diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..74f5f4a6409 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.js linguist-language=TypeScript \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 50ff61e20f4..572ac835cd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,4 @@ language: node_js node_js: - '0.10' -sudo: false - -before_script: - - npm install -g codeclimate-test-reporter - -after_script: - - cat coverage/lcov.info | codeclimate - -addons: - code_climate: - repo_token: 9852ac5362c8cc38c07ca5adc0f94c20c6c79bd78e17933dc284598a65338656 +sudo: false \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a30b2154133..92eb646f480 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Design changes will not be accepted at this time. If you have a design change pr ## Legal You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. -Please submit a Contributor License Agreement (CLA) before submitting a pull request. Download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to . Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request. Please note that we're currently only accepting pull requests of bug fixes rather than new features. +Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to . Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request. Please note that we're currently only accepting pull requests of bug fixes rather than new features. ## Housekeeping Your pull request should: diff --git a/Jakefile b/Jakefile index 4c971efe0c9..3a19812b958 100644 --- a/Jakefile +++ b/Jakefile @@ -3,6 +3,7 @@ var fs = require("fs"); var os = require("os"); var path = require("path"); +var child_process = require("child_process"); // Variables var compilerDirectory = "src/compiler/"; @@ -25,8 +26,7 @@ var thirdParty = "ThirdPartyNoticeText.txt"; var nodeModulesPathPrefix = path.resolve("./node_modules/.bin/") + path.delimiter; if (process.env.path !== undefined) { process.env.path = nodeModulesPathPrefix + process.env.path; -} -else if (process.env.PATH !== undefined) { +} else if (process.env.PATH !== undefined) { process.env.PATH = nodeModulesPathPrefix + process.env.PATH; } @@ -203,8 +203,7 @@ function concatenateFiles(destinationFile, sourceFiles) { var useDebugMode = true; var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node"); var compilerFilename = "tsc.js"; - - /* Compiles a file from a list of sources +/* Compiles a file from a list of sources * @param outFile: the target file name * @param sources: an array of the names of the source files * @param prereqs: prerequisite tasks to compiling the file @@ -215,9 +214,8 @@ var compilerFilename = "tsc.js"; * @param outDir: true to compile using --outDir * @param keepComments: false to compile using --removeComments * @param callback: a function to execute after the compilation process ends - * @async */ - function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) { +function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) { file(outFile, prereqs, function() { var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory; var options = "--module commonjs -noImplicitAny"; @@ -254,11 +252,21 @@ var compilerFilename = "tsc.js"; options += " --stripInternal" } + options += " --cacheDownlevelForOfLength --preserveNewLines"; + var cmd = host + " " + dir + compilerFilename + " " + options + " "; cmd = cmd + sources.join(" "); + console.log(cmd + "\n"); - exec(cmd, function() { - console.log("") + var ex = jake.createExec([cmd]); + // Add listeners for output and error + ex.addListener("stdout", function(output) { + process.stdout.write(output); + }); + ex.addListener("stderr", function(error) { + process.stderr.write(error); + }); + ex.addListener("cmdEnd", function() { if (!useDebugMode && prefixes && fs.existsSync(outFile)) { for (var i in prefixes) { prependFile(prefixes[i], outFile); @@ -268,14 +276,14 @@ var compilerFilename = "tsc.js"; if (callback) { callback(); } - else { - complete(); - } - }, /* errorHandler */ function() { + + complete(); + }); + ex.addListener("error", function() { fs.unlinkSync(outFile); fail("Compilation of " + outFile + " unsuccessful"); }); - + ex.run(); }, {async: true}); } @@ -318,8 +326,19 @@ compileFile(processDiagnosticMessagesJs, // The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () { var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson; - - exec(cmd); + console.log(cmd); + var ex = jake.createExec([cmd]); + // Add listeners for output and error + ex.addListener("stdout", function(output) { + process.stdout.write(output); + }); + ex.addListener("stderr", function(error) { + process.stderr.write(error); + }); + ex.addListener("cmdEnd", function() { + complete(); + }); + ex.run(); }, {async: true}) desc("Generates a diagnostic file in TypeScript based on an input JSON file"); @@ -384,7 +403,6 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright // Delete the temp dir jake.rmRf(tempDirPath, {silent: true}); - complete(); }); var serverFile = path.join(builtLocalDirectory, "tsserver.js"); @@ -433,8 +451,10 @@ compileFile(word2mdJs, file(specMd, [word2mdJs, specWord], function () { var specWordFullPath = path.resolve(specWord); var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + specMd; - - exec(cmd); + console.log(cmd); + child_process.exec(cmd, function () { + complete(); + }); }, {async: true}) @@ -485,24 +505,22 @@ var refTest262Baseline = path.join(internalTests, "baselines/test262/reference") desc("Builds the test infrastructure using the built compiler"); task("tests", ["local", run].concat(libraryTargets)); -/* Executes a command - * @param cmd: command to execute - * @param completeHandler?: a function to execute after the command ends - * @param errorHandler?: a function to execute if an error occurs - * @async - */ -function exec(cmd, completeHandler, errorHandler) { - console.log(cmd); - var ex = jake.createExec([cmd], {windowsVerbatimArguments: true, interactive: true}); +function exec(cmd, completeHandler) { + var ex = jake.createExec([cmd], {windowsVerbatimArguments: true}); + // Add listeners for output and error + ex.addListener("stdout", function(output) { + process.stdout.write(output); + }); + ex.addListener("stderr", function(error) { + process.stderr.write(error); + }); ex.addListener("cmdEnd", function() { if (completeHandler) { completeHandler(); } - else { - complete(); - } + complete(); }); - ex.addListener("error", errorHandler || function(e, status) { + ex.addListener("error", function(e, status) { fail("Process exited with code " + status); }) @@ -521,7 +539,7 @@ function cleanTestDirs() { } jake.mkdirP(localRwcBaseline); - jake.mkdirP(localTest262Baseline); + jake.mkdirP(localTest262Baseline); jake.mkdirP(localBaseline); } @@ -532,14 +550,10 @@ function writeTestConfigFile(tests, testConfigFile) { fs.writeFileSync('test.config', testConfigContents); } -/* Removes project output - * @async - */ function deleteTemporaryProjectOutput() { if (fs.existsSync(path.join(localBaseline, "projectOutput/"))) { jake.rmRf(path.join(localBaseline, "projectOutput/")); } - complete(); } var testTimeout = 20000; @@ -568,14 +582,14 @@ task("runtests", ["tests", builtLocalDirectory], function() { // timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer var cmd = host + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; - + console.log(cmd); exec(cmd, deleteTemporaryProjectOutput); }, {async: true}); desc("Generates code coverage data via instanbul") task("generate-code-coverage", ["tests", builtLocalDirectory], function () { var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run; - + console.log(cmd); exec(cmd); }, { async: true }); @@ -607,6 +621,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function( tests = tests ? tests : ''; var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests + console.log(cmd); exec(cmd); }, {async: true}); @@ -622,12 +637,14 @@ function getDiffTool() { desc("Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable"); task('diff', function () { var cmd = '"' + getDiffTool() + '" ' + refBaseline + ' ' + localBaseline; + console.log(cmd) exec(cmd); }, {async: true}); desc("Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable"); task('diff-rwc', function () { var cmd = '"' + getDiffTool() + '" ' + refRwcBaseline + ' ' + localRwcBaseline; + console.log(cmd) exec(cmd); }, {async: true}); @@ -674,6 +691,13 @@ task("webhost", [webhostJsPath], function() { jake.cpR(path.join(builtLocalDirectory, "lib.d.ts"), "tests/webhost/", {silent: true}); }); +// Perf compiler +var perftscPath = "tests/perftsc.ts"; +var perftscJsPath = "built/local/perftsc.js"; +compileFile(perftscJsPath, [perftscPath], [tscFile, perftscPath, "tests/perfsys.ts"].concat(libraryTargets), [], /*useBuiltCompiler*/ true); +desc("Builds augmented version of the compiler for perf tests"); +task("perftsc", [perftscJsPath]); + // Instrumented compiler var loggedIOpath = harnessDirectory + 'loggedIO.ts'; var loggedIOJsPath = builtLocalDirectory + 'loggedIO.js'; @@ -682,12 +706,14 @@ file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function() { jake.mkdirP(temp); var options = "--outdir " + temp + ' ' + loggedIOpath; var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " "; - - exec(cmd, function() { + console.log(cmd + "\n"); + var ex = jake.createExec([cmd]); + ex.addListener("cmdEnd", function() { fs.renameSync(temp + '/harness/loggedIO.js', loggedIOJsPath); jake.rmRf(temp); complete(); }); + ex.run(); }, {async: true}); var instrumenterPath = harnessDirectory + 'instrumenter.ts'; @@ -697,6 +723,10 @@ compileFile(instrumenterJsPath, [instrumenterPath], [tscFile, instrumenterPath], desc("Builds an instrumented tsc.js"); task('tsc-instrumented', [loggedIOJsPath, instrumenterJsPath, tscFile], function() { var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename; - - exec(cmd); + console.log(cmd); + var ex = jake.createExec([cmd]); + ex.addListener("cmdEnd", function() { + complete(); + }); + ex.run(); }, { async: true }); diff --git a/bin/lib.core.d.ts b/bin/lib.core.d.ts index a8b5fdbcf7c..132f5ffaccf 100644 --- a/bin/lib.core.d.ts +++ b/bin/lib.core.d.ts @@ -179,19 +179,19 @@ interface ObjectConstructor { * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - seal(o: any): any; + seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: any): any; + freeze(o: T): T; /** * Prevents the addition of new properties to an object. * @param o Object to make non-extensible. */ - preventExtensions(o: any): any; + preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. @@ -425,6 +425,9 @@ interface String { */ substr(from: number, length?: number): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; + [index: number]: string; } @@ -477,6 +480,9 @@ interface Number { * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { diff --git a/bin/lib.core.es6.d.ts b/bin/lib.core.es6.d.ts index b3c400f11a2..c6f3d1d1f97 100644 --- a/bin/lib.core.es6.d.ts +++ b/bin/lib.core.es6.d.ts @@ -179,19 +179,19 @@ interface ObjectConstructor { * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - seal(o: any): any; + seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: any): any; + freeze(o: T): T; /** * Prevents the addition of new properties to an object. * @param o Object to make non-extensible. */ - preventExtensions(o: any): any; + preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. @@ -425,6 +425,9 @@ interface String { */ substr(from: number, length?: number): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; + [index: number]: string; } @@ -477,6 +480,9 @@ interface Number { * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { diff --git a/bin/lib.d.ts b/bin/lib.d.ts index 02c45824aa8..e22c7351931 100644 --- a/bin/lib.d.ts +++ b/bin/lib.d.ts @@ -179,19 +179,19 @@ interface ObjectConstructor { * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - seal(o: any): any; + seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: any): any; + freeze(o: T): T; /** * Prevents the addition of new properties to an object. * @param o Object to make non-extensible. */ - preventExtensions(o: any): any; + preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. @@ -425,6 +425,9 @@ interface String { */ substr(from: number, length?: number): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; + [index: number]: string; } @@ -477,6 +480,9 @@ interface Number { * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { diff --git a/bin/lib.es6.d.ts b/bin/lib.es6.d.ts index 935f78f1603..cf849d5c72d 100644 --- a/bin/lib.es6.d.ts +++ b/bin/lib.es6.d.ts @@ -179,19 +179,19 @@ interface ObjectConstructor { * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - seal(o: any): any; + seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: any): any; + freeze(o: T): T; /** * Prevents the addition of new properties to an object. * @param o Object to make non-extensible. */ - preventExtensions(o: any): any; + preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. @@ -425,6 +425,9 @@ interface String { */ substr(from: number, length?: number): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; + [index: number]: string; } @@ -477,6 +480,9 @@ interface Number { * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { diff --git a/bin/tsc.js b/bin/tsc.js index 48eeb47befc..1d7c008595d 100644 --- a/bin/tsc.js +++ b/bin/tsc.js @@ -44,8 +44,9 @@ var ts; ts.forEach = forEach; function contains(array, value) { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (v === value) { return true; } } @@ -67,8 +68,9 @@ var ts; function countWhere(array, predicate) { var count = 0; if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (predicate(array[i])) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (predicate(v)) { count++; } } @@ -77,12 +79,13 @@ var ts; } ts.countWhere = countWhere; function filter(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (f(item)) { - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (f(_item)) { + result.push(_item); } } } @@ -90,10 +93,12 @@ var ts; } ts.filter = filter; function map(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - result.push(f(array[i])); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result.push(f(v)); } } return result; @@ -108,12 +113,14 @@ var ts; } ts.concatenate = concatenate; function deduplicate(array) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (!contains(result, item)) - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (!contains(result, _item)) { + result.push(_item); + } } } return result; @@ -121,15 +128,17 @@ var ts; ts.deduplicate = deduplicate; function sum(array, prop) { var result = 0; - for (var i = 0; i < array.length; i++) { - result += array[i][prop]; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result += v[prop]; } return result; } ts.sum = sum; function addRange(to, from) { - for (var i = 0, n = from.length; i < n; i++) { - to.push(from[i]); + for (var _i = 0, _n = from.length; _i < _n; _i++) { + var v = from[_i]; + to.push(v); } } ts.addRange = addRange; @@ -190,9 +199,9 @@ var ts; for (var id in first) { result[id] = first[id]; } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; + for (var _id in second) { + if (!hasProperty(result, _id)) { + result[_id] = second[_id]; } } return result; @@ -248,12 +257,17 @@ var ts; } ts.localizedDiagnosticMessages = undefined; function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] ? ts.localizedDiagnosticMessages[message] : message; + return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] + ? ts.localizedDiagnosticMessages[message] + : message; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + var end = start + length; Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); + Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); + Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -389,21 +403,23 @@ var ts; function getNormalizedParts(normalizedSlashedPath, rootLength) { var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); var normalized = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; + for (var _i = 0, _n = parts.length; _i < _n; _i++) { + var part = parts[_i]; if (part !== ".") { if (part === ".." && normalized.length > 0 && normalized[normalized.length - 1] !== "..") { normalized.pop(); } else { - normalized.push(part); + if (part) { + normalized.push(part); + } } } } return normalized; } function normalizePath(path) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); var normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); @@ -426,7 +442,7 @@ var ts; return [path.substr(0, rootLength)].concat(normalizedParts); } function getNormalizedPathComponents(path, currentDirectory) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { path = combinePaths(normalizeSlashes(currentDirectory), path); @@ -529,8 +545,8 @@ var ts; ts.fileExtensionIs = fileExtensionIs; var supportedExtensions = [".d.ts", ".ts", ".js"]; function removeFileExtension(path) { - for (var i = 0; i < supportedExtensions.length; i++) { - var ext = supportedExtensions[i]; + for (var _i = 0, _n = supportedExtensions.length; _i < _n; _i++) { + var ext = supportedExtensions[_i]; if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); } @@ -539,7 +555,7 @@ var ts; } ts.removeFileExtension = removeFileExtension; var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\0-\19\t\v\f\b\0\r\n\u2028\u2029\u0085]/g; + var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var escapedCharsMap = { "\0": "\\0", "\t": "\\t", @@ -554,20 +570,6 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" }; - function escapeString(s) { - s = backslashOrDoubleQuote.test(s) ? s.replace(backslashOrDoubleQuote, getReplacement) : s; - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || unicodeEscape(c); - } - function unicodeEscape(c) { - var hexCharCode = c.charCodeAt(0).toString(16); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - } - ts.escapeString = escapeString; function getDefaultLibFileName(options) { return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; } @@ -695,15 +697,16 @@ var ts; function visitDirectory(path) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var i = 0; i < files.length; i++) { - var name = files[i]; - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(ts.combinePaths(path, name)); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var _name = files[_i]; + if (!extension || ts.fileExtensionIs(_name, extension)) { + result.push(ts.combinePaths(path, _name)); } } var subfolders = getNames(folder.subfolders); - for (var i = 0; i < subfolders.length; i++) { - visitDirectory(ts.combinePaths(path, subfolders[i])); + for (var _a = 0, _b = subfolders.length; _a < _b; _a++) { + var current = subfolders[_a]; + visitDirectory(ts.combinePaths(path, current)); } } } @@ -788,8 +791,9 @@ var ts; function visitDirectory(path) { var files = _fs.readdirSync(path || ".").sort(); var directories = []; - for (var i = 0; i < files.length; i++) { - var name = ts.combinePaths(path, files[i]); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var current = files[_i]; + var name = ts.combinePaths(path, current); var stat = _fs.lstatSync(name); if (stat.isFile()) { if (!extension || ts.fileExtensionIs(name, extension)) { @@ -800,8 +804,9 @@ var ts; directories.push(name); } } - for (var i = 0; i < directories.length; i++) { - visitDirectory(directories[i]); + for (var _a = 0, _b = directories.length; _a < _b; _a++) { + var _current = directories[_a]; + visitDirectory(_current); } } } @@ -880,7 +885,6 @@ var ts; Trailing_comma_not_allowed: { code: 1009, category: 1, key: "Trailing comma not allowed." }, Asterisk_Slash_expected: { code: 1010, category: 1, key: "'*/' expected." }, Unexpected_token: { code: 1012, category: 1, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1, key: "Catch clause parameter cannot have a type annotation." }, A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1, key: "A rest parameter must be last in a parameter list." }, Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1, key: "Parameter cannot have question mark and initializer." }, A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1, key: "A required parameter cannot follow an optional parameter." }, @@ -988,7 +992,6 @@ var ts; const_declarations_must_be_initialized: { code: 1155, category: 1, key: "'const' declarations must be initialized" }, const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1, key: "'const' declarations can only be declared inside a block." }, let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1, key: "'let' declarations can only be declared inside a block." }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, Unterminated_template_literal: { code: 1160, category: 1, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: 1, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: 1, key: "An object member cannot be declared optional." }, @@ -1025,6 +1028,11 @@ var ts; External_module_0_has_no_default_export_or_export_assignment: { code: 1192, category: 1, key: "External module '{0}' has no default export or export assignment." }, An_export_declaration_cannot_have_modifiers: { code: 1193, category: 1, key: "An export declaration cannot have modifiers." }, Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: 1, key: "Export declarations are not permitted in an internal module." }, + Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: 1, key: "Catch clause variable name must be an identifier." }, + Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: 1, key: "Catch clause variable cannot have a type annotation." }, + Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: 1, key: "Catch clause variable cannot have an initializer." }, + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: 1, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, + Unterminated_Unicode_escape_sequence: { code: 1199, category: 1, key: "Unterminated Unicode escape sequence." }, Duplicate_identifier_0: { code: 2300, category: 1, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1, key: "Static members cannot reference class type parameters." }, @@ -1195,9 +1203,19 @@ var ts; Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: 1, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: 1, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: 1, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: 1, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: 1, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: 1, key: "Export declaration conflicts with exported declaration of '{0}'" }, + The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: 1, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, + Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: 1, key: "Invalid left-hand side in 'for...of' statement." }, + The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: 1, key: "The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator." }, + The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method: { code: 2489, category: 1, key: "The iterator returned by the right-hand side of a 'for...of' statement must have a 'next()' method." }, + The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: 1, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, + Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: 1, key: "Cannot redeclare identifier '{0}' in catch clause" }, + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: 1, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: 1, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, + Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: 1, key: "Type '{0}' is not an array type or a string type." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1267,6 +1285,7 @@ var ts; Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: 1, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, The_current_host_does_not_support_the_0_option: { code: 5001, category: 1, key: "The current host does not support the '{0}' option." }, Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1, key: "Cannot find the common subdirectory path for the input files." }, Cannot_read_file_0_Colon_1: { code: 5012, category: 1, key: "Cannot read file '{0}': {1}" }, @@ -1322,6 +1341,7 @@ var ts; File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: 2, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: 2, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: 2, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: 1, key: "Member '{0}' implicitly has an '{1}' type." }, @@ -1342,25 +1362,24 @@ var ts; You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: 1, key: "You cannot rename elements that are defined in the standard TypeScript library." }, yield_expressions_are_not_currently_supported: { code: 9000, category: 1, key: "'yield' expressions are not currently supported." }, Generators_are_not_currently_supported: { code: 9001, category: 1, key: "Generators are not currently supported." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." }, - for_of_statements_are_not_currently_supported: { code: 9003, category: 1, key: "'for...of' statements are not currently supported." } + The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." } }; })(ts || (ts = {})); var ts; (function (ts) { var textToToken = { - "any": 112, + "any": 111, "as": 101, - "boolean": 113, + "boolean": 112, "break": 65, "case": 66, "catch": 67, "class": 68, "continue": 70, "const": 69, - "constructor": 114, + "constructor": 113, "debugger": 71, - "declare": 115, + "declare": 114, "default": 72, "delete": 73, "do": 74, @@ -1371,43 +1390,43 @@ var ts; "false": 79, "finally": 80, "for": 81, - "from": 102, + "from": 123, "function": 82, - "get": 116, + "get": 115, "if": 83, - "implements": 103, + "implements": 102, "import": 84, "in": 85, "instanceof": 86, - "interface": 104, - "let": 105, - "module": 117, + "interface": 103, + "let": 104, + "module": 116, "new": 87, "null": 88, - "number": 119, - "package": 106, - "private": 107, - "protected": 108, - "public": 109, - "require": 118, + "number": 118, + "package": 105, + "private": 106, + "protected": 107, + "public": 108, + "require": 117, "return": 89, - "set": 120, - "static": 110, - "string": 121, + "set": 119, + "static": 109, + "string": 120, "super": 90, "switch": 91, - "symbol": 122, + "symbol": 121, "this": 92, "throw": 93, "true": 94, "try": 95, - "type": 123, + "type": 122, "typeof": 96, "var": 97, "void": 98, "while": 99, "with": 100, - "yield": 111, + "yield": 110, "of": 124, "{": 14, "}": 15, @@ -1487,17 +1506,21 @@ var ts; return false; } function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierStart) : + lookupInUnicodeMap(code, unicodeES3IdentifierStart); } ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierPart) : + lookupInUnicodeMap(code, unicodeES3IdentifierPart); } function makeReverseMap(source) { var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; + for (var _name in source) { + if (source.hasOwnProperty(_name)) { + result[source[_name]] = _name; } } return result; @@ -1673,8 +1696,8 @@ var ts; else { ts.Debug.assert(ch === 61); while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 62 && isConflictMarkerTrivia(text, pos)) { + var _ch = text.charCodeAt(pos); + if (_ch === 62 && isConflictMarkerTrivia(text, pos)) { break; } pos++; @@ -1780,6 +1803,7 @@ var ts; var token; var tokenValue; var precedingLineBreak; + var hasExtendedUnicodeEscape; var tokenIsUnterminated; function error(message, length) { if (onError) { @@ -1829,10 +1853,16 @@ var ts; } return +(text.substring(start, pos)); } - function scanHexDigits(count, mustMatchCount) { + function scanExactNumberOfHexDigits(count) { + return scanHexDigits(count, false); + } + function scanMinimumNumberOfHexDigits(count) { + return scanHexDigits(count, true); + } + function scanHexDigits(minCount, scanAsManyAsPossible) { var digits = 0; var value = 0; - while (digits < count || !mustMatchCount) { + while (digits < minCount || scanAsManyAsPossible) { var ch = text.charCodeAt(pos); if (ch >= 48 && ch <= 57) { value = value * 16 + ch - 48; @@ -1849,7 +1879,7 @@ var ts; pos++; digits++; } - if (digits < count) { + if (digits < minCount) { value = -1; } return value; @@ -1962,16 +1992,15 @@ var ts; return "\'"; case 34: return "\""; - case 120: case 117: - var ch = scanHexDigits(ch === 120 ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; + if (pos < len && text.charCodeAt(pos) === 123) { + hasExtendedUnicodeEscape = true; + pos++; + return scanExtendedUnicodeEscape(); } + return scanHexadecimalEscape(4); + case 120: + return scanHexadecimalEscape(2); case 13: if (pos < len && text.charCodeAt(pos) === 10) { pos++; @@ -1984,11 +2013,57 @@ var ts; return String.fromCharCode(ch); } } + function scanHexadecimalEscape(numDigits) { + var escapedValue = scanExactNumberOfHexDigits(numDigits); + if (escapedValue >= 0) { + return String.fromCharCode(escapedValue); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + } + function scanExtendedUnicodeEscape() { + var escapedValue = scanMinimumNumberOfHexDigits(1); + var isInvalidExtendedEscape = false; + if (escapedValue < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + isInvalidExtendedEscape = true; + } + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + isInvalidExtendedEscape = true; + } + else if (text.charCodeAt(pos) == 125) { + pos++; + } + else { + error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + return ""; + } + return utf16EncodeAsString(escapedValue); + } + function utf16EncodeAsString(codePoint) { + ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); + if (codePoint <= 65535) { + return String.fromCharCode(codePoint); + } + var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; + var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; + return String.fromCharCode(codeUnit1, codeUnit2); + } function peekUnicodeEscape() { if (pos + 5 < len && text.charCodeAt(pos + 1) === 117) { var start = pos; pos += 2; - var value = scanHexDigits(4, true); + var value = scanExactNumberOfHexDigits(4); pos = start; return value; } @@ -2020,8 +2095,8 @@ var ts; return result; } function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { + var _len = tokenValue.length; + if (_len >= 2 && _len <= 11) { var ch = tokenValue.charCodeAt(0); if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) { return token = textToToken[tokenValue]; @@ -2050,6 +2125,7 @@ var ts; } function scan() { startPos = pos; + hasExtendedUnicodeEscape = false; precedingLineBreak = false; tokenIsUnterminated = false; while (true) { @@ -2172,13 +2248,13 @@ var ts; pos += 2; var commentClosed = false; while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 && text.charCodeAt(pos + 1) === 47) { + var _ch = text.charCodeAt(pos); + if (_ch === 42 && text.charCodeAt(pos + 1) === 47) { pos += 2; commentClosed = true; break; } - if (isLineBreak(ch)) { + if (isLineBreak(_ch)) { precedingLineBreak = true; } pos++; @@ -2201,7 +2277,7 @@ var ts; case 48: if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; - var value = scanHexDigits(1, false); + var value = scanMinimumNumberOfHexDigits(1); if (value < 0) { error(ts.Diagnostics.Hexadecimal_digit_expected); value = 0; @@ -2211,22 +2287,22 @@ var ts; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) { pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { + var _value = scanBinaryOrOctalDigits(2); + if (_value < 0) { error(ts.Diagnostics.Binary_digit_expected); - value = 0; + _value = 0; } - tokenValue = "" + value; + tokenValue = "" + _value; return token = 7; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) { pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { + var _value_1 = scanBinaryOrOctalDigits(8); + if (_value_1 < 0) { error(ts.Diagnostics.Octal_digit_expected); - value = 0; + _value_1 = 0; } - tokenValue = "" + value; + tokenValue = "" + _value_1; return token = 7; } if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { @@ -2325,10 +2401,10 @@ var ts; case 126: return pos++, token = 47; case 92: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { + var cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } error(ts.Diagnostics.Invalid_character); @@ -2471,6 +2547,7 @@ var ts; getTokenPos: function () { return tokenPos; }, getTokenText: function () { return text.substring(tokenPos, pos); }, getTokenValue: function () { return tokenValue; }, + hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, isIdentifier: function () { return token === 64 || token > 100; }, isReservedWord: function () { return token >= 65 && token <= 100; }, @@ -2491,8 +2568,8 @@ var ts; (function (ts) { function getDeclarationOfKind(symbol, kind) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if (declaration.kind === kind) { return declaration; } @@ -2549,7 +2626,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 220) { + while (node && node.kind !== 221) { node = node.parent; } return node; @@ -2619,35 +2696,75 @@ var ts; return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); } ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 12288) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function getEnclosingBlockScopeContainer(node) { + var current = node; + while (current) { + if (isFunctionLike(current)) { + return current; + } + switch (current.kind) { + case 221: + case 202: + case 217: + case 200: + case 181: + case 182: + case 183: + return current; + case 174: + if (!isFunctionLike(current.parent)) { + return current; + } + } + current = current.parent; + } + } + ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; + function isCatchClauseVariableDeclaration(declaration) { + return declaration && + declaration.kind === 193 && + declaration.parent && + declaration.parent.kind === 217; + } + ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); } ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = getTokenPosOfNode(node, file); - var length = node.end - start; - return ts.createFileDiagnostic(file, start, length, 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) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); - var length = node.end - start; + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); return { - file: file, - start: start, - length: length, + file: sourceFile, + start: span.start, + length: span.length, code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText }; } ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getErrorSpanForNode(node) { - var errorSpan; + function getSpanOfTokenAtPosition(sourceFile, pos) { + var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text); + scanner.setTextPos(pos); + scanner.scan(); + var start = scanner.getTokenPos(); + return createTextSpanFromBounds(start, scanner.getTextPos()); + } + ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForNode(sourceFile, node) { + var errorNode = node; switch (node.kind) { case 193: case 150: @@ -2655,11 +2772,19 @@ var ts; case 197: case 200: case 199: - case 219: - errorSpan = node.name; + case 220: + case 195: + case 160: + errorNode = node.name; break; } - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + if (errorNode === undefined) { + return getSpanOfTokenAtPosition(sourceFile, node.pos); + } + var pos = nodeIsMissing(errorNode) + ? errorNode.pos + : ts.skipTrivia(sourceFile.text, errorNode.pos); + return createTextSpanFromBounds(pos, errorNode.end); } ts.getErrorSpanForNode = getErrorSpanForNode; function isExternalModule(file) { @@ -2667,7 +2792,7 @@ var ts; } ts.isExternalModule = isExternalModule; function isDeclarationFile(file) { - return (file.flags & 1024) !== 0; + return (file.flags & 2048) !== 0; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { @@ -2697,11 +2822,11 @@ var ts; } ts.getCombinedNodeFlags = getCombinedNodeFlags; function isConst(node) { - return !!(getCombinedNodeFlags(node) & 4096); + return !!(getCombinedNodeFlags(node) & 8192); } ts.isConst = isConst; function isLet(node) { - return !!(getCombinedNodeFlags(node) & 2048); + return !!(getCombinedNodeFlags(node) & 4096); } ts.isLet = isLet; function isPrologueDirective(node) { @@ -2734,6 +2859,7 @@ var ts; switch (node.kind) { case 186: return visitor(node); + case 202: case 174: case 178: case 179: @@ -2743,17 +2869,34 @@ var ts; case 183: case 187: case 188: - case 213: case 214: + case 215: case 189: case 191: - case 216: + case 217: return ts.forEachChild(node, traverse); } } } ts.forEachReturnStatement = forEachReturnStatement; - function isAnyFunction(node) { + function isVariableLike(node) { + if (node) { + switch (node.kind) { + case 150: + case 220: + case 128: + case 218: + case 130: + case 129: + case 219: + case 193: + return true; + } + } + return false; + } + ts.isVariableLike = isVariableLike; + function isFunctionLike(node) { if (node) { switch (node.kind) { case 133: @@ -2777,9 +2920,9 @@ var ts; } return false; } - ts.isAnyFunction = isAnyFunction; + ts.isFunctionLike = isFunctionLike; function isFunctionBlock(node) { - return node && node.kind === 174 && isAnyFunction(node.parent); + return node && node.kind === 174 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { @@ -2789,7 +2932,7 @@ var ts; function getContainingFunction(node) { while (true) { node = node.parent; - if (!node || isAnyFunction(node)) { + if (!node || isFunctionLike(node)) { return node; } } @@ -2823,7 +2966,7 @@ var ts; case 134: case 135: case 199: - case 220: + case 221: return node; } } @@ -2908,16 +3051,16 @@ var ts; } case 7: case 8: - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: case 129: - case 219: - case 217: + case 220: + case 218: case 150: - return parent.initializer === node; + return _parent.initializer === node; case 177: case 178: case 179: @@ -2925,28 +3068,28 @@ var ts; case 186: case 187: case 188: - case 213: + case 214: case 190: case 188: - return parent.expression === node; + return _parent.expression === node; case 181: - var forStatement = parent; + var forStatement = _parent; return (forStatement.initializer === node && forStatement.initializer.kind !== 194) || forStatement.condition === node || forStatement.iterator === node; case 182: case 183: - var forInStatement = parent; + var forInStatement = _parent; return (forInStatement.initializer === node && forInStatement.initializer.kind !== 194) || forInStatement.expression === node; case 158: - return node === parent.expression; + return node === _parent.expression; case 173: - return node === parent.expression; + return node === _parent.expression; case 126: - return node === parent.expression; + return node === _parent.expression; default: - if (isExpression(parent)) { + if (isExpression(_parent)) { return true; } } @@ -2961,7 +3104,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind === 212; + return node.kind === 203 && node.moduleReference.kind === 213; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -2970,20 +3113,20 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind !== 212; + return node.kind === 203 && node.moduleReference.kind !== 213; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function getExternalModuleName(node) { - if (node.kind === 203) { + if (node.kind === 204) { return node.moduleSpecifier; } - if (node.kind === 202) { + if (node.kind === 203) { var reference = node.moduleReference; - if (reference.kind === 212) { + if (reference.kind === 213) { return reference.expression; } } - if (node.kind === 209) { + if (node.kind === 210) { return node.moduleSpecifier; } } @@ -3000,8 +3143,8 @@ var ts; case 132: case 131: return node.questionToken !== undefined; + case 219: case 218: - case 217: case 130: case 129: return node.questionToken !== undefined; @@ -3027,12 +3170,12 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return node.kind === 149 || node.kind === 148; + return !!node && (node.kind === 149 || node.kind === 148); } ts.isBindingPattern = isBindingPattern; function isInAmbientContext(node) { while (node) { - if (node.flags & (2 | 1024)) { + if (node.flags & (2 | 2048)) { return true; } node = node.parent; @@ -3042,31 +3185,33 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 127: - case 128: - case 193: + case 161: case 150: - case 130: - case 129: - case 217: - case 218: - case 219: + case 196: + case 133: + case 199: + case 220: + case 212: + case 195: + case 160: + case 134: + case 205: + case 203: + case 208: + case 197: case 132: case 131: - case 195: - case 134: - case 135: - case 133: - case 196: - case 197: - case 198: - case 199: case 200: - case 202: - case 204: - case 207: - case 205: - case 211: + case 206: + case 128: + case 218: + case 130: + case 129: + case 135: + case 219: + case 198: + case 127: + case 193: return true; } return false; @@ -3092,34 +3237,36 @@ var ts; case 175: case 180: case 187: - case 208: + case 209: return true; default: return false; } } ts.isStatement = isStatement; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + function isDeclarationName(name) { if (name.kind !== 64 && name.kind !== 8 && name.kind !== 7) { return false; } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 160) { - return parent.name === name; + var _parent = name.parent; + if (_parent.kind === 208 || _parent.kind === 212) { + if (_parent.propertyName) { + return true; + } } - if (parent.kind === 216) { - return parent.name === name; + if (isDeclaration(_parent)) { + return _parent.name === name; } return false; } - ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; + ts.isDeclarationName = isDeclarationName; function getClassBaseTypeNode(node) { var heritageClause = getHeritageClause(node.heritageClauses, 78); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassBaseTypeNode = getClassBaseTypeNode; function getClassImplementedTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 103); + var heritageClause = getHeritageClause(node.heritageClauses, 102); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementedTypeNodes = getClassImplementedTypeNodes; @@ -3130,9 +3277,10 @@ var ts; ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; function getHeritageClause(clauses, kind) { if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; + for (var _i = 0, _n = clauses.length; _i < _n; _i++) { + var clause = clauses[_i]; + if (clause.token === kind) { + return clause; } } } @@ -3233,13 +3381,14 @@ var ts; ts.isESSymbolIdentifier = isESSymbolIdentifier; function isModifier(token) { switch (token) { - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: case 77: - case 115: + case 114: case 69: + case 72: return true; } return false; @@ -3354,6 +3503,42 @@ var ts; return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; + function nodeStartsNewLexicalEnvironment(n) { + return isFunctionLike(n) || n.kind === 200 || n.kind === 221; + } + ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; + function nodeIsSynthesized(node) { + return node.pos === -1; + } + ts.nodeIsSynthesized = nodeIsSynthesized; + function createSynthesizedNode(kind, startsOnNewLine) { + var node = ts.createNode(kind); + node.pos = -1; + node.end = -1; + node.startsOnNewLine = startsOnNewLine; + return node; + } + ts.createSynthesizedNode = createSynthesizedNode; + function generateUniqueName(baseName, isExistingName) { + if (baseName.charCodeAt(0) !== 95) { + baseName = "_" + baseName; + if (!isExistingName(baseName)) { + return baseName; + } + } + if (baseName.charCodeAt(baseName.length - 1) !== 95) { + baseName += "_"; + } + var i = 1; + while (true) { + var _name = baseName + i; + if (!isExistingName(_name)) { + return _name; + } + i++; + } + } + ts.generateUniqueName = generateUniqueName; function createDiagnosticCollection() { var nonFileDiagnostics = []; var fileDiagnostics = {}; @@ -3419,10 +3604,45 @@ var ts; } } 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 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; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(222); + var nodeConstructors = new Array(223); ts.parseTime = 0; function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); @@ -3444,8 +3664,9 @@ var ts; } function visitEachNode(cbNode, nodes) { if (nodes) { - for (var i = 0, len = nodes.length; i < len; i++) { - var result = cbNode(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + var result = cbNode(node); if (result) { return result; } @@ -3469,8 +3690,8 @@ var ts; case 128: case 130: case 129: - case 217: case 218: + case 219: case 193: case 150: return visitNodes(cbNodes, node.modifiers) || @@ -3529,6 +3750,7 @@ var ts; return visitNodes(cbNodes, node.properties); case 153: return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); case 154: return visitNode(cbNode, node.expression) || @@ -3565,14 +3787,16 @@ var ts; visitNode(cbNode, node.right); case 168: return visitNode(cbNode, node.condition) || + visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || + visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); case 171: return visitNode(cbNode, node.expression); case 174: case 201: return visitNodes(cbNodes, node.statements); - case 220: + case 221: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); case 175: @@ -3615,11 +3839,13 @@ var ts; visitNode(cbNode, node.statement); case 188: return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.clauses); - case 213: + visitNode(cbNode, node.caseBlock); + case 202: + return visitNodes(cbNodes, node.clauses); + case 214: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 214: + case 215: return visitNodes(cbNodes, node.statements); case 189: return visitNode(cbNode, node.label) || @@ -3630,9 +3856,8 @@ var ts; return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 216: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type) || + case 217: + return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); case 196: return visitNodes(cbNodes, node.modifiers) || @@ -3654,49 +3879,49 @@ var ts; return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 219: + case 220: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); case 200: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 202: + case 203: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 203: + case 204: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 204: + case 205: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 205: - return visitNode(cbNode, node.name); case 206: - case 210: + return visitNode(cbNode, node.name); + case 207: + case 211: return visitNodes(cbNodes, node.elements); - case 209: + case 210: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 207: - case 211: + case 208: + case 212: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 208: + case 209: return visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportName); + visitNode(cbNode, node.expression); case 169: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); case 173: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); case 126: return visitNode(cbNode, node.expression); - case 215: + case 216: return visitNodes(cbNodes, node.types); - case 212: + case 213: return visitNode(cbNode, node.expression); } } @@ -3729,28 +3954,29 @@ var ts; ; function modifierToFlag(token) { switch (token) { - case 110: return 128; - case 109: return 16; - case 108: return 64; - case 107: return 32; + case 109: return 128; + case 108: return 16; + case 107: return 64; + case 106: return 32; case 77: return 1; - case 115: return 2; - case 69: return 4096; + case 114: return 2; + case 69: return 8192; + case 72: return 256; } return 0; } ts.modifierToFlag = modifierToFlag; function fixupParentReferences(sourceFile) { - var parent = sourceFile; + var _parent = sourceFile; forEachChild(sourceFile, visitNode); return; function visitNode(n) { - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; + if (n.parent !== _parent) { + n.parent = _parent; + var saveParent = _parent; + _parent = n; forEachChild(n, visitNode); - parent = saveParent; + _parent = saveParent; } } } @@ -3788,8 +4014,9 @@ var ts; array._children = undefined; array.pos += delta; array.end += delta; - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } } } @@ -3851,8 +4078,9 @@ var ts; array.intersectsChange = true; array._children = undefined; adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } return; } @@ -4049,7 +4277,7 @@ var ts; var identifierCount = 0; var nodeCount = 0; var token; - var sourceFile = createNode(220, 0); + var sourceFile = createNode(221, 0); sourceFile.pos = 0; sourceFile.end = sourceText.length; sourceFile.text = sourceText; @@ -4057,7 +4285,7 @@ var ts; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 1024 : 0; + sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 : 0; var contextFlags = 0; var parseErrorBeforeNextFinishedNode = false; var scanner = ts.createScanner(languageVersion, true, sourceText, scanError); @@ -4145,8 +4373,8 @@ var ts; } function parseErrorAtCurrentToken(message, arg0) { var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); + var _length = scanner.getTextPos() - start; + parseErrorAtPosition(start, _length, message, arg0); } function parseErrorAtPosition(start, length, message, arg0) { var lastError = ts.lastOrUndefined(sourceFile.parseDiagnostics); @@ -4185,7 +4413,9 @@ var ts; var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; var saveContextFlags = contextFlags; - var result = isLookAhead ? scanner.lookAhead(callback) : scanner.tryScan(callback); + var result = isLookAhead + ? scanner.lookAhead(callback) + : scanner.tryScan(callback); ts.Debug.assert(saveContextFlags === contextFlags); if (!result || isLookAhead) { token = saveToken; @@ -4204,10 +4434,10 @@ var ts; if (token === 64) { return true; } - if (token === 111 && inYieldContext()) { + if (token === 110 && inYieldContext()) { return false; } - return inStrictModeContext() ? token > 111 : token > 100; + return inStrictModeContext() ? token > 110 : token > 100; } function parseExpected(kind, diagnosticMessage) { if (token === kind) { @@ -4231,12 +4461,14 @@ var ts; } function parseOptionalToken(t) { if (token === t) { - var node = createNode(t); - nextToken(); - return finishNode(node); + return parseTokenNode(); } return undefined; } + function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { + return parseOptionalToken(t) || + createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); + } function parseTokenNode() { var node = createNode(token); nextToken(); @@ -4355,13 +4587,26 @@ var ts; } if (token === 77) { nextToken(); + if (token === 72) { + return lookAhead(nextTokenIsClassOrFunction); + } return token !== 35 && token !== 14 && canFollowModifier(); } + if (token === 72) { + return nextTokenIsClassOrFunction(); + } nextToken(); return canFollowModifier(); } function canFollowModifier() { - return token === 18 || token === 14 || token === 35 || isLiteralPropertyName(); + return token === 18 + || token === 14 + || token === 35 + || isLiteralPropertyName(); + } + function nextTokenIsClassOrFunction() { + nextToken(); + return token === 68 || token === 82; } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -4415,7 +4660,7 @@ var ts; return isIdentifier(); } function isNotHeritageClauseTypeName() { - if (token === 103 || + if (token === 102 || token === 78) { return lookAhead(nextTokenIsIdentifier); } @@ -4439,11 +4684,11 @@ var ts; case 4: return token === 15 || token === 66 || token === 72; case 8: - return token === 14 || token === 78 || token === 103; + return token === 14 || token === 78 || token === 102; case 9: return isVariableDeclaratorListTerminator(); case 16: - return token === 25 || token === 16 || token === 14 || token === 78 || token === 103; + return token === 25 || token === 16 || token === 14 || token === 78 || token === 102; case 12: return token === 17 || token === 22; case 14: @@ -4582,10 +4827,10 @@ var ts; function isReusableModuleElement(node) { if (node) { switch (node.kind) { + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 196: case 197: case 200: @@ -4613,8 +4858,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 213: case 214: + case 215: return true; } } @@ -4649,7 +4894,7 @@ var ts; return false; } function isReusableEnumMember(node) { - return node.kind === 219; + return node.kind === 220; } function isReusableTypeMember(node) { if (node) { @@ -4779,7 +5024,7 @@ var ts; literal = parseLiteralNode(); } else { - literal = createMissingNode(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); + literal = parseExpectedToken(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); } span.literal = literal; return finishNode(span); @@ -4788,14 +5033,19 @@ var ts; 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 === 7 && sourceText.charCodeAt(tokenPos) === 48 && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 8192; + if (node.kind === 7 + && sourceText.charCodeAt(tokenPos) === 48 + && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { + node.flags |= 16384; } return node; } @@ -4833,7 +5083,9 @@ var ts; } function parseParameterType() { if (parseOptional(51)) { - return token === 8 ? parseLiteralNode(true) : parseType(); + return token === 8 + ? parseLiteralNode(true) + : parseType(); } return undefined; } @@ -4948,11 +5200,11 @@ var ts; } function parsePropertyOrMethodSignature() { var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (token === 16 || token === 24) { var method = createNode(131, fullStart); - method.name = name; + method.name = _name; method.questionToken = questionToken; fillSignature(51, false, false, method); parseTypeMemberSemicolon(); @@ -4960,7 +5212,7 @@ var ts; } else { var property = createNode(129, fullStart); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); @@ -5003,7 +5255,9 @@ var ts; case 24: return parseSignatureMember(136); case 18: - return isIndexSignature() ? parseIndexSignatureDeclaration(undefined) : parsePropertyOrMethodSignature(); + return isIndexSignature() + ? parseIndexSignatureDeclaration(undefined) + : parsePropertyOrMethodSignature(); case 87: if (lookAhead(isStartOfConstructSignature)) { return parseSignatureMember(137); @@ -5025,7 +5279,9 @@ var ts; } function parseIndexSignatureWithModifiers() { var modifiers = parseModifiers(); - return isIndexSignature() ? parseIndexSignatureDeclaration(modifiers) : undefined; + return isIndexSignature() + ? parseIndexSignatureDeclaration(modifiers) + : undefined; } function isStartOfConstructSignature() { nextToken(); @@ -5073,11 +5329,11 @@ var ts; } function parseNonArrayType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 98: @@ -5096,11 +5352,11 @@ var ts; } function isStartOfType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 96: case 14: @@ -5221,7 +5477,7 @@ var ts; case 39: case 24: case 64: - case 111: + case 110: return true; default: if (isBinaryOperator()) { @@ -5268,7 +5524,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token === 111) { + if (token === 110) { if (inYieldContext()) { return true; } @@ -5283,6 +5539,11 @@ var ts; nextToken(); return !scanner.hasPrecedingLineBreak() && isIdentifier(); } + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === 14 || token === 18); + } function parseYieldExpression() { var node = createNode(170); nextToken(); @@ -5314,7 +5575,9 @@ var ts; if (triState === 0) { return undefined; } - var arrowFunction = triState === 1 ? parseParenthesizedArrowFunctionExpressionHead(true) : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); + var arrowFunction = triState === 1 + ? parseParenthesizedArrowFunctionExpressionHead(true) + : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); if (!arrowFunction) { return undefined; } @@ -5393,13 +5656,15 @@ var ts; return parseAssignmentExpressionOrHigher(); } function parseConditionalExpressionRest(leftOperand) { - if (!parseOptional(50)) { + var questionToken = parseOptionalToken(50); + if (!questionToken) { return leftOperand; } var node = createNode(168, leftOperand.pos); node.condition = leftOperand; + node.questionToken = questionToken; node.whenTrue = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(51); + node.colonToken = parseExpectedToken(51, false, ts.Diagnostics._0_expected, ts.tokenToString(51)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -5534,7 +5799,9 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token === 90 ? parseSuperExpression() : parseMemberExpressionOrHigher(); + var expression = token === 90 + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); } function parseMemberExpressionOrHigher() { @@ -5548,7 +5815,7 @@ var ts; } var node = createNode(153, expression.pos); node.expression = expression; - parseExpected(20, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.dotToken = parseExpectedToken(20, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -5562,10 +5829,11 @@ var ts; } function parseMemberExpressionRest(expression) { while (true) { - var dotOrBracketStart = scanner.getTokenPos(); - if (parseOptional(20)) { + var dotToken = parseOptionalToken(20); + if (dotToken) { var propertyAccess = createNode(153, expression.pos); propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; @@ -5587,7 +5855,9 @@ var ts; if (token === 10 || token === 11) { var tagExpression = createNode(157, expression.pos); tagExpression.tag = expression; - tagExpression.template = token === 10 ? parseLiteralNode() : parseTemplateExpression(); + tagExpression.template = token === 10 + ? parseLiteralNode() + : parseTemplateExpression(); expression = finishNode(tagExpression); continue; } @@ -5610,10 +5880,10 @@ var ts; continue; } else if (token === 16) { - var callExpr = createNode(155, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); + var _callExpr = createNode(155, expression.pos); + _callExpr.expression = expression; + _callExpr.arguments = parseArgumentList(); + expression = finishNode(_callExpr); continue; } return expression; @@ -5633,7 +5903,9 @@ var ts; if (!parseExpected(25)) { return undefined; } - return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined; + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } function canFollowTypeArgumentsInExpression() { switch (token) { @@ -5708,7 +5980,9 @@ var ts; return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token === 21 ? parseSpreadElement() : token === 23 ? createNode(172) : parseAssignmentExpressionOrHigher(); + return token === 21 ? parseSpreadElement() : + token === 23 ? createNode(172) : + parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return allowInAnd(parseArgumentOrArrayLiteralElement); @@ -5717,16 +5991,16 @@ var ts; var node = createNode(151); parseExpected(18); if (scanner.hasPrecedingLineBreak()) - node.flags |= 256; + node.flags |= 512; node.elements = parseDelimitedList(14, parseArgumentOrArrayLiteralElement); parseExpected(19); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, modifiers) { - if (parseContextualModifier(116)) { + if (parseContextualModifier(115)) { return parseAccessorDeclaration(134, fullStart, modifiers); } - else if (parseContextualModifier(120)) { + else if (parseContextualModifier(119)) { return parseAccessorDeclaration(135, fullStart, modifiers); } return undefined; @@ -5747,13 +6021,13 @@ var ts; return parseMethodDeclaration(fullStart, modifiers, asteriskToken, propertyName, questionToken); } if ((token === 23 || token === 15) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(218, fullStart); + var shorthandDeclaration = createNode(219, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(217, fullStart); + var propertyAssignment = createNode(218, fullStart); propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; parseExpected(51); @@ -5765,7 +6039,7 @@ var ts; var node = createNode(152); parseExpected(14); if (scanner.hasPrecedingLineBreak()) { - node.flags |= 256; + node.flags |= 512; } node.properties = parseDelimitedList(13, parseObjectLiteralElement, true); parseExpected(15); @@ -5852,7 +6126,7 @@ var ts; parseExpected(16); var initializer = undefined; if (token !== 22) { - if (token === 97 || token === 105 || token === 69) { + if (token === 97 || token === 104 || token === 69) { initializer = parseVariableDeclarationList(true); } else { @@ -5919,7 +6193,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(213); + var node = createNode(214); parseExpected(66); node.expression = allowInAnd(parseExpression); parseExpected(51); @@ -5927,7 +6201,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(214); + var node = createNode(215); parseExpected(72); parseExpected(51); node.statements = parseList(4, false, parseStatement); @@ -5942,9 +6216,11 @@ var ts; parseExpected(16); node.expression = allowInAnd(parseExpression); parseExpected(17); + var caseBlock = createNode(202, scanner.getStartPos()); parseExpected(14); - node.clauses = parseList(3, false, parseCaseOrDefaultClause); + caseBlock.clauses = parseList(3, false, parseCaseOrDefaultClause); parseExpected(15); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { @@ -5966,11 +6242,11 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(216); + var result = createNode(217); parseExpected(67); - parseExpected(16); - result.name = parseIdentifier(); - result.type = parseTypeAnnotation(); + if (parseExpected(16)) { + result.variableDeclaration = parseVariableDeclaration(); + } parseExpected(17); result.block = parseBlock(false, false); return finishNode(result); @@ -6009,7 +6285,7 @@ var ts; return !inErrorRecovery; case 14: case 97: - case 105: + case 104: case 82: case 83: case 74: @@ -6029,18 +6305,18 @@ var ts; case 69: var isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; - case 104: + case 103: case 68: - case 117: + case 116: case 76: - case 123: + case 122: if (isDeclarationStart()) { return false; } - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: if (lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine)) { return false; } @@ -6093,7 +6369,7 @@ var ts; return parseTryStatement(); case 71: return parseDebuggerStatement(); - case 105: + case 104: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined); } @@ -6117,7 +6393,7 @@ var ts; return undefined; } return parseVariableStatement(start, modifiers); - case 105: + case 104: if (!isLetDeclaration()) { return undefined; } @@ -6200,11 +6476,11 @@ var ts; switch (token) { case 97: break; - case 105: - node.flags |= 2048; + case 104: + node.flags |= 4096; break; case 69: - node.flags |= 4096; + node.flags |= 8192; break; default: ts.Debug.fail(); @@ -6236,7 +6512,7 @@ var ts; setModifiers(node, modifiers); parseExpected(82); node.asteriskToken = parseOptionalToken(35); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); fillSignature(51, !!node.asteriskToken, false, node); node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); return finishNode(node); @@ -6244,7 +6520,7 @@ var ts; function parseConstructorDeclaration(pos, modifiers) { var node = createNode(133, pos); setModifiers(node, modifiers); - parseExpected(114); + parseExpected(113); fillSignature(51, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); return finishNode(node); @@ -6261,15 +6537,15 @@ var ts; } function parsePropertyOrMethodDeclaration(fullStart, modifiers) { var asteriskToken = parseOptionalToken(35); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (asteriskToken || token === 16 || token === 24) { - return parseMethodDeclaration(fullStart, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + return parseMethodDeclaration(fullStart, modifiers, asteriskToken, _name, questionToken, ts.Diagnostics.or_expected); } else { var property = createNode(130, fullStart); setModifiers(property, modifiers); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); property.initializer = allowInAnd(parseNonParameterInitializer); @@ -6305,7 +6581,7 @@ var ts; return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 120 || idToken === 116) { + if (!ts.isKeyword(idToken) || idToken === 119 || idToken === 115) { return true; } switch (token) { @@ -6350,7 +6626,7 @@ var ts; if (accessor) { return accessor; } - if (token === 114) { + if (token === 113) { return parseConstructorDeclaration(fullStart, modifiers); } if (isIndexSignature()) { @@ -6369,11 +6645,13 @@ var ts; var node = createNode(196, fullStart); setModifiers(node, modifiers); parseExpected(68); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(true); if (parseExpected(14)) { - node.members = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseClassMembers) : parseClassMembers(); + node.members = inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseClassMembers) + : parseClassMembers(); parseExpected(15); } else { @@ -6383,7 +6661,9 @@ var ts; } function parseHeritageClauses(isClassHeritageClause) { if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() ? doOutsideOfYieldContext(parseHeritageClausesWorker) : parseHeritageClausesWorker(); + return isClassHeritageClause && inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseHeritageClausesWorker) + : parseHeritageClausesWorker(); } return undefined; } @@ -6391,8 +6671,8 @@ var ts; return parseList(19, false, parseHeritageClause); } function parseHeritageClause() { - if (token === 78 || token === 103) { - var node = createNode(215); + if (token === 78 || token === 102) { + var node = createNode(216); node.token = token; nextToken(); node.types = parseDelimitedList(8, parseTypeReference); @@ -6401,7 +6681,7 @@ var ts; return undefined; } function isHeritageClause() { - return token === 78 || token === 103; + return token === 78 || token === 102; } function parseClassMembers() { return parseList(6, false, parseClassElement); @@ -6409,7 +6689,7 @@ var ts; function parseInterfaceDeclaration(fullStart, modifiers) { var node = createNode(197, fullStart); setModifiers(node, modifiers); - parseExpected(104); + parseExpected(103); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(false); @@ -6419,7 +6699,7 @@ var ts; function parseTypeAliasDeclaration(fullStart, modifiers) { var node = createNode(198, fullStart); setModifiers(node, modifiers); - parseExpected(123); + parseExpected(122); node.name = parseIdentifier(); parseExpected(52); node.type = parseType(); @@ -6427,7 +6707,7 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(219, scanner.getStartPos()); + var node = createNode(220, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); @@ -6462,7 +6742,9 @@ var ts; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(20) ? parseInternalModuleTail(getNodePos(), undefined, 1) : parseModuleBlock(); + node.body = parseOptional(20) + ? parseInternalModuleTail(getNodePos(), undefined, 1) + : parseModuleBlock(); return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, modifiers) { @@ -6473,11 +6755,13 @@ var ts; return finishNode(node); } function parseModuleDeclaration(fullStart, modifiers) { - parseExpected(117); - return token === 8 ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); + parseExpected(116); + return token === 8 + ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) + : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); } function isExternalModuleReference() { - return token === 118 && + return token === 117 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { @@ -6486,7 +6770,7 @@ var ts; function nextTokenIsCommaOrFromKeyword() { nextToken(); return token === 23 || - token === 102; + token === 123; } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers) { parseExpected(84); @@ -6494,8 +6778,8 @@ var ts; var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token !== 23 && token !== 102) { - var importEqualsDeclaration = createNode(202, fullStart); + if (token !== 23 && token !== 123) { + var importEqualsDeclaration = createNode(203, fullStart); setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; parseExpected(52); @@ -6504,35 +6788,37 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(203, fullStart); + var importDeclaration = createNode(204, fullStart); setModifiers(importDeclaration, modifiers); if (identifier || token === 35 || token === 14) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(102); + parseExpected(123); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(204, fullStart); + var importClause = createNode(205, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(23)) { - importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(206); + importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(207); } return finishNode(importClause); } function parseModuleReference() { - return isExternalModuleReference() ? parseExternalModuleReference() : parseEntityName(false); + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(212); - parseExpected(118); + var node = createNode(213); + parseExpected(117); parseExpected(16); node.expression = parseModuleSpecifier(); parseExpected(17); @@ -6546,7 +6832,7 @@ var ts; return result; } function parseNamespaceImport() { - var namespaceImport = createNode(205); + var namespaceImport = createNode(206); parseExpected(35); parseExpected(101); namespaceImport.name = parseIdentifier(); @@ -6554,14 +6840,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(20, kind === 206 ? parseImportSpecifier : parseExportSpecifier, 14, 15); + node.elements = parseBracketedList(20, kind === 207 ? parseImportSpecifier : parseExportSpecifier, 14, 15); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(211); + return parseImportOrExportSpecifier(212); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(207); + return parseImportOrExportSpecifier(208); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -6587,30 +6873,36 @@ var ts; return finishNode(node); } function parseExportDeclaration(fullStart, modifiers) { - var node = createNode(209, fullStart); + var node = createNode(210, fullStart); setModifiers(node, modifiers); if (parseOptional(35)) { - parseExpected(102); + parseExpected(123); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(210); - if (parseOptional(102)) { + node.exportClause = parseNamedImportsOrExports(211); + if (parseOptional(123)) { node.moduleSpecifier = parseModuleSpecifier(); } } parseSemicolon(); return finishNode(node); } - function parseExportAssignmentTail(fullStart, modifiers) { - var node = createNode(208, fullStart); + function parseExportAssignment(fullStart, modifiers) { + var node = createNode(209, fullStart); setModifiers(node, modifiers); - node.exportName = parseIdentifier(); + if (parseOptional(52)) { + node.isExportEquals = true; + } + else { + parseExpected(72); + } + node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); return finishNode(node); } function isLetDeclaration() { - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOnSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart() { switch (token) { @@ -6618,24 +6910,24 @@ var ts; case 69: case 82: return true; - case 105: + case 104: return isLetDeclaration(); case 68: - case 104: + case 103: case 76: - case 123: + case 122: return lookAhead(nextTokenIsIdentifierOrKeyword); case 84: return lookAhead(nextTokenCanFollowImportKeyword); - case 117: + case 116: return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral); case 77: return lookAhead(nextTokenCanFollowExportKeyword); - case 115: - case 109: - case 107: + case 114: case 108: - case 110: + case 106: + case 107: + case 109: return lookAhead(nextTokenIsDeclarationStart); } } @@ -6658,7 +6950,7 @@ var ts; function nextTokenCanFollowExportKeyword() { nextToken(); return token === 52 || token === 35 || - token === 14 || isDeclarationStart(); + token === 14 || token === 72 || isDeclarationStart(); } function nextTokenIsDeclarationStart() { nextToken(); @@ -6672,8 +6964,8 @@ var ts; var modifiers = parseModifiers(); if (token === 77) { nextToken(); - if (parseOptional(52)) { - return parseExportAssignmentTail(fullStart, modifiers); + if (token === 72 || token === 52) { + return parseExportAssignment(fullStart, modifiers); } if (token === 35 || token === 14) { return parseExportDeclaration(fullStart, modifiers); @@ -6681,20 +6973,20 @@ var ts; } switch (token) { case 97: - case 105: + case 104: case 69: return parseVariableStatement(fullStart, modifiers); case 82: return parseFunctionDeclaration(fullStart, modifiers); case 68: return parseClassDeclaration(fullStart, modifiers); - case 104: + case 103: return parseInterfaceDeclaration(fullStart, modifiers); - case 123: + case 122: return parseTypeAliasDeclaration(fullStart, modifiers); case 76: return parseEnumDeclaration(fullStart, modifiers); - case 117: + case 116: return parseModuleDeclaration(fullStart, modifiers); case 84: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers); @@ -6712,7 +7004,9 @@ var ts; return parseSourceElementOrModuleElement(); } function parseSourceElementOrModuleElement() { - return isDeclarationStart() ? parseDeclaration() : parseStatement(); + return isDeclarationStart() + ? parseDeclaration() + : parseStatement(); } function processReferenceComments(sourceFile) { var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); @@ -6770,7 +7064,13 @@ var ts; } function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 1 || node.kind === 202 && node.moduleReference.kind === 212 || node.kind === 203 || node.kind === 208 || node.kind === 209 ? node : undefined; + return node.flags & 1 + || node.kind === 203 && node.moduleReference.kind === 213 + || node.kind === 204 + || node.kind === 209 + || node.kind === 210 + ? node + : undefined; }); } } @@ -6818,7 +7118,7 @@ var ts; else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 203 || node.kind === 202) && !(node.flags & 1)) { + else if ((node.kind === 204 || node.kind === 203) && !(node.flags & 1)) { return 0; } else if (node.kind === 201) { @@ -6852,7 +7152,7 @@ var ts; } ts.bindSourceFile = bindSourceFile; function bindSourceFileWorker(file) { - var parent; + var _parent; var container; var blockScopeContainer; var lastContainer; @@ -6860,7 +7160,8 @@ var ts; var Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { file.locals = {}; - container = blockScopeContainer = file; + container = file; + setBlockScopeContainer(file, false); bind(file); file.symbolCount = symbolCount; } @@ -6868,6 +7169,12 @@ var ts; symbolCount++; return new Symbol(flags, name); } + function setBlockScopeContainer(node, cleanLocals) { + blockScopeContainer = node; + if (cleanLocals) { + blockScopeContainer.locals = undefined; + } + } function addDeclarationToSymbol(symbol, node, symbolKind) { symbol.flags |= symbolKind; if (!symbol.declarations) @@ -6904,6 +7211,13 @@ var ts; return "__new"; case 138: return "__index"; + case 210: + return "__export"; + case 209: + return "default"; + case 195: + case 196: + return node.flags & 256 ? "default" : undefined; } } function getDisplayName(node) { @@ -6911,19 +7225,22 @@ var ts; } function declareSymbol(symbols, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); - var name = getDeclarationName(node); - if (name !== undefined) { - var symbol = ts.hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); + var _name = node.flags & 256 && parent ? "default" : getDeclarationName(node); + var symbol; + if (_name !== undefined) { + symbol = ts.hasProperty(symbols, _name) ? symbols[_name] : (symbols[_name] = createSymbol(0, _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; + var message = symbol.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name, message, getDisplayName(node))); - symbol = createSymbol(0, name); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); + symbol = createSymbol(0, _name); } } else { @@ -6955,7 +7272,7 @@ var ts; function declareModuleMember(node, symbolKind, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 1; if (symbolKind & 8388608) { - if (node.kind === 211 || (node.kind === 202 && hasExportModifier)) { + if (node.kind === 212 || (node.kind === 203 && hasExportModifier)) { declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); } else { @@ -6980,10 +7297,10 @@ var ts; if (symbolKind & 255504) { node.locals = {}; } - var saveParent = parent; + var saveParent = _parent; var saveContainer = container; var savedBlockScopeContainer = blockScopeContainer; - parent = node; + _parent = node; if (symbolKind & 262128) { container = node; if (lastContainer) { @@ -6992,11 +7309,11 @@ var ts; lastContainer = container; } if (isBlockScopeContainer) { - blockScopeContainer = node; + setBlockScopeContainer(node, (symbolKind & 255504) === 0 && node.kind !== 221); } ts.forEachChild(node, bind); container = saveContainer; - parent = saveParent; + _parent = saveParent; blockScopeContainer = savedBlockScopeContainer; } function bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer) { @@ -7004,7 +7321,7 @@ var ts; case 200: declareModuleMember(node, symbolKind, symbolExcludes); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolKind, symbolExcludes); break; @@ -7060,12 +7377,6 @@ var ts; } } } - function bindExportDeclaration(node) { - if (!node.exportClause) { - (container.exportStars || (container.exportStars = [])).push(node); - } - bindChildren(node, 0, false); - } function bindFunctionOrConstructorType(node) { var symbol = createSymbol(131072, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072); @@ -7081,21 +7392,14 @@ var ts; bindChildren(node, symbolKind, isBlockScopeContainer); } function bindCatchVariableDeclaration(node) { - var symbol = createSymbol(1, node.name.text || "__missing"); - addDeclarationToSymbol(symbol, node, 1); - var saveParent = parent; - var savedBlockScopeContainer = blockScopeContainer; - parent = blockScopeContainer = node; - ts.forEachChild(node, bind); - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; + bindChildren(node, 0, true); } function bindBlockScopedVariableDeclaration(node) { switch (blockScopeContainer.kind) { case 200: declareModuleMember(node, 2, 107455); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, 2, 107455); break; @@ -7112,7 +7416,7 @@ var ts; return "__" + ts.indexOf(node.parent.parameters, node); } function bind(node) { - node.parent = parent; + node.parent = _parent; switch (node.kind) { case 127: bindDeclaration(node, 262144, 530912, false); @@ -7125,7 +7429,7 @@ var ts; if (ts.isBindingPattern(node.name)) { bindChildren(node, 0, false); } - else if (ts.getCombinedNodeFlags(node) & 6144) { + else if (ts.isBlockOrCatchScoped(node)) { bindBlockScopedVariableDeclaration(node); } else { @@ -7136,11 +7440,11 @@ var ts; case 129: bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455, false); break; - case 217: case 218: + case 219: bindPropertyOrMethodOrAccessor(node, 4, 107455, false); break; - case 219: + case 220: bindPropertyOrMethodOrAccessor(node, 8, 107455, false); break; case 136: @@ -7178,7 +7482,7 @@ var ts; case 161: bindAnonymousDeclaration(node, 16, "__function", true); break; - case 216: + case 217: bindCatchVariableDeclaration(node); break; case 196: @@ -7201,16 +7505,13 @@ var ts; case 200: bindModuleDeclaration(node); break; - case 202: - case 205: - case 207: - case 211: + case 203: + case 206: + case 208: + case 212: bindDeclaration(node, 8388608, 8388608, false); break; - case 209: - bindExportDeclaration(node); - break; - case 204: + case 205: if (node.name) { bindDeclaration(node, 8388608, 8388608, false); } @@ -7218,26 +7519,41 @@ var ts; bindChildren(node, 0, false); } break; - case 220: + case 210: + if (!node.exportClause) { + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); + } + bindChildren(node, 0, false); + break; + case 209: + if (node.expression.kind === 64) { + declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 8388608); + } + else { + declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455); + } + bindChildren(node, 0, false); + break; + case 221: if (ts.isExternalModule(node)) { bindAnonymousDeclaration(node, 512, '"' + ts.removeFileExtension(node.fileName) + '"', true); break; } case 174: - bindChildren(node, 0, !ts.isAnyFunction(node.parent)); + bindChildren(node, 0, !ts.isFunctionLike(node.parent)); break; - case 216: + case 217: case 181: case 182: case 183: - case 188: + case 202: bindChildren(node, 0, true); break; default: - var saveParent = parent; - parent = node; + var saveParent = _parent; + _parent = node; ts.forEachChild(node, bind); - parent = saveParent; + _parent = saveParent; } } function bindParameter(node) { @@ -7280,6 +7596,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var languageVersion = compilerOptions.target || 0; var emitResolver = createResolver(); + var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); + var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var checker = { getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, @@ -7312,11 +7630,10 @@ var ts; isValidPropertyAccess: isValidPropertyAccess, getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveImport, - getEmitResolver: getEmitResolver + getAliasedSymbol: resolveAlias, + getEmitResolver: getEmitResolver, + getExportsOfExternalModule: getExportsOfExternalModule }; - var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); - var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var unknownSymbol = createSymbol(4 | 67108864, "unknown"); var resolvingSymbol = createSymbol(67108864, "__resolving__"); var anyType = createIntrinsicType(1, "any"); @@ -7347,6 +7664,7 @@ var ts; var globalRegExpType; var globalTemplateStringsArrayType; var globalESSymbolType; + var globalIterableType; var anyArrayType; var tupleTypes = {}; var unionTypes = {}; @@ -7380,7 +7698,9 @@ var ts; return emitResolver; } function error(location, message, arg0, arg1, arg2) { - var diagnostic = location ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); + var diagnostic = location + ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) + : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); diagnostics.add(diagnostic); } function createSymbol(flags, name) { @@ -7466,7 +7786,8 @@ var ts; recordMergedSymbol(target, source); } else { - var message = target.flags & 2 || source.flags & 2 ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; + var message = target.flags & 2 || source.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(source.declarations, function (node) { error(node.name ? node.name : node, message, symbolToString(source)); }); @@ -7500,13 +7821,6 @@ var ts; } } } - function extendSymbolTable(target, source) { - for (var id in source) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } function getSymbolLinks(symbol) { if (symbol.flags & 67108864) return symbol; @@ -7520,10 +7834,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 220); + return ts.getAncestor(node, 221); } function isGlobalSourceFile(node) { - return node.kind === 220 && !ts.isExternalModule(node); + return node.kind === 221 && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -7533,7 +7847,7 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target === unknownSymbol || target.flags & meaning) { return symbol; } @@ -7564,12 +7878,12 @@ var ts; } } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931)) { - if (!(result.flags & 8388608 && getDeclarationOfImportSymbol(result).kind === 211)) { + if (!(result.flags & 8388608 && getDeclarationOfAliasSymbol(result).kind === 212)) { break loop; } result = undefined; @@ -7633,13 +7947,6 @@ var ts; break loop; } break; - case 216: - var id = location.name; - if (name === id.text) { - result = location.symbol; - break loop; - } - break; } lastLocation = location; location = location.parent; @@ -7660,27 +7967,57 @@ var ts; return undefined; } if (result.flags & 2) { - var declaration = ts.forEach(result.declarations, function (d) { return ts.getCombinedNodeFlags(d) & 6144 ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } + checkResolvedBlockScopedVariable(result, errorLocation); } } return result; } - function isImportSymbolDeclaration(node) { - return node.kind === 202 || - node.kind === 204 && !!node.name || - node.kind === 205 || - node.kind === 207 || - node.kind === 211; + function checkResolvedBlockScopedVariable(result, errorLocation) { + ts.Debug.assert((result.flags & 2) !== 0); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); + ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); + var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); + if (!isUsedBeforeDeclaration) { + var variableDeclaration = ts.getAncestor(declaration, 193); + var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); + if (variableDeclaration.parent.parent.kind === 175 || + variableDeclaration.parent.parent.kind === 181) { + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === 183 || + variableDeclaration.parent.parent.kind === 182) { + var expression = variableDeclaration.parent.parent.expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + } + if (isUsedBeforeDeclaration) { + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); + } } - function getDeclarationOfImportSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return isImportSymbolDeclaration(d) ? d : undefined; }); + function isSameScopeDescendentOf(initial, parent, stopAt) { + if (!parent) { + return false; + } + for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { + if (current === parent) { + return true; + } + } + return false; + } + function isAliasSymbolDeclaration(node) { + return node.kind === 203 || + node.kind === 205 && !!node.name || + node.kind === 206 || + node.kind === 208 || + node.kind === 212 || + node.kind === 209; + } + function getDeclarationOfAliasSymbol(symbol) { + return ts.forEach(symbol.declarations, function (d) { return isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 212) { + if (node.moduleReference.kind === 213) { var moduleSymbol = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); var exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); return exportAssignmentSymbol || moduleSymbol; @@ -7703,14 +8040,14 @@ var ts; function getExternalModuleMember(node, specifier) { var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol) { - var name = specifier.propertyName || specifier.name; - if (name.text) { - var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, 107455 | 793056 | 1536); + var _name = specifier.propertyName || specifier.name; + if (_name.text) { + var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), _name.text, 107455 | 793056 | 1536); if (!symbol) { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(_name)); return; } - return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveImport(symbol); + return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveAlias(symbol); } } } @@ -7718,28 +8055,35 @@ var ts; return getExternalModuleMember(node.parent.parent.parent, node); } function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node, node.propertyName || node.name, 107455 | 793056 | 1536); + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536); + } + function getTargetOfExportAssignment(node) { + return resolveEntityName(node.expression, 107455 | 793056 | 1536); } function getTargetOfImportDeclaration(node) { switch (node.kind) { - case 202: + case 203: return getTargetOfImportEqualsDeclaration(node); - case 204: - return getTargetOfImportClause(node); case 205: + return getTargetOfImportClause(node); + case 206: return getTargetOfNamespaceImport(node); - case 207: + case 208: return getTargetOfImportSpecifier(node); - case 211: + case 212: return getTargetOfExportSpecifier(node); + case 209: + return getTargetOfExportAssignment(node); } } - function resolveImport(symbol) { - ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Imports here."); + function resolveAlias(symbol) { + ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here."); var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfImportSymbol(symbol); + var node = getDeclarationOfAliasSymbol(symbol); var target = getTargetOfImportDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -7753,47 +8097,73 @@ var ts; } return links.target; } + function markExportAsReferenced(node) { + var symbol = getSymbolOfNode(node); + var target = resolveAlias(symbol); + if (target && target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target)) { + markAliasSymbolAsReferenced(symbol); + } + } + function markAliasSymbolAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.referenced) { + links.referenced = true; + var node = getDeclarationOfAliasSymbol(symbol); + if (node.kind === 209) { + checkExpressionCached(node.expression); + } + else if (node.kind === 212) { + checkExpressionCached(node.propertyName || node.name); + } + else if (ts.isInternalModuleImportEqualsDeclaration(node)) { + checkExpressionCached(node.moduleReference); + } + } + } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 202); + importDeclaration = ts.getAncestor(entityName, 203); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 64 && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } if (entityName.kind === 64 || entityName.parent.kind === 125) { - return resolveEntityName(importDeclaration, entityName, 1536); + return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 202); - return resolveEntityName(importDeclaration, entityName, 107455 | 793056 | 1536); + ts.Debug.assert(entityName.parent.kind === 203); + return resolveEntityName(entityName, 107455 | 793056 | 1536); } } function getFullyQualifiedName(symbol) { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } - function resolveEntityName(location, name, meaning) { + function resolveEntityName(name, meaning) { if (ts.getFullWidth(name) === 0) { return undefined; } + var symbol; if (name.kind === 64) { - var symbol = resolveName(location, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); + symbol = resolveName(name, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); if (!symbol) { - return; + return undefined; } } else if (name.kind === 125) { - var namespace = resolveEntityName(location, name.left, 1536); - if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) - return; - var symbol = getSymbol(getExportsOfSymbol(namespace), name.right.text, meaning); + var namespace = resolveEntityName(name.left, 1536); + if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) { + return undefined; + } + var right = name.right; + symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); - return; + error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); + return undefined; } } ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveImport(symbol); + return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function isExternalModuleNameRelative(moduleName) { return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; @@ -7814,14 +8184,17 @@ var ts; return symbol; } } + var sourceFile; while (true) { var fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - var sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); - if (sourceFile || isRelative) + sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); + if (sourceFile || isRelative) { break; + } var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) + if (parentPath === searchPath) { break; + } searchPath = parentPath; } if (sourceFile) { @@ -7833,6 +8206,9 @@ var ts; } error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_external_module_0, moduleName); } + function getExportAssignmentSymbol(moduleSymbol) { + return moduleSymbol.exports["default"]; + } function getResolvedExportAssignmentSymbol(moduleSymbol) { var symbol = getExportAssignmentSymbol(moduleSymbol); if (symbol) { @@ -7840,82 +8216,52 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - return resolveImport(symbol); + return resolveAlias(symbol); } } } - function getExportAssignmentSymbol(symbol) { - checkTypeOfExportAssignmentSymbol(symbol); - return getSymbolLinks(symbol).exportAssignmentSymbol; - } - function checkTypeOfExportAssignmentSymbol(containerSymbol) { - var symbolLinks = getSymbolLinks(containerSymbol); - if (!symbolLinks.exportAssignmentChecked) { - var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol); - if (exportInformation.exportAssignments.length) { - if (exportInformation.exportAssignments.length > 1) { - ts.forEach(exportInformation.exportAssignments, function (node) { return error(node, ts.Diagnostics.A_module_cannot_have_more_than_one_export_assignment); }); - } - var node = exportInformation.exportAssignments[0]; - if (exportInformation.hasExportedMember) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - if (node.exportName.text) { - var meaning = 107455 | 793056 | 1536; - var exportSymbol = resolveName(node, node.exportName.text, meaning, ts.Diagnostics.Cannot_find_name_0, node.exportName); - } - symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol; - } - symbolLinks.exportAssignmentChecked = true; - } - } - function collectExportInformationForSourceFileOrModule(symbol) { - var seenExportedMember = false; - var result = []; - ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 220 ? declaration : declaration.body); - ts.forEach(block.statements, function (node) { - if (node.kind === 208) { - result.push(node); - } - else { - seenExportedMember = seenExportedMember || (node.flags & 1) !== 0; - } - }); - }); - return { - hasExportedMember: seenExportedMember, - exportAssignments: result - }; - } function getExportsOfSymbol(symbol) { return symbol.flags & 1536 ? getExportsOfModule(symbol) : symbol.exports; } - function getExportsOfModule(symbol) { - var links = getSymbolLinks(symbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(symbol)); + function getExportsOfModule(moduleSymbol) { + var links = getSymbolLinks(moduleSymbol); + return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); } - function getExportsForModule(symbol) { + function extendExportSymbols(target, source) { + for (var id in source) { + if (id !== "default" && !ts.hasProperty(target, id)) { + target[id] = source[id]; + } + } + } + function getExportsForModule(moduleSymbol) { + if (compilerOptions.target < 2) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + return { + "default": defaultSymbol + }; + } + } var result; var visitedSymbols = []; - visit(symbol); - return result; + visit(moduleSymbol); + return result || moduleSymbol.exports; function visit(symbol) { if (!ts.contains(visitedSymbols, symbol)) { visitedSymbols.push(symbol); - if (!result) { - result = symbol.exports; - } - else { - extendSymbolTable(result, symbol.exports); - } - ts.forEach(symbol.declarations, function (node) { - if (node.kind === 220 || node.kind === 200) { - ts.forEach(node.exportStars, function (exportStar) { - visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier)); - }); + if (symbol !== moduleSymbol) { + if (!result) { + result = cloneSymbolTable(moduleSymbol.exports); } - }); + extendExportSymbols(result, symbol.exports); + } + var exportStars = symbol.exports["__export"]; + if (exportStars) { + ts.forEach(exportStars.declarations, function (node) { + visit(resolveExternalModuleName(node, node.moduleSpecifier)); + }); + } } } } @@ -7930,7 +8276,9 @@ var ts; return getMergedSymbol(symbol.parent); } function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576) !== 0 ? getMergedSymbol(symbol.exportSymbol) : symbol; + return symbol && (symbol.flags & 1048576) !== 0 + ? getMergedSymbol(symbol.exportSymbol) + : symbol; } function symbolIsValue(symbol) { if (symbol.flags & 16777216) { @@ -7940,14 +8288,14 @@ var ts; return true; } if (symbol.flags & 8388608) { - return (resolveImport(symbol).flags & 107455) !== 0; + return (resolveAlias(symbol).flags & 107455) !== 0; } return false; } function findConstructorDeclaration(node) { var members = node.members; - for (var i = 0; i < members.length; i++) { - var member = members[i]; + for (var _i = 0, _n = members.length; _i < _n; _i++) { + var member = members[_i]; if (member.kind === 133 && ts.nodeIsPresent(member.body)) { return member; } @@ -8006,25 +8354,25 @@ var ts; } function forEachSymbolTableInScope(enclosingDeclaration, callback) { var result; - for (var location = enclosingDeclaration; location; location = location.parent) { - if (location.locals && !isGlobalSourceFile(location)) { - if (result = callback(location.locals)) { + for (var _location = enclosingDeclaration; _location; _location = _location.parent) { + if (_location.locals && !isGlobalSourceFile(_location)) { + if (result = callback(_location.locals)) { return result; } } - switch (location.kind) { - case 220: - if (!ts.isExternalModule(location)) { + switch (_location.kind) { + case 221: + if (!ts.isExternalModule(_location)) { break; } case 200: - if (result = callback(getSymbolOfNode(location).exports)) { + if (result = callback(getSymbolOfNode(_location).exports)) { return result; } break; case 196: case 197: - if (result = callback(getSymbolOfNode(location).members)) { + if (result = callback(getSymbolOfNode(_location).members)) { return result; } break; @@ -8057,8 +8405,8 @@ var ts; if (symbolFromSymbolTable.flags & 8388608) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { + var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); + if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; } var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; @@ -8083,7 +8431,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveImport(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -8139,7 +8487,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 200 && declaration.name.kind === 8) || - (declaration.kind === 220 && ts.isExternalModule(declaration)); + (declaration.kind === 221 && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -8149,7 +8497,7 @@ var ts; return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 202 && + if (declaration.kind === 203 && !(declaration.flags & 1) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; @@ -8174,7 +8522,7 @@ var ts; meaning = 107455 | 1048576; } else if (entityName.kind === 125 || - entityName.parent.kind === 202) { + entityName.parent.kind === 203) { meaning = 1536; } else { @@ -8265,8 +8613,9 @@ var ts; walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); } if (accessibleSymbolChain) { - for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) { - appendParentTypeArgumentsAndSymbolName(accessibleSymbolChain[i]); + for (var _i = 0, _n = accessibleSymbolChain.length; _i < _n; _i++) { + var accessibleSymbol = accessibleSymbolChain[_i]; + appendParentTypeArgumentsAndSymbolName(accessibleSymbol); } } else { @@ -8374,7 +8723,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056, 0, flags); } else { - writeKeyword(writer, 112); + writeKeyword(writer, 111); } } else { @@ -8392,7 +8741,7 @@ var ts; var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { - return declaration.parent.kind === 220 || declaration.parent.kind === 201; + return declaration.parent.kind === 221 || declaration.parent.kind === 201; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -8448,15 +8797,17 @@ var ts; writePunctuation(writer, 14); writer.writeLine(); writer.increaseIndent(); - for (var i = 0; i < resolved.callSignatures.length; i++) { - buildSignatureDisplay(resolved.callSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + for (var _i = 0, _a = resolved.callSignatures, _n = _a.length; _i < _n; _i++) { + var signature = _a[_i]; + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.constructSignatures.length; i++) { + for (var _b = 0, _c = resolved.constructSignatures, _d = _c.length; _b < _d; _b++) { + var _signature = _c[_b]; writeKeyword(writer, 87); writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -8465,7 +8816,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 0, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 121); + writeKeyword(writer, 120); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -8478,7 +8829,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 1, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 119); + writeKeyword(writer, 118); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -8486,17 +8837,18 @@ var ts; writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.properties.length; i++) { - var p = resolved.properties[i]; + for (var _e = 0, _f = resolved.properties, _g = _f.length; _e < _g; _e++) { + var p = _f[_e]; var t = getTypeOfSymbol(p); if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) { var signatures = getSignaturesOfType(t, 0); - for (var j = 0; j < signatures.length; j++) { + for (var _h = 0, _j = signatures.length; _h < _j; _h++) { + var _signature_1 = signatures[_h]; buildSymbolDisplay(p, writer); if (p.flags & 536870912) { writePunctuation(writer, 50); } - buildSignatureDisplay(signatures[j], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature_1, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -8626,7 +8978,7 @@ var ts; return node; } } - else if (node.kind === 220) { + else if (node.kind === 221) { return ts.isExternalModule(node) ? node : undefined; } } @@ -8634,16 +8986,17 @@ var ts; } function isUsedInExportAssignment(node) { var externalModule = getContainingExternalModule(node); + var exportAssignmentSymbol; + var resolvedExportSymbol; if (externalModule) { var externalModuleSymbol = getSymbolOfNode(externalModule); - var exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var resolvedExportSymbol; + exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); var symbolOfNode = getSymbolOfNode(node); if (isSymbolUsedInExportAssignment(symbolOfNode)) { return true; } if (symbolOfNode.flags & 8388608) { - return isSymbolUsedInExportAssignment(resolveImport(symbolOfNode)); + return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); } } function isSymbolUsedInExportAssignment(symbol) { @@ -8651,7 +9004,7 @@ var ts; return true; } if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608)) { - resolvedExportSymbol = resolvedExportSymbol || resolveImport(exportAssignmentSymbol); + resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); if (resolvedExportSymbol === symbol) { return true; } @@ -8676,13 +9029,13 @@ var ts; case 198: case 195: case 199: - case 202: - var parent = getDeclarationContainer(node); + case 203: + var _parent = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 1) && - !(node.kind !== 202 && parent.kind !== 220 && ts.isInAmbientContext(parent))) { - return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); + !(node.kind !== 203 && _parent.kind !== 221 && ts.isInAmbientContext(_parent))) { + return isGlobalSourceFile(_parent) || isUsedInExportAssignment(node); } - return isDeclarationVisible(parent); + return isDeclarationVisible(_parent); case 130: case 129: case 134: @@ -8708,7 +9061,7 @@ var ts; case 147: return isDeclarationVisible(node.parent); case 127: - case 220: + case 221: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -8752,13 +9105,14 @@ var ts; } return parentType; } + var type; if (pattern.kind === 148) { - var name = declaration.propertyName || declaration.name; - var type = getTypeOfPropertyOfType(parentType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, 1) || + var _name = declaration.propertyName || declaration.name; + type = getTypeOfPropertyOfType(parentType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(_name)); return unknownType; } } @@ -8769,14 +9123,19 @@ var ts; } if (!declaration.dotDotDotToken) { var propName = "" + ts.indexOf(pattern.elements, declaration); - var type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); + type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); if (!type) { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + if (isTupleType(parentType)) { + error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); + } + else { + error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + } return unknownType; } } else { - var type = createArrayType(getIndexTypeOfType(parentType, 1)); + type = createArrayType(getIndexTypeOfType(parentType, 1)); } } return type; @@ -8785,6 +9144,9 @@ var ts; if (declaration.parent.parent.kind === 182) { return anyType; } + if (declaration.parent.parent.kind === 183) { + return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; + } if (ts.isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); } @@ -8807,7 +9169,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 218) { + if (declaration.kind === 219) { return checkIdentifier(declaration.name); } return undefined; @@ -8825,8 +9187,8 @@ var ts; var members = {}; 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); + var _name = e.propertyName || e.name; + var symbol = createSymbol(flags, _name.text); symbol.type = getTypeFromBindingElement(e); members[symbol.name] = symbol; }); @@ -8844,7 +9206,9 @@ var ts; return !elementTypes.length ? anyArrayType : hasSpreadElement ? createArrayType(getUnionType(elementTypes)) : createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern) { - return pattern.kind === 148 ? getTypeFromObjectBindingPattern(pattern) : getTypeFromArrayBindingPattern(pattern); + return pattern.kind === 148 + ? getTypeFromObjectBindingPattern(pattern) + : getTypeFromArrayBindingPattern(pattern); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { var type = getTypeForVariableLikeDeclaration(declaration); @@ -8852,7 +9216,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - return declaration.kind !== 217 ? getWidenedType(type) : type; + return declaration.kind !== 218 ? getWidenedType(type) : type; } if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name); @@ -8873,9 +9237,12 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 216) { + if (declaration.parent.kind === 217) { return links.type = anyType; } + if (declaration.kind === 209) { + return links.type = checkExpression(declaration.expression); + } links.type = resolvingType; var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); if (links.type === resolvingType) { @@ -8885,7 +9252,9 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var diagnostic = symbol.valueDeclaration.type ? ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; + var diagnostic = symbol.valueDeclaration.type ? + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); } } @@ -8946,8 +9315,8 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var getter = ts.getDeclarationOfKind(symbol, 134); - error(getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + var _getter = ts.getDeclarationOfKind(symbol, 134); + error(_getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } } @@ -8965,10 +9334,10 @@ var ts; } return links.type; } - function getTypeOfImport(symbol) { + function getTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - links.type = getTypeOfSymbol(resolveImport(symbol)); + links.type = getTypeOfSymbol(resolveAlias(symbol)); } return links.type; } @@ -8996,7 +9365,7 @@ var ts; return getTypeOfAccessors(symbol); } if (symbol.flags & 8388608) { - return getTypeOfImport(symbol); + return getTypeOfAlias(symbol); } return unknownType; } @@ -9124,8 +9493,8 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = ts.getDeclarationOfKind(symbol, 198); - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + var _declaration = ts.getDeclarationOfKind(symbol, 198); + error(_declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; } @@ -9150,10 +9519,10 @@ var ts; } return links.declaredType; } - function getDeclaredTypeOfImport(symbol) { + function getDeclaredTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveImport(symbol)); + links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); } return links.declaredType; } @@ -9175,29 +9544,29 @@ var ts; return getDeclaredTypeOfTypeParameter(symbol); } if (symbol.flags & 8388608) { - return getDeclaredTypeOfImport(symbol); + return getDeclaredTypeOfAlias(symbol); } return unknownType; } function createSymbolTable(symbols) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = symbol; } return result; } function createInstantiatedSymbolTable(symbols, mapper) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = instantiateSymbol(symbol, mapper); } return result; } function addInheritedMembers(symbols, baseSymbols) { - for (var i = 0; i < baseSymbols.length; i++) { - var s = baseSymbols[i]; + for (var _i = 0, _n = baseSymbols.length; _i < _n; _i++) { + var s = baseSymbols[_i]; if (!ts.hasProperty(symbols, s.name)) { symbols[s.name] = s; } @@ -9205,8 +9574,9 @@ var ts; } function addInheritedSignatures(signatures, baseSignatures) { if (baseSignatures) { - for (var i = 0; i < baseSignatures.length; i++) { - signatures.push(baseSignatures[i]); + for (var _i = 0, _n = baseSignatures.length; _i < _n; _i++) { + var signature = baseSignatures[_i]; + signatures.push(signature); } } } @@ -9265,7 +9635,8 @@ var ts; var baseType = classType.baseTypes[0]; var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1); return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 ? getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); + var signature = baseType.flags & 4096 ? + getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); signature.typeParameters = classType.typeParameters; signature.resolvedReturnType = classType; return signature; @@ -9302,13 +9673,14 @@ var ts; function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var signatures = signatureLists[0]; - for (var i = 0; i < signatures.length; i++) { - if (signatures[i].typeParameters) { + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; + if (signature.typeParameters) { return emptyArray; } } - for (var i = 1; i < signatureLists.length; i++) { - if (!signatureListsIdentical(signatures, signatureLists[i])) { + for (var _i_1 = 1; _i_1 < signatureLists.length; _i_1++) { + if (!signatureListsIdentical(signatures, signatureLists[_i_1])) { return emptyArray; } } @@ -9322,8 +9694,9 @@ var ts; } function getUnionIndexType(types, kind) { var indexTypes = []; - for (var i = 0; i < types.length; i++) { - var indexType = getIndexTypeOfType(types[i], kind); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + var indexType = getIndexTypeOfType(type, kind); if (!indexType) { return undefined; } @@ -9340,17 +9713,22 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; + var members; + var callSignatures; + var constructSignatures; + var stringIndexType; + var numberIndexType; if (symbol.flags & 2048) { - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1); + members = symbol.members; + callSignatures = getSignaturesOfSymbol(members["__call"]); + constructSignatures = getSignaturesOfSymbol(members["__new"]); + stringIndexType = getIndexTypeOfSymbol(symbol, 0); + numberIndexType = getIndexTypeOfSymbol(symbol, 1); } else { - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; + members = emptySymbols; + callSignatures = emptyArray; + constructSignatures = emptyArray; if (symbol.flags & 1952) { members = getExportsOfSymbol(symbol); } @@ -9368,8 +9746,8 @@ var ts; addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(classType.baseTypes[0].symbol))); } } - var stringIndexType = undefined; - var numberIndexType = (symbol.flags & 384) ? stringType : undefined; + stringIndexType = undefined; + numberIndexType = (symbol.flags & 384) ? stringType : undefined; } setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } @@ -9452,8 +9830,9 @@ var ts; function createUnionProperty(unionType, name) { var types = unionType.types; var props; - for (var i = 0; i < types.length; i++) { - var type = getApparentType(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var type = getApparentType(current); if (type !== unknownType) { var prop = getPropertyOfType(type, name); if (!prop) { @@ -9469,12 +9848,12 @@ var ts; } var propTypes = []; var declarations = []; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); + for (var _a = 0, _b = props.length; _a < _b; _a++) { + var _prop = props[_a]; + if (_prop.declarations) { + declarations.push.apply(declarations, _prop.declarations); } - propTypes.push(getTypeOfSymbol(prop)); + propTypes.push(getTypeOfSymbol(_prop)); } var result = createSymbol(4 | 67108864 | 268435456, name); result.unionType = unionType; @@ -9511,9 +9890,9 @@ var ts; } } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) - return symbol; + var _symbol = getPropertyOfObjectType(globalFunctionType, name); + if (_symbol) + return _symbol; } return getPropertyOfObjectType(globalObjectType, name); } @@ -9546,11 +9925,22 @@ var ts; }); return result; } + function getExportsOfExternalModule(node) { + if (!node.moduleSpecifier) { + return emptyArray; + } + var module = resolveExternalModuleName(node, node.moduleSpecifier); + if (!module || !module.exports) { + return emptyArray; + } + return ts.mapToArray(getExportsOfModule(module)); + } function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var classType = declaration.kind === 133 ? getDeclaredTypeOfClass(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.typeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; + var typeParameters = classType ? classType.typeParameters : + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; var parameters = []; var hasStringLiterals = false; var minArgumentCount = -1; @@ -9623,14 +10013,15 @@ var ts; function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { signature.resolvedReturnType = resolvingType; + var type; if (signature.target) { - var type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); + type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - var type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); } else { - var type = getReturnTypeFromBody(signature.declaration); + type = getReturnTypeFromBody(signature.declaration); } if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = type; @@ -9691,12 +10082,13 @@ var ts; return symbol.members["__index"]; } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 119 : 121; + var syntaxKind = kind === 1 ? 118 : 120; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { var len = indexSymbol.declarations.length; - for (var i = 0; i < len; i++) { - var node = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var node = decl; if (node.parameters.length === 1) { var parameter = node.parameters[0]; if (parameter && parameter.type && parameter.type.kind === syntaxKind) { @@ -9709,7 +10101,9 @@ var ts; } function getIndexTypeOfSymbol(symbol, kind) { var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType : undefined; + return declaration + ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType + : undefined; } function getConstraintOfTypeParameter(type) { if (!type.constraint) { @@ -9732,8 +10126,9 @@ var ts; default: var result = ""; for (var i = 0; i < types.length; i++) { - if (i > 0) + if (i > 0) { result += ","; + } result += types[i].id; } return result; @@ -9741,8 +10136,9 @@ var ts; } function getWideningFlagsOfTypes(types) { var result = 0; - for (var i = 0; i < types.length; i++) { - result |= types[i].flags; + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + result |= type.flags; } return result & 786432; } @@ -9794,9 +10190,9 @@ var ts; function getTypeFromTypeReferenceNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = resolveEntityName(node, node.typeName, 793056); + var symbol = resolveEntityName(node.typeName, 793056); + var type; if (symbol) { - var type; if ((symbol.flags & 262144) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { type = unknownType; } @@ -9834,8 +10230,8 @@ var ts; function getTypeOfGlobalSymbol(symbol, arity) { function getTypeDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; switch (declaration.kind) { case 196: case 197: @@ -9867,8 +10263,9 @@ var ts; function getGlobalSymbol(name, meaning, diagnostic) { return resolveName(undefined, name, meaning, diagnostic, name); } - function getGlobalType(name) { - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), 0); + function getGlobalType(name, arity) { + if (arity === void 0) { arity = 0; } + return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); } function getGlobalESSymbolConstructorSymbol() { return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); @@ -9916,13 +10313,15 @@ var ts; } } function addTypesToSortedSet(sortedTypes, types) { - for (var i = 0, len = types.length; i < len; i++) { - addTypeToSortedSet(sortedTypes, types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + addTypeToSortedSet(sortedTypes, type); } } function isSubtypeOfAny(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && isTypeSubtypeOf(candidate, type)) { return true; } } @@ -9938,8 +10337,9 @@ var ts; } } function containsAnyType(types) { - for (var i = 0; i < types.length; i++) { - if (types[i].flags & 1) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (type.flags & 1) { return true; } } @@ -10012,15 +10412,15 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 112: + case 111: return anyType; - case 121: + case 120: return stringType; - case 119: + case 118: return numberType; - case 113: + case 112: return booleanType; - case 122: + case 121: return esSymbolType; case 98: return voidType; @@ -10053,8 +10453,9 @@ var ts; function instantiateList(items, mapper, instantiator) { if (items && items.length) { var result = []; - for (var i = 0; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); + for (var _i = 0, _n = items.length; _i < _n; _i++) { + var v = items[_i]; + result.push(instantiator(v, mapper)); } return result; } @@ -10073,8 +10474,9 @@ var ts; } return function (t) { for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + if (t === sources[i]) { return targets[i]; + } } return t; }; @@ -10091,9 +10493,11 @@ var ts; case 2: return createBinaryTypeEraser(sources[0], sources[1]); } return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + for (var _i = 0, _n = sources.length; _i < _n; _i++) { + var source = sources[_i]; + if (t === source) { return anyType; + } } return t; }; @@ -10127,8 +10531,9 @@ var ts; return result; } function instantiateSignature(signature, mapper, eraseTypeParameters) { + var freshTypeParameters; if (signature.typeParameters && !eraseTypeParameters) { - var freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); + freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); } var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -10172,7 +10577,8 @@ var ts; return mapper(type); } if (type.flags & 32768) { - return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? instantiateAnonymousType(type, mapper) : type; + return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? + instantiateAnonymousType(type, mapper) : type; } if (type.flags & 4096) { return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); @@ -10201,8 +10607,8 @@ var ts; isContextSensitive(node.whenFalse); case 167: return node.operatorToken.kind === 49 && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 217: + (isContextSensitive(node.left) || isContextSensitive(node.right)); + case 218: return isContextSensitive(node.initializer); case 132: case 131: @@ -10284,7 +10690,7 @@ var ts; } function isRelatedTo(source, target, reportErrors, headMessage, elaborateErrors) { if (elaborateErrors === void 0) { elaborateErrors = false; } - var result; + var _result; if (source === target) return -1; if (relation !== identityRelation) { @@ -10308,54 +10714,54 @@ var ts; if (source.flags & 16384 || target.flags & 16384) { if (relation === identityRelation) { if (source.flags & 16384 && target.flags & 16384) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; + if (_result = unionTypeRelatedToUnionType(source, target)) { + if (_result &= unionTypeRelatedToUnionType(target, source)) { + return _result; } } } else if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(target, source, reportErrors)) { + return _result; } } } else { if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; + if (_result = typeRelatedToUnionType(source, target, reportErrors)) { + return _result; } } } } else if (source.flags & 512 && target.flags & 512) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; + if (_result = typeParameterRelatedTo(source, target, reportErrors)) { + return _result; } } else { var saveErrorInfo = errorInfo; if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; + if (_result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { + return _result; } } var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); if (sourceOrApparentType.flags & 48128 && target.flags & 48128 && - (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { + (_result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { errorInfo = saveErrorInfo; - return result; + return _result; } } if (reportErrors) { @@ -10371,16 +10777,17 @@ var ts; return 0; } function unionTypeRelatedToUnionType(source, target) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = typeRelatedToUnionType(sourceTypes[i], target, false); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = typeRelatedToUnionType(sourceType, target, false); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeRelatedToUnionType(source, target, reportErrors) { var targetTypes = target.types; @@ -10393,27 +10800,28 @@ var ts; return 0; } function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = isRelatedTo(sourceType, target, reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typesRelatedTo(sources, targets, reportErrors) { - var result = -1; + var _result = -1; for (var i = 0, len = sources.length; i < len; i++) { var related = isRelatedTo(sources[i], targets[i], reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeParameterRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -10479,19 +10887,20 @@ var ts; expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; + var _result; if (expandingFlags === 3) { - var result = 1; + _result = 1; } else { - var result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); + _result = propertiesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 0, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 1, reportErrors); + if (_result) { + _result &= stringIndexTypesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= numberIndexTypesRelatedTo(source, target, reportErrors); } } } @@ -10499,23 +10908,23 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result) { + if (_result) { var maybeCache = maybeStack[depth]; - var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; + var destinationCache = (_result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; ts.copyMap(maybeCache, destinationCache); } else { relation[id] = reportErrors ? 3 : 2; } - return result; + return _result; } function isDeeplyNestedGeneric(type, stack) { if (type.flags & 4096 && depth >= 10) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) { + if (t.flags & 4096 && t.target === _target) { count++; if (count >= 10) return true; @@ -10528,11 +10937,11 @@ var ts; if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } - var result = -1; + var _result = -1; var properties = getPropertiesOfObjectType(target); var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 131072); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp !== targetProp) { if (!sourceProp) { @@ -10583,7 +10992,7 @@ var ts; } return 0; } - result &= related; + _result &= related; if (sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) { if (reportErrors) { reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); @@ -10593,7 +11002,7 @@ var ts; } } } - return result; + return _result; } function propertiesIdenticalTo(source, target) { var sourceProperties = getPropertiesOfObjectType(source); @@ -10601,9 +11010,9 @@ var ts; if (sourceProperties.length !== targetProperties.length) { return 0; } - var result = -1; - for (var i = 0, len = sourceProperties.length; i < len; ++i) { - var sourceProp = sourceProperties[i]; + var _result = -1; + for (var _i = 0, _n = sourceProperties.length; _i < _n; _i++) { + var sourceProp = sourceProperties[_i]; var targetProp = getPropertyOfObjectType(target, sourceProp.name); if (!targetProp) { return 0; @@ -10612,9 +11021,9 @@ var ts; if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function signaturesRelatedTo(source, target, kind, reportErrors) { if (relation === identityRelation) { @@ -10625,18 +11034,18 @@ var ts; } var sourceSignatures = getSignaturesOfType(source, kind); var targetSignatures = getSignaturesOfType(target, kind); - var result = -1; + var _result = -1; var saveErrorInfo = errorInfo; - outer: for (var i = 0; i < targetSignatures.length; i++) { - var t = targetSignatures[i]; + outer: for (var _i = 0, _n = targetSignatures.length; _i < _n; _i++) { + var t = targetSignatures[_i]; if (!t.hasStringLiterals || target.flags & 65536) { var localErrors = reportErrors; - for (var j = 0; j < sourceSignatures.length; j++) { - var s = sourceSignatures[j]; + for (var _a = 0, _b = sourceSignatures.length; _a < _b; _a++) { + var s = sourceSignatures[_a]; if (!s.hasStringLiterals || source.flags & 65536) { var related = signatureRelatedTo(s, t, localErrors); if (related) { - result &= related; + _result &= related; errorInfo = saveErrorInfo; continue outer; } @@ -10646,7 +11055,7 @@ var ts; return 0; } } - return result; + return _result; } function signatureRelatedTo(source, target, reportErrors) { if (source === target) { @@ -10676,14 +11085,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - var result = -1; + var _result = -1; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + var _s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + var _t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); + var related = isRelatedTo(_s, _t, reportErrors); if (!related) { - related = isRelatedTo(t, s, false); + related = isRelatedTo(_t, _s, false); if (!related) { if (reportErrors) { reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); @@ -10692,13 +11101,13 @@ var ts; } errorInfo = saveErrorInfo; } - result &= related; + _result &= related; } var t = getReturnTypeOfSignature(target); if (t === voidType) - return result; + return _result; var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); + return _result & isRelatedTo(s, t, reportErrors); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -10706,15 +11115,15 @@ var ts; if (sourceSignatures.length !== targetSignatures.length) { return 0; } - var result = -1; + var _result = -1; for (var i = 0, len = sourceSignatures.length; i < len; ++i) { var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function stringIndexTypesRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -10754,11 +11163,12 @@ var ts; } return 0; } + var related; if (sourceStringType && sourceNumberType) { - var related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { - var related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); } if (!related) { if (reportErrors) { @@ -10833,14 +11243,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { + for (var _i = 0, _len = source.parameters.length; _i < _len; _i++) { + var s = source.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[_i]); + var t = target.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[_i]); + var _related = compareTypes(s, t); + if (!_related) { return 0; } - result &= related; + result &= _related; } if (compareReturnTypes) { result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); @@ -10848,8 +11258,9 @@ var ts; return result; } function isSupertypeOfEach(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && !isTypeSubtypeOf(types[i], candidate)) + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && !isTypeSubtypeOf(type, candidate)) return false; } return true; @@ -10892,6 +11303,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isTupleType(type) { + return (type.flags & 8192) && !!type.elementTypes; + } function getWidenedTypeOfObjectLiteral(type) { var properties = getPropertiesOfObjectType(type); var members = {}; @@ -10949,29 +11363,32 @@ var ts; return reportWideningErrorsInType(type.typeArguments[0]); } if (type.flags & 131072) { - var errorReported = false; + var _errorReported = false; ts.forEach(getPropertiesOfObjectType(type), function (p) { var t = getTypeOfSymbol(p); if (t.flags & 262144) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); } - errorReported = true; + _errorReported = true; } }); - return errorReported; + return _errorReported; } return false; } function reportImplicitAnyError(declaration, type) { var typeAsString = typeToString(getWidenedType(type)); + var diagnostic; switch (declaration.kind) { case 130: case 129: - var diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; case 128: - var diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; + diagnostic = declaration.dotDotDotToken ? + ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : + ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; case 195: case 132: @@ -10984,10 +11401,10 @@ var ts; error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; } - var diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; + diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; default: - var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); } @@ -11026,7 +11443,8 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) { + for (var _i = 0, _n = typeParameters.length; _i < _n; _i++) { + var unused = typeParameters[_i]; inferences.push({ primary: undefined, secondary: undefined }); } return { @@ -11045,19 +11463,21 @@ var ts; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) + if (source === sourceStack[i] && target === targetStack[i]) { return true; + } } return false; } function isWithinDepthLimit(type, stack) { if (depth >= 5) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) + if (t.flags & 4096 && t.target === _target) { count++; + } } return count < 5; } @@ -11072,7 +11492,9 @@ var ts; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { var inferences = context.inferences[i]; - var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + var candidates = inferiority ? + inferences.secondary || (inferences.secondary = []) : + inferences.primary || (inferences.primary = []); if (!ts.contains(candidates, source)) candidates.push(source); break; @@ -11082,16 +11504,16 @@ var ts; else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { var sourceTypes = source.typeArguments; var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); + for (var _i = 0; _i < sourceTypes.length; _i++) { + inferFromTypes(sourceTypes[_i], targetTypes[_i]); } } else if (target.flags & 16384) { - var targetTypes = target.types; + var _targetTypes = target.types; var typeParameterCount = 0; var typeParameter; - for (var i = 0; i < targetTypes.length; i++) { - var t = targetTypes[i]; + for (var _a = 0, _n = _targetTypes.length; _a < _n; _a++) { + var t = _targetTypes[_a]; if (t.flags & 512 && ts.contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; @@ -11107,9 +11529,10 @@ var ts; } } else if (source.flags & 16384) { - var sourceTypes = source.types; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], target); + var _sourceTypes = source.types; + for (var _b = 0, _c = _sourceTypes.length; _b < _c; _b++) { + var sourceType = _sourceTypes[_b]; + inferFromTypes(sourceType, target); } } else if (source.flags & 48128 && (target.flags & (4096 | 8192) || @@ -11134,8 +11557,8 @@ var ts; } function inferFromProperties(source, target) { var properties = getPropertiesOfObjectType(target); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfObjectType(source, targetProp.name); if (sourceProp) { inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); @@ -11220,16 +11643,19 @@ var ts; } ts.Debug.fail("should not get here"); } - function removeTypesFromUnionType(type, typeKind, isOfTypeKind) { + function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { if (type.flags & 16384) { var types = type.types; if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (narrowedType !== emptyObjectType) { + if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { return narrowedType; } } } + else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { + return getUnionType(emptyArray); + } return type; } function hasInitializer(node) { @@ -11301,12 +11727,12 @@ var ts; case 186: case 187: case 188: - case 213: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: return ts.forEachChild(node, isAssignedIn); } return false; @@ -11314,10 +11740,10 @@ var ts; } function resolveLocation(node) { var containerNodes = []; - for (var parent = node.parent; parent; parent = parent.parent) { - if ((ts.isExpression(parent) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent)) { - containerNodes.unshift(parent); + for (var _parent = node.parent; _parent; _parent = _parent.parent) { + if ((ts.isExpression(_parent) || ts.isObjectLiteralMethod(node)) && + isContextSensitive(_parent)) { + containerNodes.unshift(_parent); } } ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); @@ -11362,7 +11788,7 @@ var ts; } } break; - case 220: + case 221: case 200: case 195: case 132: @@ -11396,16 +11822,16 @@ var ts; } if (assumeTrue) { if (!typeInfo) { - return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true); + return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true, false); } if (isTypeSubtypeOf(typeInfo.type, type)) { return typeInfo.type; } - return removeTypesFromUnionType(type, typeInfo.flags, false); + return removeTypesFromUnionType(type, typeInfo.flags, false, false); } else { if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true); + return removeTypesFromUnionType(type, typeInfo.flags, true, false); } return type; } @@ -11481,46 +11907,56 @@ var ts; return type; } } - function markLinkedImportsAsReferenced(node) { - if (node) { - var nodeLinks = getNodeLinks(node); - while (nodeLinks.importOnRightSide) { - var rightSide = nodeLinks.importOnRightSide; - nodeLinks.importOnRightSide = undefined; - getSymbolLinks(rightSide).referenced = true; - ts.Debug.assert((rightSide.flags & 8388608) !== 0); - nodeLinks = getNodeLinks(ts.getDeclarationOfKind(rightSide, 202)); - } - } - } function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 161) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression); } - if (symbol.flags & 8388608) { - var symbolLinks = getSymbolLinks(symbol); - if (!symbolLinks.referenced) { - var importOrExportAssignment = getLeftSideOfImportEqualsOrExportAssignment(node); - if (!importOrExportAssignment || - (importOrExportAssignment.flags & 1) || - (importOrExportAssignment.kind === 208)) { - symbolLinks.referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); - } - else { - var nodeLinks = getNodeLinks(importOrExportAssignment); - ts.Debug.assert(!nodeLinks.importOnRightSide); - nodeLinks.importOnRightSide = symbol; - } - } - if (symbolLinks.referenced) { - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); + checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } + function isInsideFunction(node, threshold) { + var current = node; + while (current && current !== threshold) { + if (ts.isFunctionLike(current)) { + return true; + } + current = current.parent; + } + return false; + } + function checkBlockScopedBindingCapturedInLoop(node, symbol) { + if (languageVersion >= 2 || + (symbol.flags & 2) === 0 || + symbol.valueDeclaration.parent.kind === 217) { + return; + } + var container = symbol.valueDeclaration; + while (container.kind !== 194) { + container = container.parent; + } + container = container.parent; + if (container.kind === 175) { + container = container.parent; + } + var inFunction = isInsideFunction(node.parent, container); + var current = container; + while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { + if (isIterationStatement(current, false)) { + if (inFunction) { + grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); + } + getNodeLinks(symbol.valueDeclaration).flags |= 256; + break; + } + current = current.parent; + } + } function captureLexicalThis(node, container) { var classNode = container.parent && container.parent.kind === 196 ? container.parent : undefined; getNodeLinks(node).flags |= 2; @@ -11593,11 +12029,12 @@ var ts; var container = ts.getSuperContainer(node, true); if (container) { var canUseSuperExpression = false; + var needToCaptureLexicalThis; if (isCallExpression) { canUseSuperExpression = container.kind === 133; } else { - var needToCaptureLexicalThis = false; + needToCaptureLexicalThis = false; while (container && container.kind === 161) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = true; @@ -11606,19 +12043,19 @@ var ts; if (container.flags & 128) { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135; + container.kind === 131 || + container.kind === 134 || + container.kind === 135; } else { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135 || - container.kind === 130 || - container.kind === 129 || - container.kind === 133; + container.kind === 131 || + container.kind === 134 || + container.kind === 135 || + container.kind === 130 || + container.kind === 129 || + container.kind === 133; } } } @@ -11744,8 +12181,9 @@ var ts; var types = type.types; var mappedType; var mappedTypes; - for (var i = 0; i < types.length; i++) { - var t = mapper(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var t = mapper(current); if (t) { if (!mappedType) { mappedType = t; @@ -11803,7 +12241,9 @@ var ts; var type = getContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) || getIndexTypeOfContextualType(type, 1); + return getTypeOfPropertyOfContextualType(type, "" + index) + || getIndexTypeOfContextualType(type, 1) + || (languageVersion >= 2 ? checkIteratedType(type, undefined) : undefined); } return undefined; } @@ -11818,8 +12258,8 @@ var ts; if (node.contextualType) { return node.contextualType; } - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: @@ -11831,22 +12271,22 @@ var ts; return getContextualTypeForReturnExpression(node); case 155: case 156: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(_parent, node); case 158: - return getTypeFromTypeNode(parent.type); + return getTypeFromTypeNode(_parent.type); case 167: return getContextualTypeForBinaryOperand(node); - case 217: - return getContextualTypeForObjectLiteralElement(parent); + case 218: + return getContextualTypeForObjectLiteralElement(_parent); case 151: return getContextualTypeForElementExpression(node); case 168: return getContextualTypeForConditionalOperand(node); case 173: - ts.Debug.assert(parent.parent.kind === 169); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + ts.Debug.assert(_parent.parent.kind === 169); + return getContextualTypeForSubstitutionExpression(_parent.parent, node); case 159: - return getContextualType(parent); + return getContextualType(_parent); } return undefined; } @@ -11867,7 +12307,9 @@ var ts; } function getContextualSignature(node) { ts.Debug.assert(node.kind !== 132 || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getContextualType(node); + var type = ts.isObjectLiteralMethod(node) + ? getContextualTypeForObjectLiteralMethod(node) + : getContextualType(node); if (!type) { return undefined; } @@ -11876,12 +12318,13 @@ var ts; } var signatureList; var types = type.types; - for (var i = 0; i < types.length; i++) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; if (signatureList && - getSignaturesOfObjectOrUnionType(types[i], 0).length > 1) { + getSignaturesOfObjectOrUnionType(current, 0).length > 1) { return undefined; } - var signature = getNonGenericSignature(types[i]); + var signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { signatureList = [signature]; @@ -11906,15 +12349,15 @@ var ts; return mapper && mapper !== identityMapper; } function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 167 && parent.operatorToken.kind === 52 && parent.left === node) { + var _parent = node.parent; + if (_parent.kind === 167 && _parent.operatorToken.kind === 52 && _parent.left === node) { return true; } - if (parent.kind === 217) { - return isAssignmentTarget(parent.parent); + if (_parent.kind === 218) { + return isAssignmentTarget(_parent.parent); } - if (parent.kind === 151) { - return isAssignmentTarget(parent); + if (_parent.kind === 151) { + return isAssignmentTarget(_parent); } return false; } @@ -11979,21 +12422,24 @@ var ts; var propertiesArray = []; var contextualType = getContextualType(node); var typeFlags; - for (var i = 0; i < node.properties.length; i++) { - var memberDecl = node.properties[i]; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 217 || - memberDecl.kind === 218 || + if (memberDecl.kind === 218 || + memberDecl.kind === 219 || ts.isObjectLiteralMethod(memberDecl)) { - if (memberDecl.kind === 217) { - var type = checkPropertyAssignment(memberDecl, contextualMapper); + var type = void 0; + if (memberDecl.kind === 218) { + type = checkPropertyAssignment(memberDecl, contextualMapper); } else if (memberDecl.kind === 132) { - var type = checkObjectLiteralMethod(memberDecl, contextualMapper); + type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 218); - var type = memberDecl.name.kind === 126 ? unknownType : checkExpression(memberDecl.name, contextualMapper); + ts.Debug.assert(memberDecl.kind === 219); + type = memberDecl.name.kind === 126 + ? unknownType + : checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); @@ -12026,15 +12472,15 @@ var ts; for (var i = 0; i < propertiesArray.length; i++) { var propertyDecl = node.properties[i]; if (kind === 0 || isNumericName(propertyDecl.name)) { - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); + var _type = getTypeOfSymbol(propertiesArray[i]); + if (!ts.contains(propTypes, _type)) { + propTypes.push(_type); } } } - var result = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result.flags; - return result; + var _result = propTypes.length ? getUnionType(propTypes) : undefinedType; + typeFlags |= _result.flags; + return _result; } return undefined; } @@ -12109,7 +12555,9 @@ var ts; return anyType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 153 ? node.expression : node.left; + var left = node.kind === 153 + ? node.expression + : node.left; var type = checkExpressionOrQualifiedName(left); if (type !== unknownType && type !== anyType) { var prop = getPropertyOfType(getWidenedType(type), propertyName); @@ -12135,9 +12583,9 @@ var ts; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); } else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); + var _start = node.end - "]".length; + var _end = node.end; + grammarErrorAtPos(sourceFile, _start, _end - _start, ts.Diagnostics.Expression_expected); } } var objectType = getApparentType(checkExpression(node.expression)); @@ -12152,15 +12600,15 @@ var ts; return unknownType; } if (node.argumentExpression) { - var name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name !== undefined) { - var prop = getPropertyOfType(objectType, name); + var _name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + if (_name !== undefined) { + var prop = getPropertyOfType(objectType, _name); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); } else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name, symbolToString(objectType.symbol)); + error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, _name, symbolToString(objectType.symbol)); return unknownType; } } @@ -12247,22 +12695,22 @@ var ts; var specializedIndex = -1; var spliceIndex; ts.Debug.assert(!result.length); - for (var i = 0; i < signatures.length; i++) { - var signature = signatures[i]; + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent = signature.declaration && signature.declaration.parent; + var _parent = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent === lastParent) { + if (lastParent && _parent === lastParent) { index++; } else { - lastParent = parent; + lastParent = _parent; index = cutoffIndex; } } else { index = cutoffIndex = result.length; - lastParent = parent; + lastParent = _parent; } lastSymbol = symbol; if (signature.hasStringLiterals) { @@ -12354,30 +12802,31 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); + var argType = void 0; if (i === 0 && args[i].parent.kind === 157) { - var argType = globalTemplateStringsArrayType; + argType = globalTemplateStringsArrayType; } else { var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - var argType = checkExpressionWithContextualType(arg, paramType, mapper); + argType = checkExpressionWithContextualType(arg, paramType, mapper); } inferTypes(context, argType, paramType); } } if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); + for (var _i = 0; _i < args.length; _i++) { + if (excludeArgument[_i] === false) { + var _arg = args[_i]; + var _paramType = getTypeAtPosition(signature, _arg.kind === 171 ? -1 : _i); + inferTypes(context, checkExpressionWithContextualType(_arg, _paramType, inferenceMapper), _paramType); } } } var inferredTypes = getInferredTypes(context); context.failedTypeParameterIndex = ts.indexOf(inferredTypes, inferenceFailureType); - for (var i = 0; i < inferredTypes.length; i++) { - if (inferredTypes[i] === inferenceFailureType) { - inferredTypes[i] = unknownType; + for (var _i_1 = 0; _i_1 < inferredTypes.length; _i_1++) { + if (inferredTypes[_i_1] === inferenceFailureType) { + inferredTypes[_i_1] = unknownType; } } return context; @@ -12403,7 +12852,9 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : + arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : + checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { return false; } @@ -12497,50 +12948,53 @@ var ts; error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); } if (!produceDiagnostics) { - for (var i = 0, n = candidates.length; i < n; i++) { - if (hasCorrectArity(node, args, candidates[i])) { - return candidates[i]; + for (var _i = 0, _n = candidates.length; _i < _n; _i++) { + var candidate = candidates[_i]; + if (hasCorrectArity(node, args, candidate)) { + return candidate; } } } return resolveErrorCall(node); function chooseOverload(candidates, relation) { - for (var i = 0; i < candidates.length; i++) { - if (!hasCorrectArity(node, args, candidates[i])) { + for (var _a = 0, _b = candidates.length; _a < _b; _a++) { + var current = candidates[_a]; + if (!hasCorrectArity(node, args, current)) { continue; } - var originalCandidate = candidates[i]; - var inferenceResult; + var originalCandidate = current; + var inferenceResult = void 0; + var _candidate = void 0; + var typeArgumentsAreValid = void 0; while (true) { - var candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes; - var typeArgumentsAreValid; + _candidate = originalCandidate; + if (_candidate.typeParameters) { + var typeArgumentTypes = void 0; if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); + typeArgumentTypes = new Array(_candidate.typeParameters.length); + typeArgumentsAreValid = checkTypeArguments(_candidate, typeArguments, typeArgumentTypes, false); } else { - inferenceResult = inferTypeArguments(candidate, args, excludeArgument); + inferenceResult = inferTypeArguments(_candidate, args, excludeArgument); typeArgumentsAreValid = inferenceResult.failedTypeParameterIndex < 0; typeArgumentTypes = inferenceResult.inferredTypes; } if (!typeArgumentsAreValid) { break; } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); + _candidate = getSignatureInstantiation(_candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, _candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; if (index < 0) { - return candidate; + return _candidate; } excludeArgument[index] = false; } if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; + var instantiatedCandidate = _candidate; if (typeArgumentsAreValid) { candidateForArgumentError = instantiatedCandidate; } @@ -12552,7 +13006,7 @@ var ts; } } else { - ts.Debug.assert(originalCandidate === candidate); + ts.Debug.assert(originalCandidate === _candidate); candidateForArgumentError = originalCandidate; } } @@ -12680,9 +13134,6 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - if (languageVersion < 2) { - grammarErrorOnFirstToken(node.template, ts.Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher); - } return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { @@ -12698,9 +13149,13 @@ var ts; } function getTypeAtPosition(signature, pos) { if (pos >= 0) { - return signature.hasRestParameter ? pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; + return signature.hasRestParameter ? + pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : + pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; } - return signature.hasRestParameter ? getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : anyArrayType; + return signature.hasRestParameter ? + getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : + anyArrayType; } function assignContextualParameterTypes(signature, context, mapper) { var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); @@ -12710,9 +13165,9 @@ var ts; links.type = instantiateType(getTypeAtPosition(context, i), mapper); } if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = signature.parameters[signature.parameters.length - 1]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); + var _parameter = signature.parameters[signature.parameters.length - 1]; + var _links = getSymbolLinks(_parameter); + _links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); } } function getReturnTypeFromBody(func, contextualMapper) { @@ -12720,15 +13175,16 @@ var ts; if (!func.body) { return unknownType; } + var type; if (func.body.kind !== 174) { - var type = checkExpressionCached(func.body, contextualMapper); + type = checkExpressionCached(func.body, contextualMapper); } else { var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { return voidType; } - var type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); return unknownType; @@ -12841,19 +13297,21 @@ var ts; } return true; } - function checkReferenceExpression(n, invalidReferenceMessage, constantVarianleMessage) { + function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { function findSymbol(n) { var symbol = getNodeLinks(n).resolvedSymbol; return symbol && getExportSymbolOfValueSymbolIfExported(symbol); } function isReferenceOrErrorExpression(n) { switch (n.kind) { - case 64: + case 64: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; - case 153: - var symbol = findSymbol(n); - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; + } + case 153: { + var _symbol = findSymbol(n); + return !_symbol || _symbol === unknownSymbol || (_symbol.flags & ~8) !== 0; + } case 154: return true; case 159: @@ -12865,18 +13323,20 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 64: - case 153: + case 153: { var symbol = findSymbol(n); - return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096) !== 0; - case 154: + return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192) !== 0; + } + case 154: { var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8) { - var name = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name); - return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096) !== 0; + var _symbol = findSymbol(n.expression); + if (_symbol && index && index.kind === 8) { + var _name = index.text; + var prop = getPropertyOfType(getTypeOfSymbol(_symbol), _name); + return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192) !== 0; } return false; + } case 159: return isConstVariableReference(n.expression); default: @@ -12888,7 +13348,7 @@ var ts; return false; } if (isConstVariableReference(n)) { - error(n, constantVarianleMessage); + error(n, constantVariableMessage); return false; } return true; @@ -12948,8 +13408,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (types[i].flags & kind) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (current.flags & kind) { return true; } } @@ -12963,8 +13424,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (!(types[i].flags & kind)) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (!(current.flags & kind)) { return false; } } @@ -12998,18 +13460,19 @@ var ts; } function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { var properties = node.properties; - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { - var name = p.name; - var type = sourceType.flags & 1 ? sourceType : getTypeOfPropertyOfType(sourceType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, 1) || - getIndexTypeOfType(sourceType, 0); + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { + var _name = p.name; + var type = sourceType.flags & 1 ? sourceType : + getTypeOfPropertyOfType(sourceType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(sourceType, 1) || + getIndexTypeOfType(sourceType, 0); if (type) { - checkDestructuringAssignment(p.initializer || name, type); + checkDestructuringAssignment(p.initializer || _name, type); } else { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(_name)); } } else { @@ -13029,12 +13492,19 @@ var ts; if (e.kind !== 172) { if (e.kind !== 171) { var propName = "" + i; - var type = sourceType.flags & 1 ? sourceType : isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : getIndexTypeOfType(sourceType, 1); + var type = sourceType.flags & 1 ? sourceType : + isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : + getIndexTypeOfType(sourceType, 1); if (type) { checkDestructuringAssignment(e, type, contextualMapper); } else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + if (isTupleType(sourceType)) { + error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); + } + else { + error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } } } else { @@ -13177,7 +13647,9 @@ var ts; return rightType; } function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : someConstituentTypeHasKind(rightType, 1048576) ? node.right : undefined; + var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : + someConstituentTypeHasKind(rightType, 1048576) ? node.right : + undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); return false; @@ -13288,8 +13760,8 @@ var ts; } if (isConstEnumObjectType(type)) { var ok = (node.parent.kind === 153 && node.parent.expression === node) || - (node.parent.kind === 154 && node.parent.expression === node) || - ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); + (node.parent.kind === 154 && node.parent.expression === node) || + ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -13435,11 +13907,12 @@ var ts; if (indexSymbol) { var seenNumericIndexer = false; var seenStringIndexer = false; - for (var i = 0, len = indexSymbol.declarations.length; i < len; ++i) { - var declaration = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 121: + case 120: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -13447,7 +13920,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 119: + case 118: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -13514,7 +13987,7 @@ var ts; if (ts.getClassBaseTypeNode(node.parent)) { if (containsSuperCall(node.body)) { var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); + ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); if (superCallShouldBeFirst) { var statements = node.body.statements; if (!statements.length || statements[0].kind !== 177 || !isSuperCallExpression(statements[0].expression)) { @@ -13623,8 +14096,8 @@ var ts; else { signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); } - for (var i = 0; i < signaturesToCheck.length; i++) { - var otherSignature = signaturesToCheck[i]; + for (var _i = 0, _n = signaturesToCheck.length; _i < _n; _i++) { + var otherSignature = signaturesToCheck[_i]; if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { return; } @@ -13704,16 +14177,16 @@ var ts; }); if (subsequentNode) { if (subsequentNode.kind === node.kind) { - var errorNode = subsequentNode.name || subsequentNode; + var _errorNode = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { ts.Debug.assert(node.kind === 132 || node.kind === 131); ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128)); var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode, diagnostic); + error(_errorNode, diagnostic); return; } else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); + error(_errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -13729,8 +14202,9 @@ var ts; var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536; var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; - for (var i = 0; i < declarations.length; i++) { - var node = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var node = current; var inAmbientContext = ts.isInAmbientContext(node); var inAmbientContextOrInterface = node.parent.kind === 197 || node.parent.kind === 143 || inAmbientContext; if (inAmbientContextOrInterface) { @@ -13787,9 +14261,10 @@ var ts; var signatures = getSignaturesOfSymbol(symbol); var bodySignature = getSignatureFromDeclaration(bodyDeclaration); if (!bodySignature.hasStringLiterals) { - for (var i = 0, len = signatures.length; i < len; ++i) { - if (!signatures[i].hasStringLiterals && !isSignatureAssignableTo(bodySignature, signatures[i])) { - error(signatures[i].declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + for (var _a = 0, _b = signatures.length; _a < _b; _a++) { + var signature = signatures[_a]; + if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { + error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); break; } } @@ -13801,7 +14276,6 @@ var ts; if (!produceDiagnostics) { return; } - var symbol; var symbol = node.localSymbol; if (!symbol) { symbol = getSymbolOfNode(node); @@ -13836,13 +14310,15 @@ var ts; case 197: return 2097152; case 200: - return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; + return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 + ? 4194304 | 1048576 + : 4194304; case 196: case 199: return 2097152 | 1048576; - case 202: + case 203: var result = 0; - var target = resolveImport(getSymbolOfNode(d)); + var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); return result; default: @@ -13863,7 +14339,7 @@ var ts; } function checkFunctionLikeDeclaration(node) { checkSignatureDeclaration(node); - if (node.name.kind === 126) { + if (node.name && node.name.kind === 126) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -13936,8 +14412,8 @@ var ts; var current = node; while (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { @@ -13957,8 +14433,8 @@ var ts; return; } if (ts.getClassBaseTypeNode(enclosingClass)) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } else { @@ -13973,30 +14449,30 @@ var ts; if (node.kind === 200 && ts.getModuleInstanceState(node) !== 1) { return; } - var parent = getDeclarationContainer(node); - if (parent.kind === 220 && ts.isExternalModule(parent)) { + var _parent = getDeclarationContainer(node); + if (_parent.kind === 221 && ts.isExternalModule(_parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkVarDeclaredNamesNotShadowed(node) { - if (node.initializer && (ts.getCombinedNodeFlags(node) & 6144) === 0) { + if (node.initializer && (ts.getCombinedNodeFlags(node) & 12288) === 0) { var symbol = getSymbolOfNode(node); if (symbol.flags & 1) { var localDeclarationSymbol = resolveName(node, node.name.text, 3, undefined, undefined); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 6144) { + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288) { var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 194); var container = varDeclList.parent.kind === 175 && - varDeclList.parent.parent; + varDeclList.parent.parent; var namesShareScope = container && - (container.kind === 174 && ts.isAnyFunction(container.parent) || - (container.kind === 201 && container.kind === 200) || - container.kind === 220); + (container.kind === 174 && ts.isFunctionLike(container.parent) || + (container.kind === 201 && container.kind === 200) || + container.kind === 221); if (!namesShareScope) { - var name = symbolToString(localDeclarationSymbol); - error(ts.getErrorSpanForNode(node), ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + var _name = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, _name, _name); } } } @@ -14010,10 +14486,11 @@ var ts; return node.kind === 128; } function checkParameterInitializer(node) { - if (getRootDeclaration(node).kind === 128) { - var func = ts.getContainingFunction(node); - visit(node.initializer); + if (getRootDeclaration(node).kind !== 128) { + return; } + var func = ts.getContainingFunction(node); + visit(node.initializer); function visit(n) { if (n.kind === 64) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; @@ -14152,33 +14629,153 @@ var ts; checkSourceElement(node.statement); } function checkForOfStatement(node) { - checkGrammarForOfStatement(node); + checkGrammarForInOrForOfStatement(node); + if (node.initializer.kind === 194) { + checkForInOrForOfVariableDeclaration(node); + } + else { + var varExpr = node.initializer; + var iteratedType = checkRightHandSideOfForOf(node.expression); + if (varExpr.kind === 151 || varExpr.kind === 152) { + checkDestructuringAssignment(varExpr, iteratedType || unknownType); + } + else { + var leftType = checkExpression(varExpr); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + if (iteratedType) { + checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); + } + } + } + checkSourceElement(node.statement); } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); if (node.initializer.kind === 194) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); + var variable = node.initializer.declarations[0]; + if (variable && ts.isBindingPattern(variable.name)) { + error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } + checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; - var exprType = checkExpression(varExpr); - if (!allConstituentTypesHaveKind(exprType, 1 | 258)) { + var leftType = checkExpression(varExpr); + if (varExpr.kind === 151 || varExpr.kind === 152) { + error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + } + else if (!allConstituentTypesHaveKind(leftType, 1 | 258)) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); } } - var exprType = checkExpression(node.expression); - if (!allConstituentTypesHaveKind(exprType, 1 | 48128 | 512)) { + var rightType = checkExpression(node.expression); + if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) { error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } checkSourceElement(node.statement); } + function checkForInOrForOfVariableDeclaration(iterationStatement) { + var variableDeclarationList = iterationStatement.initializer; + if (variableDeclarationList.declarations.length >= 1) { + var decl = variableDeclarationList.declarations[0]; + checkVariableDeclaration(decl); + } + } + function checkRightHandSideOfForOf(rhsExpression) { + var expressionType = getTypeOfExpression(rhsExpression); + return languageVersion >= 2 + ? checkIteratedType(expressionType, rhsExpression) + : checkElementTypeOfArrayOrString(expressionType, rhsExpression); + } + function checkIteratedType(iterable, expressionForError) { + ts.Debug.assert(languageVersion >= 2); + var iteratedType = getIteratedType(iterable, expressionForError); + if (expressionForError && iteratedType) { + var completeIterableType = globalIterableType !== emptyObjectType + ? createTypeReference(globalIterableType, [iteratedType]) + : emptyObjectType; + checkTypeAssignableTo(iterable, completeIterableType, expressionForError); + } + return iteratedType; + function getIteratedType(iterable, expressionForError) { + if (allConstituentTypesHaveKind(iterable, 1)) { + return undefined; + } + var iteratorFunction = getTypeOfPropertyOfType(iterable, ts.getPropertyNameForKnownSymbolName("iterator")); + if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, 1)) { + return undefined; + } + var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray; + if (iteratorFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator); + } + return undefined; + } + var iterator = getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iterator, 1)) { + return undefined; + } + var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); + if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, 1)) { + return undefined; + } + var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray; + if (iteratorNextFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method); + } + return undefined; + } + var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iteratorNextResult, 1)) { + return undefined; + } + var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); + if (!iteratorNextValue) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); + } + return undefined; + } + return iteratorNextValue; + } + } + function checkElementTypeOfArrayOrString(arrayOrStringType, expressionForError) { + ts.Debug.assert(languageVersion < 2); + var arrayType = removeTypesFromUnionType(arrayOrStringType, 258, true, true); + var hasStringConstituent = arrayOrStringType !== arrayType; + var reportedError = false; + if (hasStringConstituent) { + if (languageVersion < 1) { + error(expressionForError, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + reportedError = true; + } + if (arrayType === emptyObjectType) { + return stringType; + } + } + if (!isArrayLikeType(arrayType)) { + if (!reportedError) { + var diagnostic = hasStringConstituent + ? ts.Diagnostics.Type_0_is_not_an_array_type + : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; + error(expressionForError, diagnostic, typeToString(arrayType)); + } + return hasStringConstituent ? stringType : unknownType; + } + var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType; + if (hasStringConstituent) { + if (arrayElementType.flags & 258) { + return stringType; + } + return getUnionType([arrayElementType, stringType]); + } + return arrayElementType; + } function checkBreakOrContinueStatement(node) { checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } @@ -14227,8 +14824,8 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); - ts.forEach(node.clauses, function (clause) { - if (clause.kind === 214 && !hasDuplicateDefaultClause) { + ts.forEach(node.caseBlock.clauses, function (clause) { + if (clause.kind === 215 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -14240,7 +14837,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 213) { + if (produceDiagnostics && clause.kind === 214) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); if (!isTypeAssignableTo(expressionType, caseType)) { @@ -14254,7 +14851,7 @@ var ts; if (!checkGrammarStatementInAmbientContext(node)) { var current = node.parent; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { break; } if (current.kind === 189 && current.label.text === node.label.text) { @@ -14282,16 +14879,33 @@ var ts; checkBlock(node.tryBlock); var catchClause = node.catchClause; if (catchClause) { - if (catchClause.type) { - var sourceFile = ts.getSourceFileOfNode(node); - var colonStart = ts.skipTrivia(sourceFile.text, catchClause.name.end); - grammarErrorAtPos(sourceFile, colonStart, ":".length, ts.Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation); + if (catchClause.variableDeclaration) { + if (catchClause.variableDeclaration.name.kind !== 64) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); + } + else if (catchClause.variableDeclaration.type) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); + } + else if (catchClause.variableDeclaration.initializer) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); + } + else { + var identifierName = catchClause.variableDeclaration.name.text; + var locals = catchClause.block.locals; + if (locals && ts.hasProperty(locals, identifierName)) { + var localSymbol = locals[identifierName]; + if (localSymbol && (localSymbol.flags & 2) !== 0) { + grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + } + } + checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); + } } - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.name); checkBlock(catchClause.block); } - if (node.finallyBlock) + if (node.finallyBlock) { checkBlock(node.finallyBlock); + } } function checkIndexConstraints(type) { var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1); @@ -14306,8 +14920,8 @@ var ts; }); if (type.flags & 1024 && type.symbol.valueDeclaration.kind === 196) { var classDeclaration = type.symbol.valueDeclaration; - for (var i = 0; i < classDeclaration.members.length; i++) { - var member = classDeclaration.members[i]; + for (var _i = 0, _a = classDeclaration.members, _n = _a.length; _i < _n; _i++) { + var member = _a[_i]; if (!(member.flags & 128) && ts.hasDynamicName(member)) { var propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0); @@ -14334,20 +14948,22 @@ var ts; if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) { return; } - var errorNode; + var _errorNode; if (prop.valueDeclaration.name.kind === 126 || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; + _errorNode = prop.valueDeclaration; } else if (indexDeclaration) { - errorNode = indexDeclaration; + _errorNode = indexDeclaration; } else if (containingType.flags & 2048) { var someBaseClassHasBothPropertyAndIndexer = ts.forEach(containingType.baseTypes, function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; + _errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); + if (_errorNode && !isTypeAssignableTo(propertyType, indexType)) { + var errorMessage = indexKind === 0 + ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 + : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; + error(_errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); } } } @@ -14364,7 +14980,7 @@ var ts; } function checkTypeParameters(typeParameterDeclarations) { if (typeParameterDeclarations) { - for (var i = 0; i < typeParameterDeclarations.length; i++) { + for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { var node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { @@ -14379,10 +14995,12 @@ var ts; } function checkClassDeclaration(node) { checkGrammarClassDeclarationHeritageClauses(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + if (node.name) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + } checkTypeParameters(node.typeParameters); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -14395,10 +15013,10 @@ var ts; if (type.baseTypes.length) { if (produceDiagnostics) { var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); + checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(node, baseTypeNode.typeName, 107455)) { + checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + if (baseType.symbol !== resolveEntityName(baseTypeNode.typeName, 107455)) { error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -14414,7 +15032,7 @@ var ts; if (t !== unknownType) { var declaredType = (t.flags & 4096) ? t.target : t; if (declaredType.flags & (1024 | 2048)) { - checkTypeAssignableTo(type, t, node.name, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -14434,8 +15052,9 @@ var ts; } function checkKindsOfPropertyMemberOverrides(type, baseType) { var baseProperties = getPropertiesOfObjectType(baseType); - for (var i = 0, len = baseProperties.length; i < len; ++i) { - var base = getTargetSymbol(baseProperties[i]); + for (var _i = 0, _n = baseProperties.length; _i < _n; _i++) { + var baseProperty = baseProperties[_i]; + var base = getTargetSymbol(baseProperty); if (base.flags & 134217728) { continue; } @@ -14452,7 +15071,7 @@ var ts; if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) { continue; } - var errorMessage; + var errorMessage = void 0; if (base.flags & 8192) { if (derived.flags & 98304) { errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; @@ -14510,11 +15129,11 @@ var ts; var seen = {}; ts.forEach(type.declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); var ok = true; - for (var i = 0, len = type.baseTypes.length; i < len; ++i) { - var base = type.baseTypes[i]; + for (var _i = 0, _a = type.baseTypes, _n = _a.length; _i < _n; _i++) { + var base = _a[_i]; var properties = getPropertiesOfObjectType(base); - for (var j = 0, proplen = properties.length; j < proplen; ++j) { - var prop = properties[j]; + for (var _b = 0, _c = properties.length; _b < _c; _b++) { + var prop = properties[_b]; if (!ts.hasProperty(seen, prop.name)) { seen[prop.name] = { prop: prop, containingType: base }; } @@ -14569,8 +15188,8 @@ var ts; checkSourceElement(node.type); } function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128)) { + var _nodeLinks = getNodeLinks(node); + if (!(_nodeLinks.flags & 128)) { var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); var autoValue = 0; @@ -14607,7 +15226,7 @@ var ts; getNodeLinks(member).enumMemberValue = autoValue++; } }); - nodeLinks.flags |= 128; + _nodeLinks.flags |= 128; } function getConstantValueForEnumMemberInitializer(initializer, enumIsConst) { return evalConstant(initializer); @@ -14662,10 +15281,10 @@ var ts; } var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; + var _enumType; var propertyName; if (e.kind === 64) { - enumType = currentType; + _enumType = currentType; propertyName = e.text; } else { @@ -14674,21 +15293,21 @@ var ts; e.argumentExpression.kind !== 8) { return undefined; } - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.argumentExpression.text; } else { - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.name.text; } - if (enumType !== currentType) { + if (_enumType !== currentType) { return undefined; } } if (propertyName === undefined) { return undefined; } - var property = getPropertyOfObjectType(enumType, propertyName); + var property = getPropertyOfObjectType(_enumType, propertyName); if (!property || !(property.flags & 8)) { return undefined; } @@ -14748,8 +15367,8 @@ var ts; } function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if ((declaration.kind === 196 || (declaration.kind === 195 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -14762,21 +15381,15 @@ var ts; if (!ts.isInAmbientContext(node) && node.name.kind === 8) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } - else if (node.name.kind === 64 && node.body.kind === 201) { - var statements = node.body.statements; - for (var i = 0, n = statements.length; i < n; i++) { - var statement = statements[i]; - if (statement.kind === 208) { - grammarErrorOnNode(statement, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); - } - } - } } checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - if (symbol.flags & 512 && symbol.declarations.length > 1 && !ts.isInAmbientContext(node) && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { + if (symbol.flags & 512 + && symbol.declarations.length > 1 + && !ts.isInAmbientContext(node) + && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { var classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (classOrFunc) { if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(classOrFunc)) { @@ -14811,8 +15424,10 @@ var ts; return false; } var inAmbientExternalModule = node.parent.kind === 201 && node.parent.parent.name.kind === 8; - if (node.parent.kind !== 220 && !inAmbientExternalModule) { - error(moduleName, node.kind === 209 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); + if (node.parent.kind !== 221 && !inAmbientExternalModule) { + error(moduleName, node.kind === 210 ? + ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : + ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -14821,15 +15436,17 @@ var ts; } return true; } - function checkImportSymbol(node) { + function checkAliasSymbol(node) { var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target !== unknownSymbol) { var excludedMeanings = (symbol.flags & 107455 ? 107455 : 0) | - (symbol.flags & 793056 ? 793056 : 0) | - (symbol.flags & 1536 ? 1536 : 0); + (symbol.flags & 793056 ? 793056 : 0) | + (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 211 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + var message = node.kind === 212 ? + ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : + ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } } @@ -14837,10 +15454,10 @@ var ts; function checkImportBinding(node) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkImportSymbol(node); + checkAliasSymbol(node); } function checkImportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { @@ -14850,7 +15467,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { checkImportBinding(importClause.namedBindings); } else { @@ -14862,50 +15479,108 @@ var ts; } function checkImportEqualsDeclaration(node) { checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { + if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); - if (target !== unknownSymbol) { - if (target.flags & 107455) { - var moduleName = getFirstIdentifier(node.moduleReference); - if (resolveEntityName(node, moduleName, 107455 | 1536).flags & 1536) { - checkExpressionOrQualifiedName(node.moduleReference); - } - else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } + if (node.flags & 1) { + markExportAsReferenced(node); } - } - else { - if (checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); + if (ts.isInternalModuleImportEqualsDeclaration(node)) { + var target = resolveAlias(getSymbolOfNode(node)); + if (target !== unknownSymbol) { + if (target.flags & 107455) { + var moduleName = getFirstIdentifier(node.moduleReference); + if (!(resolveEntityName(moduleName, 107455 | 1536).flags & 1536)) { + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); + } + } + if (target.flags & 793056) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); + } + } } } } function checkExportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { - ts.forEach(node.exportClause.elements, checkImportSymbol); + ts.forEach(node.exportClause.elements, checkExportSpecifier); } } } + function checkExportSpecifier(node) { + checkAliasSymbol(node); + if (!node.parent.parent.moduleSpecifier) { + markExportAsReferenced(node); + } + } function checkExportAssignment(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + var container = node.parent.kind === 221 ? node.parent : node.parent.parent; + if (container.kind === 200 && container.name.kind === 64) { + error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + return; + } + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - var container = node.parent; - if (container.kind !== 220) { - container = container.parent; + if (node.expression.kind === 64) { + markExportAsReferenced(node); + } + else { + checkExpressionCached(node.expression); + } + checkExternalModuleExports(container); + } + function getModuleStatements(node) { + if (node.kind === 221) { + return node.statements; + } + if (node.kind === 200 && node.body.kind === 201) { + return node.body.statements; + } + return emptyArray; + } + function hasExportedMembers(moduleSymbol) { + var declarations = moduleSymbol.declarations; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var statements = getModuleStatements(current); + for (var _a = 0, _b = statements.length; _a < _b; _a++) { + var node = statements[_a]; + if (node.kind === 210) { + var exportClause = node.exportClause; + if (!exportClause) { + return true; + } + var specifiers = exportClause.elements; + for (var _c = 0, _d = specifiers.length; _c < _d; _c++) { + var specifier = specifiers[_c]; + if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) { + return true; + } + } + } + else if (node.kind !== 209 && node.flags & 1 && !(node.flags & 256)) { + return true; + } + } + } + } + function checkExternalModuleExports(node) { + var moduleSymbol = getSymbolOfNode(node); + var links = getSymbolLinks(moduleSymbol); + if (!links.exportsChecked) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + if (hasExportedMembers(moduleSymbol)) { + var declaration = getDeclarationOfAliasSymbol(defaultSymbol) || defaultSymbol.valueDeclaration; + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + } + links.exportsChecked = true; } - checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); } function checkSourceElement(node) { if (!node) @@ -14997,13 +15672,13 @@ var ts; return checkEnumDeclaration(node); case 200: return checkModuleDeclaration(node); - case 203: + case 204: return checkImportDeclaration(node); - case 202: + case 203: return checkImportEqualsDeclaration(node); - case 209: + case 210: return checkExportDeclaration(node); - case 208: + case 209: return checkExportAssignment(node); case 176: checkGrammarStatementInAmbientContext(node); @@ -15044,7 +15719,7 @@ var ts; case 150: case 151: case 152: - case 217: + case 218: case 153: case 154: case 155: @@ -15076,18 +15751,20 @@ var ts; case 185: case 186: case 188: - case 213: + case 202: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: case 193: case 194: case 196: case 199: - case 219: case 220: + case 209: + case 221: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15106,11 +15783,7 @@ var ts; ts.forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); if (ts.isExternalModule(node)) { - var symbol = getExportAssignmentSymbol(node.symbol); - if (symbol && symbol.flags & 8388608) { - getSymbolLinks(symbol).referenced = true; - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + checkExternalModuleExports(node); } if (potentialThisCollisions.length) { ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); @@ -15179,7 +15852,7 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: @@ -15199,11 +15872,6 @@ var ts; copySymbol(location.symbol, meaning); } break; - case 216: - if (location.name.text) { - copySymbol(location.symbol, meaning); - } - break; } memberFlags = location.flags; location = location.parent; @@ -15237,11 +15905,11 @@ var ts; return true; } switch (node.kind) { + case 111: + case 118: + case 120: case 112: - case 119: case 121: - case 113: - case 122: return true; case 98: return node.parent.kind !== 164; @@ -15253,21 +15921,21 @@ var ts; } case 125: ts.Debug.assert(node.kind === 64 || node.kind === 125, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); - var parent = node.parent; - if (parent.kind === 142) { + var _parent = node.parent; + if (_parent.kind === 142) { return false; } - if (139 <= parent.kind && parent.kind <= 147) { + if (139 <= _parent.kind && _parent.kind <= 147) { return true; } - switch (parent.kind) { + switch (_parent.kind) { case 127: - return node === parent.constraint; + return node === _parent.constraint; case 130: case 129: case 128: case 193: - return node === parent.type; + return node === _parent.type; case 195: case 160: case 161: @@ -15276,16 +15944,16 @@ var ts; case 131: case 134: case 135: - return node === parent.type; + return node === _parent.type; case 136: case 137: case 138: - return node === parent.type; + return node === _parent.type; case 158: - return node === parent.type; + return node === _parent.type; case 155: case 156: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + return _parent.typeArguments && ts.indexOf(_parent.typeArguments, node) >= 0; case 157: return false; } @@ -15296,11 +15964,11 @@ var ts; while (nodeOnRightSide.parent.kind === 125) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 202) { + if (nodeOnRightSide.parent.kind === 203) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 208) { - return nodeOnRightSide.parent.exportName === nodeOnRightSide && nodeOnRightSide.parent; + if (nodeOnRightSide.parent.kind === 209) { + return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; } @@ -15312,11 +15980,11 @@ var ts; (node.parent.kind === 153 && node.parent.name === node); } function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 208) { - return resolveEntityName(entityName.parent.parent, entityName, 107455 | 793056 | 1536 | 8388608); + if (entityName.parent.kind === 209) { + return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } if (entityName.kind !== 153) { if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15332,7 +16000,7 @@ var ts; } if (entityName.kind === 64) { var meaning = 107455 | 8388608; - return resolveEntityName(entityName, entityName, meaning); + return resolveEntityName(entityName, meaning); } else if (entityName.kind === 153) { var symbol = getNodeLinks(entityName).resolvedSymbol; @@ -15342,17 +16010,17 @@ var ts; return getNodeLinks(entityName).resolvedSymbol; } else if (entityName.kind === 125) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { + var _symbol = getNodeLinks(entityName).resolvedSymbol; + if (!_symbol) { checkQualifiedName(entityName); } return getNodeLinks(entityName).resolvedSymbol; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 139 ? 793056 : 1536; - meaning |= 8388608; - return resolveEntityName(entityName, entityName, meaning); + var _meaning = entityName.parent.kind === 139 ? 793056 : 1536; + _meaning |= 8388608; + return resolveEntityName(entityName, _meaning); } return undefined; } @@ -15360,11 +16028,13 @@ var ts; if (isInsideWithStatementBody(node)) { return undefined; } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationName(node)) { return getSymbolOfNode(node.parent); } if (node.kind === 64 && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 208 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); + return node.parent.kind === 209 + ? getSymbolOfEntityNameOrPropertyAccessExpression(node) + : getSymbolOfPartOfRightHandSideOfImportEquals(node); } switch (node.kind) { case 64: @@ -15375,18 +16045,19 @@ var ts; case 90: var type = checkExpression(node); return type.symbol; - case 114: + case 113: var constructorDeclaration = node.parent; if (constructorDeclaration && constructorDeclaration.kind === 133) { return constructorDeclaration.parent.symbol; } return undefined; case 8: - if (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) { - var importSymbol = getSymbolOfNode(node.parent.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; + var moduleName; + if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && + ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || + ((node.parent.kind === 204 || node.parent.kind === 210) && + node.parent.moduleSpecifier === node)) { + return resolveExternalModuleName(node, node); } case 7: if (node.parent.kind == 154 && node.parent.argumentExpression === node) { @@ -15403,8 +16074,8 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 218) { - return resolveEntityName(location, location.name, 107455); + if (location && location.kind === 219) { + return resolveEntityName(location.name, 107455); } return undefined; } @@ -15423,21 +16094,21 @@ var ts; return getDeclaredTypeOfSymbol(symbol); } if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); + var _symbol = getSymbolInfo(node); + return _symbol && getDeclaredTypeOfSymbol(_symbol); } if (ts.isDeclaration(node)) { - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); + var _symbol_1 = getSymbolOfNode(node); + return getTypeOfSymbol(_symbol_1); } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); + if (ts.isDeclarationName(node)) { + var _symbol_2 = getSymbolInfo(node); + return _symbol_2 && getTypeOfSymbol(_symbol_2); } if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); + var _symbol_3 = getSymbolInfo(node); + var declaredType = _symbol_3 && getDeclaredTypeOfSymbol(_symbol_3); + return declaredType !== unknownType ? declaredType : getTypeOfSymbol(_symbol_3); } return unknownType; } @@ -15448,7 +16119,7 @@ var ts; return checkExpression(expr); } function getAugmentedPropertiesOfType(type) { - var type = getApparentType(type); + type = getApparentType(type); var propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) { ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { @@ -15462,9 +16133,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name = symbol.name; + var _name = symbol.name; ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name)); + symbols.push(getPropertyOfType(t, _name)); }); return symbols; } @@ -15477,7 +16148,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 220; + return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 221; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -15507,6 +16178,10 @@ var ts; return generatedNames; function generateNames(node) { switch (node.kind) { + case 195: + case 196: + generateNameForFunctionOrClassDeclaration(node); + break; case 200: generateNameForModuleOrEnum(node); generateNames(node.body); @@ -15514,13 +16189,16 @@ var ts; case 199: generateNameForModuleOrEnum(node); break; - case 203: + case 204: generateNameForImportDeclaration(node); break; - case 209: + case 210: generateNameForExportDeclaration(node); break; - case 220: + case 209: + generateNameForExportAssignment(node); + break; + case 221: case 201: ts.forEach(node.statements, generateNames); break; @@ -15530,40 +16208,31 @@ var ts; return ts.hasProperty(globals, name) || ts.hasProperty(sourceFile.identifiers, name) || ts.hasProperty(generatedNames, name); } function makeUniqueName(baseName) { - if (baseName.charCodeAt(0) !== 95) { - var baseName = "_" + baseName; - if (!isExistingName(baseName)) { - return generatedNames[baseName] = baseName; - } - } - if (baseName.charCodeAt(baseName.length - 1) !== 95) { - baseName += "_"; - } - var i = 1; - while (true) { - name = baseName + i; - if (!isExistingName(name)) { - return generatedNames[name] = name; - } - i++; - } + var _name = ts.generateUniqueName(baseName, isExistingName); + return generatedNames[_name] = _name; } function assignGeneratedName(node, name) { getNodeLinks(node).generatedName = ts.unescapeIdentifier(name); } + function generateNameForFunctionOrClassDeclaration(node) { + if (!node.name) { + assignGeneratedName(node, makeUniqueName("default")); + } + } function generateNameForModuleOrEnum(node) { if (node.name.kind === 64) { - var name = node.name.text; - assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name)); + var _name = node.name.text; + assignGeneratedName(node, isUniqueLocalName(_name, node) ? _name : makeUniqueName(_name)); } } function generateNameForImportOrExportDeclaration(node) { var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 ? ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; + var baseName = expr.kind === 8 ? + ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; assignGeneratedName(node, makeUniqueName(baseName)); } function generateNameForImportDeclaration(node) { - if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 206) { + if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 207) { generateNameForImportOrExportDeclaration(node); } } @@ -15572,6 +16241,11 @@ var ts; generateNameForImportOrExportDeclaration(node); } } + function generateNameForExportAssignment(node) { + if (node.expression.kind !== 64) { + assignGeneratedName(node, makeUniqueName("default")); + } + } } function getGeneratedNameForNode(node) { var links = getNodeLinks(node); @@ -15586,9 +16260,9 @@ var ts; function getLocalNameForImportDeclaration(node) { return getGeneratedNameForNode(node); } - function getImportNameSubstitution(symbol) { - var declaration = getDeclarationOfImportSymbol(symbol); - if (declaration && declaration.kind === 207) { + function getAliasNameSubstitution(symbol) { + var declaration = getDeclarationOfAliasSymbol(symbol); + if (declaration && declaration.kind === 208) { var moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); var propertyName = declaration.propertyName || declaration.name; return moduleName + "." + ts.unescapeIdentifier(propertyName.text); @@ -15618,38 +16292,35 @@ var ts; return getExportNameSubstitution(exportSymbol, node.parent); } if (symbol.flags & 8388608) { - return getImportNameSubstitution(symbol); + return getAliasNameSubstitution(symbol); } } } - function getExportAssignmentName(node) { - var symbol = getExportAssignmentSymbol(getSymbolOfNode(node)); - return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; + function hasExportDefaultValue(node) { + var symbol = getResolvedExportAssignmentSymbol(getSymbolOfNode(node)); + return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol); } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 220 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 221 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } - return isImportResolvedToValue(getSymbolOfNode(node)); + return isAliasResolvedToValue(getSymbolOfNode(node)); } - function isImportResolvedToValue(symbol) { - var target = resolveImport(symbol); + function isAliasResolvedToValue(symbol) { + var target = resolveAlias(symbol); return target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || s.constEnumOnlyModule; } - function isReferencedImportDeclaration(node) { - if (isImportSymbolDeclaration(node)) { + function isReferencedAliasDeclaration(node) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (getSymbolLinks(symbol).referenced) { return true; } - if (node.kind === 202 && node.flags & 1 && isImportResolvedToValue(symbol)) { - return true; - } } - return ts.forEachChild(node, isReferencedImportDeclaration); + return ts.forEachChild(node, isReferencedAliasDeclaration); } function isImplementationOfOverload(node) { if (ts.nodeIsPresent(node.body)) { @@ -15668,14 +16339,14 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 219) { + if (node.kind === 220) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & 8)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 219) { + if (declaration.kind === 220) { return getEnumMemberValue(declaration); } } @@ -15683,7 +16354,9 @@ var ts; } function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 | 131072)) ? getTypeOfSymbol(symbol) : unknownType; + var type = symbol && !(symbol.flags & (2048 | 131072)) + ? getTypeOfSymbol(symbol) + : unknownType; getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -15691,15 +16364,42 @@ var ts; getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function isUnknownIdentifier(location, name) { + ts.Debug.assert(!ts.nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location"); return !resolveName(location, name, 107455, undefined, undefined) && !ts.hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name); } + function getBlockScopedVariableId(n) { + ts.Debug.assert(!ts.nodeIsSynthesized(n)); + if (n.parent.kind === 153 && + n.parent.name === n) { + return undefined; + } + if (n.parent.kind === 150 && + n.parent.propertyName === n) { + return undefined; + } + var declarationSymbol = (n.parent.kind === 193 && n.parent.name === n) || + n.parent.kind === 150 + ? getSymbolOfNode(n.parent) + : undefined; + var symbol = declarationSymbol || + getNodeLinks(n).resolvedSymbol || + resolveName(n, n.text, 107455 | 8388608, undefined, undefined); + var isLetOrConst = symbol && + (symbol.flags & 2) && + symbol.valueDeclaration.parent.kind !== 217; + if (isLetOrConst) { + getSymbolLinks(symbol); + return symbol.id; + } + return undefined; + } function createResolver() { return { getGeneratedNameForNode: getGeneratedNameForNode, getExpressionNameSubstitution: getExpressionNameSubstitution, - getExportAssignmentName: getExportAssignmentName, - isReferencedImportDeclaration: isReferencedImportDeclaration, + hasExportDefaultValue: hasExportDefaultValue, + isReferencedAliasDeclaration: isReferencedAliasDeclaration, getNodeCheckFlags: getNodeCheckFlags, isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, isDeclarationVisible: isDeclarationVisible, @@ -15709,7 +16409,8 @@ var ts; isSymbolAccessible: isSymbolAccessible, isEntityNameVisible: isEntityNameVisible, getConstantValue: getConstantValue, - isUnknownIdentifier: isUnknownIdentifier + isUnknownIdentifier: isUnknownIdentifier, + getBlockScopedVariableId: getBlockScopedVariableId }; } function initializeTypeChecker() { @@ -15737,6 +16438,7 @@ var ts; globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); globalESSymbolType = getGlobalType("Symbol"); globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); + globalIterableType = getGlobalType("Iterable", 1); } else { globalTemplateStringsArrayType = unknownType; @@ -15762,10 +16464,10 @@ var ts; case 175: case 195: case 198: + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 128: break; default: @@ -15776,17 +16478,17 @@ var ts; } var lastStatic, lastPrivate, lastProtected, lastDeclare; var flags = 0; - for (var i = 0, n = node.modifiers.length; i < n; i++) { - var modifier = node.modifiers[i]; + for (var _i = 0, _a = node.modifiers, _n = _a.length; _i < _n; _i++) { + var modifier = _a[_i]; switch (modifier.kind) { - case 109: case 108: case 107: - var text; - if (modifier.kind === 109) { + case 106: + var text = void 0; + if (modifier.kind === 108) { text = "public"; } - else if (modifier.kind === 108) { + else if (modifier.kind === 107) { text = "protected"; lastProtected = modifier; } @@ -15800,16 +16502,16 @@ var ts; else if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } flags |= ts.modifierToFlag(modifier.kind); break; - case 110: + case 109: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } else if (node.kind === 128) { @@ -15833,7 +16535,7 @@ var ts; } flags |= 1; break; - case 115: + case 114: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } @@ -15862,7 +16564,7 @@ var ts; return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); } } - else if ((node.kind === 203 || node.kind === 202) && flags & 2) { + else if ((node.kind === 204 || node.kind === 203) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); } else if (node.kind === 197 && flags & 2) { @@ -15939,7 +16641,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); } - if (parameter.flags & 243) { + if (parameter.flags & 499) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); } if (parameter.questionToken) { @@ -15951,7 +16653,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 121 && parameter.type.kind !== 119) { + if (parameter.type.kind !== 120 && parameter.type.kind !== 118) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -15959,7 +16661,7 @@ var ts; } } function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 243) { + if (node.flags & 499) { grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); } } @@ -15981,8 +16683,8 @@ var ts; function checkGrammarForOmittedArgument(node, arguments) { if (arguments) { var sourceFile = ts.getSourceFileOfNode(node); - for (var i = 0, n = arguments.length; i < n; i++) { - var arg = arguments[i]; + for (var _i = 0, _n = arguments.length; _i < _n; _i++) { + var arg = arguments[_i]; if (arg.kind === 172) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } @@ -16008,9 +16710,8 @@ var ts; var seenExtendsClause = false; var seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16024,7 +16725,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -16037,9 +16738,8 @@ var ts; function checkGrammarInterfaceDeclaration(node) { var seenExtendsClause = false; if (node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16047,7 +16747,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -16084,19 +16784,19 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var inStrictMode = (node.parserContextFlags & 1) !== 0; - for (var i = 0, n = node.properties.length; i < n; i++) { - var prop = node.properties[i]; - var name = prop.name; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var prop = _a[_i]; + var _name = prop.name; if (prop.kind === 172 || - name.kind === 126) { - checkGrammarComputedPropertyName(name); + _name.kind === 126) { + checkGrammarComputedPropertyName(_name); continue; } - var currentKind; - if (prop.kind === 217 || prop.kind === 218) { + var currentKind = void 0; + if (prop.kind === 218 || prop.kind === 219) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name.kind === 7) { - checkGrammarNumbericLiteral(name); + if (_name.kind === 7) { + checkGrammarNumbericLiteral(_name); } currentKind = Property; } @@ -16112,26 +16812,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name.text)) { - seen[name.text] = currentKind; + if (!ts.hasProperty(seen, _name.text)) { + seen[_name.text] = currentKind; } else { - var existingKind = seen[name.text]; + var existingKind = seen[_name.text]; if (currentKind === Property && existingKind === Property) { if (inStrictMode) { - grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name.text] = currentKind | existingKind; + seen[_name.text] = currentKind | existingKind; } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } } @@ -16144,29 +16844,28 @@ var ts; var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + var diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement + : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = variableList.declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); + var _diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer + : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return grammarErrorOnNode(firstDeclaration.name, _diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); + var _diagnostic_1 = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation + : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return grammarErrorOnNode(firstDeclaration, _diagnostic_1); } } } return false; } - function checkGrammarForOfStatement(forOfStatement) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_not_currently_supported); - if (languageVersion < 2) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - return checkGrammarForInOrForOfStatement(forOfStatement); - } function checkGrammarAccessor(accessor) { var kind = accessor.kind; if (languageVersion < 1) { @@ -16196,7 +16895,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } - else if (parameter.flags & 243) { + else if (parameter.flags & 499) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } else if (parameter.questionToken) { @@ -16261,13 +16960,14 @@ var ts; function checkGrammarBreakOrContinueStatement(node) { var current = node; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { case 189: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 184 && !isIterationStatement(current.statement, true); + var isMisplacedContinueLabel = node.kind === 184 + && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } @@ -16288,12 +16988,16 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + var message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement + : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); + var _message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement + : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return grammarErrorOnNode(node, _message); } } function checkGrammarBindingElement(node) { @@ -16309,16 +17013,17 @@ var ts; return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } function checkGrammarVariableDeclaration(node) { - if (ts.isInAmbientContext(node)) { - if (ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + if (node.parent.parent.kind !== 182 && node.parent.parent.kind !== 183) { + if (ts.isInAmbientContext(node)) { + if (ts.isBindingPattern(node.name)) { + return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + } + if (node.initializer) { + var equalsTokenLength = "=".length; + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); + } } - if (node.initializer) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else { - if (!node.initializer) { + else if (!node.initializer) { if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); } @@ -16339,8 +17044,9 @@ var ts; } else { var elements = name.elements; - for (var i = 0; i < elements.length; ++i) { - checkGrammarNameInLetOrConstDeclarations(elements[i].name); + for (var _i = 0, _n = elements.length; _i < _n; _i++) { + var element = elements[_i]; + checkGrammarNameInLetOrConstDeclarations(element.name); } } } @@ -16352,14 +17058,6 @@ var ts; if (!declarationList.declarations.length) { return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - if (languageVersion < 2) { - if (ts.isLet(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - else if (ts.isConst(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - } } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { @@ -16399,13 +17097,13 @@ var ts; return false; } function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 4096) !== 0; + var enumIsConst = (enumDecl.flags & 8192) !== 0; var hasError = false; if (!enumIsConst) { var inConstantEnumMemberSection = true; var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var i = 0, n = enumDecl.members.length; i < n; i++) { - var node = enumDecl.members[i]; + for (var _i = 0, _a = enumDecl.members, _n = _a.length; _i < _n; _i++) { + var node = _a[_i]; if (node.name.kind === 126) { hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } @@ -16427,18 +17125,11 @@ var ts; function hasParseDiagnostics(sourceFile) { return sourceFile.parseDiagnostics.length > 0; } - function scanToken(scanner, pos) { - scanner.setTextPos(pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return start; - } function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - var start = scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, scanner.getTextPos() - start, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); return true; } } @@ -16451,16 +17142,17 @@ var ts; function grammarErrorOnNode(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getErrorSpanForNode(node); - var start = span.end > span.pos ? ts.skipTrivia(sourceFile.text, span.pos) : span.pos; - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, span.end - start, message, arg0, arg1, arg2)); + diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); return true; } } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, identifier) { - if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { - var name = ts.declarationNameToString(identifier); - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, name); + function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { + if (name && name.kind === 64) { + var identifier = name; + if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { + var nameText = ts.declarationNameToString(identifier); + return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); + } } } function checkGrammarConstructorTypeParameters(node) { @@ -16496,18 +17188,18 @@ var ts; } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { if (node.kind === 197 || + node.kind === 204 || node.kind === 203 || - node.kind === 202 || + node.kind === 210 || node.kind === 209 || - node.kind === 208 || (node.flags & 2)) { return false; } return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var i = 0, n = file.statements.length; i < n; i++) { - var decl = file.statements[i]; + for (var _i = 0, _a = file.statements, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; if (ts.isDeclaration(decl) || decl.kind === 175) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; @@ -16524,13 +17216,13 @@ var ts; return getNodeLinks(node).hasReportedStatementInAmbientContext = true; } var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isAnyFunction(node.parent)) { + if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 220) { - var links = getNodeLinks(node.parent); - if (!links.hasReportedStatementInAmbientContext) { - return links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 221) { + var _links = getNodeLinks(node.parent); + if (!_links.hasReportedStatementInAmbientContext) { + return _links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -16538,7 +17230,7 @@ var ts; } } function checkGrammarNumbericLiteral(node) { - if (node.flags & 8192) { + if (node.flags & 16384) { if (node.parserContextFlags & 1) { return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); } @@ -16550,9 +17242,8 @@ var ts; function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, scanner.getTextPos(), 0, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); return true; } } @@ -16681,7 +17372,9 @@ var ts; 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 : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); + var nextLineStart = (currentLine + 1) === lineCount + ? currentSourceFile.text.length + 1 + : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); if (pos !== comment.pos) { if (firstCommentLineIndent === undefined) { firstCommentLineIndent = calculateIndent(ts.getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); @@ -16759,7 +17452,8 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 134 || member.kind === 135) && (member.flags & 128) === (accessor.flags & 128)) { + if ((member.kind === 134 || member.kind === 135) + && (member.flags & 128) === (accessor.flags & 128)) { var memberName = ts.getPropertyNameForPropertyNameNode(member.name); var accessorName = ts.getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { @@ -16789,11 +17483,12 @@ var ts; } function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); + var emitOutputFilePathWithoutExtension; if (compilerOptions.outDir) { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; } @@ -16824,7 +17519,7 @@ var ts; var addedGlobalFileReference = false; ts.forEach(root.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - if (referencedFile && ((referencedFile.flags & 1024) || + if (referencedFile && ((referencedFile.flags & 2048) || shouldEmitToOwnFile(referencedFile, compilerOptions) || !addedGlobalFileReference)) { writeReferencePath(referencedFile); @@ -16875,17 +17570,17 @@ var ts; } } function createAndSetNewTextWriterWithSymbolWriter() { - var writer = createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; + var _writer = createTextWriter(newLine); + _writer.trackSymbol = trackSymbol; + _writer.writeKeyword = _writer.write; + _writer.writeOperator = _writer.write; + _writer.writePunctuation = _writer.write; + _writer.writeSpace = _writer.write; + _writer.writeStringLiteral = _writer.writeLiteral; + _writer.writeParameter = _writer.write; + _writer.writeSymbol = _writer.write; + setWriter(_writer); + return _writer; } function setWriter(newWriter) { writer = newWriter; @@ -16953,18 +17648,20 @@ var ts; } } function emitLines(nodes) { - for (var i = 0, n = nodes.length; i < n; i++) { - emit(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + emit(node); } } function emitSeparatedList(nodes, separator, eachNodeEmitFn) { var currentWriterPos = writer.getTextPos(); - for (var i = 0, n = nodes.length; i < n; i++) { + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (currentWriterPos !== writer.getTextPos()) { write(separator); } currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(nodes[i]); + eachNodeEmitFn(node); } } function emitCommaList(nodes, eachNodeEmitFn) { @@ -16983,11 +17680,11 @@ var ts; } function emitType(type) { switch (type.kind) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 8: return writeTextOfNode(currentSourceFile, type); @@ -17016,7 +17713,7 @@ var ts; ts.Debug.fail("Unknown type annotation: " + type.kind); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 202 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 203 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); function writeEntityName(entityName) { @@ -17077,8 +17774,8 @@ var ts; emitLines(node.statements); } function emitExportAssignment(node) { - write("export = "); - writeTextOfNode(currentSourceFile, node.exportName); + write(node.isExportEquals ? "export = " : "export default "); + writeTextOfNode(currentSourceFile, node.expression); write(";"); writeLine(); } @@ -17294,7 +17991,9 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.parent.parent.kind === 196) { - diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; + diagnosticMessage = isImplementsList ? + ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : + ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; @@ -17387,17 +18086,31 @@ var ts; function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.kind === 193) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 130 || node.kind === 129) { if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; } } return diagnosticMessage !== undefined ? { @@ -17437,13 +18150,14 @@ var ts; return; } var accessors = getAllAccessorDeclarations(node.parent.members, node); + var accessorWithTypeAnnotation; if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); writeTextOfNode(currentSourceFile, node.name); if (!(node.flags & 32)) { - var accessorWithTypeAnnotation = node; + accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { var anotherAccessor = node.kind === 134 ? accessors.setAccessor : accessors.getAccessor; @@ -17459,17 +18173,25 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 134 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : undefined; + return accessor.kind === 134 + ? accessor.type + : accessor.parameters.length > 0 + ? accessor.parameters[0].type + : undefined; } } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (accessorWithTypeAnnotation.kind === 135) { if (accessorWithTypeAnnotation.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } return { diagnosticMessage: diagnosticMessage, @@ -17479,10 +18201,18 @@ var ts; } else { if (accessorWithTypeAnnotation.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; } return { diagnosticMessage: diagnosticMessage, @@ -17564,28 +18294,48 @@ var ts; var diagnosticMessage; switch (node.kind) { case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 138: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 132: case 131: if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: ts.Debug.fail("This is unknown kind for signature: " + node.kind); @@ -17624,28 +18374,50 @@ var ts; var diagnosticMessage; switch (node.parent.kind) { case 133: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; break; case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 132: case 131: if (node.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } else if (node.parent.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); @@ -17682,22 +18454,26 @@ var ts; return emitClassDeclaration(node); case 198: return emitTypeAliasDeclaration(node); - case 219: + case 220: return emitEnumMemberDeclaration(node); case 199: return emitEnumDeclaration(node); case 200: return emitModuleDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 208: + case 209: return emitExportAssignment(node); - case 220: + case 221: return emitSourceFile(node); } } function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 1024 ? referencedFile.fileName : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; + var declFileName = referencedFile.flags & 2048 + ? referencedFile.fileName + : shouldEmitToOwnFile(referencedFile, compilerOptions) + ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") + : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false); referencePathsOutput += "/// " + newLine; } @@ -17748,22 +18524,28 @@ var ts; var writeLine = writer.writeLine; var increaseIndent = writer.increaseIndent; var decreaseIndent = writer.decreaseIndent; + var preserveNewLines = compilerOptions.preserveNewLines || false; var currentSourceFile; + var lastFrame; + var currentScopeNames; + var generatedBlockScopeNames; var extendsEmitted = false; var tempCount = 0; var tempVariables; var tempParameters; var externalImports; var exportSpecifiers; + var exportDefault; var writeEmittedFiles = writeJavaScriptFile; var emitLeadingComments = compilerOptions.removeComments ? function (node) { } : emitLeadingDeclarationComments; var emitTrailingComments = compilerOptions.removeComments ? function (node) { } : emitTrailingDeclarationComments; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfLocalPosition; var detachedCommentsInfo; var emitDetachedComments = compilerOptions.removeComments ? function (node) { } : emitDetachedCommentsAtPosition; - var emitPinnedOrTripleSlashComments = compilerOptions.removeComments ? function (node) { } : emitPinnedOrTripleSlashCommentsOfNode; var writeComment = writeCommentRange; - var emit = emitNode; + var emitNodeWithoutSourceMap = compilerOptions.removeComments ? emitNodeWithoutSourceMapWithoutComments : emitNodeWithoutSourceMapWithComments; + var emit = emitNodeWithoutSourceMap; + var emitWithoutComments = emitNodeWithoutSourceMapWithoutComments; var emitStart = function (node) { }; var emitEnd = function (node) { }; var emitToken = emitTokenText; @@ -17774,18 +18556,72 @@ var ts; initializeEmitterWithSourceMaps(); } if (root) { - emit(root); + emitSourceFile(root); } else { ts.forEach(host.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emit(sourceFile); + emitSourceFile(sourceFile); } }); } writeLine(); writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); return; + function emitSourceFile(sourceFile) { + currentSourceFile = sourceFile; + emit(sourceFile); + } + function enterNameScope() { + var names = currentScopeNames; + currentScopeNames = undefined; + if (names) { + lastFrame = { names: names, previous: lastFrame }; + return true; + } + return false; + } + function exitNameScope(popFrame) { + if (popFrame) { + currentScopeNames = lastFrame.names; + lastFrame = lastFrame.previous; + } + else { + currentScopeNames = undefined; + } + } + function generateUniqueNameForLocation(location, baseName) { + var _name; + if (!isExistingName(location, baseName)) { + _name = baseName; + } + else { + _name = ts.generateUniqueName(baseName, function (n) { return isExistingName(location, n); }); + } + return recordNameInCurrentScope(_name); + } + function recordNameInCurrentScope(name) { + if (!currentScopeNames) { + currentScopeNames = {}; + } + return currentScopeNames[name] = name; + } + function isExistingName(location, name) { + if (!resolver.isUnknownIdentifier(location, name)) { + return true; + } + if (currentScopeNames && ts.hasProperty(currentScopeNames, name)) { + return true; + } + var frame = lastFrame; + while (frame) { + if (ts.hasProperty(frame.names, name)) { + return true; + } + frame = frame.previous; + } + return false; + } function initializeEmitterWithSourceMaps() { var sourceMapDir; var sourceMapSourceIndex = -1; @@ -17910,8 +18746,8 @@ var ts; if (scopeName) { var parentIndex = getSourceMapNameIndex(); if (parentIndex !== -1) { - var name = node.name; - if (!name || name.kind !== 126) { + var _name = node.name; + if (!_name || _name.kind !== 126) { scopeName = "." + scopeName; } scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; @@ -17938,8 +18774,10 @@ var ts; node.kind === 196 || node.kind === 199) { if (node.name) { - var name = node.name; - scopeName = name.kind === 126 ? ts.getTextOfNode(name) : node.name.text; + var _name = node.name; + scopeName = _name.kind === 126 + ? ts.getTextOfNode(_name) + : node.name.text; } recordScopeNameStart(scopeName); } @@ -18017,21 +18855,32 @@ var ts; else { sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); } - function emitNodeWithMap(node) { + function emitNodeWithSourceMap(node) { if (node) { - if (node.kind != 220) { + if (ts.nodeIsSynthesized(node)) { + return emitNodeWithoutSourceMap(node); + } + if (node.kind != 221) { recordEmitNodeStartSpan(node); - emitNode(node); + emitNodeWithoutSourceMap(node); recordEmitNodeEndSpan(node); } else { recordNewSourceFileStart(node); - emitNode(node); + emitNodeWithoutSourceMap(node); } } } + function emitNodeWithSourceMapWithoutComments(node) { + if (node) { + recordEmitNodeStartSpan(node); + emitNodeWithoutSourceMapWithoutComments(node); + recordEmitNodeEndSpan(node); + } + } writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithMap; + emit = emitNodeWithSourceMap; + emitWithoutComments = emitNodeWithSourceMapWithoutComments; emitStart = recordEmitNodeStartSpan; emitEnd = recordEmitNodeEndSpan; emitToken = writeTextWithSpanRecord; @@ -18042,16 +18891,21 @@ var ts; function writeJavaScriptFile(emitOutput, writeByteOrderMark) { writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } - function createTempVariable(location, forLoopVariable) { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && resolver.isUnknownIdentifier(location, name)) { - break; + function createTempVariable(location, preferredName) { + for (var name = preferredName; !name || isExistingName(location, name); tempCount++) { + var char = 97 + tempCount; + if (char === 105 || char === 110) { + continue; + } + if (tempCount < 26) { + name = "_" + String.fromCharCode(char); + } + else { + name = "_" + (tempCount - 26); } - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + 97) : tempCount - 25); - tempCount++; } - var result = ts.createNode(64); + recordNameInCurrentScope(name); + var result = ts.createSynthesizedNode(64); result.text = name; return result; } @@ -18061,8 +18915,8 @@ var ts; } tempVariables.push(name); } - function createAndRecordTempVariable(location) { - var temp = createTempVariable(location, false); + function createAndRecordTempVariable(location, preferredName) { + var temp = createTempVariable(location, preferredName); recordTempDeclaration(temp); return temp; } @@ -18095,7 +18949,7 @@ var ts; emit(node); } } - function emitParenthesized(node, parenthesized) { + function emitParenthesizedIf(node, parenthesized) { if (parenthesized) { write("("); } @@ -18112,7 +18966,7 @@ var ts; function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { ts.Debug.assert(nodes.length > 0); increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -18122,7 +18976,7 @@ var ts; } for (var i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -18132,12 +18986,11 @@ var ts; } emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes)); if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -18182,37 +19035,109 @@ var ts; emit(nodes[i]); } } - function isBinaryOrOctalIntegerLiteral(text) { - if (text.length <= 0) { - return false; - } - if (text.charCodeAt(1) === 66 || text.charCodeAt(1) === 98 || - text.charCodeAt(1) === 79 || text.charCodeAt(1) === 111) { - return true; + function isBinaryOrOctalIntegerLiteral(node, text) { + if (node.kind === 7 && text.length > 1) { + switch (text.charCodeAt(1)) { + case 98: + case 66: + case 111: + case 79: + return true; + } } return false; } function emitLiteral(node) { - var text = languageVersion < 2 && ts.isTemplateLiteralKind(node.kind) ? getTemplateLiteralAsStringLiteral(node) : node.parent ? ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node) : node.text; + var text = getLiteralText(node); if (compilerOptions.sourceMap && (node.kind === 8 || ts.isTemplateLiteralKind(node.kind))) { writer.writeLiteral(text); } - else if (languageVersion < 2 && node.kind === 7 && isBinaryOrOctalIntegerLiteral(text)) { + else if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) { write(node.text); } else { write(text); } } - function getTemplateLiteralAsStringLiteral(node) { - return '"' + ts.escapeString(node.text) + '"'; + function getLiteralText(node) { + if (languageVersion < 2 && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { + return getQuotedEscapedLiteralText('"', node.text, '"'); + } + if (node.parent) { + return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + } + switch (node.kind) { + case 8: + return getQuotedEscapedLiteralText('"', node.text, '"'); + case 10: + return getQuotedEscapedLiteralText('`', node.text, '`'); + case 11: + return getQuotedEscapedLiteralText('`', node.text, '${'); + case 12: + return getQuotedEscapedLiteralText('}', node.text, '${'); + case 13: + return getQuotedEscapedLiteralText('}', node.text, '`'); + case 7: + return node.text; + } + ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); + } + function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { + return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; + } + function emitDownlevelRawTemplateLiteral(node) { + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var isLast = node.kind === 10 || node.kind === 13; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + text = text.replace(/\r\n?/g, "\n"); + text = ts.escapeString(text); + write('"' + text + '"'); + } + function emitDownlevelTaggedTemplateArray(node, literalEmitter) { + write("["); + if (node.template.kind === 10) { + literalEmitter(node.template); + } + else { + literalEmitter(node.template.head); + ts.forEach(node.template.templateSpans, function (child) { + write(", "); + literalEmitter(child.literal); + }); + } + write("]"); + } + function emitDownlevelTaggedTemplate(node) { + var tempVariable = createAndRecordTempVariable(node); + write("("); + emit(tempVariable); + write(" = "); + emitDownlevelTaggedTemplateArray(node, emit); + write(", "); + emit(tempVariable); + write(".raw = "); + emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); + write(", "); + emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); + write("("); + emit(tempVariable); + if (node.template.kind === 169) { + ts.forEach(node.template.templateSpans, function (templateSpan) { + write(", "); + var needsParens = templateSpan.expression.kind === 167 + && templateSpan.expression.operatorToken.kind === 23; + emitParenthesizedIf(templateSpan.expression, needsParens); + }); + } + write("))"); } function emitTemplateExpression(node) { if (languageVersion >= 2) { ts.forEachChild(node, emit); return; } - var emitOuterParens = ts.isExpression(node.parent) && templateNeedsParens(node, node.parent); + var emitOuterParens = ts.isExpression(node.parent) + && templateNeedsParens(node, node.parent); if (emitOuterParens) { write("("); } @@ -18221,13 +19146,14 @@ var ts; emitLiteral(node.head); headEmitted = true; } - for (var i = 0; i < node.templateSpans.length; i++) { + for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 159 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; + var needsParens = templateSpan.expression.kind !== 159 + && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); } - emitParenthesized(templateSpan.expression, needsParens); + emitParenthesizedIf(templateSpan.expression, needsParens); if (templateSpan.literal.text.length !== 0) { write(" + "); emitLiteral(templateSpan.literal); @@ -18297,16 +19223,16 @@ var ts; } } function isNotExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 128: case 193: case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 195: @@ -18317,16 +19243,14 @@ var ts; case 197: case 199: case 200: - case 202: - return parent.name === node; + case 203: + return _parent.name === node; case 185: case 184: - case 208: + case 209: return false; case 189: return node.parent.label === node; - case 216: - return node.parent.name === node; } } function emitExpressionIdentifier(node) { @@ -18338,7 +19262,18 @@ var ts; writeTextOfNode(currentSourceFile, node); } } + function getBlockScopedVariableId(node) { + return !ts.nodeIsSynthesized(node) && resolver.getBlockScopedVariableId(node); + } function emitIdentifier(node) { + var variableId = getBlockScopedVariableId(node); + if (variableId !== undefined && generatedBlockScopeNames) { + var text = generatedBlockScopeNames[variableId]; + if (text) { + write(text); + return; + } + } if (!node.parent) { write(node.text); } @@ -18401,7 +19336,7 @@ var ts; write("..."); emit(node.expression); } - function needsParenthesisForPropertyAccess(node) { + function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 64: case 151: @@ -18416,8 +19351,8 @@ var ts; function emitListWithSpread(elements, multiLine, trailingComma) { var pos = 0; var group = 0; - var length = elements.length; - while (pos < length) { + var _length = elements.length; + while (pos < _length) { if (group === 1) { write(".concat("); } @@ -18427,19 +19362,19 @@ var ts; var e = elements[pos]; if (e.kind === 171) { e = e.expression; - emitParenthesized(e, group === 0 && needsParenthesisForPropertyAccess(e)); + emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; } else { var i = pos; - while (i < length && elements[i].kind !== 171) { + while (i < _length && elements[i].kind !== 171) { i++; } write("["); if (multiLine) { increaseIndent(); } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); + emitList(elements, pos, i - pos, multiLine, trailingComma && i === _length); if (multiLine) { decreaseIndent(); } @@ -18466,24 +19401,18 @@ var ts; write("]"); } else { - emitListWithSpread(elements, (node.flags & 256) !== 0, elements.hasTrailingComma); + emitListWithSpread(elements, (node.flags & 512) !== 0, elements.hasTrailingComma); } } - function createSynthesizedNode(kind) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - return node; - } function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { var parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); return emit(parenthesizedObjectLiteral); } function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral, firstComputedPropertyIndex) { var tempVar = createAndRecordTempVariable(originalObjectLiteral); - var initialObjectLiteral = createSynthesizedNode(152); + var initialObjectLiteral = ts.createSynthesizedNode(152); initialObjectLiteral.properties = originalObjectLiteral.properties.slice(0, firstComputedPropertyIndex); - initialObjectLiteral.flags |= 256; + initialObjectLiteral.flags |= 512; var propertyPatches = createBinaryExpression(tempVar, 52, initialObjectLiteral); ts.forEach(originalObjectLiteral.properties, function (property) { var patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); @@ -18491,7 +19420,7 @@ var ts; propertyPatches = createBinaryExpression(propertyPatches, 23, patchedProperty); } }); - propertyPatches = createBinaryExpression(propertyPatches, 23, tempVar); + propertyPatches = createBinaryExpression(propertyPatches, 23, createIdentifier(tempVar.text, true)); var result = createParenthesizedExpression(propertyPatches); return result; } @@ -18502,13 +19431,13 @@ var ts; function tryCreatePatchingPropertyAssignment(objectLiteral, tempVar, property) { var leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); var maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); - return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide); + return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide, true); } function tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property) { switch (property.kind) { - case 217: - return property.initializer; case 218: + return property.initializer; + case 219: return createIdentifier(resolver.getExpressionNameSubstitution(property.name)); case 132: return createFunctionExpression(property.parameters, property.body); @@ -18518,17 +19447,17 @@ var ts; if (firstAccessor !== property) { return undefined; } - var propertyDescriptor = createSynthesizedNode(152); + var propertyDescriptor = ts.createSynthesizedNode(152); var descriptorProperties = []; if (getAccessor) { - var getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); - descriptorProperties.push(getProperty); + var _getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); + descriptorProperties.push(_getProperty); } if (setAccessor) { var setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); descriptorProperties.push(setProperty); } - var trueExpr = createSynthesizedNode(94); + var trueExpr = ts.createSynthesizedNode(94); var enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); descriptorProperties.push(enumerableTrue); var configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); @@ -18541,7 +19470,7 @@ var ts; } } function createParenthesizedExpression(expression) { - var result = createSynthesizedNode(159); + var result = ts.createSynthesizedNode(159); result.expression = expression; return result; } @@ -18555,13 +19484,18 @@ var ts; result.end = -1; return result; } - function createBinaryExpression(left, operator, right) { - var result = createSynthesizedNode(167); - result.operatorToken = createSynthesizedNode(operator); + function createBinaryExpression(left, operator, right, startsOnNewLine) { + var result = ts.createSynthesizedNode(167, startsOnNewLine); + result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } + function createExpressionStatement(expression) { + var result = ts.createSynthesizedNode(177); + result.expression = expression; + return result; + } function createMemberAccessForPropertyName(expression, memberName) { if (memberName.kind === 64) { return createPropertyAccessExpression(expression, memberName); @@ -18577,36 +19511,37 @@ var ts; } } function createPropertyAssignment(name, initializer) { - var result = createSynthesizedNode(217); + var result = ts.createSynthesizedNode(218); result.name = name; result.initializer = initializer; return result; } function createFunctionExpression(parameters, body) { - var result = createSynthesizedNode(160); + var result = ts.createSynthesizedNode(160); result.parameters = parameters; result.body = body; return result; } function createPropertyAccessExpression(expression, name) { - var result = createSynthesizedNode(153); + var result = ts.createSynthesizedNode(153); result.expression = expression; + result.dotToken = ts.createSynthesizedNode(20); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = createSynthesizedNode(154); + var result = ts.createSynthesizedNode(154); result.expression = expression; result.argumentExpression = argumentExpression; return result; } - function createIdentifier(name) { - var result = createSynthesizedNode(64); + function createIdentifier(name, startsOnNewLine) { + var result = ts.createSynthesizedNode(64, startsOnNewLine); result.text = name; return result; } function createCallExpression(invokedExpression, arguments) { - var result = createSynthesizedNode(155); + var result = ts.createSynthesizedNode(155); result.expression = invokedExpression; result.arguments = arguments; return result; @@ -18629,7 +19564,6 @@ var ts; } } write("{"); - var properties = node.properties; if (properties.length) { emitLinePreservingList(node, properties, languageVersion >= 1, true); } @@ -18671,13 +19605,31 @@ var ts; } return false; } + function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { + var realNodesAreOnDifferentLines = preserveNewLines && !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { + increaseIndent(); + writeLine(); + return true; + } + else { + if (valueToWriteWhenNotIndenting) { + write(valueToWriteWhenNotIndenting); + } + return false; + } + } function emitPropertyAccess(node) { if (tryEmitConstantValue(node)) { return; } emit(node.expression); + var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); write("."); + var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); emit(node.name); + decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } function emitQualifiedName(node) { emit(node.left); @@ -18791,26 +19743,33 @@ var ts; } } function emitTaggedTemplateExpression(node) { - emit(node.tag); - write(" "); - emit(node.template); + if (compilerOptions.target >= 2) { + emit(node.tag); + write(" "); + emit(node.template); + } + else { + emitDownlevelTaggedTemplate(node); + } } function emitParenExpression(node) { - if (node.expression.kind === 158) { - var operand = node.expression.expression; - while (operand.kind == 158) { - operand = operand.expression; - } - if (operand.kind !== 165 && - operand.kind !== 164 && - operand.kind !== 163 && - operand.kind !== 162 && - operand.kind !== 166 && - operand.kind !== 156 && - !(operand.kind === 155 && node.parent.kind === 156) && - !(operand.kind === 160 && node.parent.kind === 155)) { - emit(operand); - return; + if (!node.parent || node.parent.kind !== 161) { + if (node.expression.kind === 158) { + var operand = node.expression.expression; + while (operand.kind == 158) { + operand = operand.expression; + } + if (operand.kind !== 165 && + operand.kind !== 164 && + operand.kind !== 163 && + operand.kind !== 162 && + operand.kind !== 166 && + operand.kind !== 156 && + !(operand.kind === 155 && node.parent.kind === 156) && + !(operand.kind === 160 && node.parent.kind === 155)) { + emit(operand); + return; + } } } write("("); @@ -18852,52 +19811,40 @@ var ts; function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 52 && (node.left.kind === 152 || node.left.kind === 151)) { - emitDestructuring(node); + emitDestructuring(node, node.parent.kind === 177); } else { emit(node.left); - if (node.operatorToken.kind !== 23) { - write(" "); - } + var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 ? " " : undefined); write(ts.tokenToString(node.operatorToken.kind)); - var operatorEnd = ts.getLineAndCharacterOfPosition(currentSourceFile, node.operatorToken.end); - var rightStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.right.pos)); - var onDifferentLine = operatorEnd.line !== rightStart.line; - if (onDifferentLine) { - var exprStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - var firstCharOfExpr = getFirstNonWhitespaceCharacterIndexOnLine(exprStart.line); - var shouldIndent = rightStart.character > firstCharOfExpr; - if (shouldIndent) { - increaseIndent(); - } - writeLine(); - } - else { - write(" "); - } + var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); emit(node.right); - if (shouldIndent) { - decreaseIndent(); - } + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } } - function getFirstNonWhitespaceCharacterIndexOnLine(line) { - var lineStart = ts.getLineStarts(currentSourceFile)[line]; - var text = currentSourceFile.text; - for (var i = lineStart; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (!ts.isWhiteSpace(text.charCodeAt(i)) || ts.isLineBreak(ch)) { - break; - } - } - return i - lineStart; + function synthesizedNodeStartsOnNewLine(node) { + return ts.nodeIsSynthesized(node) && node.startsOnNewLine; } function emitConditionalExpression(node) { emit(node.condition); - write(" ? "); + var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); + write("?"); + var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); emit(node.whenTrue); - write(" : "); + decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); + var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); + write(":"); + var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); emit(node.whenFalse); + decreaseIndentIf(indentedBeforeColon, indentedAfterColon); + } + function decreaseIndentIf(value1, value2) { + if (value1) { + decreaseIndent(); + } + if (value2) { + decreaseIndent(); + } } function isSingleLineEmptyBlock(node) { if (node && node.kind === 174) { @@ -18906,7 +19853,7 @@ var ts; } } function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(14, node.pos); write(" "); emitToken(15, node.statements.end); @@ -18941,7 +19888,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesized(node.expression, node.expression.kind === 161); + emitParenthesizedIf(node.expression, node.expression.kind === 161); write(";"); } function emitIfStatement(node) { @@ -18982,6 +19929,30 @@ var ts; write(")"); emitEmbeddedStatement(node.statement); } + function emitStartOfVariableDeclarationList(decl, startPos) { + var tokenKind = 97; + if (decl && languageVersion >= 2) { + if (ts.isLet(decl)) { + tokenKind = 104; + } + else if (ts.isConst(decl)) { + tokenKind = 69; + } + } + if (startPos !== undefined) { + emitToken(tokenKind, startPos); + } + else { + switch (tokenKind) { + case 97: + return write("var "); + case 104: + return write("let "); + case 69: + return write("const "); + } + } + } function emitForStatement(node) { var endPos = emitToken(81, node.pos); write(" "); @@ -18989,17 +19960,9 @@ var ts; if (node.initializer && node.initializer.kind === 194) { var variableDeclarationList = node.initializer; var declarations = variableDeclarationList.declarations; - if (declarations[0] && ts.isLet(declarations[0])) { - emitToken(105, endPos); - } - else if (declarations[0] && ts.isConst(declarations[0])) { - emitToken(69, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(declarations[0], endPos); write(" "); - emitCommaList(variableDeclarationList.declarations); + emitCommaList(declarations); } else if (node.initializer) { emit(node.initializer); @@ -19012,6 +19975,9 @@ var ts; emitEmbeddedStatement(node.statement); } function emitForInOrForOfStatement(node) { + if (languageVersion < 2 && node.kind === 183) { + return emitDownLevelForOfStatement(node); + } var endPos = emitToken(81, node.pos); write(" "); endPos = emitToken(16, endPos); @@ -19019,12 +19985,7 @@ var ts; var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { var decl = variableDeclarationList.declarations[0]; - if (ts.isLet(decl)) { - emitToken(105, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(decl, endPos); write(" "); emit(decl); } @@ -19042,6 +20003,99 @@ var ts; emitToken(17, node.expression.end); emitEmbeddedStatement(node.statement); } + function emitDownLevelForOfStatement(node) { + var endPos = emitToken(81, node.pos); + write(" "); + endPos = emitToken(16, endPos); + var rhsIsIdentifier = node.expression.kind === 64; + var counter = createTempVariable(node, "_i"); + var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(node); + var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, "_n") : undefined; + emitStart(node.expression); + write("var "); + emitNodeWithoutSourceMap(counter); + write(" = 0"); + emitEnd(node.expression); + if (!rhsIsIdentifier) { + write(", "); + emitStart(node.expression); + emitNodeWithoutSourceMap(rhsReference); + write(" = "); + emitNodeWithoutSourceMap(node.expression); + emitEnd(node.expression); + } + if (cachedLength) { + write(", "); + emitNodeWithoutSourceMap(cachedLength); + write(" = "); + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write(" < "); + if (cachedLength) { + emitNodeWithoutSourceMap(cachedLength); + } + else { + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + emitEnd(node.initializer); + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write("++"); + emitEnd(node.initializer); + emitToken(17, node.expression.end); + write(" {"); + writeLine(); + increaseIndent(); + var rhsIterationValue = createElementAccessExpression(rhsReference, counter); + emitStart(node.initializer); + if (node.initializer.kind === 194) { + write("var "); + var variableDeclarationList = node.initializer; + if (variableDeclarationList.declarations.length > 0) { + var declaration = variableDeclarationList.declarations[0]; + if (ts.isBindingPattern(declaration.name)) { + emitDestructuring(declaration, false, rhsIterationValue); + } + else { + emitNodeWithoutSourceMap(declaration); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + emitNodeWithoutSourceMap(createTempVariable(node)); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + var assignmentExpression = createBinaryExpression(node.initializer, 52, rhsIterationValue, false); + if (node.initializer.kind === 151 || node.initializer.kind === 152) { + emitDestructuring(assignmentExpression, true, undefined, node); + } + else { + emitNodeWithoutSourceMap(assignmentExpression); + } + } + emitEnd(node.initializer); + write(";"); + if (node.statement.kind === 174) { + emitLines(node.statement.statements); + } + else { + writeLine(); + emit(node.statement); + } + writeLine(); + decreaseIndent(); + write("}"); + } function emitBreakOrContinueStatement(node) { emitToken(node.kind === 185 ? 65 : 70, node.pos); emitOptional(" ", node.label); @@ -19065,7 +20119,10 @@ var ts; emit(node.expression); endPos = emitToken(17, node.expression.end); write(" "); - emitToken(14, endPos); + emitCaseBlock(node.caseBlock, endPos); + } + function emitCaseBlock(node, startPos) { + emitToken(14, startPos); increaseIndent(); emitLines(node.clauses); decreaseIndent(); @@ -19085,7 +20142,7 @@ var ts; getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 213) { + if (node.kind === 214) { write("case "); emit(node.expression); write(":"); @@ -19093,7 +20150,7 @@ var ts; else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -19123,8 +20180,8 @@ var ts; var endPos = emitToken(67, node.pos); write(" "); emitToken(16, endPos); - emit(node.name); - emitToken(17, node.name.end); + emit(node.variableDeclaration); + emitToken(17, node.variableDeclaration ? node.variableDeclaration.end : endPos); write(" "); emitBlock(node.block); } @@ -19153,37 +20210,46 @@ var ts; emitContainingModuleName(node); write("."); } - emitNode(node.name); + emitNodeWithoutSourceMap(node.name); emitEnd(node.name); } + function createVoidZero() { + var zero = ts.createSynthesizedNode(7); + zero.text = "0"; + var result = ts.createSynthesizedNode(164); + result.expression = zero; + return result; + } function emitExportMemberAssignments(name) { - if (exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { + if (!exportDefault && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { ts.forEach(exportSpecifiers[name.text], function (specifier) { writeLine(); emitStart(specifier.name); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); emitEnd(specifier.name); write(" = "); - emitNode(name); + emitNodeWithoutSourceMap(name); write(";"); }); } } - function emitDestructuring(root, value) { + function emitDestructuring(root, isAssignmentExpressionStatement, value, lowestNonSynthesizedAncestor) { var emitCount = 0; - var isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; + var _isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; if (root.kind === 167) { emitAssignmentExpression(root); } else { + ts.Debug.assert(!isAssignmentExpressionStatement); emitBindingElement(root, value); } function emitAssignment(name, value) { if (emitCount++) { write(", "); } + renameNonTopLevelLetAndConst(name); if (name.parent && (name.parent.kind === 193 || name.parent.kind === 150)) { emitModuleMemberName(name.parent); } @@ -19195,8 +20261,8 @@ var ts; } function ensureIdentifier(expr) { if (expr.kind !== 64) { - var identifier = createTempVariable(root); - if (!isDeclaration) { + var identifier = createTempVariable(lowestNonSynthesizedAncestor || root); + if (!_isDeclaration) { recordTempDeclaration(identifier); } emitAssignment(identifier, expr); @@ -19204,27 +20270,25 @@ var ts; } return expr; } - function createVoidZero() { - var zero = ts.createNode(7); - zero.text = "0"; - var result = ts.createNode(164); - result.expression = zero; - return result; - } function createDefaultValueCheck(value, defaultValue) { value = ensureIdentifier(value); - var equals = ts.createNode(167); + var equals = ts.createSynthesizedNode(167); equals.left = value; - equals.operatorToken = ts.createNode(30); + equals.operatorToken = ts.createSynthesizedNode(30); equals.right = createVoidZero(); - var cond = ts.createNode(168); - cond.condition = equals; - cond.whenTrue = defaultValue; - cond.whenFalse = value; + return createConditionalExpression(equals, defaultValue, value); + } + function createConditionalExpression(condition, whenTrue, whenFalse) { + var cond = ts.createSynthesizedNode(168); + cond.condition = condition; + cond.questionToken = ts.createSynthesizedNode(50); + cond.whenTrue = whenTrue; + cond.colonToken = ts.createSynthesizedNode(51); + cond.whenFalse = whenFalse; return cond; } function createNumericLiteral(value) { - var node = ts.createNode(7); + var node = ts.createSynthesizedNode(7); node.text = "" + value; return node; } @@ -19232,7 +20296,7 @@ var ts; if (expr.kind === 64 || expr.kind === 153 || expr.kind === 154) { return expr; } - var node = ts.createNode(159); + var node = ts.createSynthesizedNode(159); node.expression = expr; return node; } @@ -19240,13 +20304,10 @@ var ts; if (propName.kind !== 64) { return createElementAccess(object, propName); } - var node = ts.createNode(153); - node.expression = parenthesizeForAccess(object); - node.name = propName; - return node; + return createPropertyAccessExpression(parenthesizeForAccess(object), propName); } function createElementAccess(object, index) { - var node = ts.createNode(154); + var node = ts.createSynthesizedNode(154); node.expression = parenthesizeForAccess(object); node.argumentExpression = index; return node; @@ -19256,9 +20317,9 @@ var ts; if (properties.length !== 1) { value = ensureIdentifier(value); } - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { var propName = (p.name); emitDestructuringAssignment(p.initializer || propName, createPropertyAccess(value, propName)); } @@ -19302,18 +20363,18 @@ var ts; } function emitAssignmentExpression(root) { var target = root.left; - var value = root.right; - if (root.parent.kind === 177) { - emitDestructuringAssignment(target, value); + var _value = root.right; + if (isAssignmentExpressionStatement) { + emitDestructuringAssignment(target, _value); } else { if (root.parent.kind !== 159) { write("("); } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); + _value = ensureIdentifier(_value); + emitDestructuringAssignment(target, _value); write(", "); - emit(value); + emit(_value); if (root.parent.kind !== 159) { write(")"); } @@ -19360,7 +20421,7 @@ var ts; function emitVariableDeclaration(node) { if (ts.isBindingPattern(node.name)) { if (languageVersion < 2) { - emitDestructuring(node); + emitDestructuring(node, false); } else { emit(node.name); @@ -19368,30 +20429,65 @@ var ts; } } else { + renameNonTopLevelLetAndConst(node.name); emitModuleMemberName(node); - emitOptional(" = ", node.initializer); + var initializer = node.initializer; + if (!initializer && languageVersion < 2) { + var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256) && + (getCombinedFlagsForIdentifier(node.name) & 4096); + if (isUninitializedLet && + node.parent.parent.kind !== 182 && + node.parent.parent.kind !== 183) { + initializer = createVoidZero(); + } + } + emitOptional(" = ", initializer); } } function emitExportVariableAssignments(node) { - var name = node.name; - if (name.kind === 64) { - emitExportMemberAssignments(name); + var _name = node.name; + if (_name.kind === 64) { + emitExportMemberAssignments(_name); } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); + else if (ts.isBindingPattern(_name)) { + ts.forEach(_name.elements, emitExportVariableAssignments); } } + function getCombinedFlagsForIdentifier(node) { + if (!node.parent || (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return 0; + } + return ts.getCombinedNodeFlags(node.parent); + } + function renameNonTopLevelLetAndConst(node) { + if (languageVersion >= 2 || + ts.nodeIsSynthesized(node) || + node.kind !== 64 || + (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return; + } + var combinedFlags = getCombinedFlagsForIdentifier(node); + if (((combinedFlags & 12288) === 0) || combinedFlags & 1) { + return; + } + var list = ts.getAncestor(node, 194); + if (list.parent.kind === 175 && list.parent.parent.kind === 221) { + return; + } + var blockScopeContainer = ts.getEnclosingBlockScopeContainer(node); + var _parent = blockScopeContainer.kind === 221 + ? blockScopeContainer + : blockScopeContainer.parent; + var generatedName = generateUniqueNameForLocation(_parent, node.text); + var variableId = resolver.getBlockScopedVariableId(node); + if (!generatedBlockScopeNames) { + generatedBlockScopeNames = []; + } + generatedBlockScopeNames[variableId] = generatedName; + } function emitVariableStatement(node) { if (!(node.flags & 1)) { - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } + emitStartOfVariableDeclarationList(node.declarationList); } emitCommaList(node.declarationList.declarations); write(";"); @@ -19402,12 +20498,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name = createTempVariable(node); + var _name = createTempVariable(node); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name); - emit(name); + tempParameters.push(_name); + emit(_name); } else { emit(node.name); @@ -19428,7 +20524,7 @@ var ts; if (ts.isBindingPattern(p.name)) { writeLine(); write("var "); - emitDestructuring(p, tempParameters[tempIndex]); + emitDestructuring(p, false, tempParameters[tempIndex]); write(";"); tempIndex++; } @@ -19436,14 +20532,14 @@ var ts; writeLine(); emitStart(p); write("if ("); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" === void 0)"); emitEnd(p); write(" { "); emitStart(p); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" = "); - emitNode(p.initializer); + emitNodeWithoutSourceMap(p.initializer); emitEnd(p); write("; }"); } @@ -19454,12 +20550,12 @@ var ts; if (languageVersion < 2 && ts.hasRestParameters(node)) { var restIndex = node.parameters.length - 1; var restParam = node.parameters[restIndex]; - var tempName = createTempVariable(node, true).text; + var tempName = createTempVariable(node, "_i").text; writeLine(); emitLeadingComments(restParam); emitStart(restParam); write("var "); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write(" = [];"); emitEnd(restParam); emitTrailingComments(restParam); @@ -19480,7 +20576,7 @@ var ts; increaseIndent(); writeLine(); emitStart(restParam); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); emitEnd(restParam); decreaseIndent(); @@ -19496,6 +20592,14 @@ var ts; function shouldEmitAsArrowFunction(node) { return node.kind === 161 && languageVersion >= 2; } + function emitDeclarationName(node) { + if (node.name) { + emitNodeWithoutSourceMap(node.name); + } + else { + write(resolver.getGeneratedNameForNode(node)); + } + } function emitFunctionDeclaration(node) { if (ts.nodeIsMissing(node.body)) { return emitPinnedOrTripleSlashComments(node); @@ -19507,10 +20611,10 @@ var ts; write("function "); } if (node.kind === 195 || (node.kind === 160 && node.name)) { - emit(node.name); + emitDeclarationName(node); } emitSignatureAndBody(node); - if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } if (node.kind !== 132 && node.kind !== 131) { @@ -19550,6 +20654,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); if (shouldEmitAsArrowFunction(node)) { emitSignatureParametersForArrow(node); write(" =>"); @@ -19566,15 +20671,16 @@ var ts; else { emitExpressionFunctionBody(node, node.body); } - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -19590,7 +20696,11 @@ var ts; return; } write(" "); - emit(body); + var current = body; + while (current.kind === 158) { + current = current.expression; + } + emitParenthesizedIf(body, current.kind === 152); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -19601,11 +20711,11 @@ var ts; emitFunctionBodyPreamble(node); var preambleEmitted = writer.getTextPos() !== outPos; decreaseIndent(); - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); - emitNode(body, true); + emitWithoutComments(body); emitEnd(body); write(";"); emitTempDeclarations(false); @@ -19616,7 +20726,7 @@ var ts; writeLine(); emitLeadingComments(node.body); write("return "); - emit(node.body, true); + emitWithoutComments(node.body); write(";"); emitTrailingComments(node.body); emitTempDeclarations(true); @@ -19629,49 +20739,20 @@ var ts; scopeEmitEnd(); } function emitBlockFunctionBody(node, body) { - if (body.statements.length === 0 && !anyParameterHasBindingPatternOrInitializer(node)) { - emitFunctionBodyWithNoStatements(node, body); - } - else { - emitFunctionBodyWithStatements(node, body); - } - } - function anyParameterHasBindingPatternOrInitializer(func) { - return ts.forEach(func.parameters, hasBindingPatternOrInitializer); - } - function hasBindingPatternOrInitializer(parameter) { - return parameter.initializer || ts.isBindingPattern(parameter.name); - } - function emitFunctionBodyWithNoStatements(node, body) { - var singleLine = isSingleLineEmptyBlock(node.body); - write(" {"); - if (singleLine) { - write(" "); - } - else { - increaseIndent(); - writeLine(); - } - emitLeadingCommentsOfPosition(body.statements.end); - if (!singleLine) { - decreaseIndent(); - } - emitToken(15, body.statements.end); - } - function emitFunctionBodyWithStatements(node, body) { write(" {"); scopeEmitStart(node); - var outPos = writer.getTextPos(); + var initialTextPos = writer.getTextPos(); increaseIndent(); emitDetachedComments(body.statements); var startIndex = emitDirectivePrologues(body.statements, true); emitFunctionBodyPreamble(node); decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== outPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var i = 0, n = body.statements.length; i < n; i++) { + var preambleEmitted = writer.getTextPos() !== initialTextPos; + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + for (var _i = 0, _a = body.statements, _n = _a.length; _i < _n; _i++) { + var statement = _a[_i]; write(" "); - emit(body.statements[i]); + emit(statement); } emitTempDeclarations(false); write(" "); @@ -19709,7 +20790,7 @@ var ts; emitStart(param); emitStart(param.name); write("this."); - emitNode(param.name); + emitNodeWithoutSourceMap(param.name); emitEnd(param.name); write(" = "); emit(param.name); @@ -19721,7 +20802,7 @@ var ts; function emitMemberAccessForPropertyName(memberName) { if (memberName.kind === 8 || memberName.kind === 7) { write("["); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); write("]"); } else if (memberName.kind === 126) { @@ -19729,7 +20810,7 @@ var ts; } else { write("."); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); } } function emitMemberAssignments(node, staticFlag) { @@ -19740,7 +20821,7 @@ var ts; emitStart(member); emitStart(member.name); if (staticFlag) { - emitNode(node.name); + emitDeclarationName(node); } else { write("this"); @@ -19765,7 +20846,7 @@ var ts; emitLeadingComments(member); emitStart(member); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -19786,7 +20867,7 @@ var ts; emitStart(member); write("Object.defineProperty("); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -19831,7 +20912,7 @@ var ts; } function emitClassDeclaration(node) { write("var "); - emit(node.name); + emitDeclarationName(node); write(" = (function ("); var baseTypeNode = ts.getClassBaseTypeNode(node); if (baseTypeNode) { @@ -19844,7 +20925,7 @@ var ts; writeLine(); emitStart(baseTypeNode); write("__extends("); - emit(node.name); + emitDeclarationName(node); write(", _super);"); emitEnd(baseTypeNode); } @@ -19853,11 +20934,10 @@ var ts; emitMemberFunctions(node); emitMemberAssignments(node, 128); writeLine(); - function emitClassReturnStatement() { + emitToken(15, node.members.end, function () { write("return "); - emitNode(node.name); - } - emitToken(15, node.members.end, emitClassReturnStatement); + emitDeclarationName(node); + }); write(";"); decreaseIndent(); writeLine(); @@ -19870,16 +20950,16 @@ var ts; } write(");"); emitEnd(node); - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } - if (languageVersion < 2 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } function emitConstructorOfClass() { @@ -19889,6 +20969,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); ts.forEach(node.members, function (member) { if (member.kind === 133 && !member.body) { emitPinnedOrTripleSlashComments(member); @@ -19900,7 +20981,7 @@ var ts; } emitStart(ctor || node); write("function "); - emit(node.name); + emitDeclarationName(node); emitSignatureParameters(ctor); write(" {"); scopeEmitStart(node, "constructor"); @@ -19909,11 +20990,12 @@ var ts; emitDetachedComments(ctor.body.statements); } emitCaptureThisForNodeIfNecessary(node); + var superCall; if (ctor) { emitDefaultValueAssignments(ctor); emitRestParameter(ctor); if (baseTypeNode) { - var superCall = findInitialSuperCall(ctor); + superCall = findInitialSuperCall(ctor); if (superCall) { writeLine(); emit(superCall); @@ -19948,6 +21030,7 @@ var ts; if (ctor) { emitTrailingComments(ctor); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20066,7 +21149,9 @@ var ts; var saveTempVariables = tempVariables; tempCount = 0; tempVariables = undefined; + var popFrame = enterNameScope(); emit(node.body); + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; } @@ -20155,7 +21240,7 @@ var ts; emitImportDeclaration(node); return; } - if (resolver.isReferencedImportDeclaration(node) || + if (resolver.isReferencedAliasDeclaration(node) || (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); @@ -20185,11 +21270,11 @@ var ts; emitStart(specifier); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); write(" = "); write(generatedName); write("."); - emitNode(specifier.propertyName || specifier.name); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); write(";"); emitEnd(specifier); }); @@ -20207,15 +21292,15 @@ var ts; } } function createExternalImportInfo(node) { - if (node.kind === 202) { - if (node.moduleReference.kind === 212) { + if (node.kind === 203) { + if (node.moduleReference.kind === 213) { return { rootNode: node, declarationNode: node }; } } - else if (node.kind === 203) { + else if (node.kind === 204) { var importClause = node.importClause; if (importClause) { if (importClause.name) { @@ -20224,7 +21309,7 @@ var ts; declarationNode: importClause }; } - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { return { rootNode: node, declarationNode: importClause.namedBindings @@ -20240,7 +21325,7 @@ var ts; rootNode: node }; } - else if (node.kind === 209) { + else if (node.kind === 210) { if (node.moduleSpecifier) { return { rootNode: node @@ -20251,17 +21336,29 @@ var ts; function createExternalModuleInfo(sourceFile) { externalImports = []; exportSpecifiers = {}; + exportDefault = undefined; ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 209 && !node.moduleSpecifier) { + if (node.kind === 210 && !node.moduleSpecifier) { ts.forEach(node.exportClause.elements, function (specifier) { - var name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (specifier.name.text === "default") { + exportDefault = exportDefault || specifier; + } + var _name = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[_name] || (exportSpecifiers[_name] = [])).push(specifier); }); } + else if (node.kind === 209) { + exportDefault = exportDefault || node; + } + else if (node.kind === 195 || node.kind === 196) { + if (node.flags & 1 && node.flags & 256) { + exportDefault = exportDefault || node; + } + } else { var info = createExternalImportInfo(node); if (info) { - if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedImportDeclaration(node)) { + if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedAliasDeclaration(node)) { externalImports.push(info); } } @@ -20270,8 +21367,8 @@ var ts; } function getExternalImportInfo(node) { if (externalImports) { - for (var i = 0; i < externalImports.length; i++) { - var info = externalImports[i]; + for (var _i = 0, _n = externalImports.length; _i < _n; _i++) { + var info = externalImports[_i]; if (info.rootNode === node) { return info; } @@ -20280,7 +21377,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 208) { + if (node.kind === 209) { return node; } }); @@ -20342,18 +21439,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { - writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("return "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); - } + emitExportDefault(node, true); decreaseIndent(); writeLine(); write("});"); @@ -20362,17 +21448,24 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { + emitExportDefault(node, false); + } + function emitExportDefault(sourceFile, emitAsReturn) { + if (exportDefault && resolver.hasExportDefaultValue(sourceFile)) { writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("module.exports = "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); + emitStart(exportDefault); + write(emitAsReturn ? "return " : "module.exports = "); + if (exportDefault.kind === 209) { + emit(exportDefault.expression); + } + else if (exportDefault.kind === 212) { + emit(exportDefault.propertyName); + } + else { + emitDeclarationName(exportDefault); + } write(";"); - emitEnd(exportAssignment); + emitEnd(exportDefault); } } function emitDirectivePrologues(statements, startWithNewLine) { @@ -20389,8 +21482,7 @@ var ts; } return statements.length; } - function emitSourceFile(node) { - currentSourceFile = node; + function emitSourceFileNode(node) { writeLine(); emitDetachedComments(node); var startIndex = emitDirectivePrologues(node.statements, false); @@ -20423,36 +21515,46 @@ var ts; else { externalImports = undefined; exportSpecifiers = undefined; + exportDefault = undefined; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); } emitLeadingComments(node.endOfFileToken); } - function emitNode(node, disableComments) { + function emitNodeWithoutSourceMapWithComments(node) { if (!node) { return; } if (node.flags & 2) { return emitPinnedOrTripleSlashComments(node); } - var emitComments = !disableComments && shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { + var _emitComments = shouldEmitLeadingAndTrailingComments(node); + if (_emitComments) { emitLeadingComments(node); } emitJavaScriptWorker(node); - if (emitComments) { + if (_emitComments) { emitTrailingComments(node); } } + function emitNodeWithoutSourceMapWithoutComments(node) { + if (!node) { + return; + } + if (node.flags & 2) { + return emitPinnedOrTripleSlashComments(node); + } + emitJavaScriptWorker(node); + } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { case 197: case 195: + case 204: case 203: - case 202: case 198: - case 208: + case 209: return false; case 200: return shouldEmitModuleDeclaration(node); @@ -20507,9 +21609,9 @@ var ts; return emitArrayLiteral(node); case 152: return emitObjectLiteral(node); - case 217: - return emitPropertyAssignment(node); case 218: + return emitPropertyAssignment(node); + case 219: return emitShorthandPropertyAssignment(node); case 126: return emitComputedPropertyName(node); @@ -20578,8 +21680,8 @@ var ts; return emitWithStatement(node); case 188: return emitSwitchStatement(node); - case 213: case 214: + case 215: return emitCaseOrDefaultClause(node); case 189: return emitLabelledStatement(node); @@ -20587,7 +21689,7 @@ var ts; return emitThrowStatement(node); case 191: return emitTryStatement(node); - case 216: + case 217: return emitCatchClause(node); case 192: return emitDebuggerStatement(node); @@ -20599,18 +21701,18 @@ var ts; return emitInterfaceDeclaration(node); case 199: return emitEnumDeclaration(node); - case 219: + case 220: return emitEnumMember(node); case 200: return emitModuleDeclaration(node); - case 203: + case 204: return emitImportDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 209: + case 210: return emitExportDeclaration(node); - case 220: - return emitSourceFile(node); + case 221: + return emitSourceFileNode(node); } } function hasDetachedComments(pos) { @@ -20628,7 +21730,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 220 || node.pos !== node.parent.pos) { + if (node.parent.kind === 221 || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -20647,7 +21749,7 @@ var ts; } function emitTrailingDeclarationComments(node) { if (node.parent) { - if (node.parent.kind === 220 || node.end !== node.parent.end) { + if (node.parent.kind === 221 || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); } @@ -20697,7 +21799,7 @@ var ts; } } } - function emitPinnedOrTripleSlashCommentsOfNode(node) { + function emitPinnedOrTripleSlashComments(node) { var pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); function isPinnedOrTripleSlashComment(comment) { if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { @@ -20742,6 +21844,8 @@ var ts; var ts; (function (ts) { ts.emitTime = 0; + ts.ioReadTime = 0; + ts.version = "1.5.0.0"; function createCompilerHost(options) { var currentDirectory; var existingDirectories = {}; @@ -20750,12 +21854,17 @@ var ts; } var unsupportedFileEncodingErrorCode = -2147024809; function getSourceFile(fileName, languageVersion, onError) { + var text; try { - var text = ts.sys.readFile(fileName, options.charset); + var start = new Date().getTime(); + text = ts.sys.readFile(fileName, options.charset); + ts.ioReadTime += new Date().getTime() - start; } catch (e) { if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText : e.message); + onError(e.number === unsupportedFileEncodingErrorCode + ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText + : e.message); } text = ""; } @@ -20888,8 +21997,9 @@ var ts; if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; } + var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); var start = new Date().getTime(); - var emitResult = ts.emitFiles(getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile), getEmitHost(writeFileCallback), sourceFile); + var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); ts.emitTime += new Date().getTime() - start; return emitResult; } @@ -20938,9 +22048,11 @@ var ts; processSourceFile(ts.normalizePath(fileName), isDefaultLib); } function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { + var start; + var _length; if (refEnd !== undefined && refPos !== undefined) { - var start = refPos; - var length = refEnd - refPos; + start = refPos; + _length = refEnd - refPos; } var diagnostic; if (hasExtension(fileName)) { @@ -20965,7 +22077,7 @@ var ts; } if (diagnostic) { if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, start, length, diagnostic, fileName)); + diagnostics.add(ts.createFileDiagnostic(refFile, start, _length, diagnostic, fileName)); } else { diagnostics.add(ts.createCompilerDiagnostic(diagnostic, fileName)); @@ -21006,17 +22118,17 @@ var ts; files.push(file); } } + return file; } - return file; function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName[canonicalName]; - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; + var _file = filesByName[canonicalName]; + if (_file && host.useCaseSensitiveFileNames()) { + var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(_file.fileName, host.getCurrentDirectory()) : _file.fileName; if (canonicalName !== sourceFileName) { diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); } } - return file; + return _file; } } function processReferencedFiles(file, basePath) { @@ -21027,7 +22139,7 @@ var ts; } function processImportedModules(file, basePath) { ts.forEach(file.statements, function (node) { - if (node.kind === 203 || node.kind === 202 || node.kind === 209) { + if (node.kind === 204 || node.kind === 203 || node.kind === 210) { var moduleNameExpr = ts.getExternalModuleName(node); if (moduleNameExpr && moduleNameExpr.kind === 8) { var moduleNameText = moduleNameExpr.text; @@ -21054,10 +22166,10 @@ var ts; var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); var moduleName = nameLiteral.text; if (moduleName) { - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - var tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); + var _searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); + var tsFile = findModuleSourceFile(_searchName + ".ts", nameLiteral); if (!tsFile) { - findModuleSourceFile(searchName + ".d.ts", nameLiteral); + findModuleSourceFile(_searchName + ".d.ts", nameLiteral); } } } @@ -21078,20 +22190,19 @@ var ts; } return; } - var firstExternalModule = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (firstExternalModule && !options.module) { - var externalModuleErrorSpan = ts.getErrorSpanForNode(firstExternalModule.externalModuleIndicator); - var errorStart = ts.skipTrivia(firstExternalModule.text, externalModuleErrorSpan.pos); - var errorLength = externalModuleErrorSpan.end - errorStart; - diagnostics.add(ts.createFileDiagnostic(firstExternalModule, errorStart, errorLength, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); + if (firstExternalModuleSourceFile && !options.module) { + var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); + diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); } if (options.outDir || options.sourceRoot || (options.mapRoot && - (!options.out || firstExternalModule !== undefined))) { + (!options.out || firstExternalModuleSourceFile !== undefined))) { var commonPathComponents; ts.forEach(files, function (sourceFile) { - if (!(sourceFile.flags & 1024) && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { + if (!(sourceFile.flags & 2048) + && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); sourcePathComponents.pop(); if (commonPathComponents) { @@ -21269,6 +22380,18 @@ var ts; description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveNewLines", + type: "boolean", + description: ts.Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, + { + name: "cacheDownlevelForOfLength", + type: "boolean", + description: "Cache length access when downlevel emitting for-of statements", + experimental: true + }, { name: "target", shortName: "t", @@ -21471,7 +22594,6 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - var version = "1.5.0.0"; function validateLocaleAndSetLanguage(locale, errors) { var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase()); if (!matchResult) { @@ -21606,7 +22728,7 @@ var ts; return ts.sys.exit(1); } if (commandLine.options.version) { - reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Version_0, version)); + reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Version_0, ts.version)); return ts.sys.exit(0); } if (commandLine.options.help) { @@ -21668,7 +22790,7 @@ var ts; compilerHost.getSourceFile = getSourceFile; } var compileResult = compile(rootFileNames, compilerOptions, compilerHost); - if (!commandLine.options.watch) { + if (!compilerOptions.watch) { return ts.sys.exit(compileResult.exitStatus); } setCachedProgram(compileResult.program); @@ -21682,7 +22804,7 @@ var ts; } } var sourceFile = hostGetSourceFile(fileName, languageVersion, onError); - if (sourceFile && commandLine.options.watch) { + if (sourceFile && compilerOptions.watch) { sourceFile.fileWatcher = ts.sys.watchFile(sourceFile.fileName, function () { return sourceFileChanged(sourceFile); }); } return sourceFile; @@ -21723,14 +22845,17 @@ var ts; } ts.executeCommandLine = executeCommandLine; function compile(fileNames, compilerOptions, compilerHost) { + ts.ioReadTime = 0; ts.parseTime = 0; ts.bindTime = 0; ts.checkTime = 0; ts.emitTime = 0; var start = new Date().getTime(); var program = ts.createProgram(fileNames, compilerOptions, compilerHost); + var programTime = new Date().getTime() - start; var exitStatus = compileProgram(); var end = new Date().getTime() - start; + var compileTime = end - programTime; if (compilerOptions.listFiles) { ts.forEach(program.getSourceFiles(), function (file) { ts.sys.write(file.fileName + ts.sys.newLine); @@ -21747,10 +22872,13 @@ var ts; if (memoryUsed >= 0) { reportStatisticalValue("Memory used", Math.round(memoryUsed / 1000) + "K"); } - reportTimeStatistic("Parse time", ts.parseTime); + reportTimeStatistic("Parse time", programTime); reportTimeStatistic("Bind time", ts.bindTime); reportTimeStatistic("Check time", ts.checkTime); reportTimeStatistic("Emit time", ts.emitTime); + reportTimeStatistic("Parse time w/o IO", ts.parseTime); + reportTimeStatistic("IO read", ts.ioReadTime); + reportTimeStatistic("Compile time", compileTime); reportTimeStatistic("Total time", end); } return { program: program, exitStatus: exitStatus }; @@ -21766,7 +22894,9 @@ var ts; } } if (compilerOptions.noEmit) { - return diagnostics.length ? 1 : 0; + return diagnostics.length + ? 1 + : 0; } var emitOutput = program.emit(); reportDiagnostics(emitOutput.diagnostics); @@ -21774,13 +22904,13 @@ var ts; return 1; } if (diagnostics.length > 0 || emitOutput.diagnostics.length > 0) { - 2; + return 2; } return 0; } } function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, version) + ts.sys.newLine); + ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); } function printHelp() { var output = ""; diff --git a/bin/tsserver.js b/bin/tsserver.js index fa69f8cf5fa..44075b1f778 100644 --- a/bin/tsserver.js +++ b/bin/tsserver.js @@ -44,8 +44,9 @@ var ts; ts.forEach = forEach; function contains(array, value) { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (v === value) { return true; } } @@ -67,8 +68,9 @@ var ts; function countWhere(array, predicate) { var count = 0; if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (predicate(array[i])) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (predicate(v)) { count++; } } @@ -77,12 +79,13 @@ var ts; } ts.countWhere = countWhere; function filter(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (f(item)) { - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (f(_item)) { + result.push(_item); } } } @@ -90,10 +93,12 @@ var ts; } ts.filter = filter; function map(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - result.push(f(array[i])); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result.push(f(v)); } } return result; @@ -108,12 +113,14 @@ var ts; } ts.concatenate = concatenate; function deduplicate(array) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (!contains(result, item)) - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (!contains(result, _item)) { + result.push(_item); + } } } return result; @@ -121,15 +128,17 @@ var ts; ts.deduplicate = deduplicate; function sum(array, prop) { var result = 0; - for (var i = 0; i < array.length; i++) { - result += array[i][prop]; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result += v[prop]; } return result; } ts.sum = sum; function addRange(to, from) { - for (var i = 0, n = from.length; i < n; i++) { - to.push(from[i]); + for (var _i = 0, _n = from.length; _i < _n; _i++) { + var v = from[_i]; + to.push(v); } } ts.addRange = addRange; @@ -190,9 +199,9 @@ var ts; for (var id in first) { result[id] = first[id]; } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; + for (var _id in second) { + if (!hasProperty(result, _id)) { + result[_id] = second[_id]; } } return result; @@ -248,12 +257,17 @@ var ts; } ts.localizedDiagnosticMessages = undefined; function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] ? ts.localizedDiagnosticMessages[message] : message; + return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] + ? ts.localizedDiagnosticMessages[message] + : message; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + var end = start + length; Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); + Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); + Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -389,21 +403,23 @@ var ts; function getNormalizedParts(normalizedSlashedPath, rootLength) { var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); var normalized = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; + for (var _i = 0, _n = parts.length; _i < _n; _i++) { + var part = parts[_i]; if (part !== ".") { if (part === ".." && normalized.length > 0 && normalized[normalized.length - 1] !== "..") { normalized.pop(); } else { - normalized.push(part); + if (part) { + normalized.push(part); + } } } } return normalized; } function normalizePath(path) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); var normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); @@ -426,7 +442,7 @@ var ts; return [path.substr(0, rootLength)].concat(normalizedParts); } function getNormalizedPathComponents(path, currentDirectory) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { path = combinePaths(normalizeSlashes(currentDirectory), path); @@ -529,8 +545,8 @@ var ts; ts.fileExtensionIs = fileExtensionIs; var supportedExtensions = [".d.ts", ".ts", ".js"]; function removeFileExtension(path) { - for (var i = 0; i < supportedExtensions.length; i++) { - var ext = supportedExtensions[i]; + for (var _i = 0, _n = supportedExtensions.length; _i < _n; _i++) { + var ext = supportedExtensions[_i]; if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); } @@ -539,7 +555,7 @@ var ts; } ts.removeFileExtension = removeFileExtension; var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\0-\19\t\v\f\b\0\r\n\u2028\u2029\u0085]/g; + var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var escapedCharsMap = { "\0": "\\0", "\t": "\\t", @@ -554,20 +570,6 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" }; - function escapeString(s) { - s = backslashOrDoubleQuote.test(s) ? s.replace(backslashOrDoubleQuote, getReplacement) : s; - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || unicodeEscape(c); - } - function unicodeEscape(c) { - var hexCharCode = c.charCodeAt(0).toString(16); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - } - ts.escapeString = escapeString; function getDefaultLibFileName(options) { return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; } @@ -695,15 +697,16 @@ var ts; function visitDirectory(path) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var i = 0; i < files.length; i++) { - var name = files[i]; - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(ts.combinePaths(path, name)); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var _name = files[_i]; + if (!extension || ts.fileExtensionIs(_name, extension)) { + result.push(ts.combinePaths(path, _name)); } } var subfolders = getNames(folder.subfolders); - for (var i = 0; i < subfolders.length; i++) { - visitDirectory(ts.combinePaths(path, subfolders[i])); + for (var _a = 0, _b = subfolders.length; _a < _b; _a++) { + var current = subfolders[_a]; + visitDirectory(ts.combinePaths(path, current)); } } } @@ -788,8 +791,9 @@ var ts; function visitDirectory(path) { var files = _fs.readdirSync(path || ".").sort(); var directories = []; - for (var i = 0; i < files.length; i++) { - var name = ts.combinePaths(path, files[i]); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var current = files[_i]; + var name = ts.combinePaths(path, current); var stat = _fs.lstatSync(name); if (stat.isFile()) { if (!extension || ts.fileExtensionIs(name, extension)) { @@ -800,8 +804,9 @@ var ts; directories.push(name); } } - for (var i = 0; i < directories.length; i++) { - visitDirectory(directories[i]); + for (var _a = 0, _b = directories.length; _a < _b; _a++) { + var _current = directories[_a]; + visitDirectory(_current); } } } @@ -880,7 +885,6 @@ var ts; Trailing_comma_not_allowed: { code: 1009, category: 1, key: "Trailing comma not allowed." }, Asterisk_Slash_expected: { code: 1010, category: 1, key: "'*/' expected." }, Unexpected_token: { code: 1012, category: 1, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1, key: "Catch clause parameter cannot have a type annotation." }, A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1, key: "A rest parameter must be last in a parameter list." }, Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1, key: "Parameter cannot have question mark and initializer." }, A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1, key: "A required parameter cannot follow an optional parameter." }, @@ -988,7 +992,6 @@ var ts; const_declarations_must_be_initialized: { code: 1155, category: 1, key: "'const' declarations must be initialized" }, const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1, key: "'const' declarations can only be declared inside a block." }, let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1, key: "'let' declarations can only be declared inside a block." }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, Unterminated_template_literal: { code: 1160, category: 1, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: 1, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: 1, key: "An object member cannot be declared optional." }, @@ -1025,6 +1028,11 @@ var ts; External_module_0_has_no_default_export_or_export_assignment: { code: 1192, category: 1, key: "External module '{0}' has no default export or export assignment." }, An_export_declaration_cannot_have_modifiers: { code: 1193, category: 1, key: "An export declaration cannot have modifiers." }, Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: 1, key: "Export declarations are not permitted in an internal module." }, + Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: 1, key: "Catch clause variable name must be an identifier." }, + Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: 1, key: "Catch clause variable cannot have a type annotation." }, + Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: 1, key: "Catch clause variable cannot have an initializer." }, + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: 1, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, + Unterminated_Unicode_escape_sequence: { code: 1199, category: 1, key: "Unterminated Unicode escape sequence." }, Duplicate_identifier_0: { code: 2300, category: 1, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1, key: "Static members cannot reference class type parameters." }, @@ -1195,9 +1203,19 @@ var ts; Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: 1, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: 1, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: 1, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: 1, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: 1, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: 1, key: "Export declaration conflicts with exported declaration of '{0}'" }, + The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: 1, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, + Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: 1, key: "Invalid left-hand side in 'for...of' statement." }, + The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: 1, key: "The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator." }, + The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method: { code: 2489, category: 1, key: "The iterator returned by the right-hand side of a 'for...of' statement must have a 'next()' method." }, + The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: 1, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, + Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: 1, key: "Cannot redeclare identifier '{0}' in catch clause" }, + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: 1, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: 1, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, + Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: 1, key: "Type '{0}' is not an array type or a string type." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1267,6 +1285,7 @@ var ts; Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: 1, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, The_current_host_does_not_support_the_0_option: { code: 5001, category: 1, key: "The current host does not support the '{0}' option." }, Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1, key: "Cannot find the common subdirectory path for the input files." }, Cannot_read_file_0_Colon_1: { code: 5012, category: 1, key: "Cannot read file '{0}': {1}" }, @@ -1322,6 +1341,7 @@ var ts; File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: 2, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: 2, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: 2, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: 1, key: "Member '{0}' implicitly has an '{1}' type." }, @@ -1342,25 +1362,24 @@ var ts; You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: 1, key: "You cannot rename elements that are defined in the standard TypeScript library." }, yield_expressions_are_not_currently_supported: { code: 9000, category: 1, key: "'yield' expressions are not currently supported." }, Generators_are_not_currently_supported: { code: 9001, category: 1, key: "Generators are not currently supported." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." }, - for_of_statements_are_not_currently_supported: { code: 9003, category: 1, key: "'for...of' statements are not currently supported." } + The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." } }; })(ts || (ts = {})); var ts; (function (ts) { var textToToken = { - "any": 112, + "any": 111, "as": 101, - "boolean": 113, + "boolean": 112, "break": 65, "case": 66, "catch": 67, "class": 68, "continue": 70, "const": 69, - "constructor": 114, + "constructor": 113, "debugger": 71, - "declare": 115, + "declare": 114, "default": 72, "delete": 73, "do": 74, @@ -1371,43 +1390,43 @@ var ts; "false": 79, "finally": 80, "for": 81, - "from": 102, + "from": 123, "function": 82, - "get": 116, + "get": 115, "if": 83, - "implements": 103, + "implements": 102, "import": 84, "in": 85, "instanceof": 86, - "interface": 104, - "let": 105, - "module": 117, + "interface": 103, + "let": 104, + "module": 116, "new": 87, "null": 88, - "number": 119, - "package": 106, - "private": 107, - "protected": 108, - "public": 109, - "require": 118, + "number": 118, + "package": 105, + "private": 106, + "protected": 107, + "public": 108, + "require": 117, "return": 89, - "set": 120, - "static": 110, - "string": 121, + "set": 119, + "static": 109, + "string": 120, "super": 90, "switch": 91, - "symbol": 122, + "symbol": 121, "this": 92, "throw": 93, "true": 94, "try": 95, - "type": 123, + "type": 122, "typeof": 96, "var": 97, "void": 98, "while": 99, "with": 100, - "yield": 111, + "yield": 110, "of": 124, "{": 14, "}": 15, @@ -1487,17 +1506,21 @@ var ts; return false; } function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierStart) : + lookupInUnicodeMap(code, unicodeES3IdentifierStart); } ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierPart) : + lookupInUnicodeMap(code, unicodeES3IdentifierPart); } function makeReverseMap(source) { var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; + for (var _name in source) { + if (source.hasOwnProperty(_name)) { + result[source[_name]] = _name; } } return result; @@ -1673,8 +1696,8 @@ var ts; else { ts.Debug.assert(ch === 61); while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 62 && isConflictMarkerTrivia(text, pos)) { + var _ch = text.charCodeAt(pos); + if (_ch === 62 && isConflictMarkerTrivia(text, pos)) { break; } pos++; @@ -1780,6 +1803,7 @@ var ts; var token; var tokenValue; var precedingLineBreak; + var hasExtendedUnicodeEscape; var tokenIsUnterminated; function error(message, length) { if (onError) { @@ -1829,10 +1853,16 @@ var ts; } return +(text.substring(start, pos)); } - function scanHexDigits(count, mustMatchCount) { + function scanExactNumberOfHexDigits(count) { + return scanHexDigits(count, false); + } + function scanMinimumNumberOfHexDigits(count) { + return scanHexDigits(count, true); + } + function scanHexDigits(minCount, scanAsManyAsPossible) { var digits = 0; var value = 0; - while (digits < count || !mustMatchCount) { + while (digits < minCount || scanAsManyAsPossible) { var ch = text.charCodeAt(pos); if (ch >= 48 && ch <= 57) { value = value * 16 + ch - 48; @@ -1849,7 +1879,7 @@ var ts; pos++; digits++; } - if (digits < count) { + if (digits < minCount) { value = -1; } return value; @@ -1962,16 +1992,15 @@ var ts; return "\'"; case 34: return "\""; - case 120: case 117: - var ch = scanHexDigits(ch === 120 ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; + if (pos < len && text.charCodeAt(pos) === 123) { + hasExtendedUnicodeEscape = true; + pos++; + return scanExtendedUnicodeEscape(); } + return scanHexadecimalEscape(4); + case 120: + return scanHexadecimalEscape(2); case 13: if (pos < len && text.charCodeAt(pos) === 10) { pos++; @@ -1984,11 +2013,57 @@ var ts; return String.fromCharCode(ch); } } + function scanHexadecimalEscape(numDigits) { + var escapedValue = scanExactNumberOfHexDigits(numDigits); + if (escapedValue >= 0) { + return String.fromCharCode(escapedValue); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + } + function scanExtendedUnicodeEscape() { + var escapedValue = scanMinimumNumberOfHexDigits(1); + var isInvalidExtendedEscape = false; + if (escapedValue < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + isInvalidExtendedEscape = true; + } + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + isInvalidExtendedEscape = true; + } + else if (text.charCodeAt(pos) == 125) { + pos++; + } + else { + error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + return ""; + } + return utf16EncodeAsString(escapedValue); + } + function utf16EncodeAsString(codePoint) { + ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); + if (codePoint <= 65535) { + return String.fromCharCode(codePoint); + } + var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; + var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; + return String.fromCharCode(codeUnit1, codeUnit2); + } function peekUnicodeEscape() { if (pos + 5 < len && text.charCodeAt(pos + 1) === 117) { var start = pos; pos += 2; - var value = scanHexDigits(4, true); + var value = scanExactNumberOfHexDigits(4); pos = start; return value; } @@ -2020,8 +2095,8 @@ var ts; return result; } function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { + var _len = tokenValue.length; + if (_len >= 2 && _len <= 11) { var ch = tokenValue.charCodeAt(0); if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) { return token = textToToken[tokenValue]; @@ -2050,6 +2125,7 @@ var ts; } function scan() { startPos = pos; + hasExtendedUnicodeEscape = false; precedingLineBreak = false; tokenIsUnterminated = false; while (true) { @@ -2172,13 +2248,13 @@ var ts; pos += 2; var commentClosed = false; while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 && text.charCodeAt(pos + 1) === 47) { + var _ch = text.charCodeAt(pos); + if (_ch === 42 && text.charCodeAt(pos + 1) === 47) { pos += 2; commentClosed = true; break; } - if (isLineBreak(ch)) { + if (isLineBreak(_ch)) { precedingLineBreak = true; } pos++; @@ -2201,7 +2277,7 @@ var ts; case 48: if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; - var value = scanHexDigits(1, false); + var value = scanMinimumNumberOfHexDigits(1); if (value < 0) { error(ts.Diagnostics.Hexadecimal_digit_expected); value = 0; @@ -2211,22 +2287,22 @@ var ts; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) { pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { + var _value = scanBinaryOrOctalDigits(2); + if (_value < 0) { error(ts.Diagnostics.Binary_digit_expected); - value = 0; + _value = 0; } - tokenValue = "" + value; + tokenValue = "" + _value; return token = 7; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) { pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { + var _value_1 = scanBinaryOrOctalDigits(8); + if (_value_1 < 0) { error(ts.Diagnostics.Octal_digit_expected); - value = 0; + _value_1 = 0; } - tokenValue = "" + value; + tokenValue = "" + _value_1; return token = 7; } if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { @@ -2325,10 +2401,10 @@ var ts; case 126: return pos++, token = 47; case 92: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { + var cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } error(ts.Diagnostics.Invalid_character); @@ -2471,6 +2547,7 @@ var ts; getTokenPos: function () { return tokenPos; }, getTokenText: function () { return text.substring(tokenPos, pos); }, getTokenValue: function () { return tokenValue; }, + hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, isIdentifier: function () { return token === 64 || token > 100; }, isReservedWord: function () { return token >= 65 && token <= 100; }, @@ -2625,6 +2702,18 @@ var ts; description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveNewLines", + type: "boolean", + description: ts.Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, + { + name: "cacheDownlevelForOfLength", + type: "boolean", + description: "Cache length access when downlevel emitting for-of statements", + experimental: true + }, { name: "target", shortName: "t", @@ -2829,8 +2918,8 @@ var ts; (function (ts) { function getDeclarationOfKind(symbol, kind) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if (declaration.kind === kind) { return declaration; } @@ -2887,7 +2976,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 220) { + while (node && node.kind !== 221) { node = node.parent; } return node; @@ -2957,35 +3046,75 @@ var ts; return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); } ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 12288) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function getEnclosingBlockScopeContainer(node) { + var current = node; + while (current) { + if (isFunctionLike(current)) { + return current; + } + switch (current.kind) { + case 221: + case 202: + case 217: + case 200: + case 181: + case 182: + case 183: + return current; + case 174: + if (!isFunctionLike(current.parent)) { + return current; + } + } + current = current.parent; + } + } + ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; + function isCatchClauseVariableDeclaration(declaration) { + return declaration && + declaration.kind === 193 && + declaration.parent && + declaration.parent.kind === 217; + } + ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); } ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = getTokenPosOfNode(node, file); - var length = node.end - start; - return ts.createFileDiagnostic(file, start, length, 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) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); - var length = node.end - start; + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); return { - file: file, - start: start, - length: length, + file: sourceFile, + start: span.start, + length: span.length, code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText }; } ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getErrorSpanForNode(node) { - var errorSpan; + function getSpanOfTokenAtPosition(sourceFile, pos) { + var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text); + scanner.setTextPos(pos); + scanner.scan(); + var start = scanner.getTokenPos(); + return createTextSpanFromBounds(start, scanner.getTextPos()); + } + ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForNode(sourceFile, node) { + var errorNode = node; switch (node.kind) { case 193: case 150: @@ -2993,11 +3122,19 @@ var ts; case 197: case 200: case 199: - case 219: - errorSpan = node.name; + case 220: + case 195: + case 160: + errorNode = node.name; break; } - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + if (errorNode === undefined) { + return getSpanOfTokenAtPosition(sourceFile, node.pos); + } + var pos = nodeIsMissing(errorNode) + ? errorNode.pos + : ts.skipTrivia(sourceFile.text, errorNode.pos); + return createTextSpanFromBounds(pos, errorNode.end); } ts.getErrorSpanForNode = getErrorSpanForNode; function isExternalModule(file) { @@ -3005,7 +3142,7 @@ var ts; } ts.isExternalModule = isExternalModule; function isDeclarationFile(file) { - return (file.flags & 1024) !== 0; + return (file.flags & 2048) !== 0; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { @@ -3035,11 +3172,11 @@ var ts; } ts.getCombinedNodeFlags = getCombinedNodeFlags; function isConst(node) { - return !!(getCombinedNodeFlags(node) & 4096); + return !!(getCombinedNodeFlags(node) & 8192); } ts.isConst = isConst; function isLet(node) { - return !!(getCombinedNodeFlags(node) & 2048); + return !!(getCombinedNodeFlags(node) & 4096); } ts.isLet = isLet; function isPrologueDirective(node) { @@ -3072,6 +3209,7 @@ var ts; switch (node.kind) { case 186: return visitor(node); + case 202: case 174: case 178: case 179: @@ -3081,17 +3219,34 @@ var ts; case 183: case 187: case 188: - case 213: case 214: + case 215: case 189: case 191: - case 216: + case 217: return ts.forEachChild(node, traverse); } } } ts.forEachReturnStatement = forEachReturnStatement; - function isAnyFunction(node) { + function isVariableLike(node) { + if (node) { + switch (node.kind) { + case 150: + case 220: + case 128: + case 218: + case 130: + case 129: + case 219: + case 193: + return true; + } + } + return false; + } + ts.isVariableLike = isVariableLike; + function isFunctionLike(node) { if (node) { switch (node.kind) { case 133: @@ -3115,9 +3270,9 @@ var ts; } return false; } - ts.isAnyFunction = isAnyFunction; + ts.isFunctionLike = isFunctionLike; function isFunctionBlock(node) { - return node && node.kind === 174 && isAnyFunction(node.parent); + return node && node.kind === 174 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { @@ -3127,7 +3282,7 @@ var ts; function getContainingFunction(node) { while (true) { node = node.parent; - if (!node || isAnyFunction(node)) { + if (!node || isFunctionLike(node)) { return node; } } @@ -3161,7 +3316,7 @@ var ts; case 134: case 135: case 199: - case 220: + case 221: return node; } } @@ -3246,16 +3401,16 @@ var ts; } case 7: case 8: - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: case 129: - case 219: - case 217: + case 220: + case 218: case 150: - return parent.initializer === node; + return _parent.initializer === node; case 177: case 178: case 179: @@ -3263,28 +3418,28 @@ var ts; case 186: case 187: case 188: - case 213: + case 214: case 190: case 188: - return parent.expression === node; + return _parent.expression === node; case 181: - var forStatement = parent; + var forStatement = _parent; return (forStatement.initializer === node && forStatement.initializer.kind !== 194) || forStatement.condition === node || forStatement.iterator === node; case 182: case 183: - var forInStatement = parent; + var forInStatement = _parent; return (forInStatement.initializer === node && forInStatement.initializer.kind !== 194) || forInStatement.expression === node; case 158: - return node === parent.expression; + return node === _parent.expression; case 173: - return node === parent.expression; + return node === _parent.expression; case 126: - return node === parent.expression; + return node === _parent.expression; default: - if (isExpression(parent)) { + if (isExpression(_parent)) { return true; } } @@ -3299,7 +3454,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind === 212; + return node.kind === 203 && node.moduleReference.kind === 213; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -3308,20 +3463,20 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind !== 212; + return node.kind === 203 && node.moduleReference.kind !== 213; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function getExternalModuleName(node) { - if (node.kind === 203) { + if (node.kind === 204) { return node.moduleSpecifier; } - if (node.kind === 202) { + if (node.kind === 203) { var reference = node.moduleReference; - if (reference.kind === 212) { + if (reference.kind === 213) { return reference.expression; } } - if (node.kind === 209) { + if (node.kind === 210) { return node.moduleSpecifier; } } @@ -3338,8 +3493,8 @@ var ts; case 132: case 131: return node.questionToken !== undefined; + case 219: case 218: - case 217: case 130: case 129: return node.questionToken !== undefined; @@ -3365,12 +3520,12 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return node.kind === 149 || node.kind === 148; + return !!node && (node.kind === 149 || node.kind === 148); } ts.isBindingPattern = isBindingPattern; function isInAmbientContext(node) { while (node) { - if (node.flags & (2 | 1024)) { + if (node.flags & (2 | 2048)) { return true; } node = node.parent; @@ -3380,31 +3535,33 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 127: - case 128: - case 193: + case 161: case 150: - case 130: - case 129: - case 217: - case 218: - case 219: + case 196: + case 133: + case 199: + case 220: + case 212: + case 195: + case 160: + case 134: + case 205: + case 203: + case 208: + case 197: case 132: case 131: - case 195: - case 134: - case 135: - case 133: - case 196: - case 197: - case 198: - case 199: case 200: - case 202: - case 204: - case 207: - case 205: - case 211: + case 206: + case 128: + case 218: + case 130: + case 129: + case 135: + case 219: + case 198: + case 127: + case 193: return true; } return false; @@ -3430,34 +3587,36 @@ var ts; case 175: case 180: case 187: - case 208: + case 209: return true; default: return false; } } ts.isStatement = isStatement; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + function isDeclarationName(name) { if (name.kind !== 64 && name.kind !== 8 && name.kind !== 7) { return false; } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 160) { - return parent.name === name; + var _parent = name.parent; + if (_parent.kind === 208 || _parent.kind === 212) { + if (_parent.propertyName) { + return true; + } } - if (parent.kind === 216) { - return parent.name === name; + if (isDeclaration(_parent)) { + return _parent.name === name; } return false; } - ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; + ts.isDeclarationName = isDeclarationName; function getClassBaseTypeNode(node) { var heritageClause = getHeritageClause(node.heritageClauses, 78); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassBaseTypeNode = getClassBaseTypeNode; function getClassImplementedTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 103); + var heritageClause = getHeritageClause(node.heritageClauses, 102); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementedTypeNodes = getClassImplementedTypeNodes; @@ -3468,9 +3627,10 @@ var ts; ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; function getHeritageClause(clauses, kind) { if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; + for (var _i = 0, _n = clauses.length; _i < _n; _i++) { + var clause = clauses[_i]; + if (clause.token === kind) { + return clause; } } } @@ -3571,13 +3731,14 @@ var ts; ts.isESSymbolIdentifier = isESSymbolIdentifier; function isModifier(token) { switch (token) { - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: case 77: - case 115: + case 114: case 69: + case 72: return true; } return false; @@ -3692,6 +3853,42 @@ var ts; return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; + function nodeStartsNewLexicalEnvironment(n) { + return isFunctionLike(n) || n.kind === 200 || n.kind === 221; + } + ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; + function nodeIsSynthesized(node) { + return node.pos === -1; + } + ts.nodeIsSynthesized = nodeIsSynthesized; + function createSynthesizedNode(kind, startsOnNewLine) { + var node = ts.createNode(kind); + node.pos = -1; + node.end = -1; + node.startsOnNewLine = startsOnNewLine; + return node; + } + ts.createSynthesizedNode = createSynthesizedNode; + function generateUniqueName(baseName, isExistingName) { + if (baseName.charCodeAt(0) !== 95) { + baseName = "_" + baseName; + if (!isExistingName(baseName)) { + return baseName; + } + } + if (baseName.charCodeAt(baseName.length - 1) !== 95) { + baseName += "_"; + } + var i = 1; + while (true) { + var _name = baseName + i; + if (!isExistingName(_name)) { + return _name; + } + i++; + } + } + ts.generateUniqueName = generateUniqueName; function createDiagnosticCollection() { var nonFileDiagnostics = []; var fileDiagnostics = {}; @@ -3757,10 +3954,45 @@ var ts; } } 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 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; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(222); + var nodeConstructors = new Array(223); ts.parseTime = 0; function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); @@ -3782,8 +4014,9 @@ var ts; } function visitEachNode(cbNode, nodes) { if (nodes) { - for (var i = 0, len = nodes.length; i < len; i++) { - var result = cbNode(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + var result = cbNode(node); if (result) { return result; } @@ -3807,8 +4040,8 @@ var ts; case 128: case 130: case 129: - case 217: case 218: + case 219: case 193: case 150: return visitNodes(cbNodes, node.modifiers) || @@ -3867,6 +4100,7 @@ var ts; return visitNodes(cbNodes, node.properties); case 153: return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); case 154: return visitNode(cbNode, node.expression) || @@ -3903,14 +4137,16 @@ var ts; visitNode(cbNode, node.right); case 168: return visitNode(cbNode, node.condition) || + visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || + visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); case 171: return visitNode(cbNode, node.expression); case 174: case 201: return visitNodes(cbNodes, node.statements); - case 220: + case 221: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); case 175: @@ -3953,11 +4189,13 @@ var ts; visitNode(cbNode, node.statement); case 188: return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.clauses); - case 213: + visitNode(cbNode, node.caseBlock); + case 202: + return visitNodes(cbNodes, node.clauses); + case 214: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 214: + case 215: return visitNodes(cbNodes, node.statements); case 189: return visitNode(cbNode, node.label) || @@ -3968,9 +4206,8 @@ var ts; return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 216: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type) || + case 217: + return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); case 196: return visitNodes(cbNodes, node.modifiers) || @@ -3992,49 +4229,49 @@ var ts; return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 219: + case 220: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); case 200: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 202: + case 203: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 203: + case 204: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 204: + case 205: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 205: - return visitNode(cbNode, node.name); case 206: - case 210: + return visitNode(cbNode, node.name); + case 207: + case 211: return visitNodes(cbNodes, node.elements); - case 209: + case 210: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 207: - case 211: + case 208: + case 212: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 208: + case 209: return visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportName); + visitNode(cbNode, node.expression); case 169: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); case 173: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); case 126: return visitNode(cbNode, node.expression); - case 215: + case 216: return visitNodes(cbNodes, node.types); - case 212: + case 213: return visitNode(cbNode, node.expression); } } @@ -4067,28 +4304,29 @@ var ts; ; function modifierToFlag(token) { switch (token) { - case 110: return 128; - case 109: return 16; - case 108: return 64; - case 107: return 32; + case 109: return 128; + case 108: return 16; + case 107: return 64; + case 106: return 32; case 77: return 1; - case 115: return 2; - case 69: return 4096; + case 114: return 2; + case 69: return 8192; + case 72: return 256; } return 0; } ts.modifierToFlag = modifierToFlag; function fixupParentReferences(sourceFile) { - var parent = sourceFile; + var _parent = sourceFile; forEachChild(sourceFile, visitNode); return; function visitNode(n) { - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; + if (n.parent !== _parent) { + n.parent = _parent; + var saveParent = _parent; + _parent = n; forEachChild(n, visitNode); - parent = saveParent; + _parent = saveParent; } } } @@ -4126,8 +4364,9 @@ var ts; array._children = undefined; array.pos += delta; array.end += delta; - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } } } @@ -4189,8 +4428,9 @@ var ts; array.intersectsChange = true; array._children = undefined; adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } return; } @@ -4387,7 +4627,7 @@ var ts; var identifierCount = 0; var nodeCount = 0; var token; - var sourceFile = createNode(220, 0); + var sourceFile = createNode(221, 0); sourceFile.pos = 0; sourceFile.end = sourceText.length; sourceFile.text = sourceText; @@ -4395,7 +4635,7 @@ var ts; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 1024 : 0; + sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 : 0; var contextFlags = 0; var parseErrorBeforeNextFinishedNode = false; var scanner = ts.createScanner(languageVersion, true, sourceText, scanError); @@ -4483,8 +4723,8 @@ var ts; } function parseErrorAtCurrentToken(message, arg0) { var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); + var _length = scanner.getTextPos() - start; + parseErrorAtPosition(start, _length, message, arg0); } function parseErrorAtPosition(start, length, message, arg0) { var lastError = ts.lastOrUndefined(sourceFile.parseDiagnostics); @@ -4523,7 +4763,9 @@ var ts; var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; var saveContextFlags = contextFlags; - var result = isLookAhead ? scanner.lookAhead(callback) : scanner.tryScan(callback); + var result = isLookAhead + ? scanner.lookAhead(callback) + : scanner.tryScan(callback); ts.Debug.assert(saveContextFlags === contextFlags); if (!result || isLookAhead) { token = saveToken; @@ -4542,10 +4784,10 @@ var ts; if (token === 64) { return true; } - if (token === 111 && inYieldContext()) { + if (token === 110 && inYieldContext()) { return false; } - return inStrictModeContext() ? token > 111 : token > 100; + return inStrictModeContext() ? token > 110 : token > 100; } function parseExpected(kind, diagnosticMessage) { if (token === kind) { @@ -4569,12 +4811,14 @@ var ts; } function parseOptionalToken(t) { if (token === t) { - var node = createNode(t); - nextToken(); - return finishNode(node); + return parseTokenNode(); } return undefined; } + function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { + return parseOptionalToken(t) || + createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); + } function parseTokenNode() { var node = createNode(token); nextToken(); @@ -4693,13 +4937,26 @@ var ts; } if (token === 77) { nextToken(); + if (token === 72) { + return lookAhead(nextTokenIsClassOrFunction); + } return token !== 35 && token !== 14 && canFollowModifier(); } + if (token === 72) { + return nextTokenIsClassOrFunction(); + } nextToken(); return canFollowModifier(); } function canFollowModifier() { - return token === 18 || token === 14 || token === 35 || isLiteralPropertyName(); + return token === 18 + || token === 14 + || token === 35 + || isLiteralPropertyName(); + } + function nextTokenIsClassOrFunction() { + nextToken(); + return token === 68 || token === 82; } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -4753,7 +5010,7 @@ var ts; return isIdentifier(); } function isNotHeritageClauseTypeName() { - if (token === 103 || + if (token === 102 || token === 78) { return lookAhead(nextTokenIsIdentifier); } @@ -4777,11 +5034,11 @@ var ts; case 4: return token === 15 || token === 66 || token === 72; case 8: - return token === 14 || token === 78 || token === 103; + return token === 14 || token === 78 || token === 102; case 9: return isVariableDeclaratorListTerminator(); case 16: - return token === 25 || token === 16 || token === 14 || token === 78 || token === 103; + return token === 25 || token === 16 || token === 14 || token === 78 || token === 102; case 12: return token === 17 || token === 22; case 14: @@ -4920,10 +5177,10 @@ var ts; function isReusableModuleElement(node) { if (node) { switch (node.kind) { + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 196: case 197: case 200: @@ -4951,8 +5208,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 213: case 214: + case 215: return true; } } @@ -4987,7 +5244,7 @@ var ts; return false; } function isReusableEnumMember(node) { - return node.kind === 219; + return node.kind === 220; } function isReusableTypeMember(node) { if (node) { @@ -5117,7 +5374,7 @@ var ts; literal = parseLiteralNode(); } else { - literal = createMissingNode(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); + literal = parseExpectedToken(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); } span.literal = literal; return finishNode(span); @@ -5126,14 +5383,19 @@ var ts; 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 === 7 && sourceText.charCodeAt(tokenPos) === 48 && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 8192; + if (node.kind === 7 + && sourceText.charCodeAt(tokenPos) === 48 + && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { + node.flags |= 16384; } return node; } @@ -5171,7 +5433,9 @@ var ts; } function parseParameterType() { if (parseOptional(51)) { - return token === 8 ? parseLiteralNode(true) : parseType(); + return token === 8 + ? parseLiteralNode(true) + : parseType(); } return undefined; } @@ -5286,11 +5550,11 @@ var ts; } function parsePropertyOrMethodSignature() { var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (token === 16 || token === 24) { var method = createNode(131, fullStart); - method.name = name; + method.name = _name; method.questionToken = questionToken; fillSignature(51, false, false, method); parseTypeMemberSemicolon(); @@ -5298,7 +5562,7 @@ var ts; } else { var property = createNode(129, fullStart); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); @@ -5341,7 +5605,9 @@ var ts; case 24: return parseSignatureMember(136); case 18: - return isIndexSignature() ? parseIndexSignatureDeclaration(undefined) : parsePropertyOrMethodSignature(); + return isIndexSignature() + ? parseIndexSignatureDeclaration(undefined) + : parsePropertyOrMethodSignature(); case 87: if (lookAhead(isStartOfConstructSignature)) { return parseSignatureMember(137); @@ -5363,7 +5629,9 @@ var ts; } function parseIndexSignatureWithModifiers() { var modifiers = parseModifiers(); - return isIndexSignature() ? parseIndexSignatureDeclaration(modifiers) : undefined; + return isIndexSignature() + ? parseIndexSignatureDeclaration(modifiers) + : undefined; } function isStartOfConstructSignature() { nextToken(); @@ -5411,11 +5679,11 @@ var ts; } function parseNonArrayType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 98: @@ -5434,11 +5702,11 @@ var ts; } function isStartOfType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 96: case 14: @@ -5559,7 +5827,7 @@ var ts; case 39: case 24: case 64: - case 111: + case 110: return true; default: if (isBinaryOperator()) { @@ -5606,7 +5874,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token === 111) { + if (token === 110) { if (inYieldContext()) { return true; } @@ -5621,6 +5889,11 @@ var ts; nextToken(); return !scanner.hasPrecedingLineBreak() && isIdentifier(); } + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === 14 || token === 18); + } function parseYieldExpression() { var node = createNode(170); nextToken(); @@ -5652,7 +5925,9 @@ var ts; if (triState === 0) { return undefined; } - var arrowFunction = triState === 1 ? parseParenthesizedArrowFunctionExpressionHead(true) : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); + var arrowFunction = triState === 1 + ? parseParenthesizedArrowFunctionExpressionHead(true) + : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); if (!arrowFunction) { return undefined; } @@ -5731,13 +6006,15 @@ var ts; return parseAssignmentExpressionOrHigher(); } function parseConditionalExpressionRest(leftOperand) { - if (!parseOptional(50)) { + var questionToken = parseOptionalToken(50); + if (!questionToken) { return leftOperand; } var node = createNode(168, leftOperand.pos); node.condition = leftOperand; + node.questionToken = questionToken; node.whenTrue = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(51); + node.colonToken = parseExpectedToken(51, false, ts.Diagnostics._0_expected, ts.tokenToString(51)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -5872,7 +6149,9 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token === 90 ? parseSuperExpression() : parseMemberExpressionOrHigher(); + var expression = token === 90 + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); } function parseMemberExpressionOrHigher() { @@ -5886,7 +6165,7 @@ var ts; } var node = createNode(153, expression.pos); node.expression = expression; - parseExpected(20, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.dotToken = parseExpectedToken(20, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -5900,10 +6179,11 @@ var ts; } function parseMemberExpressionRest(expression) { while (true) { - var dotOrBracketStart = scanner.getTokenPos(); - if (parseOptional(20)) { + var dotToken = parseOptionalToken(20); + if (dotToken) { var propertyAccess = createNode(153, expression.pos); propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; @@ -5925,7 +6205,9 @@ var ts; if (token === 10 || token === 11) { var tagExpression = createNode(157, expression.pos); tagExpression.tag = expression; - tagExpression.template = token === 10 ? parseLiteralNode() : parseTemplateExpression(); + tagExpression.template = token === 10 + ? parseLiteralNode() + : parseTemplateExpression(); expression = finishNode(tagExpression); continue; } @@ -5948,10 +6230,10 @@ var ts; continue; } else if (token === 16) { - var callExpr = createNode(155, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); + var _callExpr = createNode(155, expression.pos); + _callExpr.expression = expression; + _callExpr.arguments = parseArgumentList(); + expression = finishNode(_callExpr); continue; } return expression; @@ -5971,7 +6253,9 @@ var ts; if (!parseExpected(25)) { return undefined; } - return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined; + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } function canFollowTypeArgumentsInExpression() { switch (token) { @@ -6046,7 +6330,9 @@ var ts; return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token === 21 ? parseSpreadElement() : token === 23 ? createNode(172) : parseAssignmentExpressionOrHigher(); + return token === 21 ? parseSpreadElement() : + token === 23 ? createNode(172) : + parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return allowInAnd(parseArgumentOrArrayLiteralElement); @@ -6055,16 +6341,16 @@ var ts; var node = createNode(151); parseExpected(18); if (scanner.hasPrecedingLineBreak()) - node.flags |= 256; + node.flags |= 512; node.elements = parseDelimitedList(14, parseArgumentOrArrayLiteralElement); parseExpected(19); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, modifiers) { - if (parseContextualModifier(116)) { + if (parseContextualModifier(115)) { return parseAccessorDeclaration(134, fullStart, modifiers); } - else if (parseContextualModifier(120)) { + else if (parseContextualModifier(119)) { return parseAccessorDeclaration(135, fullStart, modifiers); } return undefined; @@ -6085,13 +6371,13 @@ var ts; return parseMethodDeclaration(fullStart, modifiers, asteriskToken, propertyName, questionToken); } if ((token === 23 || token === 15) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(218, fullStart); + var shorthandDeclaration = createNode(219, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(217, fullStart); + var propertyAssignment = createNode(218, fullStart); propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; parseExpected(51); @@ -6103,7 +6389,7 @@ var ts; var node = createNode(152); parseExpected(14); if (scanner.hasPrecedingLineBreak()) { - node.flags |= 256; + node.flags |= 512; } node.properties = parseDelimitedList(13, parseObjectLiteralElement, true); parseExpected(15); @@ -6190,7 +6476,7 @@ var ts; parseExpected(16); var initializer = undefined; if (token !== 22) { - if (token === 97 || token === 105 || token === 69) { + if (token === 97 || token === 104 || token === 69) { initializer = parseVariableDeclarationList(true); } else { @@ -6257,7 +6543,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(213); + var node = createNode(214); parseExpected(66); node.expression = allowInAnd(parseExpression); parseExpected(51); @@ -6265,7 +6551,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(214); + var node = createNode(215); parseExpected(72); parseExpected(51); node.statements = parseList(4, false, parseStatement); @@ -6280,9 +6566,11 @@ var ts; parseExpected(16); node.expression = allowInAnd(parseExpression); parseExpected(17); + var caseBlock = createNode(202, scanner.getStartPos()); parseExpected(14); - node.clauses = parseList(3, false, parseCaseOrDefaultClause); + caseBlock.clauses = parseList(3, false, parseCaseOrDefaultClause); parseExpected(15); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { @@ -6304,11 +6592,11 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(216); + var result = createNode(217); parseExpected(67); - parseExpected(16); - result.name = parseIdentifier(); - result.type = parseTypeAnnotation(); + if (parseExpected(16)) { + result.variableDeclaration = parseVariableDeclaration(); + } parseExpected(17); result.block = parseBlock(false, false); return finishNode(result); @@ -6347,7 +6635,7 @@ var ts; return !inErrorRecovery; case 14: case 97: - case 105: + case 104: case 82: case 83: case 74: @@ -6367,18 +6655,18 @@ var ts; case 69: var isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; - case 104: + case 103: case 68: - case 117: + case 116: case 76: - case 123: + case 122: if (isDeclarationStart()) { return false; } - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: if (lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine)) { return false; } @@ -6431,7 +6719,7 @@ var ts; return parseTryStatement(); case 71: return parseDebuggerStatement(); - case 105: + case 104: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined); } @@ -6455,7 +6743,7 @@ var ts; return undefined; } return parseVariableStatement(start, modifiers); - case 105: + case 104: if (!isLetDeclaration()) { return undefined; } @@ -6538,11 +6826,11 @@ var ts; switch (token) { case 97: break; - case 105: - node.flags |= 2048; + case 104: + node.flags |= 4096; break; case 69: - node.flags |= 4096; + node.flags |= 8192; break; default: ts.Debug.fail(); @@ -6574,7 +6862,7 @@ var ts; setModifiers(node, modifiers); parseExpected(82); node.asteriskToken = parseOptionalToken(35); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); fillSignature(51, !!node.asteriskToken, false, node); node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); return finishNode(node); @@ -6582,7 +6870,7 @@ var ts; function parseConstructorDeclaration(pos, modifiers) { var node = createNode(133, pos); setModifiers(node, modifiers); - parseExpected(114); + parseExpected(113); fillSignature(51, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); return finishNode(node); @@ -6599,15 +6887,15 @@ var ts; } function parsePropertyOrMethodDeclaration(fullStart, modifiers) { var asteriskToken = parseOptionalToken(35); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (asteriskToken || token === 16 || token === 24) { - return parseMethodDeclaration(fullStart, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + return parseMethodDeclaration(fullStart, modifiers, asteriskToken, _name, questionToken, ts.Diagnostics.or_expected); } else { var property = createNode(130, fullStart); setModifiers(property, modifiers); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); property.initializer = allowInAnd(parseNonParameterInitializer); @@ -6643,7 +6931,7 @@ var ts; return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 120 || idToken === 116) { + if (!ts.isKeyword(idToken) || idToken === 119 || idToken === 115) { return true; } switch (token) { @@ -6688,7 +6976,7 @@ var ts; if (accessor) { return accessor; } - if (token === 114) { + if (token === 113) { return parseConstructorDeclaration(fullStart, modifiers); } if (isIndexSignature()) { @@ -6707,11 +6995,13 @@ var ts; var node = createNode(196, fullStart); setModifiers(node, modifiers); parseExpected(68); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(true); if (parseExpected(14)) { - node.members = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseClassMembers) : parseClassMembers(); + node.members = inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseClassMembers) + : parseClassMembers(); parseExpected(15); } else { @@ -6721,7 +7011,9 @@ var ts; } function parseHeritageClauses(isClassHeritageClause) { if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() ? doOutsideOfYieldContext(parseHeritageClausesWorker) : parseHeritageClausesWorker(); + return isClassHeritageClause && inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseHeritageClausesWorker) + : parseHeritageClausesWorker(); } return undefined; } @@ -6729,8 +7021,8 @@ var ts; return parseList(19, false, parseHeritageClause); } function parseHeritageClause() { - if (token === 78 || token === 103) { - var node = createNode(215); + if (token === 78 || token === 102) { + var node = createNode(216); node.token = token; nextToken(); node.types = parseDelimitedList(8, parseTypeReference); @@ -6739,7 +7031,7 @@ var ts; return undefined; } function isHeritageClause() { - return token === 78 || token === 103; + return token === 78 || token === 102; } function parseClassMembers() { return parseList(6, false, parseClassElement); @@ -6747,7 +7039,7 @@ var ts; function parseInterfaceDeclaration(fullStart, modifiers) { var node = createNode(197, fullStart); setModifiers(node, modifiers); - parseExpected(104); + parseExpected(103); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(false); @@ -6757,7 +7049,7 @@ var ts; function parseTypeAliasDeclaration(fullStart, modifiers) { var node = createNode(198, fullStart); setModifiers(node, modifiers); - parseExpected(123); + parseExpected(122); node.name = parseIdentifier(); parseExpected(52); node.type = parseType(); @@ -6765,7 +7057,7 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(219, scanner.getStartPos()); + var node = createNode(220, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); @@ -6800,7 +7092,9 @@ var ts; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(20) ? parseInternalModuleTail(getNodePos(), undefined, 1) : parseModuleBlock(); + node.body = parseOptional(20) + ? parseInternalModuleTail(getNodePos(), undefined, 1) + : parseModuleBlock(); return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, modifiers) { @@ -6811,11 +7105,13 @@ var ts; return finishNode(node); } function parseModuleDeclaration(fullStart, modifiers) { - parseExpected(117); - return token === 8 ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); + parseExpected(116); + return token === 8 + ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) + : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); } function isExternalModuleReference() { - return token === 118 && + return token === 117 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { @@ -6824,7 +7120,7 @@ var ts; function nextTokenIsCommaOrFromKeyword() { nextToken(); return token === 23 || - token === 102; + token === 123; } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers) { parseExpected(84); @@ -6832,8 +7128,8 @@ var ts; var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token !== 23 && token !== 102) { - var importEqualsDeclaration = createNode(202, fullStart); + if (token !== 23 && token !== 123) { + var importEqualsDeclaration = createNode(203, fullStart); setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; parseExpected(52); @@ -6842,35 +7138,37 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(203, fullStart); + var importDeclaration = createNode(204, fullStart); setModifiers(importDeclaration, modifiers); if (identifier || token === 35 || token === 14) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(102); + parseExpected(123); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(204, fullStart); + var importClause = createNode(205, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(23)) { - importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(206); + importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(207); } return finishNode(importClause); } function parseModuleReference() { - return isExternalModuleReference() ? parseExternalModuleReference() : parseEntityName(false); + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(212); - parseExpected(118); + var node = createNode(213); + parseExpected(117); parseExpected(16); node.expression = parseModuleSpecifier(); parseExpected(17); @@ -6884,7 +7182,7 @@ var ts; return result; } function parseNamespaceImport() { - var namespaceImport = createNode(205); + var namespaceImport = createNode(206); parseExpected(35); parseExpected(101); namespaceImport.name = parseIdentifier(); @@ -6892,14 +7190,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(20, kind === 206 ? parseImportSpecifier : parseExportSpecifier, 14, 15); + node.elements = parseBracketedList(20, kind === 207 ? parseImportSpecifier : parseExportSpecifier, 14, 15); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(211); + return parseImportOrExportSpecifier(212); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(207); + return parseImportOrExportSpecifier(208); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -6925,30 +7223,36 @@ var ts; return finishNode(node); } function parseExportDeclaration(fullStart, modifiers) { - var node = createNode(209, fullStart); + var node = createNode(210, fullStart); setModifiers(node, modifiers); if (parseOptional(35)) { - parseExpected(102); + parseExpected(123); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(210); - if (parseOptional(102)) { + node.exportClause = parseNamedImportsOrExports(211); + if (parseOptional(123)) { node.moduleSpecifier = parseModuleSpecifier(); } } parseSemicolon(); return finishNode(node); } - function parseExportAssignmentTail(fullStart, modifiers) { - var node = createNode(208, fullStart); + function parseExportAssignment(fullStart, modifiers) { + var node = createNode(209, fullStart); setModifiers(node, modifiers); - node.exportName = parseIdentifier(); + if (parseOptional(52)) { + node.isExportEquals = true; + } + else { + parseExpected(72); + } + node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); return finishNode(node); } function isLetDeclaration() { - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOnSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart() { switch (token) { @@ -6956,24 +7260,24 @@ var ts; case 69: case 82: return true; - case 105: + case 104: return isLetDeclaration(); case 68: - case 104: + case 103: case 76: - case 123: + case 122: return lookAhead(nextTokenIsIdentifierOrKeyword); case 84: return lookAhead(nextTokenCanFollowImportKeyword); - case 117: + case 116: return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral); case 77: return lookAhead(nextTokenCanFollowExportKeyword); - case 115: - case 109: - case 107: + case 114: case 108: - case 110: + case 106: + case 107: + case 109: return lookAhead(nextTokenIsDeclarationStart); } } @@ -6996,7 +7300,7 @@ var ts; function nextTokenCanFollowExportKeyword() { nextToken(); return token === 52 || token === 35 || - token === 14 || isDeclarationStart(); + token === 14 || token === 72 || isDeclarationStart(); } function nextTokenIsDeclarationStart() { nextToken(); @@ -7010,8 +7314,8 @@ var ts; var modifiers = parseModifiers(); if (token === 77) { nextToken(); - if (parseOptional(52)) { - return parseExportAssignmentTail(fullStart, modifiers); + if (token === 72 || token === 52) { + return parseExportAssignment(fullStart, modifiers); } if (token === 35 || token === 14) { return parseExportDeclaration(fullStart, modifiers); @@ -7019,20 +7323,20 @@ var ts; } switch (token) { case 97: - case 105: + case 104: case 69: return parseVariableStatement(fullStart, modifiers); case 82: return parseFunctionDeclaration(fullStart, modifiers); case 68: return parseClassDeclaration(fullStart, modifiers); - case 104: + case 103: return parseInterfaceDeclaration(fullStart, modifiers); - case 123: + case 122: return parseTypeAliasDeclaration(fullStart, modifiers); case 76: return parseEnumDeclaration(fullStart, modifiers); - case 117: + case 116: return parseModuleDeclaration(fullStart, modifiers); case 84: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers); @@ -7050,7 +7354,9 @@ var ts; return parseSourceElementOrModuleElement(); } function parseSourceElementOrModuleElement() { - return isDeclarationStart() ? parseDeclaration() : parseStatement(); + return isDeclarationStart() + ? parseDeclaration() + : parseStatement(); } function processReferenceComments(sourceFile) { var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); @@ -7108,7 +7414,13 @@ var ts; } function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 1 || node.kind === 202 && node.moduleReference.kind === 212 || node.kind === 203 || node.kind === 208 || node.kind === 209 ? node : undefined; + return node.flags & 1 + || node.kind === 203 && node.moduleReference.kind === 213 + || node.kind === 204 + || node.kind === 209 + || node.kind === 210 + ? node + : undefined; }); } } @@ -7156,7 +7468,7 @@ var ts; else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 203 || node.kind === 202) && !(node.flags & 1)) { + else if ((node.kind === 204 || node.kind === 203) && !(node.flags & 1)) { return 0; } else if (node.kind === 201) { @@ -7190,7 +7502,7 @@ var ts; } ts.bindSourceFile = bindSourceFile; function bindSourceFileWorker(file) { - var parent; + var _parent; var container; var blockScopeContainer; var lastContainer; @@ -7198,7 +7510,8 @@ var ts; var Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { file.locals = {}; - container = blockScopeContainer = file; + container = file; + setBlockScopeContainer(file, false); bind(file); file.symbolCount = symbolCount; } @@ -7206,6 +7519,12 @@ var ts; symbolCount++; return new Symbol(flags, name); } + function setBlockScopeContainer(node, cleanLocals) { + blockScopeContainer = node; + if (cleanLocals) { + blockScopeContainer.locals = undefined; + } + } function addDeclarationToSymbol(symbol, node, symbolKind) { symbol.flags |= symbolKind; if (!symbol.declarations) @@ -7242,6 +7561,13 @@ var ts; return "__new"; case 138: return "__index"; + case 210: + return "__export"; + case 209: + return "default"; + case 195: + case 196: + return node.flags & 256 ? "default" : undefined; } } function getDisplayName(node) { @@ -7249,19 +7575,22 @@ var ts; } function declareSymbol(symbols, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); - var name = getDeclarationName(node); - if (name !== undefined) { - var symbol = ts.hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); + var _name = node.flags & 256 && parent ? "default" : getDeclarationName(node); + var symbol; + if (_name !== undefined) { + symbol = ts.hasProperty(symbols, _name) ? symbols[_name] : (symbols[_name] = createSymbol(0, _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; + var message = symbol.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name, message, getDisplayName(node))); - symbol = createSymbol(0, name); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); + symbol = createSymbol(0, _name); } } else { @@ -7293,7 +7622,7 @@ var ts; function declareModuleMember(node, symbolKind, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 1; if (symbolKind & 8388608) { - if (node.kind === 211 || (node.kind === 202 && hasExportModifier)) { + if (node.kind === 212 || (node.kind === 203 && hasExportModifier)) { declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); } else { @@ -7318,10 +7647,10 @@ var ts; if (symbolKind & 255504) { node.locals = {}; } - var saveParent = parent; + var saveParent = _parent; var saveContainer = container; var savedBlockScopeContainer = blockScopeContainer; - parent = node; + _parent = node; if (symbolKind & 262128) { container = node; if (lastContainer) { @@ -7330,11 +7659,11 @@ var ts; lastContainer = container; } if (isBlockScopeContainer) { - blockScopeContainer = node; + setBlockScopeContainer(node, (symbolKind & 255504) === 0 && node.kind !== 221); } ts.forEachChild(node, bind); container = saveContainer; - parent = saveParent; + _parent = saveParent; blockScopeContainer = savedBlockScopeContainer; } function bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer) { @@ -7342,7 +7671,7 @@ var ts; case 200: declareModuleMember(node, symbolKind, symbolExcludes); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolKind, symbolExcludes); break; @@ -7398,12 +7727,6 @@ var ts; } } } - function bindExportDeclaration(node) { - if (!node.exportClause) { - (container.exportStars || (container.exportStars = [])).push(node); - } - bindChildren(node, 0, false); - } function bindFunctionOrConstructorType(node) { var symbol = createSymbol(131072, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072); @@ -7419,21 +7742,14 @@ var ts; bindChildren(node, symbolKind, isBlockScopeContainer); } function bindCatchVariableDeclaration(node) { - var symbol = createSymbol(1, node.name.text || "__missing"); - addDeclarationToSymbol(symbol, node, 1); - var saveParent = parent; - var savedBlockScopeContainer = blockScopeContainer; - parent = blockScopeContainer = node; - ts.forEachChild(node, bind); - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; + bindChildren(node, 0, true); } function bindBlockScopedVariableDeclaration(node) { switch (blockScopeContainer.kind) { case 200: declareModuleMember(node, 2, 107455); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, 2, 107455); break; @@ -7450,7 +7766,7 @@ var ts; return "__" + ts.indexOf(node.parent.parameters, node); } function bind(node) { - node.parent = parent; + node.parent = _parent; switch (node.kind) { case 127: bindDeclaration(node, 262144, 530912, false); @@ -7463,7 +7779,7 @@ var ts; if (ts.isBindingPattern(node.name)) { bindChildren(node, 0, false); } - else if (ts.getCombinedNodeFlags(node) & 6144) { + else if (ts.isBlockOrCatchScoped(node)) { bindBlockScopedVariableDeclaration(node); } else { @@ -7474,11 +7790,11 @@ var ts; case 129: bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455, false); break; - case 217: case 218: + case 219: bindPropertyOrMethodOrAccessor(node, 4, 107455, false); break; - case 219: + case 220: bindPropertyOrMethodOrAccessor(node, 8, 107455, false); break; case 136: @@ -7516,7 +7832,7 @@ var ts; case 161: bindAnonymousDeclaration(node, 16, "__function", true); break; - case 216: + case 217: bindCatchVariableDeclaration(node); break; case 196: @@ -7539,16 +7855,13 @@ var ts; case 200: bindModuleDeclaration(node); break; - case 202: - case 205: - case 207: - case 211: + case 203: + case 206: + case 208: + case 212: bindDeclaration(node, 8388608, 8388608, false); break; - case 209: - bindExportDeclaration(node); - break; - case 204: + case 205: if (node.name) { bindDeclaration(node, 8388608, 8388608, false); } @@ -7556,26 +7869,41 @@ var ts; bindChildren(node, 0, false); } break; - case 220: + case 210: + if (!node.exportClause) { + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); + } + bindChildren(node, 0, false); + break; + case 209: + if (node.expression.kind === 64) { + declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 8388608); + } + else { + declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455); + } + bindChildren(node, 0, false); + break; + case 221: if (ts.isExternalModule(node)) { bindAnonymousDeclaration(node, 512, '"' + ts.removeFileExtension(node.fileName) + '"', true); break; } case 174: - bindChildren(node, 0, !ts.isAnyFunction(node.parent)); + bindChildren(node, 0, !ts.isFunctionLike(node.parent)); break; - case 216: + case 217: case 181: case 182: case 183: - case 188: + case 202: bindChildren(node, 0, true); break; default: - var saveParent = parent; - parent = node; + var saveParent = _parent; + _parent = node; ts.forEachChild(node, bind); - parent = saveParent; + _parent = saveParent; } } function bindParameter(node) { @@ -7618,6 +7946,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var languageVersion = compilerOptions.target || 0; var emitResolver = createResolver(); + var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); + var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var checker = { getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, @@ -7650,11 +7980,10 @@ var ts; isValidPropertyAccess: isValidPropertyAccess, getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveImport, - getEmitResolver: getEmitResolver + getAliasedSymbol: resolveAlias, + getEmitResolver: getEmitResolver, + getExportsOfExternalModule: getExportsOfExternalModule }; - var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); - var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var unknownSymbol = createSymbol(4 | 67108864, "unknown"); var resolvingSymbol = createSymbol(67108864, "__resolving__"); var anyType = createIntrinsicType(1, "any"); @@ -7685,6 +8014,7 @@ var ts; var globalRegExpType; var globalTemplateStringsArrayType; var globalESSymbolType; + var globalIterableType; var anyArrayType; var tupleTypes = {}; var unionTypes = {}; @@ -7718,7 +8048,9 @@ var ts; return emitResolver; } function error(location, message, arg0, arg1, arg2) { - var diagnostic = location ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); + var diagnostic = location + ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) + : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); diagnostics.add(diagnostic); } function createSymbol(flags, name) { @@ -7804,7 +8136,8 @@ var ts; recordMergedSymbol(target, source); } else { - var message = target.flags & 2 || source.flags & 2 ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; + var message = target.flags & 2 || source.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(source.declarations, function (node) { error(node.name ? node.name : node, message, symbolToString(source)); }); @@ -7838,13 +8171,6 @@ var ts; } } } - function extendSymbolTable(target, source) { - for (var id in source) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } function getSymbolLinks(symbol) { if (symbol.flags & 67108864) return symbol; @@ -7858,10 +8184,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 220); + return ts.getAncestor(node, 221); } function isGlobalSourceFile(node) { - return node.kind === 220 && !ts.isExternalModule(node); + return node.kind === 221 && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -7871,7 +8197,7 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target === unknownSymbol || target.flags & meaning) { return symbol; } @@ -7902,12 +8228,12 @@ var ts; } } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931)) { - if (!(result.flags & 8388608 && getDeclarationOfImportSymbol(result).kind === 211)) { + if (!(result.flags & 8388608 && getDeclarationOfAliasSymbol(result).kind === 212)) { break loop; } result = undefined; @@ -7971,13 +8297,6 @@ var ts; break loop; } break; - case 216: - var id = location.name; - if (name === id.text) { - result = location.symbol; - break loop; - } - break; } lastLocation = location; location = location.parent; @@ -7998,27 +8317,57 @@ var ts; return undefined; } if (result.flags & 2) { - var declaration = ts.forEach(result.declarations, function (d) { return ts.getCombinedNodeFlags(d) & 6144 ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } + checkResolvedBlockScopedVariable(result, errorLocation); } } return result; } - function isImportSymbolDeclaration(node) { - return node.kind === 202 || - node.kind === 204 && !!node.name || - node.kind === 205 || - node.kind === 207 || - node.kind === 211; + function checkResolvedBlockScopedVariable(result, errorLocation) { + ts.Debug.assert((result.flags & 2) !== 0); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); + ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); + var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); + if (!isUsedBeforeDeclaration) { + var variableDeclaration = ts.getAncestor(declaration, 193); + var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); + if (variableDeclaration.parent.parent.kind === 175 || + variableDeclaration.parent.parent.kind === 181) { + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === 183 || + variableDeclaration.parent.parent.kind === 182) { + var expression = variableDeclaration.parent.parent.expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + } + if (isUsedBeforeDeclaration) { + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); + } } - function getDeclarationOfImportSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return isImportSymbolDeclaration(d) ? d : undefined; }); + function isSameScopeDescendentOf(initial, parent, stopAt) { + if (!parent) { + return false; + } + for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { + if (current === parent) { + return true; + } + } + return false; + } + function isAliasSymbolDeclaration(node) { + return node.kind === 203 || + node.kind === 205 && !!node.name || + node.kind === 206 || + node.kind === 208 || + node.kind === 212 || + node.kind === 209; + } + function getDeclarationOfAliasSymbol(symbol) { + return ts.forEach(symbol.declarations, function (d) { return isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 212) { + if (node.moduleReference.kind === 213) { var moduleSymbol = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); var exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); return exportAssignmentSymbol || moduleSymbol; @@ -8041,14 +8390,14 @@ var ts; function getExternalModuleMember(node, specifier) { var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol) { - var name = specifier.propertyName || specifier.name; - if (name.text) { - var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, 107455 | 793056 | 1536); + var _name = specifier.propertyName || specifier.name; + if (_name.text) { + var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), _name.text, 107455 | 793056 | 1536); if (!symbol) { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(_name)); return; } - return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveImport(symbol); + return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveAlias(symbol); } } } @@ -8056,28 +8405,35 @@ var ts; return getExternalModuleMember(node.parent.parent.parent, node); } function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node, node.propertyName || node.name, 107455 | 793056 | 1536); + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536); + } + function getTargetOfExportAssignment(node) { + return resolveEntityName(node.expression, 107455 | 793056 | 1536); } function getTargetOfImportDeclaration(node) { switch (node.kind) { - case 202: + case 203: return getTargetOfImportEqualsDeclaration(node); - case 204: - return getTargetOfImportClause(node); case 205: + return getTargetOfImportClause(node); + case 206: return getTargetOfNamespaceImport(node); - case 207: + case 208: return getTargetOfImportSpecifier(node); - case 211: + case 212: return getTargetOfExportSpecifier(node); + case 209: + return getTargetOfExportAssignment(node); } } - function resolveImport(symbol) { - ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Imports here."); + function resolveAlias(symbol) { + ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here."); var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfImportSymbol(symbol); + var node = getDeclarationOfAliasSymbol(symbol); var target = getTargetOfImportDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -8091,47 +8447,73 @@ var ts; } return links.target; } + function markExportAsReferenced(node) { + var symbol = getSymbolOfNode(node); + var target = resolveAlias(symbol); + if (target && target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target)) { + markAliasSymbolAsReferenced(symbol); + } + } + function markAliasSymbolAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.referenced) { + links.referenced = true; + var node = getDeclarationOfAliasSymbol(symbol); + if (node.kind === 209) { + checkExpressionCached(node.expression); + } + else if (node.kind === 212) { + checkExpressionCached(node.propertyName || node.name); + } + else if (ts.isInternalModuleImportEqualsDeclaration(node)) { + checkExpressionCached(node.moduleReference); + } + } + } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 202); + importDeclaration = ts.getAncestor(entityName, 203); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 64 && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } if (entityName.kind === 64 || entityName.parent.kind === 125) { - return resolveEntityName(importDeclaration, entityName, 1536); + return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 202); - return resolveEntityName(importDeclaration, entityName, 107455 | 793056 | 1536); + ts.Debug.assert(entityName.parent.kind === 203); + return resolveEntityName(entityName, 107455 | 793056 | 1536); } } function getFullyQualifiedName(symbol) { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } - function resolveEntityName(location, name, meaning) { + function resolveEntityName(name, meaning) { if (ts.getFullWidth(name) === 0) { return undefined; } + var symbol; if (name.kind === 64) { - var symbol = resolveName(location, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); + symbol = resolveName(name, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); if (!symbol) { - return; + return undefined; } } else if (name.kind === 125) { - var namespace = resolveEntityName(location, name.left, 1536); - if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) - return; - var symbol = getSymbol(getExportsOfSymbol(namespace), name.right.text, meaning); + var namespace = resolveEntityName(name.left, 1536); + if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) { + return undefined; + } + var right = name.right; + symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); - return; + error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); + return undefined; } } ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveImport(symbol); + return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function isExternalModuleNameRelative(moduleName) { return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; @@ -8152,14 +8534,17 @@ var ts; return symbol; } } + var sourceFile; while (true) { var fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - var sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); - if (sourceFile || isRelative) + sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); + if (sourceFile || isRelative) { break; + } var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) + if (parentPath === searchPath) { break; + } searchPath = parentPath; } if (sourceFile) { @@ -8171,6 +8556,9 @@ var ts; } error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_external_module_0, moduleName); } + function getExportAssignmentSymbol(moduleSymbol) { + return moduleSymbol.exports["default"]; + } function getResolvedExportAssignmentSymbol(moduleSymbol) { var symbol = getExportAssignmentSymbol(moduleSymbol); if (symbol) { @@ -8178,82 +8566,52 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - return resolveImport(symbol); + return resolveAlias(symbol); } } } - function getExportAssignmentSymbol(symbol) { - checkTypeOfExportAssignmentSymbol(symbol); - return getSymbolLinks(symbol).exportAssignmentSymbol; - } - function checkTypeOfExportAssignmentSymbol(containerSymbol) { - var symbolLinks = getSymbolLinks(containerSymbol); - if (!symbolLinks.exportAssignmentChecked) { - var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol); - if (exportInformation.exportAssignments.length) { - if (exportInformation.exportAssignments.length > 1) { - ts.forEach(exportInformation.exportAssignments, function (node) { return error(node, ts.Diagnostics.A_module_cannot_have_more_than_one_export_assignment); }); - } - var node = exportInformation.exportAssignments[0]; - if (exportInformation.hasExportedMember) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - if (node.exportName.text) { - var meaning = 107455 | 793056 | 1536; - var exportSymbol = resolveName(node, node.exportName.text, meaning, ts.Diagnostics.Cannot_find_name_0, node.exportName); - } - symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol; - } - symbolLinks.exportAssignmentChecked = true; - } - } - function collectExportInformationForSourceFileOrModule(symbol) { - var seenExportedMember = false; - var result = []; - ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 220 ? declaration : declaration.body); - ts.forEach(block.statements, function (node) { - if (node.kind === 208) { - result.push(node); - } - else { - seenExportedMember = seenExportedMember || (node.flags & 1) !== 0; - } - }); - }); - return { - hasExportedMember: seenExportedMember, - exportAssignments: result - }; - } function getExportsOfSymbol(symbol) { return symbol.flags & 1536 ? getExportsOfModule(symbol) : symbol.exports; } - function getExportsOfModule(symbol) { - var links = getSymbolLinks(symbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(symbol)); + function getExportsOfModule(moduleSymbol) { + var links = getSymbolLinks(moduleSymbol); + return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); } - function getExportsForModule(symbol) { + function extendExportSymbols(target, source) { + for (var id in source) { + if (id !== "default" && !ts.hasProperty(target, id)) { + target[id] = source[id]; + } + } + } + function getExportsForModule(moduleSymbol) { + if (compilerOptions.target < 2) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + return { + "default": defaultSymbol + }; + } + } var result; var visitedSymbols = []; - visit(symbol); - return result; + visit(moduleSymbol); + return result || moduleSymbol.exports; function visit(symbol) { if (!ts.contains(visitedSymbols, symbol)) { visitedSymbols.push(symbol); - if (!result) { - result = symbol.exports; - } - else { - extendSymbolTable(result, symbol.exports); - } - ts.forEach(symbol.declarations, function (node) { - if (node.kind === 220 || node.kind === 200) { - ts.forEach(node.exportStars, function (exportStar) { - visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier)); - }); + if (symbol !== moduleSymbol) { + if (!result) { + result = cloneSymbolTable(moduleSymbol.exports); } - }); + extendExportSymbols(result, symbol.exports); + } + var exportStars = symbol.exports["__export"]; + if (exportStars) { + ts.forEach(exportStars.declarations, function (node) { + visit(resolveExternalModuleName(node, node.moduleSpecifier)); + }); + } } } } @@ -8268,7 +8626,9 @@ var ts; return getMergedSymbol(symbol.parent); } function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576) !== 0 ? getMergedSymbol(symbol.exportSymbol) : symbol; + return symbol && (symbol.flags & 1048576) !== 0 + ? getMergedSymbol(symbol.exportSymbol) + : symbol; } function symbolIsValue(symbol) { if (symbol.flags & 16777216) { @@ -8278,14 +8638,14 @@ var ts; return true; } if (symbol.flags & 8388608) { - return (resolveImport(symbol).flags & 107455) !== 0; + return (resolveAlias(symbol).flags & 107455) !== 0; } return false; } function findConstructorDeclaration(node) { var members = node.members; - for (var i = 0; i < members.length; i++) { - var member = members[i]; + for (var _i = 0, _n = members.length; _i < _n; _i++) { + var member = members[_i]; if (member.kind === 133 && ts.nodeIsPresent(member.body)) { return member; } @@ -8344,25 +8704,25 @@ var ts; } function forEachSymbolTableInScope(enclosingDeclaration, callback) { var result; - for (var location = enclosingDeclaration; location; location = location.parent) { - if (location.locals && !isGlobalSourceFile(location)) { - if (result = callback(location.locals)) { + for (var _location = enclosingDeclaration; _location; _location = _location.parent) { + if (_location.locals && !isGlobalSourceFile(_location)) { + if (result = callback(_location.locals)) { return result; } } - switch (location.kind) { - case 220: - if (!ts.isExternalModule(location)) { + switch (_location.kind) { + case 221: + if (!ts.isExternalModule(_location)) { break; } case 200: - if (result = callback(getSymbolOfNode(location).exports)) { + if (result = callback(getSymbolOfNode(_location).exports)) { return result; } break; case 196: case 197: - if (result = callback(getSymbolOfNode(location).members)) { + if (result = callback(getSymbolOfNode(_location).members)) { return result; } break; @@ -8395,8 +8755,8 @@ var ts; if (symbolFromSymbolTable.flags & 8388608) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { + var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); + if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; } var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; @@ -8421,7 +8781,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveImport(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -8477,7 +8837,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 200 && declaration.name.kind === 8) || - (declaration.kind === 220 && ts.isExternalModule(declaration)); + (declaration.kind === 221 && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -8487,7 +8847,7 @@ var ts; return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 202 && + if (declaration.kind === 203 && !(declaration.flags & 1) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; @@ -8512,7 +8872,7 @@ var ts; meaning = 107455 | 1048576; } else if (entityName.kind === 125 || - entityName.parent.kind === 202) { + entityName.parent.kind === 203) { meaning = 1536; } else { @@ -8603,8 +8963,9 @@ var ts; walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); } if (accessibleSymbolChain) { - for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) { - appendParentTypeArgumentsAndSymbolName(accessibleSymbolChain[i]); + for (var _i = 0, _n = accessibleSymbolChain.length; _i < _n; _i++) { + var accessibleSymbol = accessibleSymbolChain[_i]; + appendParentTypeArgumentsAndSymbolName(accessibleSymbol); } } else { @@ -8712,7 +9073,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056, 0, flags); } else { - writeKeyword(writer, 112); + writeKeyword(writer, 111); } } else { @@ -8730,7 +9091,7 @@ var ts; var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { - return declaration.parent.kind === 220 || declaration.parent.kind === 201; + return declaration.parent.kind === 221 || declaration.parent.kind === 201; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -8786,15 +9147,17 @@ var ts; writePunctuation(writer, 14); writer.writeLine(); writer.increaseIndent(); - for (var i = 0; i < resolved.callSignatures.length; i++) { - buildSignatureDisplay(resolved.callSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + for (var _i = 0, _a = resolved.callSignatures, _n = _a.length; _i < _n; _i++) { + var signature = _a[_i]; + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.constructSignatures.length; i++) { + for (var _b = 0, _c = resolved.constructSignatures, _d = _c.length; _b < _d; _b++) { + var _signature = _c[_b]; writeKeyword(writer, 87); writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -8803,7 +9166,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 0, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 121); + writeKeyword(writer, 120); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -8816,7 +9179,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 1, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 119); + writeKeyword(writer, 118); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -8824,17 +9187,18 @@ var ts; writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.properties.length; i++) { - var p = resolved.properties[i]; + for (var _e = 0, _f = resolved.properties, _g = _f.length; _e < _g; _e++) { + var p = _f[_e]; var t = getTypeOfSymbol(p); if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) { var signatures = getSignaturesOfType(t, 0); - for (var j = 0; j < signatures.length; j++) { + for (var _h = 0, _j = signatures.length; _h < _j; _h++) { + var _signature_1 = signatures[_h]; buildSymbolDisplay(p, writer); if (p.flags & 536870912) { writePunctuation(writer, 50); } - buildSignatureDisplay(signatures[j], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature_1, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -8964,7 +9328,7 @@ var ts; return node; } } - else if (node.kind === 220) { + else if (node.kind === 221) { return ts.isExternalModule(node) ? node : undefined; } } @@ -8972,16 +9336,17 @@ var ts; } function isUsedInExportAssignment(node) { var externalModule = getContainingExternalModule(node); + var exportAssignmentSymbol; + var resolvedExportSymbol; if (externalModule) { var externalModuleSymbol = getSymbolOfNode(externalModule); - var exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var resolvedExportSymbol; + exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); var symbolOfNode = getSymbolOfNode(node); if (isSymbolUsedInExportAssignment(symbolOfNode)) { return true; } if (symbolOfNode.flags & 8388608) { - return isSymbolUsedInExportAssignment(resolveImport(symbolOfNode)); + return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); } } function isSymbolUsedInExportAssignment(symbol) { @@ -8989,7 +9354,7 @@ var ts; return true; } if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608)) { - resolvedExportSymbol = resolvedExportSymbol || resolveImport(exportAssignmentSymbol); + resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); if (resolvedExportSymbol === symbol) { return true; } @@ -9014,13 +9379,13 @@ var ts; case 198: case 195: case 199: - case 202: - var parent = getDeclarationContainer(node); + case 203: + var _parent = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 1) && - !(node.kind !== 202 && parent.kind !== 220 && ts.isInAmbientContext(parent))) { - return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); + !(node.kind !== 203 && _parent.kind !== 221 && ts.isInAmbientContext(_parent))) { + return isGlobalSourceFile(_parent) || isUsedInExportAssignment(node); } - return isDeclarationVisible(parent); + return isDeclarationVisible(_parent); case 130: case 129: case 134: @@ -9046,7 +9411,7 @@ var ts; case 147: return isDeclarationVisible(node.parent); case 127: - case 220: + case 221: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -9090,13 +9455,14 @@ var ts; } return parentType; } + var type; if (pattern.kind === 148) { - var name = declaration.propertyName || declaration.name; - var type = getTypeOfPropertyOfType(parentType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, 1) || + var _name = declaration.propertyName || declaration.name; + type = getTypeOfPropertyOfType(parentType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(_name)); return unknownType; } } @@ -9107,14 +9473,19 @@ var ts; } if (!declaration.dotDotDotToken) { var propName = "" + ts.indexOf(pattern.elements, declaration); - var type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); + type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); if (!type) { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + if (isTupleType(parentType)) { + error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); + } + else { + error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + } return unknownType; } } else { - var type = createArrayType(getIndexTypeOfType(parentType, 1)); + type = createArrayType(getIndexTypeOfType(parentType, 1)); } } return type; @@ -9123,6 +9494,9 @@ var ts; if (declaration.parent.parent.kind === 182) { return anyType; } + if (declaration.parent.parent.kind === 183) { + return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; + } if (ts.isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); } @@ -9145,7 +9519,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 218) { + if (declaration.kind === 219) { return checkIdentifier(declaration.name); } return undefined; @@ -9163,8 +9537,8 @@ var ts; var members = {}; 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); + var _name = e.propertyName || e.name; + var symbol = createSymbol(flags, _name.text); symbol.type = getTypeFromBindingElement(e); members[symbol.name] = symbol; }); @@ -9182,7 +9556,9 @@ var ts; return !elementTypes.length ? anyArrayType : hasSpreadElement ? createArrayType(getUnionType(elementTypes)) : createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern) { - return pattern.kind === 148 ? getTypeFromObjectBindingPattern(pattern) : getTypeFromArrayBindingPattern(pattern); + return pattern.kind === 148 + ? getTypeFromObjectBindingPattern(pattern) + : getTypeFromArrayBindingPattern(pattern); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { var type = getTypeForVariableLikeDeclaration(declaration); @@ -9190,7 +9566,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - return declaration.kind !== 217 ? getWidenedType(type) : type; + return declaration.kind !== 218 ? getWidenedType(type) : type; } if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name); @@ -9211,9 +9587,12 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 216) { + if (declaration.parent.kind === 217) { return links.type = anyType; } + if (declaration.kind === 209) { + return links.type = checkExpression(declaration.expression); + } links.type = resolvingType; var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); if (links.type === resolvingType) { @@ -9223,7 +9602,9 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var diagnostic = symbol.valueDeclaration.type ? ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; + var diagnostic = symbol.valueDeclaration.type ? + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); } } @@ -9284,8 +9665,8 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var getter = ts.getDeclarationOfKind(symbol, 134); - error(getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + var _getter = ts.getDeclarationOfKind(symbol, 134); + error(_getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } } @@ -9303,10 +9684,10 @@ var ts; } return links.type; } - function getTypeOfImport(symbol) { + function getTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - links.type = getTypeOfSymbol(resolveImport(symbol)); + links.type = getTypeOfSymbol(resolveAlias(symbol)); } return links.type; } @@ -9334,7 +9715,7 @@ var ts; return getTypeOfAccessors(symbol); } if (symbol.flags & 8388608) { - return getTypeOfImport(symbol); + return getTypeOfAlias(symbol); } return unknownType; } @@ -9462,8 +9843,8 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = ts.getDeclarationOfKind(symbol, 198); - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + var _declaration = ts.getDeclarationOfKind(symbol, 198); + error(_declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; } @@ -9488,10 +9869,10 @@ var ts; } return links.declaredType; } - function getDeclaredTypeOfImport(symbol) { + function getDeclaredTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveImport(symbol)); + links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); } return links.declaredType; } @@ -9513,29 +9894,29 @@ var ts; return getDeclaredTypeOfTypeParameter(symbol); } if (symbol.flags & 8388608) { - return getDeclaredTypeOfImport(symbol); + return getDeclaredTypeOfAlias(symbol); } return unknownType; } function createSymbolTable(symbols) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = symbol; } return result; } function createInstantiatedSymbolTable(symbols, mapper) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = instantiateSymbol(symbol, mapper); } return result; } function addInheritedMembers(symbols, baseSymbols) { - for (var i = 0; i < baseSymbols.length; i++) { - var s = baseSymbols[i]; + for (var _i = 0, _n = baseSymbols.length; _i < _n; _i++) { + var s = baseSymbols[_i]; if (!ts.hasProperty(symbols, s.name)) { symbols[s.name] = s; } @@ -9543,8 +9924,9 @@ var ts; } function addInheritedSignatures(signatures, baseSignatures) { if (baseSignatures) { - for (var i = 0; i < baseSignatures.length; i++) { - signatures.push(baseSignatures[i]); + for (var _i = 0, _n = baseSignatures.length; _i < _n; _i++) { + var signature = baseSignatures[_i]; + signatures.push(signature); } } } @@ -9603,7 +9985,8 @@ var ts; var baseType = classType.baseTypes[0]; var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1); return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 ? getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); + var signature = baseType.flags & 4096 ? + getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); signature.typeParameters = classType.typeParameters; signature.resolvedReturnType = classType; return signature; @@ -9640,13 +10023,14 @@ var ts; function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var signatures = signatureLists[0]; - for (var i = 0; i < signatures.length; i++) { - if (signatures[i].typeParameters) { + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; + if (signature.typeParameters) { return emptyArray; } } - for (var i = 1; i < signatureLists.length; i++) { - if (!signatureListsIdentical(signatures, signatureLists[i])) { + for (var _i_1 = 1; _i_1 < signatureLists.length; _i_1++) { + if (!signatureListsIdentical(signatures, signatureLists[_i_1])) { return emptyArray; } } @@ -9660,8 +10044,9 @@ var ts; } function getUnionIndexType(types, kind) { var indexTypes = []; - for (var i = 0; i < types.length; i++) { - var indexType = getIndexTypeOfType(types[i], kind); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + var indexType = getIndexTypeOfType(type, kind); if (!indexType) { return undefined; } @@ -9678,17 +10063,22 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; + var members; + var callSignatures; + var constructSignatures; + var stringIndexType; + var numberIndexType; if (symbol.flags & 2048) { - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1); + members = symbol.members; + callSignatures = getSignaturesOfSymbol(members["__call"]); + constructSignatures = getSignaturesOfSymbol(members["__new"]); + stringIndexType = getIndexTypeOfSymbol(symbol, 0); + numberIndexType = getIndexTypeOfSymbol(symbol, 1); } else { - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; + members = emptySymbols; + callSignatures = emptyArray; + constructSignatures = emptyArray; if (symbol.flags & 1952) { members = getExportsOfSymbol(symbol); } @@ -9706,8 +10096,8 @@ var ts; addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(classType.baseTypes[0].symbol))); } } - var stringIndexType = undefined; - var numberIndexType = (symbol.flags & 384) ? stringType : undefined; + stringIndexType = undefined; + numberIndexType = (symbol.flags & 384) ? stringType : undefined; } setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } @@ -9790,8 +10180,9 @@ var ts; function createUnionProperty(unionType, name) { var types = unionType.types; var props; - for (var i = 0; i < types.length; i++) { - var type = getApparentType(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var type = getApparentType(current); if (type !== unknownType) { var prop = getPropertyOfType(type, name); if (!prop) { @@ -9807,12 +10198,12 @@ var ts; } var propTypes = []; var declarations = []; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); + for (var _a = 0, _b = props.length; _a < _b; _a++) { + var _prop = props[_a]; + if (_prop.declarations) { + declarations.push.apply(declarations, _prop.declarations); } - propTypes.push(getTypeOfSymbol(prop)); + propTypes.push(getTypeOfSymbol(_prop)); } var result = createSymbol(4 | 67108864 | 268435456, name); result.unionType = unionType; @@ -9849,9 +10240,9 @@ var ts; } } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) - return symbol; + var _symbol = getPropertyOfObjectType(globalFunctionType, name); + if (_symbol) + return _symbol; } return getPropertyOfObjectType(globalObjectType, name); } @@ -9884,11 +10275,22 @@ var ts; }); return result; } + function getExportsOfExternalModule(node) { + if (!node.moduleSpecifier) { + return emptyArray; + } + var _module = resolveExternalModuleName(node, node.moduleSpecifier); + if (!_module || !_module.exports) { + return emptyArray; + } + return ts.mapToArray(getExportsOfModule(_module)); + } function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var classType = declaration.kind === 133 ? getDeclaredTypeOfClass(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.typeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; + var typeParameters = classType ? classType.typeParameters : + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; var parameters = []; var hasStringLiterals = false; var minArgumentCount = -1; @@ -9961,14 +10363,15 @@ var ts; function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { signature.resolvedReturnType = resolvingType; + var type; if (signature.target) { - var type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); + type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - var type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); } else { - var type = getReturnTypeFromBody(signature.declaration); + type = getReturnTypeFromBody(signature.declaration); } if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = type; @@ -10029,12 +10432,13 @@ var ts; return symbol.members["__index"]; } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 119 : 121; + var syntaxKind = kind === 1 ? 118 : 120; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { var len = indexSymbol.declarations.length; - for (var i = 0; i < len; i++) { - var node = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var node = decl; if (node.parameters.length === 1) { var parameter = node.parameters[0]; if (parameter && parameter.type && parameter.type.kind === syntaxKind) { @@ -10047,7 +10451,9 @@ var ts; } function getIndexTypeOfSymbol(symbol, kind) { var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType : undefined; + return declaration + ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType + : undefined; } function getConstraintOfTypeParameter(type) { if (!type.constraint) { @@ -10070,8 +10476,9 @@ var ts; default: var result = ""; for (var i = 0; i < types.length; i++) { - if (i > 0) + if (i > 0) { result += ","; + } result += types[i].id; } return result; @@ -10079,8 +10486,9 @@ var ts; } function getWideningFlagsOfTypes(types) { var result = 0; - for (var i = 0; i < types.length; i++) { - result |= types[i].flags; + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + result |= type.flags; } return result & 786432; } @@ -10132,9 +10540,9 @@ var ts; function getTypeFromTypeReferenceNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = resolveEntityName(node, node.typeName, 793056); + var symbol = resolveEntityName(node.typeName, 793056); + var type; if (symbol) { - var type; if ((symbol.flags & 262144) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { type = unknownType; } @@ -10172,8 +10580,8 @@ var ts; function getTypeOfGlobalSymbol(symbol, arity) { function getTypeDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; switch (declaration.kind) { case 196: case 197: @@ -10205,8 +10613,9 @@ var ts; function getGlobalSymbol(name, meaning, diagnostic) { return resolveName(undefined, name, meaning, diagnostic, name); } - function getGlobalType(name) { - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), 0); + function getGlobalType(name, arity) { + if (arity === void 0) { arity = 0; } + return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); } function getGlobalESSymbolConstructorSymbol() { return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); @@ -10254,13 +10663,15 @@ var ts; } } function addTypesToSortedSet(sortedTypes, types) { - for (var i = 0, len = types.length; i < len; i++) { - addTypeToSortedSet(sortedTypes, types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + addTypeToSortedSet(sortedTypes, type); } } function isSubtypeOfAny(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && isTypeSubtypeOf(candidate, type)) { return true; } } @@ -10276,8 +10687,9 @@ var ts; } } function containsAnyType(types) { - for (var i = 0; i < types.length; i++) { - if (types[i].flags & 1) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (type.flags & 1) { return true; } } @@ -10350,15 +10762,15 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 112: + case 111: return anyType; - case 121: + case 120: return stringType; - case 119: + case 118: return numberType; - case 113: + case 112: return booleanType; - case 122: + case 121: return esSymbolType; case 98: return voidType; @@ -10391,8 +10803,9 @@ var ts; function instantiateList(items, mapper, instantiator) { if (items && items.length) { var result = []; - for (var i = 0; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); + for (var _i = 0, _n = items.length; _i < _n; _i++) { + var v = items[_i]; + result.push(instantiator(v, mapper)); } return result; } @@ -10411,8 +10824,9 @@ var ts; } return function (t) { for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + if (t === sources[i]) { return targets[i]; + } } return t; }; @@ -10429,9 +10843,11 @@ var ts; case 2: return createBinaryTypeEraser(sources[0], sources[1]); } return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + for (var _i = 0, _n = sources.length; _i < _n; _i++) { + var source = sources[_i]; + if (t === source) { return anyType; + } } return t; }; @@ -10465,8 +10881,9 @@ var ts; return result; } function instantiateSignature(signature, mapper, eraseTypeParameters) { + var freshTypeParameters; if (signature.typeParameters && !eraseTypeParameters) { - var freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); + freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); } var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -10510,7 +10927,8 @@ var ts; return mapper(type); } if (type.flags & 32768) { - return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? instantiateAnonymousType(type, mapper) : type; + return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? + instantiateAnonymousType(type, mapper) : type; } if (type.flags & 4096) { return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); @@ -10539,8 +10957,8 @@ var ts; isContextSensitive(node.whenFalse); case 167: return node.operatorToken.kind === 49 && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 217: + (isContextSensitive(node.left) || isContextSensitive(node.right)); + case 218: return isContextSensitive(node.initializer); case 132: case 131: @@ -10622,7 +11040,7 @@ var ts; } function isRelatedTo(source, target, reportErrors, headMessage, elaborateErrors) { if (elaborateErrors === void 0) { elaborateErrors = false; } - var result; + var _result; if (source === target) return -1; if (relation !== identityRelation) { @@ -10646,54 +11064,54 @@ var ts; if (source.flags & 16384 || target.flags & 16384) { if (relation === identityRelation) { if (source.flags & 16384 && target.flags & 16384) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; + if (_result = unionTypeRelatedToUnionType(source, target)) { + if (_result &= unionTypeRelatedToUnionType(target, source)) { + return _result; } } } else if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(target, source, reportErrors)) { + return _result; } } } else { if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; + if (_result = typeRelatedToUnionType(source, target, reportErrors)) { + return _result; } } } } else if (source.flags & 512 && target.flags & 512) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; + if (_result = typeParameterRelatedTo(source, target, reportErrors)) { + return _result; } } else { var saveErrorInfo = errorInfo; if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; + if (_result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { + return _result; } } var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); if (sourceOrApparentType.flags & 48128 && target.flags & 48128 && - (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { + (_result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { errorInfo = saveErrorInfo; - return result; + return _result; } } if (reportErrors) { @@ -10709,16 +11127,17 @@ var ts; return 0; } function unionTypeRelatedToUnionType(source, target) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = typeRelatedToUnionType(sourceTypes[i], target, false); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = typeRelatedToUnionType(sourceType, target, false); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeRelatedToUnionType(source, target, reportErrors) { var targetTypes = target.types; @@ -10731,27 +11150,28 @@ var ts; return 0; } function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = isRelatedTo(sourceType, target, reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typesRelatedTo(sources, targets, reportErrors) { - var result = -1; + var _result = -1; for (var i = 0, len = sources.length; i < len; i++) { var related = isRelatedTo(sources[i], targets[i], reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeParameterRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -10817,19 +11237,20 @@ var ts; expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; + var _result; if (expandingFlags === 3) { - var result = 1; + _result = 1; } else { - var result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); + _result = propertiesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 0, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 1, reportErrors); + if (_result) { + _result &= stringIndexTypesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= numberIndexTypesRelatedTo(source, target, reportErrors); } } } @@ -10837,23 +11258,23 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result) { + if (_result) { var maybeCache = maybeStack[depth]; - var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; + var destinationCache = (_result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; ts.copyMap(maybeCache, destinationCache); } else { relation[id] = reportErrors ? 3 : 2; } - return result; + return _result; } function isDeeplyNestedGeneric(type, stack) { if (type.flags & 4096 && depth >= 10) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) { + if (t.flags & 4096 && t.target === _target) { count++; if (count >= 10) return true; @@ -10866,11 +11287,11 @@ var ts; if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } - var result = -1; + var _result = -1; var properties = getPropertiesOfObjectType(target); var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 131072); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp !== targetProp) { if (!sourceProp) { @@ -10921,7 +11342,7 @@ var ts; } return 0; } - result &= related; + _result &= related; if (sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) { if (reportErrors) { reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); @@ -10931,7 +11352,7 @@ var ts; } } } - return result; + return _result; } function propertiesIdenticalTo(source, target) { var sourceProperties = getPropertiesOfObjectType(source); @@ -10939,9 +11360,9 @@ var ts; if (sourceProperties.length !== targetProperties.length) { return 0; } - var result = -1; - for (var i = 0, len = sourceProperties.length; i < len; ++i) { - var sourceProp = sourceProperties[i]; + var _result = -1; + for (var _i = 0, _n = sourceProperties.length; _i < _n; _i++) { + var sourceProp = sourceProperties[_i]; var targetProp = getPropertyOfObjectType(target, sourceProp.name); if (!targetProp) { return 0; @@ -10950,9 +11371,9 @@ var ts; if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function signaturesRelatedTo(source, target, kind, reportErrors) { if (relation === identityRelation) { @@ -10963,18 +11384,18 @@ var ts; } var sourceSignatures = getSignaturesOfType(source, kind); var targetSignatures = getSignaturesOfType(target, kind); - var result = -1; + var _result = -1; var saveErrorInfo = errorInfo; - outer: for (var i = 0; i < targetSignatures.length; i++) { - var t = targetSignatures[i]; + outer: for (var _i = 0, _n = targetSignatures.length; _i < _n; _i++) { + var t = targetSignatures[_i]; if (!t.hasStringLiterals || target.flags & 65536) { var localErrors = reportErrors; - for (var j = 0; j < sourceSignatures.length; j++) { - var s = sourceSignatures[j]; + for (var _a = 0, _b = sourceSignatures.length; _a < _b; _a++) { + var s = sourceSignatures[_a]; if (!s.hasStringLiterals || source.flags & 65536) { var related = signatureRelatedTo(s, t, localErrors); if (related) { - result &= related; + _result &= related; errorInfo = saveErrorInfo; continue outer; } @@ -10984,7 +11405,7 @@ var ts; return 0; } } - return result; + return _result; } function signatureRelatedTo(source, target, reportErrors) { if (source === target) { @@ -11014,14 +11435,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - var result = -1; + var _result = -1; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + var _s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + var _t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); + var related = isRelatedTo(_s, _t, reportErrors); if (!related) { - related = isRelatedTo(t, s, false); + related = isRelatedTo(_t, _s, false); if (!related) { if (reportErrors) { reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); @@ -11030,13 +11451,13 @@ var ts; } errorInfo = saveErrorInfo; } - result &= related; + _result &= related; } var t = getReturnTypeOfSignature(target); if (t === voidType) - return result; + return _result; var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); + return _result & isRelatedTo(s, t, reportErrors); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -11044,15 +11465,15 @@ var ts; if (sourceSignatures.length !== targetSignatures.length) { return 0; } - var result = -1; + var _result = -1; for (var i = 0, len = sourceSignatures.length; i < len; ++i) { var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function stringIndexTypesRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -11092,11 +11513,12 @@ var ts; } return 0; } + var related; if (sourceStringType && sourceNumberType) { - var related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { - var related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); } if (!related) { if (reportErrors) { @@ -11171,14 +11593,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { + for (var _i = 0, _len = source.parameters.length; _i < _len; _i++) { + var s = source.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[_i]); + var t = target.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[_i]); + var _related = compareTypes(s, t); + if (!_related) { return 0; } - result &= related; + result &= _related; } if (compareReturnTypes) { result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); @@ -11186,8 +11608,9 @@ var ts; return result; } function isSupertypeOfEach(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && !isTypeSubtypeOf(types[i], candidate)) + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && !isTypeSubtypeOf(type, candidate)) return false; } return true; @@ -11230,6 +11653,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isTupleType(type) { + return (type.flags & 8192) && !!type.elementTypes; + } function getWidenedTypeOfObjectLiteral(type) { var properties = getPropertiesOfObjectType(type); var members = {}; @@ -11287,29 +11713,32 @@ var ts; return reportWideningErrorsInType(type.typeArguments[0]); } if (type.flags & 131072) { - var errorReported = false; + var _errorReported = false; ts.forEach(getPropertiesOfObjectType(type), function (p) { var t = getTypeOfSymbol(p); if (t.flags & 262144) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); } - errorReported = true; + _errorReported = true; } }); - return errorReported; + return _errorReported; } return false; } function reportImplicitAnyError(declaration, type) { var typeAsString = typeToString(getWidenedType(type)); + var diagnostic; switch (declaration.kind) { case 130: case 129: - var diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; case 128: - var diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; + diagnostic = declaration.dotDotDotToken ? + ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : + ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; case 195: case 132: @@ -11322,10 +11751,10 @@ var ts; error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; } - var diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; + diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; default: - var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); } @@ -11364,7 +11793,8 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) { + for (var _i = 0, _n = typeParameters.length; _i < _n; _i++) { + var unused = typeParameters[_i]; inferences.push({ primary: undefined, secondary: undefined }); } return { @@ -11383,19 +11813,21 @@ var ts; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) + if (source === sourceStack[i] && target === targetStack[i]) { return true; + } } return false; } function isWithinDepthLimit(type, stack) { if (depth >= 5) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) + if (t.flags & 4096 && t.target === _target) { count++; + } } return count < 5; } @@ -11410,7 +11842,9 @@ var ts; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { var inferences = context.inferences[i]; - var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + var candidates = inferiority ? + inferences.secondary || (inferences.secondary = []) : + inferences.primary || (inferences.primary = []); if (!ts.contains(candidates, source)) candidates.push(source); break; @@ -11420,16 +11854,16 @@ var ts; else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { var sourceTypes = source.typeArguments; var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); + for (var _i = 0; _i < sourceTypes.length; _i++) { + inferFromTypes(sourceTypes[_i], targetTypes[_i]); } } else if (target.flags & 16384) { - var targetTypes = target.types; + var _targetTypes = target.types; var typeParameterCount = 0; var typeParameter; - for (var i = 0; i < targetTypes.length; i++) { - var t = targetTypes[i]; + for (var _a = 0, _n = _targetTypes.length; _a < _n; _a++) { + var t = _targetTypes[_a]; if (t.flags & 512 && ts.contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; @@ -11445,9 +11879,10 @@ var ts; } } else if (source.flags & 16384) { - var sourceTypes = source.types; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], target); + var _sourceTypes = source.types; + for (var _b = 0, _c = _sourceTypes.length; _b < _c; _b++) { + var sourceType = _sourceTypes[_b]; + inferFromTypes(sourceType, target); } } else if (source.flags & 48128 && (target.flags & (4096 | 8192) || @@ -11472,8 +11907,8 @@ var ts; } function inferFromProperties(source, target) { var properties = getPropertiesOfObjectType(target); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfObjectType(source, targetProp.name); if (sourceProp) { inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); @@ -11558,16 +11993,19 @@ var ts; } ts.Debug.fail("should not get here"); } - function removeTypesFromUnionType(type, typeKind, isOfTypeKind) { + function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { if (type.flags & 16384) { var types = type.types; if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (narrowedType !== emptyObjectType) { + if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { return narrowedType; } } } + else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { + return getUnionType(emptyArray); + } return type; } function hasInitializer(node) { @@ -11639,12 +12077,12 @@ var ts; case 186: case 187: case 188: - case 213: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: return ts.forEachChild(node, isAssignedIn); } return false; @@ -11652,10 +12090,10 @@ var ts; } function resolveLocation(node) { var containerNodes = []; - for (var parent = node.parent; parent; parent = parent.parent) { - if ((ts.isExpression(parent) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent)) { - containerNodes.unshift(parent); + for (var _parent = node.parent; _parent; _parent = _parent.parent) { + if ((ts.isExpression(_parent) || ts.isObjectLiteralMethod(node)) && + isContextSensitive(_parent)) { + containerNodes.unshift(_parent); } } ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); @@ -11700,7 +12138,7 @@ var ts; } } break; - case 220: + case 221: case 200: case 195: case 132: @@ -11734,16 +12172,16 @@ var ts; } if (assumeTrue) { if (!typeInfo) { - return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true); + return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true, false); } if (isTypeSubtypeOf(typeInfo.type, type)) { return typeInfo.type; } - return removeTypesFromUnionType(type, typeInfo.flags, false); + return removeTypesFromUnionType(type, typeInfo.flags, false, false); } else { if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true); + return removeTypesFromUnionType(type, typeInfo.flags, true, false); } return type; } @@ -11819,46 +12257,56 @@ var ts; return type; } } - function markLinkedImportsAsReferenced(node) { - if (node) { - var nodeLinks = getNodeLinks(node); - while (nodeLinks.importOnRightSide) { - var rightSide = nodeLinks.importOnRightSide; - nodeLinks.importOnRightSide = undefined; - getSymbolLinks(rightSide).referenced = true; - ts.Debug.assert((rightSide.flags & 8388608) !== 0); - nodeLinks = getNodeLinks(ts.getDeclarationOfKind(rightSide, 202)); - } - } - } function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 161) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression); } - if (symbol.flags & 8388608) { - var symbolLinks = getSymbolLinks(symbol); - if (!symbolLinks.referenced) { - var importOrExportAssignment = getLeftSideOfImportEqualsOrExportAssignment(node); - if (!importOrExportAssignment || - (importOrExportAssignment.flags & 1) || - (importOrExportAssignment.kind === 208)) { - symbolLinks.referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); - } - else { - var nodeLinks = getNodeLinks(importOrExportAssignment); - ts.Debug.assert(!nodeLinks.importOnRightSide); - nodeLinks.importOnRightSide = symbol; - } - } - if (symbolLinks.referenced) { - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); + checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } + function isInsideFunction(node, threshold) { + var current = node; + while (current && current !== threshold) { + if (ts.isFunctionLike(current)) { + return true; + } + current = current.parent; + } + return false; + } + function checkBlockScopedBindingCapturedInLoop(node, symbol) { + if (languageVersion >= 2 || + (symbol.flags & 2) === 0 || + symbol.valueDeclaration.parent.kind === 217) { + return; + } + var container = symbol.valueDeclaration; + while (container.kind !== 194) { + container = container.parent; + } + container = container.parent; + if (container.kind === 175) { + container = container.parent; + } + var inFunction = isInsideFunction(node.parent, container); + var current = container; + while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { + if (isIterationStatement(current, false)) { + if (inFunction) { + grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); + } + getNodeLinks(symbol.valueDeclaration).flags |= 256; + break; + } + current = current.parent; + } + } function captureLexicalThis(node, container) { var classNode = container.parent && container.parent.kind === 196 ? container.parent : undefined; getNodeLinks(node).flags |= 2; @@ -11931,11 +12379,12 @@ var ts; var container = ts.getSuperContainer(node, true); if (container) { var canUseSuperExpression = false; + var needToCaptureLexicalThis; if (isCallExpression) { canUseSuperExpression = container.kind === 133; } else { - var needToCaptureLexicalThis = false; + needToCaptureLexicalThis = false; while (container && container.kind === 161) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = true; @@ -11944,19 +12393,19 @@ var ts; if (container.flags & 128) { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135; + container.kind === 131 || + container.kind === 134 || + container.kind === 135; } else { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135 || - container.kind === 130 || - container.kind === 129 || - container.kind === 133; + container.kind === 131 || + container.kind === 134 || + container.kind === 135 || + container.kind === 130 || + container.kind === 129 || + container.kind === 133; } } } @@ -12082,8 +12531,9 @@ var ts; var types = type.types; var mappedType; var mappedTypes; - for (var i = 0; i < types.length; i++) { - var t = mapper(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var t = mapper(current); if (t) { if (!mappedType) { mappedType = t; @@ -12141,7 +12591,9 @@ var ts; var type = getContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) || getIndexTypeOfContextualType(type, 1); + return getTypeOfPropertyOfContextualType(type, "" + index) + || getIndexTypeOfContextualType(type, 1) + || (languageVersion >= 2 ? checkIteratedType(type, undefined) : undefined); } return undefined; } @@ -12156,8 +12608,8 @@ var ts; if (node.contextualType) { return node.contextualType; } - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: @@ -12169,22 +12621,22 @@ var ts; return getContextualTypeForReturnExpression(node); case 155: case 156: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(_parent, node); case 158: - return getTypeFromTypeNode(parent.type); + return getTypeFromTypeNode(_parent.type); case 167: return getContextualTypeForBinaryOperand(node); - case 217: - return getContextualTypeForObjectLiteralElement(parent); + case 218: + return getContextualTypeForObjectLiteralElement(_parent); case 151: return getContextualTypeForElementExpression(node); case 168: return getContextualTypeForConditionalOperand(node); case 173: - ts.Debug.assert(parent.parent.kind === 169); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + ts.Debug.assert(_parent.parent.kind === 169); + return getContextualTypeForSubstitutionExpression(_parent.parent, node); case 159: - return getContextualType(parent); + return getContextualType(_parent); } return undefined; } @@ -12205,7 +12657,9 @@ var ts; } function getContextualSignature(node) { ts.Debug.assert(node.kind !== 132 || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getContextualType(node); + var type = ts.isObjectLiteralMethod(node) + ? getContextualTypeForObjectLiteralMethod(node) + : getContextualType(node); if (!type) { return undefined; } @@ -12214,12 +12668,13 @@ var ts; } var signatureList; var types = type.types; - for (var i = 0; i < types.length; i++) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; if (signatureList && - getSignaturesOfObjectOrUnionType(types[i], 0).length > 1) { + getSignaturesOfObjectOrUnionType(current, 0).length > 1) { return undefined; } - var signature = getNonGenericSignature(types[i]); + var signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { signatureList = [signature]; @@ -12244,15 +12699,15 @@ var ts; return mapper && mapper !== identityMapper; } function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 167 && parent.operatorToken.kind === 52 && parent.left === node) { + var _parent = node.parent; + if (_parent.kind === 167 && _parent.operatorToken.kind === 52 && _parent.left === node) { return true; } - if (parent.kind === 217) { - return isAssignmentTarget(parent.parent); + if (_parent.kind === 218) { + return isAssignmentTarget(_parent.parent); } - if (parent.kind === 151) { - return isAssignmentTarget(parent); + if (_parent.kind === 151) { + return isAssignmentTarget(_parent); } return false; } @@ -12317,21 +12772,24 @@ var ts; var propertiesArray = []; var contextualType = getContextualType(node); var typeFlags; - for (var i = 0; i < node.properties.length; i++) { - var memberDecl = node.properties[i]; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 217 || - memberDecl.kind === 218 || + if (memberDecl.kind === 218 || + memberDecl.kind === 219 || ts.isObjectLiteralMethod(memberDecl)) { - if (memberDecl.kind === 217) { - var type = checkPropertyAssignment(memberDecl, contextualMapper); + var type = void 0; + if (memberDecl.kind === 218) { + type = checkPropertyAssignment(memberDecl, contextualMapper); } else if (memberDecl.kind === 132) { - var type = checkObjectLiteralMethod(memberDecl, contextualMapper); + type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 218); - var type = memberDecl.name.kind === 126 ? unknownType : checkExpression(memberDecl.name, contextualMapper); + ts.Debug.assert(memberDecl.kind === 219); + type = memberDecl.name.kind === 126 + ? unknownType + : checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); @@ -12364,15 +12822,15 @@ var ts; for (var i = 0; i < propertiesArray.length; i++) { var propertyDecl = node.properties[i]; if (kind === 0 || isNumericName(propertyDecl.name)) { - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); + var _type = getTypeOfSymbol(propertiesArray[i]); + if (!ts.contains(propTypes, _type)) { + propTypes.push(_type); } } } - var result = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result.flags; - return result; + var _result = propTypes.length ? getUnionType(propTypes) : undefinedType; + typeFlags |= _result.flags; + return _result; } return undefined; } @@ -12447,7 +12905,9 @@ var ts; return anyType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 153 ? node.expression : node.left; + var left = node.kind === 153 + ? node.expression + : node.left; var type = checkExpressionOrQualifiedName(left); if (type !== unknownType && type !== anyType) { var prop = getPropertyOfType(getWidenedType(type), propertyName); @@ -12473,9 +12933,9 @@ var ts; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); } else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); + var _start = node.end - "]".length; + var _end = node.end; + grammarErrorAtPos(sourceFile, _start, _end - _start, ts.Diagnostics.Expression_expected); } } var objectType = getApparentType(checkExpression(node.expression)); @@ -12490,15 +12950,15 @@ var ts; return unknownType; } if (node.argumentExpression) { - var name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name !== undefined) { - var prop = getPropertyOfType(objectType, name); + var _name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + if (_name !== undefined) { + var prop = getPropertyOfType(objectType, _name); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); } else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name, symbolToString(objectType.symbol)); + error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, _name, symbolToString(objectType.symbol)); return unknownType; } } @@ -12585,22 +13045,22 @@ var ts; var specializedIndex = -1; var spliceIndex; ts.Debug.assert(!result.length); - for (var i = 0; i < signatures.length; i++) { - var signature = signatures[i]; + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent = signature.declaration && signature.declaration.parent; + var _parent = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent === lastParent) { + if (lastParent && _parent === lastParent) { index++; } else { - lastParent = parent; + lastParent = _parent; index = cutoffIndex; } } else { index = cutoffIndex = result.length; - lastParent = parent; + lastParent = _parent; } lastSymbol = symbol; if (signature.hasStringLiterals) { @@ -12692,30 +13152,31 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); + var argType = void 0; if (i === 0 && args[i].parent.kind === 157) { - var argType = globalTemplateStringsArrayType; + argType = globalTemplateStringsArrayType; } else { var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - var argType = checkExpressionWithContextualType(arg, paramType, mapper); + argType = checkExpressionWithContextualType(arg, paramType, mapper); } inferTypes(context, argType, paramType); } } if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); + for (var _i = 0; _i < args.length; _i++) { + if (excludeArgument[_i] === false) { + var _arg = args[_i]; + var _paramType = getTypeAtPosition(signature, _arg.kind === 171 ? -1 : _i); + inferTypes(context, checkExpressionWithContextualType(_arg, _paramType, inferenceMapper), _paramType); } } } var inferredTypes = getInferredTypes(context); context.failedTypeParameterIndex = ts.indexOf(inferredTypes, inferenceFailureType); - for (var i = 0; i < inferredTypes.length; i++) { - if (inferredTypes[i] === inferenceFailureType) { - inferredTypes[i] = unknownType; + for (var _i_1 = 0; _i_1 < inferredTypes.length; _i_1++) { + if (inferredTypes[_i_1] === inferenceFailureType) { + inferredTypes[_i_1] = unknownType; } } return context; @@ -12741,7 +13202,9 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : + arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : + checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { return false; } @@ -12835,50 +13298,53 @@ var ts; error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); } if (!produceDiagnostics) { - for (var i = 0, n = candidates.length; i < n; i++) { - if (hasCorrectArity(node, args, candidates[i])) { - return candidates[i]; + for (var _i = 0, _n = candidates.length; _i < _n; _i++) { + var candidate = candidates[_i]; + if (hasCorrectArity(node, args, candidate)) { + return candidate; } } } return resolveErrorCall(node); function chooseOverload(candidates, relation) { - for (var i = 0; i < candidates.length; i++) { - if (!hasCorrectArity(node, args, candidates[i])) { + for (var _a = 0, _b = candidates.length; _a < _b; _a++) { + var current = candidates[_a]; + if (!hasCorrectArity(node, args, current)) { continue; } - var originalCandidate = candidates[i]; - var inferenceResult; + var originalCandidate = current; + var inferenceResult = void 0; + var _candidate = void 0; + var typeArgumentsAreValid = void 0; while (true) { - var candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes; - var typeArgumentsAreValid; + _candidate = originalCandidate; + if (_candidate.typeParameters) { + var typeArgumentTypes = void 0; if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); + typeArgumentTypes = new Array(_candidate.typeParameters.length); + typeArgumentsAreValid = checkTypeArguments(_candidate, typeArguments, typeArgumentTypes, false); } else { - inferenceResult = inferTypeArguments(candidate, args, excludeArgument); + inferenceResult = inferTypeArguments(_candidate, args, excludeArgument); typeArgumentsAreValid = inferenceResult.failedTypeParameterIndex < 0; typeArgumentTypes = inferenceResult.inferredTypes; } if (!typeArgumentsAreValid) { break; } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); + _candidate = getSignatureInstantiation(_candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, _candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; if (index < 0) { - return candidate; + return _candidate; } excludeArgument[index] = false; } if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; + var instantiatedCandidate = _candidate; if (typeArgumentsAreValid) { candidateForArgumentError = instantiatedCandidate; } @@ -12890,7 +13356,7 @@ var ts; } } else { - ts.Debug.assert(originalCandidate === candidate); + ts.Debug.assert(originalCandidate === _candidate); candidateForArgumentError = originalCandidate; } } @@ -13018,9 +13484,6 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - if (languageVersion < 2) { - grammarErrorOnFirstToken(node.template, ts.Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher); - } return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { @@ -13036,9 +13499,13 @@ var ts; } function getTypeAtPosition(signature, pos) { if (pos >= 0) { - return signature.hasRestParameter ? pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; + return signature.hasRestParameter ? + pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : + pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; } - return signature.hasRestParameter ? getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : anyArrayType; + return signature.hasRestParameter ? + getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : + anyArrayType; } function assignContextualParameterTypes(signature, context, mapper) { var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); @@ -13048,9 +13515,9 @@ var ts; links.type = instantiateType(getTypeAtPosition(context, i), mapper); } if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = signature.parameters[signature.parameters.length - 1]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); + var _parameter = signature.parameters[signature.parameters.length - 1]; + var _links = getSymbolLinks(_parameter); + _links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); } } function getReturnTypeFromBody(func, contextualMapper) { @@ -13058,15 +13525,16 @@ var ts; if (!func.body) { return unknownType; } + var type; if (func.body.kind !== 174) { - var type = checkExpressionCached(func.body, contextualMapper); + type = checkExpressionCached(func.body, contextualMapper); } else { var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { return voidType; } - var type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); return unknownType; @@ -13179,19 +13647,21 @@ var ts; } return true; } - function checkReferenceExpression(n, invalidReferenceMessage, constantVarianleMessage) { + function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { function findSymbol(n) { var symbol = getNodeLinks(n).resolvedSymbol; return symbol && getExportSymbolOfValueSymbolIfExported(symbol); } function isReferenceOrErrorExpression(n) { switch (n.kind) { - case 64: + case 64: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; - case 153: - var symbol = findSymbol(n); - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; + } + case 153: { + var _symbol = findSymbol(n); + return !_symbol || _symbol === unknownSymbol || (_symbol.flags & ~8) !== 0; + } case 154: return true; case 159: @@ -13203,18 +13673,20 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 64: - case 153: + case 153: { var symbol = findSymbol(n); - return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096) !== 0; - case 154: + return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192) !== 0; + } + case 154: { var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8) { - var name = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name); - return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096) !== 0; + var _symbol = findSymbol(n.expression); + if (_symbol && index && index.kind === 8) { + var _name = index.text; + var prop = getPropertyOfType(getTypeOfSymbol(_symbol), _name); + return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192) !== 0; } return false; + } case 159: return isConstVariableReference(n.expression); default: @@ -13226,7 +13698,7 @@ var ts; return false; } if (isConstVariableReference(n)) { - error(n, constantVarianleMessage); + error(n, constantVariableMessage); return false; } return true; @@ -13286,8 +13758,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (types[i].flags & kind) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (current.flags & kind) { return true; } } @@ -13301,8 +13774,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (!(types[i].flags & kind)) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (!(current.flags & kind)) { return false; } } @@ -13336,18 +13810,19 @@ var ts; } function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { var properties = node.properties; - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { - var name = p.name; - var type = sourceType.flags & 1 ? sourceType : getTypeOfPropertyOfType(sourceType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, 1) || - getIndexTypeOfType(sourceType, 0); + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { + var _name = p.name; + var type = sourceType.flags & 1 ? sourceType : + getTypeOfPropertyOfType(sourceType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(sourceType, 1) || + getIndexTypeOfType(sourceType, 0); if (type) { - checkDestructuringAssignment(p.initializer || name, type); + checkDestructuringAssignment(p.initializer || _name, type); } else { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(_name)); } } else { @@ -13367,12 +13842,19 @@ var ts; if (e.kind !== 172) { if (e.kind !== 171) { var propName = "" + i; - var type = sourceType.flags & 1 ? sourceType : isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : getIndexTypeOfType(sourceType, 1); + var type = sourceType.flags & 1 ? sourceType : + isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : + getIndexTypeOfType(sourceType, 1); if (type) { checkDestructuringAssignment(e, type, contextualMapper); } else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + if (isTupleType(sourceType)) { + error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); + } + else { + error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } } } else { @@ -13515,7 +13997,9 @@ var ts; return rightType; } function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : someConstituentTypeHasKind(rightType, 1048576) ? node.right : undefined; + var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : + someConstituentTypeHasKind(rightType, 1048576) ? node.right : + undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); return false; @@ -13626,8 +14110,8 @@ var ts; } if (isConstEnumObjectType(type)) { var ok = (node.parent.kind === 153 && node.parent.expression === node) || - (node.parent.kind === 154 && node.parent.expression === node) || - ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); + (node.parent.kind === 154 && node.parent.expression === node) || + ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -13773,11 +14257,12 @@ var ts; if (indexSymbol) { var seenNumericIndexer = false; var seenStringIndexer = false; - for (var i = 0, len = indexSymbol.declarations.length; i < len; ++i) { - var declaration = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 121: + case 120: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -13785,7 +14270,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 119: + case 118: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -13852,7 +14337,7 @@ var ts; if (ts.getClassBaseTypeNode(node.parent)) { if (containsSuperCall(node.body)) { var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); + ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); if (superCallShouldBeFirst) { var statements = node.body.statements; if (!statements.length || statements[0].kind !== 177 || !isSuperCallExpression(statements[0].expression)) { @@ -13961,8 +14446,8 @@ var ts; else { signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); } - for (var i = 0; i < signaturesToCheck.length; i++) { - var otherSignature = signaturesToCheck[i]; + for (var _i = 0, _n = signaturesToCheck.length; _i < _n; _i++) { + var otherSignature = signaturesToCheck[_i]; if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { return; } @@ -14042,16 +14527,16 @@ var ts; }); if (subsequentNode) { if (subsequentNode.kind === node.kind) { - var errorNode = subsequentNode.name || subsequentNode; + var _errorNode = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { ts.Debug.assert(node.kind === 132 || node.kind === 131); ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128)); var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode, diagnostic); + error(_errorNode, diagnostic); return; } else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); + error(_errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -14067,8 +14552,9 @@ var ts; var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536; var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; - for (var i = 0; i < declarations.length; i++) { - var node = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var node = current; var inAmbientContext = ts.isInAmbientContext(node); var inAmbientContextOrInterface = node.parent.kind === 197 || node.parent.kind === 143 || inAmbientContext; if (inAmbientContextOrInterface) { @@ -14125,9 +14611,10 @@ var ts; var signatures = getSignaturesOfSymbol(symbol); var bodySignature = getSignatureFromDeclaration(bodyDeclaration); if (!bodySignature.hasStringLiterals) { - for (var i = 0, len = signatures.length; i < len; ++i) { - if (!signatures[i].hasStringLiterals && !isSignatureAssignableTo(bodySignature, signatures[i])) { - error(signatures[i].declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + for (var _a = 0, _b = signatures.length; _a < _b; _a++) { + var signature = signatures[_a]; + if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { + error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); break; } } @@ -14139,7 +14626,6 @@ var ts; if (!produceDiagnostics) { return; } - var symbol; var symbol = node.localSymbol; if (!symbol) { symbol = getSymbolOfNode(node); @@ -14174,13 +14660,15 @@ var ts; case 197: return 2097152; case 200: - return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; + return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 + ? 4194304 | 1048576 + : 4194304; case 196: case 199: return 2097152 | 1048576; - case 202: + case 203: var result = 0; - var target = resolveImport(getSymbolOfNode(d)); + var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); return result; default: @@ -14201,7 +14689,7 @@ var ts; } function checkFunctionLikeDeclaration(node) { checkSignatureDeclaration(node); - if (node.name.kind === 126) { + if (node.name && node.name.kind === 126) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -14274,8 +14762,8 @@ var ts; var current = node; while (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { @@ -14295,8 +14783,8 @@ var ts; return; } if (ts.getClassBaseTypeNode(enclosingClass)) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } else { @@ -14311,30 +14799,30 @@ var ts; if (node.kind === 200 && ts.getModuleInstanceState(node) !== 1) { return; } - var parent = getDeclarationContainer(node); - if (parent.kind === 220 && ts.isExternalModule(parent)) { + var _parent = getDeclarationContainer(node); + if (_parent.kind === 221 && ts.isExternalModule(_parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkVarDeclaredNamesNotShadowed(node) { - if (node.initializer && (ts.getCombinedNodeFlags(node) & 6144) === 0) { + if (node.initializer && (ts.getCombinedNodeFlags(node) & 12288) === 0) { var symbol = getSymbolOfNode(node); if (symbol.flags & 1) { var localDeclarationSymbol = resolveName(node, node.name.text, 3, undefined, undefined); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 6144) { + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288) { var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 194); var container = varDeclList.parent.kind === 175 && - varDeclList.parent.parent; + varDeclList.parent.parent; var namesShareScope = container && - (container.kind === 174 && ts.isAnyFunction(container.parent) || - (container.kind === 201 && container.kind === 200) || - container.kind === 220); + (container.kind === 174 && ts.isFunctionLike(container.parent) || + (container.kind === 201 && container.kind === 200) || + container.kind === 221); if (!namesShareScope) { - var name = symbolToString(localDeclarationSymbol); - error(ts.getErrorSpanForNode(node), ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + var _name = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, _name, _name); } } } @@ -14348,10 +14836,11 @@ var ts; return node.kind === 128; } function checkParameterInitializer(node) { - if (getRootDeclaration(node).kind === 128) { - var func = ts.getContainingFunction(node); - visit(node.initializer); + if (getRootDeclaration(node).kind !== 128) { + return; } + var func = ts.getContainingFunction(node); + visit(node.initializer); function visit(n) { if (n.kind === 64) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; @@ -14490,33 +14979,153 @@ var ts; checkSourceElement(node.statement); } function checkForOfStatement(node) { - checkGrammarForOfStatement(node); + checkGrammarForInOrForOfStatement(node); + if (node.initializer.kind === 194) { + checkForInOrForOfVariableDeclaration(node); + } + else { + var varExpr = node.initializer; + var iteratedType = checkRightHandSideOfForOf(node.expression); + if (varExpr.kind === 151 || varExpr.kind === 152) { + checkDestructuringAssignment(varExpr, iteratedType || unknownType); + } + else { + var leftType = checkExpression(varExpr); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + if (iteratedType) { + checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); + } + } + } + checkSourceElement(node.statement); } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); if (node.initializer.kind === 194) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); + var variable = node.initializer.declarations[0]; + if (variable && ts.isBindingPattern(variable.name)) { + error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } + checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; - var exprType = checkExpression(varExpr); - if (!allConstituentTypesHaveKind(exprType, 1 | 258)) { + var leftType = checkExpression(varExpr); + if (varExpr.kind === 151 || varExpr.kind === 152) { + error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + } + else if (!allConstituentTypesHaveKind(leftType, 1 | 258)) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); } } - var exprType = checkExpression(node.expression); - if (!allConstituentTypesHaveKind(exprType, 1 | 48128 | 512)) { + var rightType = checkExpression(node.expression); + if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) { error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } checkSourceElement(node.statement); } + function checkForInOrForOfVariableDeclaration(iterationStatement) { + var variableDeclarationList = iterationStatement.initializer; + if (variableDeclarationList.declarations.length >= 1) { + var decl = variableDeclarationList.declarations[0]; + checkVariableDeclaration(decl); + } + } + function checkRightHandSideOfForOf(rhsExpression) { + var expressionType = getTypeOfExpression(rhsExpression); + return languageVersion >= 2 + ? checkIteratedType(expressionType, rhsExpression) + : checkElementTypeOfArrayOrString(expressionType, rhsExpression); + } + function checkIteratedType(iterable, expressionForError) { + ts.Debug.assert(languageVersion >= 2); + var iteratedType = getIteratedType(iterable, expressionForError); + if (expressionForError && iteratedType) { + var completeIterableType = globalIterableType !== emptyObjectType + ? createTypeReference(globalIterableType, [iteratedType]) + : emptyObjectType; + checkTypeAssignableTo(iterable, completeIterableType, expressionForError); + } + return iteratedType; + function getIteratedType(iterable, expressionForError) { + if (allConstituentTypesHaveKind(iterable, 1)) { + return undefined; + } + var iteratorFunction = getTypeOfPropertyOfType(iterable, ts.getPropertyNameForKnownSymbolName("iterator")); + if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, 1)) { + return undefined; + } + var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray; + if (iteratorFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator); + } + return undefined; + } + var iterator = getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iterator, 1)) { + return undefined; + } + var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); + if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, 1)) { + return undefined; + } + var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray; + if (iteratorNextFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method); + } + return undefined; + } + var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iteratorNextResult, 1)) { + return undefined; + } + var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); + if (!iteratorNextValue) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); + } + return undefined; + } + return iteratorNextValue; + } + } + function checkElementTypeOfArrayOrString(arrayOrStringType, expressionForError) { + ts.Debug.assert(languageVersion < 2); + var arrayType = removeTypesFromUnionType(arrayOrStringType, 258, true, true); + var hasStringConstituent = arrayOrStringType !== arrayType; + var reportedError = false; + if (hasStringConstituent) { + if (languageVersion < 1) { + error(expressionForError, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + reportedError = true; + } + if (arrayType === emptyObjectType) { + return stringType; + } + } + if (!isArrayLikeType(arrayType)) { + if (!reportedError) { + var diagnostic = hasStringConstituent + ? ts.Diagnostics.Type_0_is_not_an_array_type + : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; + error(expressionForError, diagnostic, typeToString(arrayType)); + } + return hasStringConstituent ? stringType : unknownType; + } + var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType; + if (hasStringConstituent) { + if (arrayElementType.flags & 258) { + return stringType; + } + return getUnionType([arrayElementType, stringType]); + } + return arrayElementType; + } function checkBreakOrContinueStatement(node) { checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } @@ -14565,8 +15174,8 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); - ts.forEach(node.clauses, function (clause) { - if (clause.kind === 214 && !hasDuplicateDefaultClause) { + ts.forEach(node.caseBlock.clauses, function (clause) { + if (clause.kind === 215 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -14578,7 +15187,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 213) { + if (produceDiagnostics && clause.kind === 214) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); if (!isTypeAssignableTo(expressionType, caseType)) { @@ -14592,7 +15201,7 @@ var ts; if (!checkGrammarStatementInAmbientContext(node)) { var current = node.parent; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { break; } if (current.kind === 189 && current.label.text === node.label.text) { @@ -14620,16 +15229,33 @@ var ts; checkBlock(node.tryBlock); var catchClause = node.catchClause; if (catchClause) { - if (catchClause.type) { - var sourceFile = ts.getSourceFileOfNode(node); - var colonStart = ts.skipTrivia(sourceFile.text, catchClause.name.end); - grammarErrorAtPos(sourceFile, colonStart, ":".length, ts.Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation); + if (catchClause.variableDeclaration) { + if (catchClause.variableDeclaration.name.kind !== 64) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); + } + else if (catchClause.variableDeclaration.type) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); + } + else if (catchClause.variableDeclaration.initializer) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); + } + else { + var identifierName = catchClause.variableDeclaration.name.text; + var locals = catchClause.block.locals; + if (locals && ts.hasProperty(locals, identifierName)) { + var localSymbol = locals[identifierName]; + if (localSymbol && (localSymbol.flags & 2) !== 0) { + grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + } + } + checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); + } } - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.name); checkBlock(catchClause.block); } - if (node.finallyBlock) + if (node.finallyBlock) { checkBlock(node.finallyBlock); + } } function checkIndexConstraints(type) { var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1); @@ -14644,8 +15270,8 @@ var ts; }); if (type.flags & 1024 && type.symbol.valueDeclaration.kind === 196) { var classDeclaration = type.symbol.valueDeclaration; - for (var i = 0; i < classDeclaration.members.length; i++) { - var member = classDeclaration.members[i]; + for (var _i = 0, _a = classDeclaration.members, _n = _a.length; _i < _n; _i++) { + var member = _a[_i]; if (!(member.flags & 128) && ts.hasDynamicName(member)) { var propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0); @@ -14672,20 +15298,22 @@ var ts; if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) { return; } - var errorNode; + var _errorNode; if (prop.valueDeclaration.name.kind === 126 || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; + _errorNode = prop.valueDeclaration; } else if (indexDeclaration) { - errorNode = indexDeclaration; + _errorNode = indexDeclaration; } else if (containingType.flags & 2048) { var someBaseClassHasBothPropertyAndIndexer = ts.forEach(containingType.baseTypes, function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; + _errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); + if (_errorNode && !isTypeAssignableTo(propertyType, indexType)) { + var errorMessage = indexKind === 0 + ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 + : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; + error(_errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); } } } @@ -14702,7 +15330,7 @@ var ts; } function checkTypeParameters(typeParameterDeclarations) { if (typeParameterDeclarations) { - for (var i = 0; i < typeParameterDeclarations.length; i++) { + for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { var node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { @@ -14717,10 +15345,12 @@ var ts; } function checkClassDeclaration(node) { checkGrammarClassDeclarationHeritageClauses(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + if (node.name) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + } checkTypeParameters(node.typeParameters); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -14733,10 +15363,10 @@ var ts; if (type.baseTypes.length) { if (produceDiagnostics) { var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); + checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(node, baseTypeNode.typeName, 107455)) { + checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + if (baseType.symbol !== resolveEntityName(baseTypeNode.typeName, 107455)) { error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -14752,7 +15382,7 @@ var ts; if (t !== unknownType) { var declaredType = (t.flags & 4096) ? t.target : t; if (declaredType.flags & (1024 | 2048)) { - checkTypeAssignableTo(type, t, node.name, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -14772,8 +15402,9 @@ var ts; } function checkKindsOfPropertyMemberOverrides(type, baseType) { var baseProperties = getPropertiesOfObjectType(baseType); - for (var i = 0, len = baseProperties.length; i < len; ++i) { - var base = getTargetSymbol(baseProperties[i]); + for (var _i = 0, _n = baseProperties.length; _i < _n; _i++) { + var baseProperty = baseProperties[_i]; + var base = getTargetSymbol(baseProperty); if (base.flags & 134217728) { continue; } @@ -14790,7 +15421,7 @@ var ts; if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) { continue; } - var errorMessage; + var errorMessage = void 0; if (base.flags & 8192) { if (derived.flags & 98304) { errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; @@ -14848,11 +15479,11 @@ var ts; var seen = {}; ts.forEach(type.declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); var ok = true; - for (var i = 0, len = type.baseTypes.length; i < len; ++i) { - var base = type.baseTypes[i]; + for (var _i = 0, _a = type.baseTypes, _n = _a.length; _i < _n; _i++) { + var base = _a[_i]; var properties = getPropertiesOfObjectType(base); - for (var j = 0, proplen = properties.length; j < proplen; ++j) { - var prop = properties[j]; + for (var _b = 0, _c = properties.length; _b < _c; _b++) { + var prop = properties[_b]; if (!ts.hasProperty(seen, prop.name)) { seen[prop.name] = { prop: prop, containingType: base }; } @@ -14907,8 +15538,8 @@ var ts; checkSourceElement(node.type); } function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128)) { + var _nodeLinks = getNodeLinks(node); + if (!(_nodeLinks.flags & 128)) { var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); var autoValue = 0; @@ -14945,7 +15576,7 @@ var ts; getNodeLinks(member).enumMemberValue = autoValue++; } }); - nodeLinks.flags |= 128; + _nodeLinks.flags |= 128; } function getConstantValueForEnumMemberInitializer(initializer, enumIsConst) { return evalConstant(initializer); @@ -15000,10 +15631,10 @@ var ts; } var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; + var _enumType; var propertyName; if (e.kind === 64) { - enumType = currentType; + _enumType = currentType; propertyName = e.text; } else { @@ -15012,21 +15643,21 @@ var ts; e.argumentExpression.kind !== 8) { return undefined; } - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.argumentExpression.text; } else { - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.name.text; } - if (enumType !== currentType) { + if (_enumType !== currentType) { return undefined; } } if (propertyName === undefined) { return undefined; } - var property = getPropertyOfObjectType(enumType, propertyName); + var property = getPropertyOfObjectType(_enumType, propertyName); if (!property || !(property.flags & 8)) { return undefined; } @@ -15086,8 +15717,8 @@ var ts; } function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if ((declaration.kind === 196 || (declaration.kind === 195 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -15100,21 +15731,15 @@ var ts; if (!ts.isInAmbientContext(node) && node.name.kind === 8) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } - else if (node.name.kind === 64 && node.body.kind === 201) { - var statements = node.body.statements; - for (var i = 0, n = statements.length; i < n; i++) { - var statement = statements[i]; - if (statement.kind === 208) { - grammarErrorOnNode(statement, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); - } - } - } } checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - if (symbol.flags & 512 && symbol.declarations.length > 1 && !ts.isInAmbientContext(node) && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { + if (symbol.flags & 512 + && symbol.declarations.length > 1 + && !ts.isInAmbientContext(node) + && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { var classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (classOrFunc) { if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(classOrFunc)) { @@ -15149,8 +15774,10 @@ var ts; return false; } var inAmbientExternalModule = node.parent.kind === 201 && node.parent.parent.name.kind === 8; - if (node.parent.kind !== 220 && !inAmbientExternalModule) { - error(moduleName, node.kind === 209 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); + if (node.parent.kind !== 221 && !inAmbientExternalModule) { + error(moduleName, node.kind === 210 ? + ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : + ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -15159,15 +15786,17 @@ var ts; } return true; } - function checkImportSymbol(node) { + function checkAliasSymbol(node) { var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target !== unknownSymbol) { var excludedMeanings = (symbol.flags & 107455 ? 107455 : 0) | - (symbol.flags & 793056 ? 793056 : 0) | - (symbol.flags & 1536 ? 1536 : 0); + (symbol.flags & 793056 ? 793056 : 0) | + (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 211 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + var message = node.kind === 212 ? + ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : + ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } } @@ -15175,10 +15804,10 @@ var ts; function checkImportBinding(node) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkImportSymbol(node); + checkAliasSymbol(node); } function checkImportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { @@ -15188,7 +15817,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { checkImportBinding(importClause.namedBindings); } else { @@ -15200,50 +15829,108 @@ var ts; } function checkImportEqualsDeclaration(node) { checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { + if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); - if (target !== unknownSymbol) { - if (target.flags & 107455) { - var moduleName = getFirstIdentifier(node.moduleReference); - if (resolveEntityName(node, moduleName, 107455 | 1536).flags & 1536) { - checkExpressionOrQualifiedName(node.moduleReference); - } - else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } + if (node.flags & 1) { + markExportAsReferenced(node); } - } - else { - if (checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); + if (ts.isInternalModuleImportEqualsDeclaration(node)) { + var target = resolveAlias(getSymbolOfNode(node)); + if (target !== unknownSymbol) { + if (target.flags & 107455) { + var moduleName = getFirstIdentifier(node.moduleReference); + if (!(resolveEntityName(moduleName, 107455 | 1536).flags & 1536)) { + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); + } + } + if (target.flags & 793056) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); + } + } } } } function checkExportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { - ts.forEach(node.exportClause.elements, checkImportSymbol); + ts.forEach(node.exportClause.elements, checkExportSpecifier); } } } + function checkExportSpecifier(node) { + checkAliasSymbol(node); + if (!node.parent.parent.moduleSpecifier) { + markExportAsReferenced(node); + } + } function checkExportAssignment(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + var container = node.parent.kind === 221 ? node.parent : node.parent.parent; + if (container.kind === 200 && container.name.kind === 64) { + error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + return; + } + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - var container = node.parent; - if (container.kind !== 220) { - container = container.parent; + if (node.expression.kind === 64) { + markExportAsReferenced(node); + } + else { + checkExpressionCached(node.expression); + } + checkExternalModuleExports(container); + } + function getModuleStatements(node) { + if (node.kind === 221) { + return node.statements; + } + if (node.kind === 200 && node.body.kind === 201) { + return node.body.statements; + } + return emptyArray; + } + function hasExportedMembers(moduleSymbol) { + var declarations = moduleSymbol.declarations; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var statements = getModuleStatements(current); + for (var _a = 0, _b = statements.length; _a < _b; _a++) { + var node = statements[_a]; + if (node.kind === 210) { + var exportClause = node.exportClause; + if (!exportClause) { + return true; + } + var specifiers = exportClause.elements; + for (var _c = 0, _d = specifiers.length; _c < _d; _c++) { + var specifier = specifiers[_c]; + if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) { + return true; + } + } + } + else if (node.kind !== 209 && node.flags & 1 && !(node.flags & 256)) { + return true; + } + } + } + } + function checkExternalModuleExports(node) { + var moduleSymbol = getSymbolOfNode(node); + var links = getSymbolLinks(moduleSymbol); + if (!links.exportsChecked) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + if (hasExportedMembers(moduleSymbol)) { + var declaration = getDeclarationOfAliasSymbol(defaultSymbol) || defaultSymbol.valueDeclaration; + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + } + links.exportsChecked = true; } - checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); } function checkSourceElement(node) { if (!node) @@ -15335,13 +16022,13 @@ var ts; return checkEnumDeclaration(node); case 200: return checkModuleDeclaration(node); - case 203: + case 204: return checkImportDeclaration(node); - case 202: + case 203: return checkImportEqualsDeclaration(node); - case 209: + case 210: return checkExportDeclaration(node); - case 208: + case 209: return checkExportAssignment(node); case 176: checkGrammarStatementInAmbientContext(node); @@ -15382,7 +16069,7 @@ var ts; case 150: case 151: case 152: - case 217: + case 218: case 153: case 154: case 155: @@ -15414,18 +16101,20 @@ var ts; case 185: case 186: case 188: - case 213: + case 202: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: case 193: case 194: case 196: case 199: - case 219: case 220: + case 209: + case 221: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15444,11 +16133,7 @@ var ts; ts.forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); if (ts.isExternalModule(node)) { - var symbol = getExportAssignmentSymbol(node.symbol); - if (symbol && symbol.flags & 8388608) { - getSymbolLinks(symbol).referenced = true; - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + checkExternalModuleExports(node); } if (potentialThisCollisions.length) { ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); @@ -15517,7 +16202,7 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: @@ -15537,11 +16222,6 @@ var ts; copySymbol(location.symbol, meaning); } break; - case 216: - if (location.name.text) { - copySymbol(location.symbol, meaning); - } - break; } memberFlags = location.flags; location = location.parent; @@ -15575,11 +16255,11 @@ var ts; return true; } switch (node.kind) { + case 111: + case 118: + case 120: case 112: - case 119: case 121: - case 113: - case 122: return true; case 98: return node.parent.kind !== 164; @@ -15591,21 +16271,21 @@ var ts; } case 125: ts.Debug.assert(node.kind === 64 || node.kind === 125, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); - var parent = node.parent; - if (parent.kind === 142) { + var _parent = node.parent; + if (_parent.kind === 142) { return false; } - if (139 <= parent.kind && parent.kind <= 147) { + if (139 <= _parent.kind && _parent.kind <= 147) { return true; } - switch (parent.kind) { + switch (_parent.kind) { case 127: - return node === parent.constraint; + return node === _parent.constraint; case 130: case 129: case 128: case 193: - return node === parent.type; + return node === _parent.type; case 195: case 160: case 161: @@ -15614,16 +16294,16 @@ var ts; case 131: case 134: case 135: - return node === parent.type; + return node === _parent.type; case 136: case 137: case 138: - return node === parent.type; + return node === _parent.type; case 158: - return node === parent.type; + return node === _parent.type; case 155: case 156: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + return _parent.typeArguments && ts.indexOf(_parent.typeArguments, node) >= 0; case 157: return false; } @@ -15634,11 +16314,11 @@ var ts; while (nodeOnRightSide.parent.kind === 125) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 202) { + if (nodeOnRightSide.parent.kind === 203) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 208) { - return nodeOnRightSide.parent.exportName === nodeOnRightSide && nodeOnRightSide.parent; + if (nodeOnRightSide.parent.kind === 209) { + return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; } @@ -15650,11 +16330,11 @@ var ts; (node.parent.kind === 153 && node.parent.name === node); } function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 208) { - return resolveEntityName(entityName.parent.parent, entityName, 107455 | 793056 | 1536 | 8388608); + if (entityName.parent.kind === 209) { + return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } if (entityName.kind !== 153) { if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15670,7 +16350,7 @@ var ts; } if (entityName.kind === 64) { var meaning = 107455 | 8388608; - return resolveEntityName(entityName, entityName, meaning); + return resolveEntityName(entityName, meaning); } else if (entityName.kind === 153) { var symbol = getNodeLinks(entityName).resolvedSymbol; @@ -15680,17 +16360,17 @@ var ts; return getNodeLinks(entityName).resolvedSymbol; } else if (entityName.kind === 125) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { + var _symbol = getNodeLinks(entityName).resolvedSymbol; + if (!_symbol) { checkQualifiedName(entityName); } return getNodeLinks(entityName).resolvedSymbol; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 139 ? 793056 : 1536; - meaning |= 8388608; - return resolveEntityName(entityName, entityName, meaning); + var _meaning = entityName.parent.kind === 139 ? 793056 : 1536; + _meaning |= 8388608; + return resolveEntityName(entityName, _meaning); } return undefined; } @@ -15698,11 +16378,13 @@ var ts; if (isInsideWithStatementBody(node)) { return undefined; } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationName(node)) { return getSymbolOfNode(node.parent); } if (node.kind === 64 && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 208 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); + return node.parent.kind === 209 + ? getSymbolOfEntityNameOrPropertyAccessExpression(node) + : getSymbolOfPartOfRightHandSideOfImportEquals(node); } switch (node.kind) { case 64: @@ -15713,18 +16395,19 @@ var ts; case 90: var type = checkExpression(node); return type.symbol; - case 114: + case 113: var constructorDeclaration = node.parent; if (constructorDeclaration && constructorDeclaration.kind === 133) { return constructorDeclaration.parent.symbol; } return undefined; case 8: - if (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) { - var importSymbol = getSymbolOfNode(node.parent.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; + var moduleName; + if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && + ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || + ((node.parent.kind === 204 || node.parent.kind === 210) && + node.parent.moduleSpecifier === node)) { + return resolveExternalModuleName(node, node); } case 7: if (node.parent.kind == 154 && node.parent.argumentExpression === node) { @@ -15741,8 +16424,8 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 218) { - return resolveEntityName(location, location.name, 107455); + if (location && location.kind === 219) { + return resolveEntityName(location.name, 107455); } return undefined; } @@ -15761,21 +16444,21 @@ var ts; return getDeclaredTypeOfSymbol(symbol); } if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); + var _symbol = getSymbolInfo(node); + return _symbol && getDeclaredTypeOfSymbol(_symbol); } if (ts.isDeclaration(node)) { - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); + var _symbol_1 = getSymbolOfNode(node); + return getTypeOfSymbol(_symbol_1); } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); + if (ts.isDeclarationName(node)) { + var _symbol_2 = getSymbolInfo(node); + return _symbol_2 && getTypeOfSymbol(_symbol_2); } if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); + var _symbol_3 = getSymbolInfo(node); + var declaredType = _symbol_3 && getDeclaredTypeOfSymbol(_symbol_3); + return declaredType !== unknownType ? declaredType : getTypeOfSymbol(_symbol_3); } return unknownType; } @@ -15786,7 +16469,7 @@ var ts; return checkExpression(expr); } function getAugmentedPropertiesOfType(type) { - var type = getApparentType(type); + type = getApparentType(type); var propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) { ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { @@ -15800,9 +16483,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name = symbol.name; + var _name = symbol.name; ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name)); + symbols.push(getPropertyOfType(t, _name)); }); return symbols; } @@ -15815,7 +16498,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 220; + return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 221; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -15845,6 +16528,10 @@ var ts; return generatedNames; function generateNames(node) { switch (node.kind) { + case 195: + case 196: + generateNameForFunctionOrClassDeclaration(node); + break; case 200: generateNameForModuleOrEnum(node); generateNames(node.body); @@ -15852,13 +16539,16 @@ var ts; case 199: generateNameForModuleOrEnum(node); break; - case 203: + case 204: generateNameForImportDeclaration(node); break; - case 209: + case 210: generateNameForExportDeclaration(node); break; - case 220: + case 209: + generateNameForExportAssignment(node); + break; + case 221: case 201: ts.forEach(node.statements, generateNames); break; @@ -15868,40 +16558,31 @@ var ts; return ts.hasProperty(globals, name) || ts.hasProperty(sourceFile.identifiers, name) || ts.hasProperty(generatedNames, name); } function makeUniqueName(baseName) { - if (baseName.charCodeAt(0) !== 95) { - var baseName = "_" + baseName; - if (!isExistingName(baseName)) { - return generatedNames[baseName] = baseName; - } - } - if (baseName.charCodeAt(baseName.length - 1) !== 95) { - baseName += "_"; - } - var i = 1; - while (true) { - name = baseName + i; - if (!isExistingName(name)) { - return generatedNames[name] = name; - } - i++; - } + var _name = ts.generateUniqueName(baseName, isExistingName); + return generatedNames[_name] = _name; } function assignGeneratedName(node, name) { getNodeLinks(node).generatedName = ts.unescapeIdentifier(name); } + function generateNameForFunctionOrClassDeclaration(node) { + if (!node.name) { + assignGeneratedName(node, makeUniqueName("default")); + } + } function generateNameForModuleOrEnum(node) { if (node.name.kind === 64) { - var name = node.name.text; - assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name)); + var _name = node.name.text; + assignGeneratedName(node, isUniqueLocalName(_name, node) ? _name : makeUniqueName(_name)); } } function generateNameForImportOrExportDeclaration(node) { var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 ? ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; + var baseName = expr.kind === 8 ? + ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; assignGeneratedName(node, makeUniqueName(baseName)); } function generateNameForImportDeclaration(node) { - if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 206) { + if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 207) { generateNameForImportOrExportDeclaration(node); } } @@ -15910,6 +16591,11 @@ var ts; generateNameForImportOrExportDeclaration(node); } } + function generateNameForExportAssignment(node) { + if (node.expression.kind !== 64) { + assignGeneratedName(node, makeUniqueName("default")); + } + } } function getGeneratedNameForNode(node) { var links = getNodeLinks(node); @@ -15924,9 +16610,9 @@ var ts; function getLocalNameForImportDeclaration(node) { return getGeneratedNameForNode(node); } - function getImportNameSubstitution(symbol) { - var declaration = getDeclarationOfImportSymbol(symbol); - if (declaration && declaration.kind === 207) { + function getAliasNameSubstitution(symbol) { + var declaration = getDeclarationOfAliasSymbol(symbol); + if (declaration && declaration.kind === 208) { var moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); var propertyName = declaration.propertyName || declaration.name; return moduleName + "." + ts.unescapeIdentifier(propertyName.text); @@ -15956,38 +16642,35 @@ var ts; return getExportNameSubstitution(exportSymbol, node.parent); } if (symbol.flags & 8388608) { - return getImportNameSubstitution(symbol); + return getAliasNameSubstitution(symbol); } } } - function getExportAssignmentName(node) { - var symbol = getExportAssignmentSymbol(getSymbolOfNode(node)); - return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; + function hasExportDefaultValue(node) { + var symbol = getResolvedExportAssignmentSymbol(getSymbolOfNode(node)); + return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol); } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 220 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 221 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } - return isImportResolvedToValue(getSymbolOfNode(node)); + return isAliasResolvedToValue(getSymbolOfNode(node)); } - function isImportResolvedToValue(symbol) { - var target = resolveImport(symbol); + function isAliasResolvedToValue(symbol) { + var target = resolveAlias(symbol); return target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || s.constEnumOnlyModule; } - function isReferencedImportDeclaration(node) { - if (isImportSymbolDeclaration(node)) { + function isReferencedAliasDeclaration(node) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (getSymbolLinks(symbol).referenced) { return true; } - if (node.kind === 202 && node.flags & 1 && isImportResolvedToValue(symbol)) { - return true; - } } - return ts.forEachChild(node, isReferencedImportDeclaration); + return ts.forEachChild(node, isReferencedAliasDeclaration); } function isImplementationOfOverload(node) { if (ts.nodeIsPresent(node.body)) { @@ -16006,14 +16689,14 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 219) { + if (node.kind === 220) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & 8)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 219) { + if (declaration.kind === 220) { return getEnumMemberValue(declaration); } } @@ -16021,7 +16704,9 @@ var ts; } function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 | 131072)) ? getTypeOfSymbol(symbol) : unknownType; + var type = symbol && !(symbol.flags & (2048 | 131072)) + ? getTypeOfSymbol(symbol) + : unknownType; getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -16029,15 +16714,42 @@ var ts; getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function isUnknownIdentifier(location, name) { + ts.Debug.assert(!ts.nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location"); return !resolveName(location, name, 107455, undefined, undefined) && !ts.hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name); } + function getBlockScopedVariableId(n) { + ts.Debug.assert(!ts.nodeIsSynthesized(n)); + if (n.parent.kind === 153 && + n.parent.name === n) { + return undefined; + } + if (n.parent.kind === 150 && + n.parent.propertyName === n) { + return undefined; + } + var declarationSymbol = (n.parent.kind === 193 && n.parent.name === n) || + n.parent.kind === 150 + ? getSymbolOfNode(n.parent) + : undefined; + var symbol = declarationSymbol || + getNodeLinks(n).resolvedSymbol || + resolveName(n, n.text, 107455 | 8388608, undefined, undefined); + var isLetOrConst = symbol && + (symbol.flags & 2) && + symbol.valueDeclaration.parent.kind !== 217; + if (isLetOrConst) { + getSymbolLinks(symbol); + return symbol.id; + } + return undefined; + } function createResolver() { return { getGeneratedNameForNode: getGeneratedNameForNode, getExpressionNameSubstitution: getExpressionNameSubstitution, - getExportAssignmentName: getExportAssignmentName, - isReferencedImportDeclaration: isReferencedImportDeclaration, + hasExportDefaultValue: hasExportDefaultValue, + isReferencedAliasDeclaration: isReferencedAliasDeclaration, getNodeCheckFlags: getNodeCheckFlags, isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, isDeclarationVisible: isDeclarationVisible, @@ -16047,7 +16759,8 @@ var ts; isSymbolAccessible: isSymbolAccessible, isEntityNameVisible: isEntityNameVisible, getConstantValue: getConstantValue, - isUnknownIdentifier: isUnknownIdentifier + isUnknownIdentifier: isUnknownIdentifier, + getBlockScopedVariableId: getBlockScopedVariableId }; } function initializeTypeChecker() { @@ -16075,6 +16788,7 @@ var ts; globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); globalESSymbolType = getGlobalType("Symbol"); globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); + globalIterableType = getGlobalType("Iterable", 1); } else { globalTemplateStringsArrayType = unknownType; @@ -16100,10 +16814,10 @@ var ts; case 175: case 195: case 198: + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 128: break; default: @@ -16114,17 +16828,17 @@ var ts; } var lastStatic, lastPrivate, lastProtected, lastDeclare; var flags = 0; - for (var i = 0, n = node.modifiers.length; i < n; i++) { - var modifier = node.modifiers[i]; + for (var _i = 0, _a = node.modifiers, _n = _a.length; _i < _n; _i++) { + var modifier = _a[_i]; switch (modifier.kind) { - case 109: case 108: case 107: - var text; - if (modifier.kind === 109) { + case 106: + var text = void 0; + if (modifier.kind === 108) { text = "public"; } - else if (modifier.kind === 108) { + else if (modifier.kind === 107) { text = "protected"; lastProtected = modifier; } @@ -16138,16 +16852,16 @@ var ts; else if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } flags |= ts.modifierToFlag(modifier.kind); break; - case 110: + case 109: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } else if (node.kind === 128) { @@ -16171,7 +16885,7 @@ var ts; } flags |= 1; break; - case 115: + case 114: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } @@ -16200,7 +16914,7 @@ var ts; return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); } } - else if ((node.kind === 203 || node.kind === 202) && flags & 2) { + else if ((node.kind === 204 || node.kind === 203) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); } else if (node.kind === 197 && flags & 2) { @@ -16277,7 +16991,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); } - if (parameter.flags & 243) { + if (parameter.flags & 499) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); } if (parameter.questionToken) { @@ -16289,7 +17003,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 121 && parameter.type.kind !== 119) { + if (parameter.type.kind !== 120 && parameter.type.kind !== 118) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -16297,7 +17011,7 @@ var ts; } } function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 243) { + if (node.flags & 499) { grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); } } @@ -16319,8 +17033,8 @@ var ts; function checkGrammarForOmittedArgument(node, arguments) { if (arguments) { var sourceFile = ts.getSourceFileOfNode(node); - for (var i = 0, n = arguments.length; i < n; i++) { - var arg = arguments[i]; + for (var _i = 0, _n = arguments.length; _i < _n; _i++) { + var arg = arguments[_i]; if (arg.kind === 172) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } @@ -16346,9 +17060,8 @@ var ts; var seenExtendsClause = false; var seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16362,7 +17075,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -16375,9 +17088,8 @@ var ts; function checkGrammarInterfaceDeclaration(node) { var seenExtendsClause = false; if (node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16385,7 +17097,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -16422,19 +17134,19 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var inStrictMode = (node.parserContextFlags & 1) !== 0; - for (var i = 0, n = node.properties.length; i < n; i++) { - var prop = node.properties[i]; - var name = prop.name; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var prop = _a[_i]; + var _name = prop.name; if (prop.kind === 172 || - name.kind === 126) { - checkGrammarComputedPropertyName(name); + _name.kind === 126) { + checkGrammarComputedPropertyName(_name); continue; } - var currentKind; - if (prop.kind === 217 || prop.kind === 218) { + var currentKind = void 0; + if (prop.kind === 218 || prop.kind === 219) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name.kind === 7) { - checkGrammarNumbericLiteral(name); + if (_name.kind === 7) { + checkGrammarNumbericLiteral(_name); } currentKind = Property; } @@ -16450,26 +17162,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name.text)) { - seen[name.text] = currentKind; + if (!ts.hasProperty(seen, _name.text)) { + seen[_name.text] = currentKind; } else { - var existingKind = seen[name.text]; + var existingKind = seen[_name.text]; if (currentKind === Property && existingKind === Property) { if (inStrictMode) { - grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name.text] = currentKind | existingKind; + seen[_name.text] = currentKind | existingKind; } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } } @@ -16482,29 +17194,28 @@ var ts; var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + var diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement + : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = variableList.declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); + var _diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer + : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return grammarErrorOnNode(firstDeclaration.name, _diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); + var _diagnostic_1 = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation + : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return grammarErrorOnNode(firstDeclaration, _diagnostic_1); } } } return false; } - function checkGrammarForOfStatement(forOfStatement) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_not_currently_supported); - if (languageVersion < 2) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - return checkGrammarForInOrForOfStatement(forOfStatement); - } function checkGrammarAccessor(accessor) { var kind = accessor.kind; if (languageVersion < 1) { @@ -16534,7 +17245,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } - else if (parameter.flags & 243) { + else if (parameter.flags & 499) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } else if (parameter.questionToken) { @@ -16599,13 +17310,14 @@ var ts; function checkGrammarBreakOrContinueStatement(node) { var current = node; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { case 189: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 184 && !isIterationStatement(current.statement, true); + var isMisplacedContinueLabel = node.kind === 184 + && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } @@ -16626,12 +17338,16 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + var message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement + : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); + var _message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement + : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return grammarErrorOnNode(node, _message); } } function checkGrammarBindingElement(node) { @@ -16647,16 +17363,17 @@ var ts; return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } function checkGrammarVariableDeclaration(node) { - if (ts.isInAmbientContext(node)) { - if (ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + if (node.parent.parent.kind !== 182 && node.parent.parent.kind !== 183) { + if (ts.isInAmbientContext(node)) { + if (ts.isBindingPattern(node.name)) { + return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + } + if (node.initializer) { + var equalsTokenLength = "=".length; + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); + } } - if (node.initializer) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else { - if (!node.initializer) { + else if (!node.initializer) { if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); } @@ -16677,8 +17394,9 @@ var ts; } else { var elements = name.elements; - for (var i = 0; i < elements.length; ++i) { - checkGrammarNameInLetOrConstDeclarations(elements[i].name); + for (var _i = 0, _n = elements.length; _i < _n; _i++) { + var element = elements[_i]; + checkGrammarNameInLetOrConstDeclarations(element.name); } } } @@ -16690,14 +17408,6 @@ var ts; if (!declarationList.declarations.length) { return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - if (languageVersion < 2) { - if (ts.isLet(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - else if (ts.isConst(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - } } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { @@ -16737,13 +17447,13 @@ var ts; return false; } function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 4096) !== 0; + var enumIsConst = (enumDecl.flags & 8192) !== 0; var hasError = false; if (!enumIsConst) { var inConstantEnumMemberSection = true; var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var i = 0, n = enumDecl.members.length; i < n; i++) { - var node = enumDecl.members[i]; + for (var _i = 0, _a = enumDecl.members, _n = _a.length; _i < _n; _i++) { + var node = _a[_i]; if (node.name.kind === 126) { hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } @@ -16765,18 +17475,11 @@ var ts; function hasParseDiagnostics(sourceFile) { return sourceFile.parseDiagnostics.length > 0; } - function scanToken(scanner, pos) { - scanner.setTextPos(pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return start; - } function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - var start = scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, scanner.getTextPos() - start, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); return true; } } @@ -16789,16 +17492,17 @@ var ts; function grammarErrorOnNode(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getErrorSpanForNode(node); - var start = span.end > span.pos ? ts.skipTrivia(sourceFile.text, span.pos) : span.pos; - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, span.end - start, message, arg0, arg1, arg2)); + diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); return true; } } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, identifier) { - if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { - var name = ts.declarationNameToString(identifier); - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, name); + function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { + if (name && name.kind === 64) { + var identifier = name; + if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { + var nameText = ts.declarationNameToString(identifier); + return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); + } } } function checkGrammarConstructorTypeParameters(node) { @@ -16834,18 +17538,18 @@ var ts; } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { if (node.kind === 197 || + node.kind === 204 || node.kind === 203 || - node.kind === 202 || + node.kind === 210 || node.kind === 209 || - node.kind === 208 || (node.flags & 2)) { return false; } return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var i = 0, n = file.statements.length; i < n; i++) { - var decl = file.statements[i]; + for (var _i = 0, _a = file.statements, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; if (ts.isDeclaration(decl) || decl.kind === 175) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; @@ -16862,13 +17566,13 @@ var ts; return getNodeLinks(node).hasReportedStatementInAmbientContext = true; } var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isAnyFunction(node.parent)) { + if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 220) { - var links = getNodeLinks(node.parent); - if (!links.hasReportedStatementInAmbientContext) { - return links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 221) { + var _links = getNodeLinks(node.parent); + if (!_links.hasReportedStatementInAmbientContext) { + return _links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -16876,7 +17580,7 @@ var ts; } } function checkGrammarNumbericLiteral(node) { - if (node.flags & 8192) { + if (node.flags & 16384) { if (node.parserContextFlags & 1) { return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); } @@ -16888,9 +17592,8 @@ var ts; function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, scanner.getTextPos(), 0, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); return true; } } @@ -17019,7 +17722,9 @@ var ts; 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 : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); + var nextLineStart = (currentLine + 1) === lineCount + ? currentSourceFile.text.length + 1 + : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); if (pos !== comment.pos) { if (firstCommentLineIndent === undefined) { firstCommentLineIndent = calculateIndent(ts.getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); @@ -17097,7 +17802,8 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 134 || member.kind === 135) && (member.flags & 128) === (accessor.flags & 128)) { + if ((member.kind === 134 || member.kind === 135) + && (member.flags & 128) === (accessor.flags & 128)) { var memberName = ts.getPropertyNameForPropertyNameNode(member.name); var accessorName = ts.getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { @@ -17127,11 +17833,12 @@ var ts; } function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); + var emitOutputFilePathWithoutExtension; if (compilerOptions.outDir) { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; } @@ -17162,7 +17869,7 @@ var ts; var addedGlobalFileReference = false; ts.forEach(root.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - if (referencedFile && ((referencedFile.flags & 1024) || + if (referencedFile && ((referencedFile.flags & 2048) || shouldEmitToOwnFile(referencedFile, compilerOptions) || !addedGlobalFileReference)) { writeReferencePath(referencedFile); @@ -17213,17 +17920,17 @@ var ts; } } function createAndSetNewTextWriterWithSymbolWriter() { - var writer = createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; + var _writer = createTextWriter(newLine); + _writer.trackSymbol = trackSymbol; + _writer.writeKeyword = _writer.write; + _writer.writeOperator = _writer.write; + _writer.writePunctuation = _writer.write; + _writer.writeSpace = _writer.write; + _writer.writeStringLiteral = _writer.writeLiteral; + _writer.writeParameter = _writer.write; + _writer.writeSymbol = _writer.write; + setWriter(_writer); + return _writer; } function setWriter(newWriter) { writer = newWriter; @@ -17291,18 +17998,20 @@ var ts; } } function emitLines(nodes) { - for (var i = 0, n = nodes.length; i < n; i++) { - emit(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + emit(node); } } function emitSeparatedList(nodes, separator, eachNodeEmitFn) { var currentWriterPos = writer.getTextPos(); - for (var i = 0, n = nodes.length; i < n; i++) { + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (currentWriterPos !== writer.getTextPos()) { write(separator); } currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(nodes[i]); + eachNodeEmitFn(node); } } function emitCommaList(nodes, eachNodeEmitFn) { @@ -17321,11 +18030,11 @@ var ts; } function emitType(type) { switch (type.kind) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 8: return writeTextOfNode(currentSourceFile, type); @@ -17354,7 +18063,7 @@ var ts; ts.Debug.fail("Unknown type annotation: " + type.kind); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 202 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 203 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); function writeEntityName(entityName) { @@ -17415,8 +18124,8 @@ var ts; emitLines(node.statements); } function emitExportAssignment(node) { - write("export = "); - writeTextOfNode(currentSourceFile, node.exportName); + write(node.isExportEquals ? "export = " : "export default "); + writeTextOfNode(currentSourceFile, node.expression); write(";"); writeLine(); } @@ -17632,7 +18341,9 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.parent.parent.kind === 196) { - diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; + diagnosticMessage = isImplementsList ? + ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : + ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; @@ -17725,17 +18436,31 @@ var ts; function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.kind === 193) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 130 || node.kind === 129) { if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; } } return diagnosticMessage !== undefined ? { @@ -17775,13 +18500,14 @@ var ts; return; } var accessors = getAllAccessorDeclarations(node.parent.members, node); + var accessorWithTypeAnnotation; if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); writeTextOfNode(currentSourceFile, node.name); if (!(node.flags & 32)) { - var accessorWithTypeAnnotation = node; + accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { var anotherAccessor = node.kind === 134 ? accessors.setAccessor : accessors.getAccessor; @@ -17797,17 +18523,25 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 134 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : undefined; + return accessor.kind === 134 + ? accessor.type + : accessor.parameters.length > 0 + ? accessor.parameters[0].type + : undefined; } } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (accessorWithTypeAnnotation.kind === 135) { if (accessorWithTypeAnnotation.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } return { diagnosticMessage: diagnosticMessage, @@ -17817,10 +18551,18 @@ var ts; } else { if (accessorWithTypeAnnotation.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; } return { diagnosticMessage: diagnosticMessage, @@ -17902,28 +18644,48 @@ var ts; var diagnosticMessage; switch (node.kind) { case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 138: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 132: case 131: if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: ts.Debug.fail("This is unknown kind for signature: " + node.kind); @@ -17962,28 +18724,50 @@ var ts; var diagnosticMessage; switch (node.parent.kind) { case 133: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; break; case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 132: case 131: if (node.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } else if (node.parent.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); @@ -18020,22 +18804,26 @@ var ts; return emitClassDeclaration(node); case 198: return emitTypeAliasDeclaration(node); - case 219: + case 220: return emitEnumMemberDeclaration(node); case 199: return emitEnumDeclaration(node); case 200: return emitModuleDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 208: + case 209: return emitExportAssignment(node); - case 220: + case 221: return emitSourceFile(node); } } function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 1024 ? referencedFile.fileName : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; + var declFileName = referencedFile.flags & 2048 + ? referencedFile.fileName + : shouldEmitToOwnFile(referencedFile, compilerOptions) + ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") + : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false); referencePathsOutput += "/// " + newLine; } @@ -18086,22 +18874,28 @@ var ts; var writeLine = writer.writeLine; var increaseIndent = writer.increaseIndent; var decreaseIndent = writer.decreaseIndent; + var preserveNewLines = compilerOptions.preserveNewLines || false; var currentSourceFile; + var lastFrame; + var currentScopeNames; + var generatedBlockScopeNames; var extendsEmitted = false; var tempCount = 0; var tempVariables; var tempParameters; var externalImports; var exportSpecifiers; + var exportDefault; var writeEmittedFiles = writeJavaScriptFile; var emitLeadingComments = compilerOptions.removeComments ? function (node) { } : emitLeadingDeclarationComments; var emitTrailingComments = compilerOptions.removeComments ? function (node) { } : emitTrailingDeclarationComments; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfLocalPosition; var detachedCommentsInfo; var emitDetachedComments = compilerOptions.removeComments ? function (node) { } : emitDetachedCommentsAtPosition; - var emitPinnedOrTripleSlashComments = compilerOptions.removeComments ? function (node) { } : emitPinnedOrTripleSlashCommentsOfNode; var writeComment = writeCommentRange; - var emit = emitNode; + var emitNodeWithoutSourceMap = compilerOptions.removeComments ? emitNodeWithoutSourceMapWithoutComments : emitNodeWithoutSourceMapWithComments; + var emit = emitNodeWithoutSourceMap; + var emitWithoutComments = emitNodeWithoutSourceMapWithoutComments; var emitStart = function (node) { }; var emitEnd = function (node) { }; var emitToken = emitTokenText; @@ -18112,18 +18906,72 @@ var ts; initializeEmitterWithSourceMaps(); } if (root) { - emit(root); + emitSourceFile(root); } else { ts.forEach(host.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emit(sourceFile); + emitSourceFile(sourceFile); } }); } writeLine(); writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); return; + function emitSourceFile(sourceFile) { + currentSourceFile = sourceFile; + emit(sourceFile); + } + function enterNameScope() { + var names = currentScopeNames; + currentScopeNames = undefined; + if (names) { + lastFrame = { names: names, previous: lastFrame }; + return true; + } + return false; + } + function exitNameScope(popFrame) { + if (popFrame) { + currentScopeNames = lastFrame.names; + lastFrame = lastFrame.previous; + } + else { + currentScopeNames = undefined; + } + } + function generateUniqueNameForLocation(location, baseName) { + var _name; + if (!isExistingName(location, baseName)) { + _name = baseName; + } + else { + _name = ts.generateUniqueName(baseName, function (n) { return isExistingName(location, n); }); + } + return recordNameInCurrentScope(_name); + } + function recordNameInCurrentScope(name) { + if (!currentScopeNames) { + currentScopeNames = {}; + } + return currentScopeNames[name] = name; + } + function isExistingName(location, name) { + if (!resolver.isUnknownIdentifier(location, name)) { + return true; + } + if (currentScopeNames && ts.hasProperty(currentScopeNames, name)) { + return true; + } + var frame = lastFrame; + while (frame) { + if (ts.hasProperty(frame.names, name)) { + return true; + } + frame = frame.previous; + } + return false; + } function initializeEmitterWithSourceMaps() { var sourceMapDir; var sourceMapSourceIndex = -1; @@ -18248,8 +19096,8 @@ var ts; if (scopeName) { var parentIndex = getSourceMapNameIndex(); if (parentIndex !== -1) { - var name = node.name; - if (!name || name.kind !== 126) { + var _name = node.name; + if (!_name || _name.kind !== 126) { scopeName = "." + scopeName; } scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; @@ -18276,8 +19124,10 @@ var ts; node.kind === 196 || node.kind === 199) { if (node.name) { - var name = node.name; - scopeName = name.kind === 126 ? ts.getTextOfNode(name) : node.name.text; + var _name = node.name; + scopeName = _name.kind === 126 + ? ts.getTextOfNode(_name) + : node.name.text; } recordScopeNameStart(scopeName); } @@ -18355,21 +19205,32 @@ var ts; else { sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); } - function emitNodeWithMap(node) { + function emitNodeWithSourceMap(node) { if (node) { - if (node.kind != 220) { + if (ts.nodeIsSynthesized(node)) { + return emitNodeWithoutSourceMap(node); + } + if (node.kind != 221) { recordEmitNodeStartSpan(node); - emitNode(node); + emitNodeWithoutSourceMap(node); recordEmitNodeEndSpan(node); } else { recordNewSourceFileStart(node); - emitNode(node); + emitNodeWithoutSourceMap(node); } } } + function emitNodeWithSourceMapWithoutComments(node) { + if (node) { + recordEmitNodeStartSpan(node); + emitNodeWithoutSourceMapWithoutComments(node); + recordEmitNodeEndSpan(node); + } + } writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithMap; + emit = emitNodeWithSourceMap; + emitWithoutComments = emitNodeWithSourceMapWithoutComments; emitStart = recordEmitNodeStartSpan; emitEnd = recordEmitNodeEndSpan; emitToken = writeTextWithSpanRecord; @@ -18380,16 +19241,21 @@ var ts; function writeJavaScriptFile(emitOutput, writeByteOrderMark) { writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } - function createTempVariable(location, forLoopVariable) { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && resolver.isUnknownIdentifier(location, name)) { - break; + function createTempVariable(location, preferredName) { + for (var name = preferredName; !name || isExistingName(location, name); tempCount++) { + var char = 97 + tempCount; + if (char === 105 || char === 110) { + continue; + } + if (tempCount < 26) { + name = "_" + String.fromCharCode(char); + } + else { + name = "_" + (tempCount - 26); } - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + 97) : tempCount - 25); - tempCount++; } - var result = ts.createNode(64); + recordNameInCurrentScope(name); + var result = ts.createSynthesizedNode(64); result.text = name; return result; } @@ -18399,8 +19265,8 @@ var ts; } tempVariables.push(name); } - function createAndRecordTempVariable(location) { - var temp = createTempVariable(location, false); + function createAndRecordTempVariable(location, preferredName) { + var temp = createTempVariable(location, preferredName); recordTempDeclaration(temp); return temp; } @@ -18433,7 +19299,7 @@ var ts; emit(node); } } - function emitParenthesized(node, parenthesized) { + function emitParenthesizedIf(node, parenthesized) { if (parenthesized) { write("("); } @@ -18450,7 +19316,7 @@ var ts; function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { ts.Debug.assert(nodes.length > 0); increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -18460,7 +19326,7 @@ var ts; } for (var i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -18470,12 +19336,11 @@ var ts; } emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes)); if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -18520,37 +19385,109 @@ var ts; emit(nodes[i]); } } - function isBinaryOrOctalIntegerLiteral(text) { - if (text.length <= 0) { - return false; - } - if (text.charCodeAt(1) === 66 || text.charCodeAt(1) === 98 || - text.charCodeAt(1) === 79 || text.charCodeAt(1) === 111) { - return true; + function isBinaryOrOctalIntegerLiteral(node, text) { + if (node.kind === 7 && text.length > 1) { + switch (text.charCodeAt(1)) { + case 98: + case 66: + case 111: + case 79: + return true; + } } return false; } function emitLiteral(node) { - var text = languageVersion < 2 && ts.isTemplateLiteralKind(node.kind) ? getTemplateLiteralAsStringLiteral(node) : node.parent ? ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node) : node.text; + var text = getLiteralText(node); if (compilerOptions.sourceMap && (node.kind === 8 || ts.isTemplateLiteralKind(node.kind))) { writer.writeLiteral(text); } - else if (languageVersion < 2 && node.kind === 7 && isBinaryOrOctalIntegerLiteral(text)) { + else if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) { write(node.text); } else { write(text); } } - function getTemplateLiteralAsStringLiteral(node) { - return '"' + ts.escapeString(node.text) + '"'; + function getLiteralText(node) { + if (languageVersion < 2 && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { + return getQuotedEscapedLiteralText('"', node.text, '"'); + } + if (node.parent) { + return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + } + switch (node.kind) { + case 8: + return getQuotedEscapedLiteralText('"', node.text, '"'); + case 10: + return getQuotedEscapedLiteralText('`', node.text, '`'); + case 11: + return getQuotedEscapedLiteralText('`', node.text, '${'); + case 12: + return getQuotedEscapedLiteralText('}', node.text, '${'); + case 13: + return getQuotedEscapedLiteralText('}', node.text, '`'); + case 7: + return node.text; + } + ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); + } + function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { + return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; + } + function emitDownlevelRawTemplateLiteral(node) { + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var isLast = node.kind === 10 || node.kind === 13; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + text = text.replace(/\r\n?/g, "\n"); + text = ts.escapeString(text); + write('"' + text + '"'); + } + function emitDownlevelTaggedTemplateArray(node, literalEmitter) { + write("["); + if (node.template.kind === 10) { + literalEmitter(node.template); + } + else { + literalEmitter(node.template.head); + ts.forEach(node.template.templateSpans, function (child) { + write(", "); + literalEmitter(child.literal); + }); + } + write("]"); + } + function emitDownlevelTaggedTemplate(node) { + var tempVariable = createAndRecordTempVariable(node); + write("("); + emit(tempVariable); + write(" = "); + emitDownlevelTaggedTemplateArray(node, emit); + write(", "); + emit(tempVariable); + write(".raw = "); + emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); + write(", "); + emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); + write("("); + emit(tempVariable); + if (node.template.kind === 169) { + ts.forEach(node.template.templateSpans, function (templateSpan) { + write(", "); + var needsParens = templateSpan.expression.kind === 167 + && templateSpan.expression.operatorToken.kind === 23; + emitParenthesizedIf(templateSpan.expression, needsParens); + }); + } + write("))"); } function emitTemplateExpression(node) { if (languageVersion >= 2) { ts.forEachChild(node, emit); return; } - var emitOuterParens = ts.isExpression(node.parent) && templateNeedsParens(node, node.parent); + var emitOuterParens = ts.isExpression(node.parent) + && templateNeedsParens(node, node.parent); if (emitOuterParens) { write("("); } @@ -18559,13 +19496,14 @@ var ts; emitLiteral(node.head); headEmitted = true; } - for (var i = 0; i < node.templateSpans.length; i++) { + for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 159 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; + var needsParens = templateSpan.expression.kind !== 159 + && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); } - emitParenthesized(templateSpan.expression, needsParens); + emitParenthesizedIf(templateSpan.expression, needsParens); if (templateSpan.literal.text.length !== 0) { write(" + "); emitLiteral(templateSpan.literal); @@ -18635,16 +19573,16 @@ var ts; } } function isNotExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 128: case 193: case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 195: @@ -18655,16 +19593,14 @@ var ts; case 197: case 199: case 200: - case 202: - return parent.name === node; + case 203: + return _parent.name === node; case 185: case 184: - case 208: + case 209: return false; case 189: return node.parent.label === node; - case 216: - return node.parent.name === node; } } function emitExpressionIdentifier(node) { @@ -18676,7 +19612,18 @@ var ts; writeTextOfNode(currentSourceFile, node); } } + function getBlockScopedVariableId(node) { + return !ts.nodeIsSynthesized(node) && resolver.getBlockScopedVariableId(node); + } function emitIdentifier(node) { + var variableId = getBlockScopedVariableId(node); + if (variableId !== undefined && generatedBlockScopeNames) { + var text = generatedBlockScopeNames[variableId]; + if (text) { + write(text); + return; + } + } if (!node.parent) { write(node.text); } @@ -18739,7 +19686,7 @@ var ts; write("..."); emit(node.expression); } - function needsParenthesisForPropertyAccess(node) { + function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 64: case 151: @@ -18754,8 +19701,8 @@ var ts; function emitListWithSpread(elements, multiLine, trailingComma) { var pos = 0; var group = 0; - var length = elements.length; - while (pos < length) { + var _length = elements.length; + while (pos < _length) { if (group === 1) { write(".concat("); } @@ -18765,19 +19712,19 @@ var ts; var e = elements[pos]; if (e.kind === 171) { e = e.expression; - emitParenthesized(e, group === 0 && needsParenthesisForPropertyAccess(e)); + emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; } else { var i = pos; - while (i < length && elements[i].kind !== 171) { + while (i < _length && elements[i].kind !== 171) { i++; } write("["); if (multiLine) { increaseIndent(); } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); + emitList(elements, pos, i - pos, multiLine, trailingComma && i === _length); if (multiLine) { decreaseIndent(); } @@ -18804,24 +19751,18 @@ var ts; write("]"); } else { - emitListWithSpread(elements, (node.flags & 256) !== 0, elements.hasTrailingComma); + emitListWithSpread(elements, (node.flags & 512) !== 0, elements.hasTrailingComma); } } - function createSynthesizedNode(kind) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - return node; - } function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { var parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); return emit(parenthesizedObjectLiteral); } function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral, firstComputedPropertyIndex) { var tempVar = createAndRecordTempVariable(originalObjectLiteral); - var initialObjectLiteral = createSynthesizedNode(152); + var initialObjectLiteral = ts.createSynthesizedNode(152); initialObjectLiteral.properties = originalObjectLiteral.properties.slice(0, firstComputedPropertyIndex); - initialObjectLiteral.flags |= 256; + initialObjectLiteral.flags |= 512; var propertyPatches = createBinaryExpression(tempVar, 52, initialObjectLiteral); ts.forEach(originalObjectLiteral.properties, function (property) { var patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); @@ -18829,7 +19770,7 @@ var ts; propertyPatches = createBinaryExpression(propertyPatches, 23, patchedProperty); } }); - propertyPatches = createBinaryExpression(propertyPatches, 23, tempVar); + propertyPatches = createBinaryExpression(propertyPatches, 23, createIdentifier(tempVar.text, true)); var result = createParenthesizedExpression(propertyPatches); return result; } @@ -18840,13 +19781,13 @@ var ts; function tryCreatePatchingPropertyAssignment(objectLiteral, tempVar, property) { var leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); var maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); - return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide); + return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide, true); } function tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property) { switch (property.kind) { - case 217: - return property.initializer; case 218: + return property.initializer; + case 219: return createIdentifier(resolver.getExpressionNameSubstitution(property.name)); case 132: return createFunctionExpression(property.parameters, property.body); @@ -18856,17 +19797,17 @@ var ts; if (firstAccessor !== property) { return undefined; } - var propertyDescriptor = createSynthesizedNode(152); + var propertyDescriptor = ts.createSynthesizedNode(152); var descriptorProperties = []; if (getAccessor) { - var getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); - descriptorProperties.push(getProperty); + var _getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); + descriptorProperties.push(_getProperty); } if (setAccessor) { var setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); descriptorProperties.push(setProperty); } - var trueExpr = createSynthesizedNode(94); + var trueExpr = ts.createSynthesizedNode(94); var enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); descriptorProperties.push(enumerableTrue); var configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); @@ -18879,7 +19820,7 @@ var ts; } } function createParenthesizedExpression(expression) { - var result = createSynthesizedNode(159); + var result = ts.createSynthesizedNode(159); result.expression = expression; return result; } @@ -18893,13 +19834,18 @@ var ts; result.end = -1; return result; } - function createBinaryExpression(left, operator, right) { - var result = createSynthesizedNode(167); - result.operatorToken = createSynthesizedNode(operator); + function createBinaryExpression(left, operator, right, startsOnNewLine) { + var result = ts.createSynthesizedNode(167, startsOnNewLine); + result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } + function createExpressionStatement(expression) { + var result = ts.createSynthesizedNode(177); + result.expression = expression; + return result; + } function createMemberAccessForPropertyName(expression, memberName) { if (memberName.kind === 64) { return createPropertyAccessExpression(expression, memberName); @@ -18915,36 +19861,37 @@ var ts; } } function createPropertyAssignment(name, initializer) { - var result = createSynthesizedNode(217); + var result = ts.createSynthesizedNode(218); result.name = name; result.initializer = initializer; return result; } function createFunctionExpression(parameters, body) { - var result = createSynthesizedNode(160); + var result = ts.createSynthesizedNode(160); result.parameters = parameters; result.body = body; return result; } function createPropertyAccessExpression(expression, name) { - var result = createSynthesizedNode(153); + var result = ts.createSynthesizedNode(153); result.expression = expression; + result.dotToken = ts.createSynthesizedNode(20); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = createSynthesizedNode(154); + var result = ts.createSynthesizedNode(154); result.expression = expression; result.argumentExpression = argumentExpression; return result; } - function createIdentifier(name) { - var result = createSynthesizedNode(64); + function createIdentifier(name, startsOnNewLine) { + var result = ts.createSynthesizedNode(64, startsOnNewLine); result.text = name; return result; } function createCallExpression(invokedExpression, arguments) { - var result = createSynthesizedNode(155); + var result = ts.createSynthesizedNode(155); result.expression = invokedExpression; result.arguments = arguments; return result; @@ -18967,7 +19914,6 @@ var ts; } } write("{"); - var properties = node.properties; if (properties.length) { emitLinePreservingList(node, properties, languageVersion >= 1, true); } @@ -19009,13 +19955,31 @@ var ts; } return false; } + function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { + var realNodesAreOnDifferentLines = preserveNewLines && !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { + increaseIndent(); + writeLine(); + return true; + } + else { + if (valueToWriteWhenNotIndenting) { + write(valueToWriteWhenNotIndenting); + } + return false; + } + } function emitPropertyAccess(node) { if (tryEmitConstantValue(node)) { return; } emit(node.expression); + var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); write("."); + var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); emit(node.name); + decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } function emitQualifiedName(node) { emit(node.left); @@ -19129,26 +20093,33 @@ var ts; } } function emitTaggedTemplateExpression(node) { - emit(node.tag); - write(" "); - emit(node.template); + if (compilerOptions.target >= 2) { + emit(node.tag); + write(" "); + emit(node.template); + } + else { + emitDownlevelTaggedTemplate(node); + } } function emitParenExpression(node) { - if (node.expression.kind === 158) { - var operand = node.expression.expression; - while (operand.kind == 158) { - operand = operand.expression; - } - if (operand.kind !== 165 && - operand.kind !== 164 && - operand.kind !== 163 && - operand.kind !== 162 && - operand.kind !== 166 && - operand.kind !== 156 && - !(operand.kind === 155 && node.parent.kind === 156) && - !(operand.kind === 160 && node.parent.kind === 155)) { - emit(operand); - return; + if (!node.parent || node.parent.kind !== 161) { + if (node.expression.kind === 158) { + var operand = node.expression.expression; + while (operand.kind == 158) { + operand = operand.expression; + } + if (operand.kind !== 165 && + operand.kind !== 164 && + operand.kind !== 163 && + operand.kind !== 162 && + operand.kind !== 166 && + operand.kind !== 156 && + !(operand.kind === 155 && node.parent.kind === 156) && + !(operand.kind === 160 && node.parent.kind === 155)) { + emit(operand); + return; + } } } write("("); @@ -19190,52 +20161,40 @@ var ts; function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 52 && (node.left.kind === 152 || node.left.kind === 151)) { - emitDestructuring(node); + emitDestructuring(node, node.parent.kind === 177); } else { emit(node.left); - if (node.operatorToken.kind !== 23) { - write(" "); - } + var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 ? " " : undefined); write(ts.tokenToString(node.operatorToken.kind)); - var operatorEnd = ts.getLineAndCharacterOfPosition(currentSourceFile, node.operatorToken.end); - var rightStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.right.pos)); - var onDifferentLine = operatorEnd.line !== rightStart.line; - if (onDifferentLine) { - var exprStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - var firstCharOfExpr = getFirstNonWhitespaceCharacterIndexOnLine(exprStart.line); - var shouldIndent = rightStart.character > firstCharOfExpr; - if (shouldIndent) { - increaseIndent(); - } - writeLine(); - } - else { - write(" "); - } + var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); emit(node.right); - if (shouldIndent) { - decreaseIndent(); - } + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } } - function getFirstNonWhitespaceCharacterIndexOnLine(line) { - var lineStart = ts.getLineStarts(currentSourceFile)[line]; - var text = currentSourceFile.text; - for (var i = lineStart; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (!ts.isWhiteSpace(text.charCodeAt(i)) || ts.isLineBreak(ch)) { - break; - } - } - return i - lineStart; + function synthesizedNodeStartsOnNewLine(node) { + return ts.nodeIsSynthesized(node) && node.startsOnNewLine; } function emitConditionalExpression(node) { emit(node.condition); - write(" ? "); + var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); + write("?"); + var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); emit(node.whenTrue); - write(" : "); + decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); + var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); + write(":"); + var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); emit(node.whenFalse); + decreaseIndentIf(indentedBeforeColon, indentedAfterColon); + } + function decreaseIndentIf(value1, value2) { + if (value1) { + decreaseIndent(); + } + if (value2) { + decreaseIndent(); + } } function isSingleLineEmptyBlock(node) { if (node && node.kind === 174) { @@ -19244,7 +20203,7 @@ var ts; } } function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(14, node.pos); write(" "); emitToken(15, node.statements.end); @@ -19279,7 +20238,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesized(node.expression, node.expression.kind === 161); + emitParenthesizedIf(node.expression, node.expression.kind === 161); write(";"); } function emitIfStatement(node) { @@ -19320,6 +20279,30 @@ var ts; write(")"); emitEmbeddedStatement(node.statement); } + function emitStartOfVariableDeclarationList(decl, startPos) { + var tokenKind = 97; + if (decl && languageVersion >= 2) { + if (ts.isLet(decl)) { + tokenKind = 104; + } + else if (ts.isConst(decl)) { + tokenKind = 69; + } + } + if (startPos !== undefined) { + emitToken(tokenKind, startPos); + } + else { + switch (tokenKind) { + case 97: + return write("var "); + case 104: + return write("let "); + case 69: + return write("const "); + } + } + } function emitForStatement(node) { var endPos = emitToken(81, node.pos); write(" "); @@ -19327,17 +20310,9 @@ var ts; if (node.initializer && node.initializer.kind === 194) { var variableDeclarationList = node.initializer; var declarations = variableDeclarationList.declarations; - if (declarations[0] && ts.isLet(declarations[0])) { - emitToken(105, endPos); - } - else if (declarations[0] && ts.isConst(declarations[0])) { - emitToken(69, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(declarations[0], endPos); write(" "); - emitCommaList(variableDeclarationList.declarations); + emitCommaList(declarations); } else if (node.initializer) { emit(node.initializer); @@ -19350,6 +20325,9 @@ var ts; emitEmbeddedStatement(node.statement); } function emitForInOrForOfStatement(node) { + if (languageVersion < 2 && node.kind === 183) { + return emitDownLevelForOfStatement(node); + } var endPos = emitToken(81, node.pos); write(" "); endPos = emitToken(16, endPos); @@ -19357,12 +20335,7 @@ var ts; var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { var decl = variableDeclarationList.declarations[0]; - if (ts.isLet(decl)) { - emitToken(105, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(decl, endPos); write(" "); emit(decl); } @@ -19380,6 +20353,99 @@ var ts; emitToken(17, node.expression.end); emitEmbeddedStatement(node.statement); } + function emitDownLevelForOfStatement(node) { + var endPos = emitToken(81, node.pos); + write(" "); + endPos = emitToken(16, endPos); + var rhsIsIdentifier = node.expression.kind === 64; + var counter = createTempVariable(node, "_i"); + var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(node); + var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, "_n") : undefined; + emitStart(node.expression); + write("var "); + emitNodeWithoutSourceMap(counter); + write(" = 0"); + emitEnd(node.expression); + if (!rhsIsIdentifier) { + write(", "); + emitStart(node.expression); + emitNodeWithoutSourceMap(rhsReference); + write(" = "); + emitNodeWithoutSourceMap(node.expression); + emitEnd(node.expression); + } + if (cachedLength) { + write(", "); + emitNodeWithoutSourceMap(cachedLength); + write(" = "); + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write(" < "); + if (cachedLength) { + emitNodeWithoutSourceMap(cachedLength); + } + else { + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + emitEnd(node.initializer); + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write("++"); + emitEnd(node.initializer); + emitToken(17, node.expression.end); + write(" {"); + writeLine(); + increaseIndent(); + var rhsIterationValue = createElementAccessExpression(rhsReference, counter); + emitStart(node.initializer); + if (node.initializer.kind === 194) { + write("var "); + var variableDeclarationList = node.initializer; + if (variableDeclarationList.declarations.length > 0) { + var declaration = variableDeclarationList.declarations[0]; + if (ts.isBindingPattern(declaration.name)) { + emitDestructuring(declaration, false, rhsIterationValue); + } + else { + emitNodeWithoutSourceMap(declaration); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + emitNodeWithoutSourceMap(createTempVariable(node)); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + var assignmentExpression = createBinaryExpression(node.initializer, 52, rhsIterationValue, false); + if (node.initializer.kind === 151 || node.initializer.kind === 152) { + emitDestructuring(assignmentExpression, true, undefined, node); + } + else { + emitNodeWithoutSourceMap(assignmentExpression); + } + } + emitEnd(node.initializer); + write(";"); + if (node.statement.kind === 174) { + emitLines(node.statement.statements); + } + else { + writeLine(); + emit(node.statement); + } + writeLine(); + decreaseIndent(); + write("}"); + } function emitBreakOrContinueStatement(node) { emitToken(node.kind === 185 ? 65 : 70, node.pos); emitOptional(" ", node.label); @@ -19403,7 +20469,10 @@ var ts; emit(node.expression); endPos = emitToken(17, node.expression.end); write(" "); - emitToken(14, endPos); + emitCaseBlock(node.caseBlock, endPos); + } + function emitCaseBlock(node, startPos) { + emitToken(14, startPos); increaseIndent(); emitLines(node.clauses); decreaseIndent(); @@ -19423,7 +20492,7 @@ var ts; getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 213) { + if (node.kind === 214) { write("case "); emit(node.expression); write(":"); @@ -19431,7 +20500,7 @@ var ts; else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -19461,8 +20530,8 @@ var ts; var endPos = emitToken(67, node.pos); write(" "); emitToken(16, endPos); - emit(node.name); - emitToken(17, node.name.end); + emit(node.variableDeclaration); + emitToken(17, node.variableDeclaration ? node.variableDeclaration.end : endPos); write(" "); emitBlock(node.block); } @@ -19491,37 +20560,46 @@ var ts; emitContainingModuleName(node); write("."); } - emitNode(node.name); + emitNodeWithoutSourceMap(node.name); emitEnd(node.name); } + function createVoidZero() { + var zero = ts.createSynthesizedNode(7); + zero.text = "0"; + var result = ts.createSynthesizedNode(164); + result.expression = zero; + return result; + } function emitExportMemberAssignments(name) { - if (exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { + if (!exportDefault && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { ts.forEach(exportSpecifiers[name.text], function (specifier) { writeLine(); emitStart(specifier.name); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); emitEnd(specifier.name); write(" = "); - emitNode(name); + emitNodeWithoutSourceMap(name); write(";"); }); } } - function emitDestructuring(root, value) { + function emitDestructuring(root, isAssignmentExpressionStatement, value, lowestNonSynthesizedAncestor) { var emitCount = 0; - var isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; + var _isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; if (root.kind === 167) { emitAssignmentExpression(root); } else { + ts.Debug.assert(!isAssignmentExpressionStatement); emitBindingElement(root, value); } function emitAssignment(name, value) { if (emitCount++) { write(", "); } + renameNonTopLevelLetAndConst(name); if (name.parent && (name.parent.kind === 193 || name.parent.kind === 150)) { emitModuleMemberName(name.parent); } @@ -19533,8 +20611,8 @@ var ts; } function ensureIdentifier(expr) { if (expr.kind !== 64) { - var identifier = createTempVariable(root); - if (!isDeclaration) { + var identifier = createTempVariable(lowestNonSynthesizedAncestor || root); + if (!_isDeclaration) { recordTempDeclaration(identifier); } emitAssignment(identifier, expr); @@ -19542,27 +20620,25 @@ var ts; } return expr; } - function createVoidZero() { - var zero = ts.createNode(7); - zero.text = "0"; - var result = ts.createNode(164); - result.expression = zero; - return result; - } function createDefaultValueCheck(value, defaultValue) { value = ensureIdentifier(value); - var equals = ts.createNode(167); + var equals = ts.createSynthesizedNode(167); equals.left = value; - equals.operatorToken = ts.createNode(30); + equals.operatorToken = ts.createSynthesizedNode(30); equals.right = createVoidZero(); - var cond = ts.createNode(168); - cond.condition = equals; - cond.whenTrue = defaultValue; - cond.whenFalse = value; + return createConditionalExpression(equals, defaultValue, value); + } + function createConditionalExpression(condition, whenTrue, whenFalse) { + var cond = ts.createSynthesizedNode(168); + cond.condition = condition; + cond.questionToken = ts.createSynthesizedNode(50); + cond.whenTrue = whenTrue; + cond.colonToken = ts.createSynthesizedNode(51); + cond.whenFalse = whenFalse; return cond; } function createNumericLiteral(value) { - var node = ts.createNode(7); + var node = ts.createSynthesizedNode(7); node.text = "" + value; return node; } @@ -19570,7 +20646,7 @@ var ts; if (expr.kind === 64 || expr.kind === 153 || expr.kind === 154) { return expr; } - var node = ts.createNode(159); + var node = ts.createSynthesizedNode(159); node.expression = expr; return node; } @@ -19578,13 +20654,10 @@ var ts; if (propName.kind !== 64) { return createElementAccess(object, propName); } - var node = ts.createNode(153); - node.expression = parenthesizeForAccess(object); - node.name = propName; - return node; + return createPropertyAccessExpression(parenthesizeForAccess(object), propName); } function createElementAccess(object, index) { - var node = ts.createNode(154); + var node = ts.createSynthesizedNode(154); node.expression = parenthesizeForAccess(object); node.argumentExpression = index; return node; @@ -19594,9 +20667,9 @@ var ts; if (properties.length !== 1) { value = ensureIdentifier(value); } - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { var propName = (p.name); emitDestructuringAssignment(p.initializer || propName, createPropertyAccess(value, propName)); } @@ -19640,18 +20713,18 @@ var ts; } function emitAssignmentExpression(root) { var target = root.left; - var value = root.right; - if (root.parent.kind === 177) { - emitDestructuringAssignment(target, value); + var _value = root.right; + if (isAssignmentExpressionStatement) { + emitDestructuringAssignment(target, _value); } else { if (root.parent.kind !== 159) { write("("); } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); + _value = ensureIdentifier(_value); + emitDestructuringAssignment(target, _value); write(", "); - emit(value); + emit(_value); if (root.parent.kind !== 159) { write(")"); } @@ -19698,7 +20771,7 @@ var ts; function emitVariableDeclaration(node) { if (ts.isBindingPattern(node.name)) { if (languageVersion < 2) { - emitDestructuring(node); + emitDestructuring(node, false); } else { emit(node.name); @@ -19706,30 +20779,65 @@ var ts; } } else { + renameNonTopLevelLetAndConst(node.name); emitModuleMemberName(node); - emitOptional(" = ", node.initializer); + var initializer = node.initializer; + if (!initializer && languageVersion < 2) { + var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256) && + (getCombinedFlagsForIdentifier(node.name) & 4096); + if (isUninitializedLet && + node.parent.parent.kind !== 182 && + node.parent.parent.kind !== 183) { + initializer = createVoidZero(); + } + } + emitOptional(" = ", initializer); } } function emitExportVariableAssignments(node) { - var name = node.name; - if (name.kind === 64) { - emitExportMemberAssignments(name); + var _name = node.name; + if (_name.kind === 64) { + emitExportMemberAssignments(_name); } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); + else if (ts.isBindingPattern(_name)) { + ts.forEach(_name.elements, emitExportVariableAssignments); } } + function getCombinedFlagsForIdentifier(node) { + if (!node.parent || (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return 0; + } + return ts.getCombinedNodeFlags(node.parent); + } + function renameNonTopLevelLetAndConst(node) { + if (languageVersion >= 2 || + ts.nodeIsSynthesized(node) || + node.kind !== 64 || + (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return; + } + var combinedFlags = getCombinedFlagsForIdentifier(node); + if (((combinedFlags & 12288) === 0) || combinedFlags & 1) { + return; + } + var list = ts.getAncestor(node, 194); + if (list.parent.kind === 175 && list.parent.parent.kind === 221) { + return; + } + var blockScopeContainer = ts.getEnclosingBlockScopeContainer(node); + var _parent = blockScopeContainer.kind === 221 + ? blockScopeContainer + : blockScopeContainer.parent; + var generatedName = generateUniqueNameForLocation(_parent, node.text); + var variableId = resolver.getBlockScopedVariableId(node); + if (!generatedBlockScopeNames) { + generatedBlockScopeNames = []; + } + generatedBlockScopeNames[variableId] = generatedName; + } function emitVariableStatement(node) { if (!(node.flags & 1)) { - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } + emitStartOfVariableDeclarationList(node.declarationList); } emitCommaList(node.declarationList.declarations); write(";"); @@ -19740,12 +20848,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name = createTempVariable(node); + var _name = createTempVariable(node); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name); - emit(name); + tempParameters.push(_name); + emit(_name); } else { emit(node.name); @@ -19766,7 +20874,7 @@ var ts; if (ts.isBindingPattern(p.name)) { writeLine(); write("var "); - emitDestructuring(p, tempParameters[tempIndex]); + emitDestructuring(p, false, tempParameters[tempIndex]); write(";"); tempIndex++; } @@ -19774,14 +20882,14 @@ var ts; writeLine(); emitStart(p); write("if ("); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" === void 0)"); emitEnd(p); write(" { "); emitStart(p); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" = "); - emitNode(p.initializer); + emitNodeWithoutSourceMap(p.initializer); emitEnd(p); write("; }"); } @@ -19792,12 +20900,12 @@ var ts; if (languageVersion < 2 && ts.hasRestParameters(node)) { var restIndex = node.parameters.length - 1; var restParam = node.parameters[restIndex]; - var tempName = createTempVariable(node, true).text; + var tempName = createTempVariable(node, "_i").text; writeLine(); emitLeadingComments(restParam); emitStart(restParam); write("var "); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write(" = [];"); emitEnd(restParam); emitTrailingComments(restParam); @@ -19818,7 +20926,7 @@ var ts; increaseIndent(); writeLine(); emitStart(restParam); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); emitEnd(restParam); decreaseIndent(); @@ -19834,6 +20942,14 @@ var ts; function shouldEmitAsArrowFunction(node) { return node.kind === 161 && languageVersion >= 2; } + function emitDeclarationName(node) { + if (node.name) { + emitNodeWithoutSourceMap(node.name); + } + else { + write(resolver.getGeneratedNameForNode(node)); + } + } function emitFunctionDeclaration(node) { if (ts.nodeIsMissing(node.body)) { return emitPinnedOrTripleSlashComments(node); @@ -19845,10 +20961,10 @@ var ts; write("function "); } if (node.kind === 195 || (node.kind === 160 && node.name)) { - emit(node.name); + emitDeclarationName(node); } emitSignatureAndBody(node); - if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } if (node.kind !== 132 && node.kind !== 131) { @@ -19888,6 +21004,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); if (shouldEmitAsArrowFunction(node)) { emitSignatureParametersForArrow(node); write(" =>"); @@ -19904,15 +21021,16 @@ var ts; else { emitExpressionFunctionBody(node, node.body); } - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -19928,7 +21046,11 @@ var ts; return; } write(" "); - emit(body); + var current = body; + while (current.kind === 158) { + current = current.expression; + } + emitParenthesizedIf(body, current.kind === 152); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -19939,11 +21061,11 @@ var ts; emitFunctionBodyPreamble(node); var preambleEmitted = writer.getTextPos() !== outPos; decreaseIndent(); - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); - emitNode(body, true); + emitWithoutComments(body); emitEnd(body); write(";"); emitTempDeclarations(false); @@ -19954,7 +21076,7 @@ var ts; writeLine(); emitLeadingComments(node.body); write("return "); - emit(node.body, true); + emitWithoutComments(node.body); write(";"); emitTrailingComments(node.body); emitTempDeclarations(true); @@ -19967,49 +21089,20 @@ var ts; scopeEmitEnd(); } function emitBlockFunctionBody(node, body) { - if (body.statements.length === 0 && !anyParameterHasBindingPatternOrInitializer(node)) { - emitFunctionBodyWithNoStatements(node, body); - } - else { - emitFunctionBodyWithStatements(node, body); - } - } - function anyParameterHasBindingPatternOrInitializer(func) { - return ts.forEach(func.parameters, hasBindingPatternOrInitializer); - } - function hasBindingPatternOrInitializer(parameter) { - return parameter.initializer || ts.isBindingPattern(parameter.name); - } - function emitFunctionBodyWithNoStatements(node, body) { - var singleLine = isSingleLineEmptyBlock(node.body); - write(" {"); - if (singleLine) { - write(" "); - } - else { - increaseIndent(); - writeLine(); - } - emitLeadingCommentsOfPosition(body.statements.end); - if (!singleLine) { - decreaseIndent(); - } - emitToken(15, body.statements.end); - } - function emitFunctionBodyWithStatements(node, body) { write(" {"); scopeEmitStart(node); - var outPos = writer.getTextPos(); + var initialTextPos = writer.getTextPos(); increaseIndent(); emitDetachedComments(body.statements); var startIndex = emitDirectivePrologues(body.statements, true); emitFunctionBodyPreamble(node); decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== outPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var i = 0, n = body.statements.length; i < n; i++) { + var preambleEmitted = writer.getTextPos() !== initialTextPos; + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + for (var _i = 0, _a = body.statements, _n = _a.length; _i < _n; _i++) { + var statement = _a[_i]; write(" "); - emit(body.statements[i]); + emit(statement); } emitTempDeclarations(false); write(" "); @@ -20047,7 +21140,7 @@ var ts; emitStart(param); emitStart(param.name); write("this."); - emitNode(param.name); + emitNodeWithoutSourceMap(param.name); emitEnd(param.name); write(" = "); emit(param.name); @@ -20059,7 +21152,7 @@ var ts; function emitMemberAccessForPropertyName(memberName) { if (memberName.kind === 8 || memberName.kind === 7) { write("["); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); write("]"); } else if (memberName.kind === 126) { @@ -20067,7 +21160,7 @@ var ts; } else { write("."); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); } } function emitMemberAssignments(node, staticFlag) { @@ -20078,7 +21171,7 @@ var ts; emitStart(member); emitStart(member.name); if (staticFlag) { - emitNode(node.name); + emitDeclarationName(node); } else { write("this"); @@ -20103,7 +21196,7 @@ var ts; emitLeadingComments(member); emitStart(member); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20124,7 +21217,7 @@ var ts; emitStart(member); write("Object.defineProperty("); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20169,7 +21262,7 @@ var ts; } function emitClassDeclaration(node) { write("var "); - emit(node.name); + emitDeclarationName(node); write(" = (function ("); var baseTypeNode = ts.getClassBaseTypeNode(node); if (baseTypeNode) { @@ -20182,7 +21275,7 @@ var ts; writeLine(); emitStart(baseTypeNode); write("__extends("); - emit(node.name); + emitDeclarationName(node); write(", _super);"); emitEnd(baseTypeNode); } @@ -20191,11 +21284,10 @@ var ts; emitMemberFunctions(node); emitMemberAssignments(node, 128); writeLine(); - function emitClassReturnStatement() { + emitToken(15, node.members.end, function () { write("return "); - emitNode(node.name); - } - emitToken(15, node.members.end, emitClassReturnStatement); + emitDeclarationName(node); + }); write(";"); decreaseIndent(); writeLine(); @@ -20208,16 +21300,16 @@ var ts; } write(");"); emitEnd(node); - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } - if (languageVersion < 2 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } function emitConstructorOfClass() { @@ -20227,6 +21319,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); ts.forEach(node.members, function (member) { if (member.kind === 133 && !member.body) { emitPinnedOrTripleSlashComments(member); @@ -20238,7 +21331,7 @@ var ts; } emitStart(ctor || node); write("function "); - emit(node.name); + emitDeclarationName(node); emitSignatureParameters(ctor); write(" {"); scopeEmitStart(node, "constructor"); @@ -20247,11 +21340,12 @@ var ts; emitDetachedComments(ctor.body.statements); } emitCaptureThisForNodeIfNecessary(node); + var superCall; if (ctor) { emitDefaultValueAssignments(ctor); emitRestParameter(ctor); if (baseTypeNode) { - var superCall = findInitialSuperCall(ctor); + superCall = findInitialSuperCall(ctor); if (superCall) { writeLine(); emit(superCall); @@ -20286,6 +21380,7 @@ var ts; if (ctor) { emitTrailingComments(ctor); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20404,7 +21499,9 @@ var ts; var saveTempVariables = tempVariables; tempCount = 0; tempVariables = undefined; + var popFrame = enterNameScope(); emit(node.body); + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; } @@ -20493,7 +21590,7 @@ var ts; emitImportDeclaration(node); return; } - if (resolver.isReferencedImportDeclaration(node) || + if (resolver.isReferencedAliasDeclaration(node) || (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); @@ -20523,11 +21620,11 @@ var ts; emitStart(specifier); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); write(" = "); write(generatedName); write("."); - emitNode(specifier.propertyName || specifier.name); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); write(";"); emitEnd(specifier); }); @@ -20545,15 +21642,15 @@ var ts; } } function createExternalImportInfo(node) { - if (node.kind === 202) { - if (node.moduleReference.kind === 212) { + if (node.kind === 203) { + if (node.moduleReference.kind === 213) { return { rootNode: node, declarationNode: node }; } } - else if (node.kind === 203) { + else if (node.kind === 204) { var importClause = node.importClause; if (importClause) { if (importClause.name) { @@ -20562,7 +21659,7 @@ var ts; declarationNode: importClause }; } - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { return { rootNode: node, declarationNode: importClause.namedBindings @@ -20578,7 +21675,7 @@ var ts; rootNode: node }; } - else if (node.kind === 209) { + else if (node.kind === 210) { if (node.moduleSpecifier) { return { rootNode: node @@ -20589,17 +21686,29 @@ var ts; function createExternalModuleInfo(sourceFile) { externalImports = []; exportSpecifiers = {}; + exportDefault = undefined; ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 209 && !node.moduleSpecifier) { + if (node.kind === 210 && !node.moduleSpecifier) { ts.forEach(node.exportClause.elements, function (specifier) { - var name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (specifier.name.text === "default") { + exportDefault = exportDefault || specifier; + } + var _name = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[_name] || (exportSpecifiers[_name] = [])).push(specifier); }); } + else if (node.kind === 209) { + exportDefault = exportDefault || node; + } + else if (node.kind === 195 || node.kind === 196) { + if (node.flags & 1 && node.flags & 256) { + exportDefault = exportDefault || node; + } + } else { var info = createExternalImportInfo(node); if (info) { - if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedImportDeclaration(node)) { + if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedAliasDeclaration(node)) { externalImports.push(info); } } @@ -20608,8 +21717,8 @@ var ts; } function getExternalImportInfo(node) { if (externalImports) { - for (var i = 0; i < externalImports.length; i++) { - var info = externalImports[i]; + for (var _i = 0, _n = externalImports.length; _i < _n; _i++) { + var info = externalImports[_i]; if (info.rootNode === node) { return info; } @@ -20618,7 +21727,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 208) { + if (node.kind === 209) { return node; } }); @@ -20680,18 +21789,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { - writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("return "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); - } + emitExportDefault(node, true); decreaseIndent(); writeLine(); write("});"); @@ -20700,17 +21798,24 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { + emitExportDefault(node, false); + } + function emitExportDefault(sourceFile, emitAsReturn) { + if (exportDefault && resolver.hasExportDefaultValue(sourceFile)) { writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("module.exports = "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); + emitStart(exportDefault); + write(emitAsReturn ? "return " : "module.exports = "); + if (exportDefault.kind === 209) { + emit(exportDefault.expression); + } + else if (exportDefault.kind === 212) { + emit(exportDefault.propertyName); + } + else { + emitDeclarationName(exportDefault); + } write(";"); - emitEnd(exportAssignment); + emitEnd(exportDefault); } } function emitDirectivePrologues(statements, startWithNewLine) { @@ -20727,8 +21832,7 @@ var ts; } return statements.length; } - function emitSourceFile(node) { - currentSourceFile = node; + function emitSourceFileNode(node) { writeLine(); emitDetachedComments(node); var startIndex = emitDirectivePrologues(node.statements, false); @@ -20761,36 +21865,46 @@ var ts; else { externalImports = undefined; exportSpecifiers = undefined; + exportDefault = undefined; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); } emitLeadingComments(node.endOfFileToken); } - function emitNode(node, disableComments) { + function emitNodeWithoutSourceMapWithComments(node) { if (!node) { return; } if (node.flags & 2) { return emitPinnedOrTripleSlashComments(node); } - var emitComments = !disableComments && shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { + var _emitComments = shouldEmitLeadingAndTrailingComments(node); + if (_emitComments) { emitLeadingComments(node); } emitJavaScriptWorker(node); - if (emitComments) { + if (_emitComments) { emitTrailingComments(node); } } + function emitNodeWithoutSourceMapWithoutComments(node) { + if (!node) { + return; + } + if (node.flags & 2) { + return emitPinnedOrTripleSlashComments(node); + } + emitJavaScriptWorker(node); + } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { case 197: case 195: + case 204: case 203: - case 202: case 198: - case 208: + case 209: return false; case 200: return shouldEmitModuleDeclaration(node); @@ -20845,9 +21959,9 @@ var ts; return emitArrayLiteral(node); case 152: return emitObjectLiteral(node); - case 217: - return emitPropertyAssignment(node); case 218: + return emitPropertyAssignment(node); + case 219: return emitShorthandPropertyAssignment(node); case 126: return emitComputedPropertyName(node); @@ -20916,8 +22030,8 @@ var ts; return emitWithStatement(node); case 188: return emitSwitchStatement(node); - case 213: case 214: + case 215: return emitCaseOrDefaultClause(node); case 189: return emitLabelledStatement(node); @@ -20925,7 +22039,7 @@ var ts; return emitThrowStatement(node); case 191: return emitTryStatement(node); - case 216: + case 217: return emitCatchClause(node); case 192: return emitDebuggerStatement(node); @@ -20937,18 +22051,18 @@ var ts; return emitInterfaceDeclaration(node); case 199: return emitEnumDeclaration(node); - case 219: + case 220: return emitEnumMember(node); case 200: return emitModuleDeclaration(node); - case 203: + case 204: return emitImportDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 209: + case 210: return emitExportDeclaration(node); - case 220: - return emitSourceFile(node); + case 221: + return emitSourceFileNode(node); } } function hasDetachedComments(pos) { @@ -20966,7 +22080,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 220 || node.pos !== node.parent.pos) { + if (node.parent.kind === 221 || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -20985,7 +22099,7 @@ var ts; } function emitTrailingDeclarationComments(node) { if (node.parent) { - if (node.parent.kind === 220 || node.end !== node.parent.end) { + if (node.parent.kind === 221 || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); } @@ -21035,7 +22149,7 @@ var ts; } } } - function emitPinnedOrTripleSlashCommentsOfNode(node) { + function emitPinnedOrTripleSlashComments(node) { var pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); function isPinnedOrTripleSlashComment(comment) { if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { @@ -21080,6 +22194,8 @@ var ts; var ts; (function (ts) { ts.emitTime = 0; + ts.ioReadTime = 0; + ts.version = "1.5.0.0"; function createCompilerHost(options) { var currentDirectory; var existingDirectories = {}; @@ -21088,12 +22204,17 @@ var ts; } var unsupportedFileEncodingErrorCode = -2147024809; function getSourceFile(fileName, languageVersion, onError) { + var text; try { - var text = ts.sys.readFile(fileName, options.charset); + var start = new Date().getTime(); + text = ts.sys.readFile(fileName, options.charset); + ts.ioReadTime += new Date().getTime() - start; } catch (e) { if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText : e.message); + onError(e.number === unsupportedFileEncodingErrorCode + ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText + : e.message); } text = ""; } @@ -21226,8 +22347,9 @@ var ts; if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; } + var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); var start = new Date().getTime(); - var emitResult = ts.emitFiles(getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile), getEmitHost(writeFileCallback), sourceFile); + var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); ts.emitTime += new Date().getTime() - start; return emitResult; } @@ -21276,9 +22398,11 @@ var ts; processSourceFile(ts.normalizePath(fileName), isDefaultLib); } function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { + var start; + var _length; if (refEnd !== undefined && refPos !== undefined) { - var start = refPos; - var length = refEnd - refPos; + start = refPos; + _length = refEnd - refPos; } var diagnostic; if (hasExtension(fileName)) { @@ -21303,7 +22427,7 @@ var ts; } if (diagnostic) { if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, start, length, diagnostic, fileName)); + diagnostics.add(ts.createFileDiagnostic(refFile, start, _length, diagnostic, fileName)); } else { diagnostics.add(ts.createCompilerDiagnostic(diagnostic, fileName)); @@ -21344,17 +22468,17 @@ var ts; files.push(file); } } + return file; } - return file; function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName[canonicalName]; - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; + var _file = filesByName[canonicalName]; + if (_file && host.useCaseSensitiveFileNames()) { + var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(_file.fileName, host.getCurrentDirectory()) : _file.fileName; if (canonicalName !== sourceFileName) { diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); } } - return file; + return _file; } } function processReferencedFiles(file, basePath) { @@ -21365,7 +22489,7 @@ var ts; } function processImportedModules(file, basePath) { ts.forEach(file.statements, function (node) { - if (node.kind === 203 || node.kind === 202 || node.kind === 209) { + if (node.kind === 204 || node.kind === 203 || node.kind === 210) { var moduleNameExpr = ts.getExternalModuleName(node); if (moduleNameExpr && moduleNameExpr.kind === 8) { var moduleNameText = moduleNameExpr.text; @@ -21392,10 +22516,10 @@ var ts; var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); var moduleName = nameLiteral.text; if (moduleName) { - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - var tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); + var _searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); + var tsFile = findModuleSourceFile(_searchName + ".ts", nameLiteral); if (!tsFile) { - findModuleSourceFile(searchName + ".d.ts", nameLiteral); + findModuleSourceFile(_searchName + ".d.ts", nameLiteral); } } } @@ -21416,20 +22540,19 @@ var ts; } return; } - var firstExternalModule = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (firstExternalModule && !options.module) { - var externalModuleErrorSpan = ts.getErrorSpanForNode(firstExternalModule.externalModuleIndicator); - var errorStart = ts.skipTrivia(firstExternalModule.text, externalModuleErrorSpan.pos); - var errorLength = externalModuleErrorSpan.end - errorStart; - diagnostics.add(ts.createFileDiagnostic(firstExternalModule, errorStart, errorLength, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); + if (firstExternalModuleSourceFile && !options.module) { + var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); + diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); } if (options.outDir || options.sourceRoot || (options.mapRoot && - (!options.out || firstExternalModule !== undefined))) { + (!options.out || firstExternalModuleSourceFile !== undefined))) { var commonPathComponents; ts.forEach(files, function (sourceFile) { - if (!(sourceFile.flags & 1024) && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { + if (!(sourceFile.flags & 2048) + && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); sourcePathComponents.pop(); if (commonPathComponents) { @@ -21474,7 +22597,7 @@ var ts; var BreakpointResolver; (function (BreakpointResolver) { function spanInSourceFileAtLocation(sourceFile, position) { - if (sourceFile.flags & 1024) { + if (sourceFile.flags & 2048) { return undefined; } var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); @@ -21544,7 +22667,7 @@ var ts; } case 201: return spanInBlock(node); - case 216: + case 217: return spanInBlock(node.block); case 177: return textSpan(node.expression); @@ -21570,24 +22693,28 @@ var ts; return textSpan(node, ts.findNextToken(node.expression, node)); case 188: return textSpan(node, ts.findNextToken(node.expression, node)); - case 213: case 214: + case 215: return spanInNode(node.statements[0]); case 191: return spanInBlock(node.tryBlock); case 190: return textSpan(node, node.expression); - case 208: - return textSpan(node, node.exportName); - case 202: + case 209: + return textSpan(node, node.expression); + case 203: return textSpan(node, node.moduleReference); + case 204: + return textSpan(node, node.moduleSpecifier); + case 210: + return textSpan(node, node.moduleSpecifier); case 200: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } case 196: case 199: - case 219: + case 220: case 155: case 156: return textSpan(node); @@ -21621,13 +22748,13 @@ var ts; case 80: return spanInNextNode(node); default: - if (node.parent.kind === 217 && node.parent.name === node) { + if (node.parent.kind === 218 && node.parent.name === node) { return spanInNode(node.parent.initializer); } if (node.parent.kind === 158 && node.parent.type === node) { return spanInNode(node.parent.expression); } - if (ts.isAnyFunction(node.parent) && node.parent.type === node) { + if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } return spanInNode(node.parent); @@ -21640,7 +22767,11 @@ var ts; } var isParentVariableStatement = variableDeclaration.parent.parent.kind === 175; var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 181 && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement ? variableDeclaration.parent.parent.declarationList.declarations : isDeclarationOfForStatement ? variableDeclaration.parent.parent.initializer.declarations : undefined; + var declarations = isParentVariableStatement + ? variableDeclaration.parent.parent.declarationList.declarations + : isDeclarationOfForStatement + ? variableDeclaration.parent.parent.initializer.declarations + : undefined; if (variableDeclaration.initializer || (variableDeclaration.flags & 1)) { if (declarations && declarations[0] === variableDeclaration) { if (isParentVariableStatement) { @@ -21742,8 +22873,8 @@ var ts; case 196: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 188: - return spanInNodeIfStartsOnSameLine(node.parent, node.parent.clauses[0]); + case 202: + return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } @@ -21760,12 +22891,12 @@ var ts; if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 216: + case 217: return spanInNode(node.parent.statements[node.parent.statements.length - 1]); ; - case 188: - var switchStatement = node.parent; - var lastClause = switchStatement.clauses[switchStatement.clauses.length - 1]; + case 202: + var caseBlock = node.parent; + var lastClause = caseBlock.clauses[caseBlock.clauses.length - 1]; if (lastClause) { return spanInNode(lastClause.statements[lastClause.statements.length - 1]); } @@ -21800,7 +22931,7 @@ var ts; return spanInNode(node.parent); } function spanInColonToken(node) { - if (ts.isAnyFunction(node.parent) || node.parent.kind === 217) { + if (ts.isFunctionLike(node.parent) || node.parent.kind === 218) { return spanInPreviousNode(node); } return spanInNode(node.parent); @@ -21852,24 +22983,24 @@ var ts; switch (n.kind) { case 174: if (!ts.isFunctionBlock(n)) { - var parent = n.parent; + var _parent = n.parent; var openBrace = ts.findChildOfKind(n, 14, sourceFile); var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - if (parent.kind === 179 || - parent.kind === 182 || - parent.kind === 183 || - parent.kind === 181 || - parent.kind === 178 || - parent.kind === 180 || - parent.kind === 187 || - parent.kind === 216) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + if (_parent.kind === 179 || + _parent.kind === 182 || + _parent.kind === 183 || + _parent.kind === 181 || + _parent.kind === 178 || + _parent.kind === 180 || + _parent.kind === 187 || + _parent.kind === 217) { + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -21889,20 +23020,22 @@ var ts; }); break; } - case 201: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); + case 201: { + var _openBrace = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n.parent, _openBrace, _closeBrace, autoCollapse(n)); break; + } case 196: case 197: case 199: case 152: - case 188: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); + case 202: { + var _openBrace_1 = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace_1 = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n, _openBrace_1, _closeBrace_1, autoCollapse(n)); break; + } case 151: var openBracket = ts.findChildOfKind(n, 18, sourceFile); var closeBracket = ts.findChildOfKind(n, 19, sourceFile); @@ -21929,8 +23062,8 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var declarations = sourceFile.getNamedDeclarations(); - for (var i = 0, n = declarations.length; i < n; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; var name = getDeclarationName(declaration); if (name !== undefined) { var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name); @@ -21961,8 +23094,9 @@ var ts; return items; function allMatchesAreCaseSensitive(matches) { ts.Debug.assert(matches.length > 0); - for (var i = 0, n = matches.length; i < n; i++) { - if (!matches[i].isCaseSensitive) { + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + if (!match.isCaseSensitive) { return false; } } @@ -22040,14 +23174,15 @@ var ts; } function bestMatchKind(matches) { ts.Debug.assert(matches.length > 0); - var bestMatchKind = 3; - for (var i = 0, n = matches.length; i < n; i++) { - var kind = matches[i].kind; - if (kind < bestMatchKind) { - bestMatchKind = kind; + var _bestMatchKind = 3; + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + var kind = match.kind; + if (kind < _bestMatchKind) { + _bestMatchKind = kind; } } - return bestMatchKind; + return _bestMatchKind; } var baseSensitivity = { sensitivity: "base" }; function compareNavigateToItems(i1, i2) { @@ -22111,6 +23246,27 @@ var ts; case 149: ts.forEach(node.elements, visit); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + childNodes.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + childNodes.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; case 150: case 193: if (ts.isBindingPattern(node.name)) { @@ -22122,7 +23278,11 @@ var ts; case 197: case 200: case 195: + case 203: + case 208: + case 212: childNodes.push(node); + break; } } ts.forEach(nodes, visit); @@ -22152,8 +23312,8 @@ var ts; } function addTopLevelNodes(nodes, topLevelNodes) { nodes = sortNodes(nodes); - for (var i = 0, n = nodes.length; i < n; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; switch (node.kind) { case 196: case 199: @@ -22191,19 +23351,19 @@ var ts; function getItemsWorker(nodes, createItem) { var items = []; var keyToItem = {}; - for (var i = 0, n = nodes.length; i < n; i++) { - var child = nodes[i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + var _item = createItem(child); + if (_item !== undefined) { + if (_item.text.length > 0) { + var key = _item.text + "-" + _item.kind + "-" + _item.indent; var itemWithSameName = keyToItem[key]; if (itemWithSameName) { - merge(itemWithSameName, item); + merge(itemWithSameName, _item); } else { - keyToItem[key] = item; - items.push(item); + keyToItem[key] = _item; + items.push(_item); } } } @@ -22216,10 +23376,10 @@ var ts; if (!target.childItems) { target.childItems = []; } - outer: for (var i = 0, n = source.childItems.length; i < n; i++) { - var sourceChild = source.childItems[i]; - for (var j = 0, m = target.childItems.length; j < m; j++) { - var targetChild = target.childItems[j]; + outer: for (var _i = 0, _a = source.childItems, _n = _a.length; _i < _n; _i++) { + var sourceChild = _a[_i]; + for (var _b = 0, _c = target.childItems, _d = _c.length; _b < _d; _b++) { + var targetChild = _c[_b]; if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { merge(targetChild, sourceChild); continue outer; @@ -22235,7 +23395,7 @@ var ts; if (ts.isBindingPattern(node.name)) { break; } - if ((node.flags & 243) === 0) { + if ((node.flags & 499) === 0) { return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); @@ -22248,7 +23408,7 @@ var ts; return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); case 138: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 219: + case 220: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); case 136: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); @@ -22262,9 +23422,9 @@ var ts; case 193: case 150: var variableDeclarationNode; - var name; + var _name; if (node.kind === 150) { - name = node.name; + _name = node.name; variableDeclarationNode = node; while (variableDeclarationNode && variableDeclarationNode.kind !== 193) { variableDeclarationNode = variableDeclarationNode.parent; @@ -22274,19 +23434,25 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name = node.name; + _name = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.variableElement); } case 133: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); + case 212: + case 208: + case 203: + case 205: + case 206: + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; function createItem(node, name, scriptElementKind) { @@ -22315,7 +23481,7 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 220: + case 221: return createSourceFileItem(node); case 196: return createClassItem(node); @@ -22359,10 +23525,15 @@ var ts; return undefined; } hasGlobalNode = true; - var rootName = ts.isExternalModule(node) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" : ""; + var rootName = ts.isExternalModule(node) + ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" + : ""; return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); } function createClassItem(node) { + if (!node.name) { + return undefined; + } var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { @@ -22372,7 +23543,7 @@ var ts; if (constructor) { nodes.push.apply(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); } - var childItems = getItemsWorker(sortNodes(nodes), createChildItem); + childItems = getItemsWorker(sortNodes(nodes), createChildItem); } return getNavigationBarItem(node.name.text, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -22398,7 +23569,9 @@ var ts; return node; } function getNodeSpan(node) { - return node.kind === 220 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); + return node.kind === 221 + ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) + : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } function getTextOfNode(node) { return ts.getTextOfNodeFromSourceText(sourceFile.text, node); @@ -22488,8 +23661,8 @@ var ts; if (isLowercase) { if (index > 0) { var wordSpans = getWordSpans(candidate); - for (var i = 0, n = wordSpans.length; i < n; i++) { - var span = wordSpans[i]; + for (var _i = 0, _n = wordSpans.length; _i < _n; _i++) { + var span = wordSpans[_i]; if (partStartsWith(candidate, span, chunk.text, true)) { return createPatternMatch(2, punctuationStripped, partStartsWith(candidate, span, chunk.text, false)); } @@ -22541,8 +23714,8 @@ var ts; } var subWordTextChunks = segment.subWordTextChunks; var matches = undefined; - for (var i = 0, n = subWordTextChunks.length; i < n; i++) { - var subWordTextChunk = subWordTextChunks[i]; + for (var _i = 0, _n = subWordTextChunks.length; _i < _n; _i++) { + var subWordTextChunk = subWordTextChunks[_i]; var result = matchTextChunk(candidate, subWordTextChunk, true); if (!result) { return undefined; @@ -22568,10 +23741,10 @@ var ts; } } else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (ch1 !== ch2) { + for (var _i = 0; _i < patternPartLength; _i++) { + var _ch1 = pattern.charCodeAt(patternPartStart + _i); + var _ch2 = candidate.charCodeAt(candidateSpan.start + _i); + if (_ch1 !== _ch2) { return false; } } @@ -22852,7 +24025,9 @@ var ts; function transitionFromLowerToUpper(identifier, word, index) { var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var transition = word ? (currentIsUpper && !lastIsUpper) : currentIsUpper; + var transition = word + ? (currentIsUpper && !lastIsUpper) + : currentIsUpper; return transition; } })(ts || (ts = {})); @@ -22892,20 +24067,22 @@ var ts; invocation: callExpression, argumentsSpan: getApplicableSpanForArguments(list), argumentIndex: 0, - argumentCount: getCommaBasedArgCount(list) + argumentCount: getArgumentCount(list) }; } var listItemInfo = ts.findListItemInfo(node); if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = (listItemInfo.listItemIndex + 1) >> 1; + var _list = listItemInfo.list; + var _isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === _list.pos; + var argumentIndex = getArgumentIndex(_list, node); + var argumentCount = getArgumentCount(_list); + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { - kind: isTypeArgList ? 0 : 1, + kind: _isTypeArgList ? 0 : 1, invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), + argumentsSpan: getApplicableSpanForArguments(_list), argumentIndex: argumentIndex, - argumentCount: getCommaBasedArgCount(list) + argumentCount: argumentCount }; } } @@ -22918,25 +24095,44 @@ var ts; var templateExpression = node.parent; var tagExpression = templateExpression.parent; ts.Debug.assert(templateExpression.kind === 169); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var _argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; + return getArgumentListInfoForTemplate(tagExpression, _argumentIndex); } else if (node.parent.kind === 173 && node.parent.parent.parent.kind === 157) { var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 169); + var _templateExpression = templateSpan.parent; + var _tagExpression = _templateExpression.parent; + ts.Debug.assert(_templateExpression.kind === 169); if (node.kind === 13 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var spanIndex = _templateExpression.templateSpans.indexOf(templateSpan); + var _argumentIndex_1 = getArgumentIndexForTemplatePiece(spanIndex, node); + return getArgumentListInfoForTemplate(_tagExpression, _argumentIndex_1); } return undefined; } - function getCommaBasedArgCount(argumentsList) { - return argumentsList.getChildCount() === 0 ? 0 : 1 + ts.countWhere(argumentsList.getChildren(), function (arg) { return arg.kind === 23; }); + function getArgumentIndex(argumentsList, node) { + var argumentIndex = 0; + var listChildren = argumentsList.getChildren(); + for (var _i = 0, _n = listChildren.length; _i < _n; _i++) { + var child = listChildren[_i]; + if (child === node) { + break; + } + if (child.kind !== 23) { + argumentIndex++; + } + } + return argumentIndex; + } + function getArgumentCount(argumentsList) { + var listChildren = argumentsList.getChildren(); + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 23; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 23) { + argumentCount++; + } + return argumentCount; } function getArgumentIndexForTemplatePiece(spanIndex, node) { ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); @@ -22949,7 +24145,10 @@ var ts; return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - var argumentCount = tagExpression.template.kind === 10 ? 1 : tagExpression.template.templateSpans.length + 1; + var argumentCount = tagExpression.template.kind === 10 + ? 1 + : tagExpression.template.templateSpans.length + 1; + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { kind: 2, invocation: tagExpression, @@ -22976,16 +24175,16 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 220; n = n.parent) { + for (var n = node; n.kind !== 221; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } if (n.pos < n.parent.pos || n.end > n.parent.end) { ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); } - var argumentInfo = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo) { - return argumentInfo; + var _argumentInfo = getImmediatelyContainingArgumentInfo(n); + if (_argumentInfo) { + return _argumentInfo; } } return undefined; @@ -23064,6 +24263,7 @@ var ts; if (selectedItemIndex < 0) { selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); } + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { items: items, applicableSpan: applicableSpan, @@ -23166,10 +24366,11 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 221 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 222 && c.pos <= node.pos && c.end >= node.end) { return c; } }); + ts.Debug.assert(!syntaxList || ts.contains(syntaxList.getChildren(), node)); return syntaxList; } ts.findContainingList = findContainingList; @@ -23230,10 +24431,10 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; var shouldDiveInChildNode = (child.pos <= previousToken.pos && child.end > previousToken.end) || - (child.pos === previousToken.end); + (child.pos === previousToken.end); if (shouldDiveInChildNode && nodeHasTokens(child)) { return find(child); } @@ -23257,7 +24458,7 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { + for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; if (nodeHasTokens(child)) { if (position <= child.end) { @@ -23271,10 +24472,10 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 220); + ts.Debug.assert(startNode !== undefined || n.kind === 221); if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); + var _candidate = findRightmostChildNodeWithTokens(children, children.length); + return _candidate && findRightmostToken(_candidate); } } function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { @@ -23311,7 +24512,7 @@ var ts; if (node.kind === 139 || node.kind === 155) { return node.typeArguments; } - if (ts.isAnyFunction(node) || node.kind === 196 || node.kind === 197) { + if (ts.isFunctionLike(node) || node.kind === 196 || node.kind === 197) { return node.typeParameters; } return undefined; @@ -23336,7 +24537,8 @@ var ts; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { - return ts.isTemplateLiteralKind(node.kind) && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); + return ts.isTemplateLiteralKind(node.kind) + && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); } ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function compareDataObjects(dst, src) { @@ -23561,21 +24763,21 @@ var ts; var t; var pos = scanner.getStartPos(); while (pos < endPos) { - var t = scanner.getToken(); - if (!ts.isTrivia(t)) { + var _t = scanner.getToken(); + if (!ts.isTrivia(_t)) { break; } scanner.scan(); - var item = { + var _item = { pos: pos, end: scanner.getStartPos(), - kind: t + kind: _t }; pos = scanner.getStartPos(); if (!leadingTrivia) { leadingTrivia = []; } - leadingTrivia.push(item); + leadingTrivia.push(_item); } savedPos = scanner.getStartPos(); } @@ -23610,7 +24812,13 @@ var ts; token: undefined }; } - var expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 : shouldRescanSlashToken(n) ? 2 : shouldRescanTemplateToken(n) ? 3 : 0; + var expectedScanAction = shouldRescanGreaterThanToken(n) + ? 1 + : shouldRescanSlashToken(n) + ? 2 + : shouldRescanTemplateToken(n) + ? 3 + : 0; if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } @@ -23673,8 +24881,8 @@ var ts; } function isOnToken() { var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < endPos && current !== 1 && !ts.isTrivia(current); + var _startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return _startPos < endPos && current !== 1 && !ts.isTrivia(current); } function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -23764,6 +24972,7 @@ var ts; formatting.FormattingContext = FormattingContext; })(formatting = ts.formatting || (ts.formatting = {})); })(ts || (ts = {})); +/// var ts; (function (ts) { var formatting; @@ -23785,6 +24994,7 @@ var ts; formatting.Rule = Rule; })(formatting = ts.formatting || (ts.formatting = {})); })(ts || (ts = {})); +/// var ts; (function (ts) { var formatting; @@ -23815,6 +25025,7 @@ var ts; formatting.RuleDescriptor = RuleDescriptor; })(formatting = ts.formatting || (ts.formatting = {})); })(ts || (ts = {})); +/// var ts; (function (ts) { var formatting; @@ -23861,8 +25072,9 @@ var ts; if (this.IsAny()) { return true; } - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { + for (var _i = 0, _a = this.customContextChecks, _n = _a.length; _i < _n; _i++) { + var check = _a[_i]; + if (!check(context)) { return false; } } @@ -23923,7 +25135,7 @@ var ts; this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(34, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([97, 93, 87, 73, 89, 96]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([105, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(82, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); @@ -23931,13 +25143,13 @@ var ts; this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(89, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([17, 74, 75, 66]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2)); this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([95, 80]), 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 120]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([115, 119]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(114, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([117, 118]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 115, 76, 77, 78, 116, 103, 84, 104, 117, 107, 109, 120, 110]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 103])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(113, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 117]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 114, 76, 77, 78, 115, 102, 84, 103, 116, 106, 108, 119, 109]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 102])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(8, 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(32, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(21, 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); @@ -23949,52 +25161,52 @@ var ts; this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.FromTokens([16, 18, 25, 23])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8)); this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14, 15), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8)); this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, - this.NoSpaceAfterQuestionMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.SpaceAfterLetConstInVariableDeclaration, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket - ]; + [ + this.IgnoreBeforeComment, this.IgnoreAfterLineComment, + this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, + this.NoSpaceAfterQuestionMark, + this.NoSpaceBeforeDot, this.NoSpaceAfterDot, + this.NoSpaceAfterUnaryPrefixOperator, + this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, + this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, + this.SpaceAfterPostincrementWhenFollowedByAdd, + this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, + this.SpaceAfterPostdecrementWhenFollowedBySubtract, + this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, + this.NoSpaceAfterCloseBrace, + this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, + this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, + this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, + this.NoSpaceBetweenReturnAndSemicolon, + this.SpaceAfterCertainKeywords, + this.SpaceAfterLetConstInVariableDeclaration, + this.NoSpaceBeforeOpenParenInFuncCall, + this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, + this.SpaceAfterVoidOperator, + this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, + this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, + this.SpaceAfterModuleName, + this.SpaceAfterArrow, + this.NoSpaceAfterEllipsis, + this.NoSpaceAfterOptionalParameters, + this.NoSpaceBetweenEmptyInterfaceBraceBrackets, + this.NoSpaceBeforeOpenAngularBracket, + this.NoSpaceBetweenCloseParenAndAngularBracket, + this.NoSpaceAfterOpenAngularBracket, + this.NoSpaceBeforeCloseAngularBracket, + this.NoSpaceAfterCloseAngularBracket + ]; this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; + [ + this.NoSpaceBeforeSemicolon, + this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, + this.NoSpaceBeforeComma, + this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, + this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, + this.SpaceAfterSemicolon, + this.NoSpaceBeforeOpenParenInFuncDecl, + this.SpaceBetweenStatements, this.SpaceAfterTryFinally + ]; this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); @@ -24018,9 +25230,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name in o) { - if (o[name] === rule) { - return name; + for (var _name in o) { + if (o[_name] === rule) { + return _name; } } throw new Error("Unknown rule"); @@ -24036,10 +25248,10 @@ var ts; case 167: case 168: return true; - case 202: + case 203: case 193: case 128: - case 219: + case 220: case 130: case 129: return context.currentTokenSpan.kind === 52 || context.nextTokenSpan.kind === 52; @@ -24082,7 +25294,7 @@ var ts; } switch (node.kind) { case 174: - case 188: + case 202: case 152: case 201: return true; @@ -24125,7 +25337,7 @@ var ts; case 200: case 199: case 174: - case 216: + case 217: case 201: case 188: return true; @@ -24143,7 +25355,7 @@ var ts; case 191: case 179: case 187: - case 216: + case 217: return true; default: return false; @@ -24264,10 +25476,11 @@ var ts; var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); var bucket = this.map[bucketIndex]; if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) + for (var _i = 0, _a = bucket.Rules(), _n = _a.length; _i < _n; _i++) { + var rule = _a[_i]; + if (rule.Operation.Context.InContext(context)) { return rule; + } } } return null; @@ -24322,13 +25535,19 @@ var ts; RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { var position; if (rule.Operation.Action == 1) { - position = specificTokens ? 0 : RulesPosition.IgnoreRulesAny; + position = specificTokens ? + 0 : + RulesPosition.IgnoreRulesAny; } else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny; + position = specificTokens ? + RulesPosition.ContextRulesSpecific : + RulesPosition.ContextRulesAny; } else { - position = specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; + position = specificTokens ? + RulesPosition.NoContextRulesSpecific : + RulesPosition.NoContextRulesAny; } var state = constructionState[rulesBucketIndex]; if (state === undefined) { @@ -24450,7 +25669,7 @@ var ts; TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([64, 16, 92, 87]); TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([64, 17, 19, 87]); TokenRange.Comments = TokenRange.FromTokens([2, 3]); - TokenRange.TypeNames = TokenRange.FromTokens([64, 119, 121, 113, 122, 98, 112]); + TokenRange.TypeNames = TokenRange.FromTokens([64, 118, 120, 112, 121, 98, 111]); return TokenRange; })(); Shared.TokenRange = TokenRange; @@ -24583,13 +25802,13 @@ var ts; } formatting.formatSelection = formatSelection; function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); - if (!parent) { + var _parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!_parent) { return []; } var span = { - pos: ts.getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), - end: parent.end + pos: ts.getLineStartPositionForPosition(_parent.getStart(sourceFile), sourceFile), + end: _parent.end }; return formatSpan(span, sourceFile, options, rulesProvider, requestKind); } @@ -24617,11 +25836,11 @@ var ts; case 200: var body = parent.body; return body && body.kind === 174 && ts.rangeContainsRange(body.statements, node); - case 220: + case 221: case 174: case 201: return ts.rangeContainsRange(parent.statements, node); - case 216: + case 217: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -24643,7 +25862,9 @@ var ts; if (!errors.length) { return rangeHasNoErrors; } - var sorted = errors.filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }).sort(function (e1, e2) { return e1.start - e2.start; }); + var sorted = errors + .filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }) + .sort(function (e1, e2) { return e1.start - e2.start; }); if (!sorted.length) { return rangeHasNoErrors; } @@ -24724,10 +25945,10 @@ var ts; } } else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { + if (_startLine !== parentStartLine || startPos === column) { return column; } } @@ -24738,9 +25959,9 @@ var ts; if (indentation === -1) { if (isSomeBlock(node.kind)) { if (isSomeBlock(parent.kind) || - parent.kind === 220 || - parent.kind === 213 || - parent.kind === 214) { + parent.kind === 221 || + parent.kind === 214 || + parent.kind === 215) { indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); } else { @@ -24844,19 +26065,19 @@ var ts; return inheritedIndentation; } while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > childStartPos) { + var _tokenInfo = formattingScanner.readTokenInfo(node); + if (_tokenInfo.token.end > childStartPos) { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, node, parentDynamicIndentation); } if (!formattingScanner.isOnToken()) { return inheritedIndentation; } if (ts.isToken(child)) { - var tokenInfo = formattingScanner.readTokenInfo(child); - ts.Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(child); + ts.Debug.assert(_tokenInfo_1.token.end === child.end); + consumeTokenAndAdvanceScanner(_tokenInfo_1, node, parentDynamicIndentation); return inheritedIndentation; } var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); @@ -24868,33 +26089,34 @@ var ts; var listStartToken = getOpenTokenForList(parent, nodes); var listEndToken = getCloseTokenForOpenToken(listStartToken); var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; + var _startLine = parentStartLine; if (listStartToken !== 0) { while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.end > nodes.pos) { + var _tokenInfo = formattingScanner.readTokenInfo(parent); + if (_tokenInfo.token.end > nodes.pos) { break; } - else if (tokenInfo.token.kind === listStartToken) { - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation = computeIndentation(tokenInfo.token, startLine, -1, parent, parentDynamicIndentation, startLine); - listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + else if (_tokenInfo.token.kind === listStartToken) { + _startLine = sourceFile.getLineAndCharacterOfPosition(_tokenInfo.token.pos).line; + var _indentation = computeIndentation(_tokenInfo.token, _startLine, -1, parent, parentDynamicIndentation, _startLine); + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, _indentation.indentation, _indentation.delta); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, listDynamicIndentation); } else { - consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, parentDynamicIndentation); } } } var inheritedIndentation = -1; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, true); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, _startLine, true); } if (listEndToken !== 0) { if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(parent); + if (_tokenInfo_1.token.kind === listEndToken && ts.rangeContainsRange(parent, _tokenInfo_1.token)) { + consumeTokenAndAdvanceScanner(_tokenInfo_1, parent, listDynamicIndentation); } } } @@ -24931,8 +26153,8 @@ var ts; if (indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { - for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { - var triviaItem = currentTokenInfo.leadingTrivia[i]; + for (var _i = 0, _a = currentTokenInfo.leadingTrivia, _n = _a.length; _i < _n; _i++) { + var triviaItem = _a[_i]; if (!ts.rangeContainsRange(originalRange, triviaItem)) { continue; } @@ -24945,8 +26167,8 @@ var ts; break; case 2: if (indentNextTokenOrTrivia) { - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - insertIndentation(triviaItem.pos, commentIndentation, false); + var _commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, _commentIndentation, false); indentNextTokenOrTrivia = false; } break; @@ -24966,8 +26188,8 @@ var ts; } } function processTrivia(trivia, parent, contextNode, dynamicIndentation) { - for (var i = 0, len = trivia.length; i < len; ++i) { - var triviaItem = trivia[i]; + for (var _i = 0, _n = trivia.length; _i < _n; _i++) { + var triviaItem = trivia[_i]; if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); @@ -25013,8 +26235,8 @@ var ts; } } trimTrailingWhitespaces = - (rule.Operation.Action & (4 | 2)) && - rule.Flag !== 1; + (rule.Operation.Action & (4 | 2)) && + rule.Flag !== 1; } else { trimTrailingWhitespaces = true; @@ -25038,25 +26260,26 @@ var ts; } } function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - if (startLine === endLine) { + var parts; + if (_startLine === endLine) { if (!firstLineIsIndented) { insertIndentation(commentRange.pos, indentation, false); } return; } else { - var parts = []; + parts = []; var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { + for (var line = _startLine; line < endLine; ++line) { var endOfLine = ts.getEndLinePosition(line, sourceFile); parts.push({ pos: startPos, end: endOfLine }); startPos = ts.getStartPositionOfLine(line + 1, sourceFile); } parts.push({ pos: startPos, end: commentRange.end }); } - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); + var startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); if (indentation === nonWhitespaceColumnInFirstPart.column) { return; @@ -25064,19 +26287,21 @@ var ts; var startIndex = 0; if (firstLineIsIndented) { startIndex = 1; - startLine++; + _startLine++; } - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; + var _delta = indentation - nonWhitespaceColumnInFirstPart.column; + for (var i = startIndex, len = parts.length; i < len; ++i, ++_startLine) { + var _startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); + var nonWhitespaceCharacterAndColumn = i === 0 + ? nonWhitespaceColumnInFirstPart + : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + var newIndentation = nonWhitespaceCharacterAndColumn.column + _delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); + recordReplace(_startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); } else { - recordDelete(startLinePos, nonWhitespaceCharacterAndColumn.character); + recordDelete(_startLinePos, nonWhitespaceCharacterAndColumn.character); } } } @@ -25249,11 +26474,11 @@ var ts; return 0; } var precedingTokenIsLiteral = precedingToken.kind === 8 || - precedingToken.kind === 9 || - precedingToken.kind === 10 || - precedingToken.kind === 11 || - precedingToken.kind === 12 || - precedingToken.kind === 13; + precedingToken.kind === 9 || + precedingToken.kind === 10 || + precedingToken.kind === 11 || + precedingToken.kind === 12 || + precedingToken.kind === 13; if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { return 0; } @@ -25279,9 +26504,9 @@ var ts; } break; } - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation; + var _actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation; } previous = current; current = current.parent; @@ -25298,9 +26523,9 @@ var ts; } SmartIndenter.getIndentationForNode = getIndentationForNode; function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { - var parent = current.parent; + var _parent = current.parent; var parentStart; - while (parent) { + while (_parent) { var useActualIndentation = true; if (ignoreActualIndentationRange) { var start = current.getStart(sourceFile); @@ -25312,21 +26537,21 @@ var ts; return actualIndentation + indentationDelta; } } - parentStart = getParentStart(parent, current, sourceFile); + parentStart = getParentStart(_parent, current, sourceFile); var parentAndChildShareLine = parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); + childStartsOnTheSameLineWithElseInIfStatement(_parent, current, currentStart.line, sourceFile); if (useActualIndentation) { - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var _actualIndentation = getActualIndentationForNode(current, _parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation + indentationDelta; } } - if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { + if (shouldIndentChildNode(_parent.kind, current.kind) && !parentAndChildShareLine) { indentationDelta += options.IndentSize; } - current = parent; + current = _parent; currentStart = parentStart; - parent = current.parent; + _parent = current.parent; } return indentationDelta; } @@ -25339,12 +26564,16 @@ var ts; } function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { var commaItemInfo = ts.findListItemInfo(commaToken); - ts.Debug.assert(commaItemInfo && commaItemInfo.listItemIndex > 0); - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + if (commaItemInfo && commaItemInfo.listItemIndex > 0) { + return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + } + else { + return -1; + } } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 220 || !parentAndChildShareLine); + (parent.kind === 221 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -25399,7 +26628,7 @@ var ts; case 132: case 131: case 136: - case 137: + case 137: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -25409,18 +26638,20 @@ var ts; return node.parent.parameters; } break; + } case 156: - case 155: - var start = node.getStart(sourceFile); + case 155: { + var _start = node.getStart(sourceFile); if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.typeArguments, _start, node.getEnd())) { return node.parent.typeArguments; } if (node.parent.arguments && - ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.arguments, _start, node.getEnd())) { return node.parent.arguments; } break; + } } } return undefined; @@ -25486,15 +26717,15 @@ var ts; case 201: case 152: case 143: - case 188: + case 202: + case 215: case 214: - case 213: case 159: case 155: case 156: case 175: case 193: - case 208: + case 209: case 186: case 168: return true; @@ -25550,9 +26781,9 @@ var ts; case 152: case 174: case 201: - case 188: + case 202: return nodeEndsWith(n, 15, sourceFile); - case 216: + case 217: return isCompletedNode(n.block, sourceFile); case 159: case 136: @@ -25576,9 +26807,15 @@ var ts; return isCompletedNode(n.expression, sourceFile); case 151: return nodeEndsWith(n, 19, sourceFile); - case 213: case 214: + case 215: return false; + case 181: + return isCompletedNode(n.statement, sourceFile); + case 182: + return isCompletedNode(n.statement, sourceFile); + case 183: + return isCompletedNode(n.statement, sourceFile); case 180: return isCompletedNode(n.statement, sourceFile); case 179: @@ -25671,17 +26908,17 @@ var ts; while (pos < end) { var token = scanner.scan(); var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 512, this)); + nodes.push(createNode(token, pos, textPos, 1024, this)); pos = textPos; } return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(221, nodes.pos, nodes.end, 512, this); + var list = createNode(222, nodes.pos, nodes.end, 1024, this); list._children = []; var pos = nodes.pos; - for (var i = 0, len = nodes.length; i < len; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (pos < node.pos) { pos = this.addSyntheticNodes(list._children, pos, node.pos); } @@ -25695,9 +26932,10 @@ var ts; }; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; + var children; if (this.kind >= 125) { scanner.setText((sourceFile || this.getSourceFile()).text); - var children = []; + children = []; var pos = this.pos; var processNode = function (node) { if (pos < node.pos) { @@ -25738,8 +26976,8 @@ var ts; }; NodeObject.prototype.getFirstToken = function (sourceFile) { var children = this.getChildren(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (child.kind < 125) { return child; } @@ -25861,7 +27099,7 @@ var ts; } function getCleanedJsDocComment(pos, end, sourceFile) { var spacesToRemoveAfterAsterisk; - var docComments = []; + var _docComments = []; var blankLineCount = 0; var isInParamTag = false; while (pos < end) { @@ -25896,14 +27134,14 @@ var ts; } pos = consumeLineBreaks(pos, end, sourceFile); if (docCommentTextOfLine) { - pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); + pushDocCommentLineText(_docComments, docCommentTextOfLine, blankLineCount); blankLineCount = 0; } - else if (!isInParamTag && docComments.length) { + else if (!isInParamTag && _docComments.length) { blankLineCount++; } } - return docComments; + return _docComments; } function getCleanedParamJsDocComment(pos, end, sourceFile) { var paramHelpStringMargin; @@ -26004,8 +27242,8 @@ var ts; } var consumedSpaces = pos - startOfLinePos; if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); - if (ch === 42) { + var _ch = sourceFile.text.charCodeAt(pos); + if (_ch === 42) { pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); } } @@ -26099,7 +27337,9 @@ var ts; case 131: var functionDeclaration = node; if (functionDeclaration.name && functionDeclaration.name.getFullWidth() > 0) { - var lastDeclaration = namedDeclarations.length > 0 ? namedDeclarations[namedDeclarations.length - 1] : undefined; + var lastDeclaration = namedDeclarations.length > 0 ? + namedDeclarations[namedDeclarations.length - 1] : + undefined; if (lastDeclaration && functionDeclaration.symbol === lastDeclaration.symbol) { if (functionDeclaration.body && !lastDeclaration.body) { namedDeclarations[namedDeclarations.length - 1] = functionDeclaration; @@ -26116,7 +27356,12 @@ var ts; case 198: case 199: case 200: - case 202: + case 203: + case 212: + case 208: + case 203: + case 205: + case 206: case 134: case 135: case 143: @@ -26146,11 +27391,32 @@ var ts; ts.forEachChild(node.name, visit); break; } - case 219: + case 220: case 130: case 129: namedDeclarations.push(node); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + namedDeclarations.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + namedDeclarations.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; } }); this.namedDeclarations = namedDeclarations; @@ -26287,8 +27553,8 @@ var ts; if (declaration.kind !== 193 && declaration.kind !== 195) { return false; } - for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { - if (parent.kind === 220 || parent.kind === 201) { + for (var _parent = declaration.parent; !ts.isFunctionBlock(_parent); _parent = _parent.parent) { + if (_parent.kind === 221 || _parent.kind === 201) { return false; } } @@ -26329,8 +27595,9 @@ var ts; this.host = host; this.fileNameToEntry = {}; var rootFileNames = host.getScriptFileNames(); - for (var i = 0, n = rootFileNames.length; i < n; i++) { - this.createEntry(rootFileNames[i]); + for (var _i = 0, _n = rootFileNames.length; _i < _n; _i++) { + var fileName = rootFileNames[_i]; + this.createEntry(fileName); } this._compilationSettings = host.getCompilationSettings() || getDefaultCompilerOptions(); } @@ -26389,17 +27656,17 @@ var ts; if (!scriptSnapshot) { throw new Error("Could not find file: '" + fileName + "'."); } - var version = this.host.getScriptVersion(fileName); + var _version = this.host.getScriptVersion(fileName); var sourceFile; if (this.currentFileName !== fileName) { - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, version, true); + sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, _version, true); } - else if (this.currentFileVersion !== version) { + else if (this.currentFileVersion !== _version) { var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); + sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, _version, editRange); } if (sourceFile) { - this.currentFileVersion = version; + this.currentFileVersion = _version; this.currentFileName = fileName; this.currentFileScriptSnapshot = scriptSnapshot; this.currentSourceFile = sourceFile; @@ -26455,7 +27722,7 @@ var ts; var entry = entries[i]; sourceFiles.push({ name: i, - refCount: entry.refCount, + refCount: entry.languageServiceRefCount, references: entry.owners.slice(0) }); } @@ -26468,34 +27735,40 @@ var ts; return JSON.stringify(bucketInfoArray, null, 2); } function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, true); + } + function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, false); + } + function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { var bucket = getBucketForCompilationSettings(compilationSettings, true); var entry = ts.lookUp(bucket, fileName); if (!entry) { + ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, false); bucket[fileName] = entry = { sourceFile: sourceFile, - refCount: 0, + languageServiceRefCount: 0, owners: [] }; } - entry.refCount++; - return entry.sourceFile; - } - function updateDocument(sourceFile, fileName, compilationSettings, scriptSnapshot, version, textChangeRange) { - var bucket = getBucketForCompilationSettings(compilationSettings, false); - ts.Debug.assert(bucket !== undefined); - var entry = ts.lookUp(bucket, fileName); - ts.Debug.assert(entry !== undefined); - entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, textChangeRange); + else { + if (entry.sourceFile.version !== version) { + entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); + } + } + if (acquiring) { + entry.languageServiceRefCount++; + } return entry.sourceFile; } function releaseDocument(fileName, compilationSettings) { var bucket = getBucketForCompilationSettings(compilationSettings, false); ts.Debug.assert(bucket !== undefined); var entry = ts.lookUp(bucket, fileName); - entry.refCount--; - ts.Debug.assert(entry.refCount >= 0); - if (entry.refCount === 0) { + entry.languageServiceRefCount--; + ts.Debug.assert(entry.languageServiceRefCount >= 0); + if (entry.languageServiceRefCount === 0) { delete bucket[fileName]; } } @@ -26526,31 +27799,111 @@ var ts; } }); } + function recordModuleName() { + var importPath = scanner.getTokenValue(); + var pos = scanner.getTokenPos(); + importedFiles.push({ + fileName: importPath, + pos: pos, + end: pos + importPath.length + }); + } function processImport() { scanner.setText(sourceText); var token = scanner.scan(); while (token !== 1) { if (token === 84) { token = scanner.scan(); - if (token === 64) { - token = scanner.scan(); - if (token === 52) { + if (token === 8) { + recordModuleName(); + continue; + } + else { + if (token === 64) { token = scanner.scan(); - if (token === 118) { + if (token === 123) { token = scanner.scan(); - if (token === 16) { + if (token === 8) { + recordModuleName(); + continue; + } + } + else if (token === 52) { + token = scanner.scan(); + if (token === 117) { token = scanner.scan(); - if (token === 8) { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); + if (token === 16) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + continue; + } } } } + else if (token === 23) { + token = scanner.scan(); + } + else { + continue; + } + } + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 101) { + token = scanner.scan(); + if (token === 64) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + } + } + } + else if (token === 77) { + token = scanner.scan(); + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } } } } @@ -26618,19 +27971,19 @@ var ts; } function isNameOfFunctionDeclaration(node) { return node.kind === 64 && - ts.isAnyFunction(node.parent) && node.parent.name === node; + ts.isFunctionLike(node.parent) && node.parent.name === node; } function isNameOfPropertyAssignment(node) { return (node.kind === 64 || node.kind === 8 || node.kind === 7) && - (node.parent.kind === 217 || node.parent.kind === 218) && node.parent.name === node; + (node.parent.kind === 218 || node.parent.kind === 219) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 8 || node.kind === 7) { switch (node.parent.kind) { case 130: case 129: - case 217: - case 219: + case 218: + case 220: case 132: case 131: case 134: @@ -26689,7 +28042,7 @@ var ts; return undefined; } switch (node.kind) { - case 220: + case 221: case 132: case 131: case 195: @@ -26713,7 +28066,11 @@ var ts; case 198: return ScriptElementKind.typeElement; case 199: return ScriptElementKind.enumElement; case 193: - return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; + return ts.isConst(node) + ? ScriptElementKind.constElement + : ts.isLet(node) + ? ScriptElementKind.letElement + : ScriptElementKind.variableElement; case 195: return ScriptElementKind.functionElement; case 134: return ScriptElementKind.memberGetAccessorElement; case 135: return ScriptElementKind.memberSetAccessorElement; @@ -26728,8 +28085,14 @@ var ts; case 136: return ScriptElementKind.callSignatureElement; case 133: return ScriptElementKind.constructorImplementationElement; case 127: return ScriptElementKind.typeParameterElement; - case 219: return ScriptElementKind.variableElement; + case 220: return ScriptElementKind.variableElement; case 128: return (node.flags & 112) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 203: + case 208: + case 205: + case 212: + case 206: + return ScriptElementKind.alias; } return ScriptElementKind.unknown; } @@ -26789,8 +28152,9 @@ var ts; }); if (program) { var oldSourceFiles = program.getSourceFiles(); - for (var i = 0, n = oldSourceFiles.length; i < n; i++) { - var fileName = oldSourceFiles[i].fileName; + for (var _i = 0, _n = oldSourceFiles.length; _i < _n; _i++) { + var oldSourceFile = oldSourceFiles[_i]; + var fileName = oldSourceFile.fileName; if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { documentRegistry.releaseDocument(fileName, oldSettings); } @@ -26805,13 +28169,9 @@ var ts; return undefined; } if (!changesInCompilationSettingsAffectSyntax) { - var oldSourceFile = program && program.getSourceFile(fileName); - if (oldSourceFile) { - if (sourceFileUpToDate(oldSourceFile)) { - return oldSourceFile; - } - var textChangeRange = hostFileInformation.scriptSnapshot.getChangeRange(oldSourceFile.scriptSnapshot); - return documentRegistry.updateDocument(oldSourceFile, fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, textChangeRange); + var _oldSourceFile = program && program.getSourceFile(fileName); + if (_oldSourceFile) { + return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); } } return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); @@ -26827,8 +28187,9 @@ var ts; if (program.getSourceFiles().length !== rootFileNames.length) { return false; } - for (var i = 0, n = rootFileNames.length; i < n; i++) { - if (!sourceFileUpToDate(program.getSourceFile(rootFileNames[i]))) { + for (var _a = 0, _b = rootFileNames.length; _a < _b; _a++) { + var _fileName = rootFileNames[_a]; + if (!sourceFileUpToDate(program.getSourceFile(_fileName))) { return false; } } @@ -26846,7 +28207,9 @@ var ts; } function dispose() { if (program) { - ts.forEach(program.getSourceFiles(), function (f) { documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); }); + ts.forEach(program.getSourceFiles(), function (f) { + return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); + }); } } function getSyntacticDiagnostics(fileName) { @@ -26879,8 +28242,8 @@ var ts; displayName = displayName.substring(1, displayName.length - 1); } var isValid = ts.isIdentifierStart(displayName.charCodeAt(0), target); - for (var i = 1, n = displayName.length; isValid && i < n; i++) { - isValid = ts.isIdentifierPart(displayName.charCodeAt(i), target); + for (var _i = 1, n = displayName.length; isValid && _i < n; _i++) { + isValid = ts.isIdentifierPart(displayName.charCodeAt(_i), target); } if (isValid) { return ts.unescapeIdentifier(displayName); @@ -26906,20 +28269,20 @@ var ts; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); log("getCompletionsAtPosition: Get current token: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var insideComment = isInsideComment(sourceFile, currentToken, position); log("getCompletionsAtPosition: Is inside comment: " + (new Date().getTime() - start)); if (insideComment) { log("Returning an empty list because completion was inside a comment."); return undefined; } - var start = new Date().getTime(); + start = new Date().getTime(); var previousToken = ts.findPrecedingToken(position, sourceFile); log("getCompletionsAtPosition: Get previous token 1: " + (new Date().getTime() - start)); if (previousToken && position <= previousToken.end && previousToken.kind === 64) { - var start = new Date().getTime(); + var _start = new Date().getTime(); previousToken = ts.findPrecedingToken(previousToken.pos, sourceFile); - log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - _start)); } if (previousToken && isCompletionListBlocker(previousToken)) { log("Returning an empty list because completion was requested in an invalid position."); @@ -26947,12 +28310,14 @@ var ts; typeChecker: typeInfoResolver }; log("getCompletionsAtPosition: Syntactic work: " + (new Date().getTime() - syntacticStart)); - var location = ts.getTouchingPropertyName(sourceFile, position); + var _location = ts.getTouchingPropertyName(sourceFile, position); var semanticStart = new Date().getTime(); + var isMemberCompletion; + var isNewIdentifierLocation; if (isRightOfDot) { var symbols = []; - var isMemberCompletion = true; - var isNewIdentifierLocation = false; + isMemberCompletion = true; + isNewIdentifierLocation = false; if (node.kind === 64 || node.kind === 125 || node.kind === 153) { var symbol = typeInfoResolver.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { @@ -26991,12 +28356,23 @@ var ts; getCompletionEntriesFromSymbols(filteredMembers, activeCompletionSession); } } + else if (ts.getAncestor(previousToken, 205)) { + isMemberCompletion = true; + isNewIdentifierLocation = true; + if (showCompletionsInImportsClause(previousToken)) { + var importDeclaration = ts.getAncestor(previousToken, 204); + ts.Debug.assert(importDeclaration !== undefined); + var _exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); + var filteredExports = filterModuleExports(_exports, importDeclaration); + getCompletionEntriesFromSymbols(filteredExports, activeCompletionSession); + } + } else { isMemberCompletion = false; isNewIdentifierLocation = isNewIdentifierDefinitionLocation(previousToken); var symbolMeanings = 793056 | 107455 | 1536 | 8388608; - var symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); - getCompletionEntriesFromSymbols(symbols, activeCompletionSession); + var _symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); + getCompletionEntriesFromSymbols(_symbols, activeCompletionSession); } } if (!isMemberCompletion) { @@ -27010,9 +28386,9 @@ var ts; entries: activeCompletionSession.entries }; function getCompletionEntriesFromSymbols(symbols, session) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); ts.forEach(symbols, function (symbol) { - var entry = createCompletionEntry(symbol, session.typeChecker, location); + var entry = createCompletionEntry(symbol, session.typeChecker, _location); if (entry) { var id = ts.escapeIdentifier(entry.name); if (!ts.lookUp(session.symbols, id)) { @@ -27021,41 +28397,57 @@ var ts; } } }); - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - _start_1)); } function isCompletionListBlocker(previousToken) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || isIdentifierDefinitionLocation(previousToken) || isRightOfIllegalDot(previousToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - _start_1)); return result; } + function showCompletionsInImportsClause(node) { + if (node) { + if (node.kind === 14 || node.kind === 23) { + return node.parent.kind === 207; + } + } + return false; + } function isNewIdentifierDefinitionLocation(previousToken) { if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 23: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 151 || containingNodeKind === 167; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 151 + || containingNodeKind === 167; case 16: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 159; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 159; case 18: return containingNodeKind === 151; - case 117: + case 116: return true; case 20: return containingNodeKind === 200; case 14: return containingNodeKind === 196; case 52: - return containingNodeKind === 193 || containingNodeKind === 167; + return containingNodeKind === 193 + || containingNodeKind === 167; case 11: return containingNodeKind === 169; case 12: return containingNodeKind === 173; - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 130; } switch (previousToken.getText()) { @@ -27068,10 +28460,12 @@ var ts; return false; } function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { - if (previousToken.kind === 8 || previousToken.kind === 9 || ts.isTemplateLiteralKind(previousToken.kind)) { - var start = previousToken.getStart(); + if (previousToken.kind === 8 + || previousToken.kind === 9 + || ts.isTemplateLiteralKind(previousToken.kind)) { + var _start_1 = previousToken.getStart(); var end = previousToken.getEnd(); - if (start < position && position < end) { + if (_start_1 < position && position < end) { return true; } else if (position === end) { @@ -27082,12 +28476,12 @@ var ts; } function getContainingObjectLiteralApplicableForCompletion(previousToken) { if (previousToken) { - var parent = previousToken.parent; + var _parent = previousToken.parent; switch (previousToken.kind) { case 14: case 23: - if (parent && parent.kind === 152) { - return parent; + if (_parent && _parent.kind === 152) { + return _parent; } break; } @@ -27130,7 +28524,7 @@ var ts; case 18: return containingNodeKind === 149; case 16: - return containingNodeKind === 216 || + return containingNodeKind === 217 || isFunction(containingNodeKind); case 14: return containingNodeKind === 199 || @@ -27146,27 +28540,27 @@ var ts; containingNodeKind === 195 || containingNodeKind === 197 || isFunction(containingNodeKind); - case 110: + case 109: return containingNodeKind === 130; case 21: return containingNodeKind === 128 || containingNodeKind === 133 || (previousToken.parent.parent.kind === 149); - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 128; case 68: case 76: - case 104: + case 103: case 82: case 97: - case 116: - case 120: + case 115: + case 119: case 84: - case 105: + case 104: case 69: - case 111: + case 110: return true; } switch (previousToken.getText()) { @@ -27191,13 +28585,30 @@ var ts; } return false; } + function filterModuleExports(exports, importDeclaration) { + var exisingImports = {}; + if (!importDeclaration.importClause) { + return exports; + } + if (importDeclaration.importClause.namedBindings && + importDeclaration.importClause.namedBindings.kind === 207) { + ts.forEach(importDeclaration.importClause.namedBindings.elements, function (el) { + var _name = el.propertyName || el.name; + exisingImports[_name.text] = true; + }); + } + if (ts.isEmpty(exisingImports)) { + return exports; + } + return ts.filter(exports, function (e) { return !ts.lookUp(exisingImports, e.name); }); + } function filterContextualMembersList(contextualMemberSymbols, existingMembers) { if (!existingMembers || existingMembers.length === 0) { return contextualMemberSymbols; } var existingMemberNames = {}; ts.forEach(existingMembers, function (m) { - if (m.kind !== 217 && m.kind !== 218) { + if (m.kind !== 218 && m.kind !== 219) { return; } if (m.getStart() <= position && position <= m.getEnd()) { @@ -27205,13 +28616,13 @@ var ts; } existingMemberNames[m.name.text] = true; }); - var filteredMembers = []; + var _filteredMembers = []; ts.forEach(contextualMemberSymbols, function (s) { if (!existingMemberNames[s.name]) { - filteredMembers.push(s); + _filteredMembers.push(s); } }); - return filteredMembers; + return _filteredMembers; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -27222,10 +28633,10 @@ var ts; } var symbol = ts.lookUp(activeCompletionSession.symbols, ts.escapeIdentifier(entryName)); if (symbol) { - var location = ts.getTouchingPropertyName(sourceFile, position); - var completionEntry = createCompletionEntry(symbol, session.typeChecker, location); - ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, location) !== undefined, "Could not find type for symbol"); - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location, session.typeChecker, location, 7); + var _location = ts.getTouchingPropertyName(sourceFile, position); + var completionEntry = createCompletionEntry(symbol, session.typeChecker, _location); + ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, _location) !== undefined, "Could not find type for symbol"); + var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), _location, session.typeChecker, _location, 7); return { name: entryName, kind: displayPartsDocumentationsAndSymbolKind.symbolKind, @@ -27337,7 +28748,9 @@ var ts; return ScriptElementKind.unknown; } function getSymbolModifiers(symbol) { - return symbol && symbol.declarations && symbol.declarations.length > 0 ? ts.getNodeModifiers(symbol.declarations[0]) : ScriptElementKindModifier.none; + return symbol && symbol.declarations && symbol.declarations.length > 0 + ? ts.getNodeModifiers(symbol.declarations[0]) + : ScriptElementKindModifier.none; } function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, typeResolver, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } @@ -27346,11 +28759,13 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); var hasAddedSymbolInfo; + var type; if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 || symbolFlags & 8388608) { if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { symbolKind = ScriptElementKind.memberVariableElement; } - var type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); + var signature; + type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); if (type) { if (location.parent && location.parent.kind === 153) { var right = location.parent.name; @@ -27421,15 +28836,14 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 114 && location.parent.kind === 133)) { - var signature; + (location.kind === 113 && location.parent.kind === 133)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); + var _allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeResolver.isImplementationOfOverload(functionDeclaration)) { signature = typeResolver.getSignatureFromDeclaration(functionDeclaration); } else { - signature = allSignatures[0]; + signature = _allSignatures[0]; } if (functionDeclaration.kind === 133) { symbolKind = ScriptElementKind.constructorImplementationElement; @@ -27439,7 +28853,7 @@ var ts; addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 136 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } - addSignatureDisplayParts(signature, allSignatures); + addSignatureDisplayParts(signature, _allSignatures); hasAddedSymbolInfo = true; } } @@ -27452,14 +28866,14 @@ var ts; } if ((symbolFlags & 64) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(104)); + displayParts.push(ts.keywordPart(103)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(123)); + displayParts.push(ts.keywordPart(122)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); displayParts.push(ts.spacePart()); @@ -27479,7 +28893,7 @@ var ts; } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(117)); + displayParts.push(ts.keywordPart(116)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } @@ -27499,7 +28913,7 @@ var ts; } else { var signatureDeclaration = ts.getDeclarationOfKind(symbol, 127).parent; - var signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); + var _signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); if (signatureDeclaration.kind === 137) { displayParts.push(ts.keywordPart(87)); displayParts.push(ts.spacePart()); @@ -27507,13 +28921,13 @@ var ts; else if (signatureDeclaration.kind !== 136 && signatureDeclaration.name) { addFullSymbolName(signatureDeclaration.symbol); } - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, signature, sourceFile, 32)); + displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, _signature, sourceFile, 32)); } } if (symbolFlags & 8) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 219) { + if (declaration.kind === 220) { var constantValue = typeResolver.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -27529,13 +28943,13 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 202) { + if (declaration.kind === 203) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); displayParts.push(ts.operatorPart(52)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(118)); + displayParts.push(ts.keywordPart(117)); displayParts.push(ts.punctuationPart(16)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8)); displayParts.push(ts.punctuationPart(17)); @@ -27578,8 +28992,8 @@ var ts; symbolFlags & 131072 || symbolFlags & 98304 || symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); - addSignatureDisplayParts(allSignatures[0], allSignatures); + var _allSignatures_1 = type.getCallSignatures(); + addSignatureDisplayParts(_allSignatures_1[0], _allSignatures_1); } } } @@ -27624,10 +29038,10 @@ var ts; documentation = signature.getDocumentationComment(); } function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { + var _typeParameterParts = ts.mapToDisplayParts(function (writer) { typeResolver.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); }); - displayParts.push.apply(displayParts, typeParameterParts); + displayParts.push.apply(displayParts, _typeParameterParts); } } function getQuickInfoAtPosition(fileName, position) { @@ -27698,8 +29112,14 @@ var ts; if (!symbol) { return undefined; } + if (symbol.flags & 8388608) { + var declaration = symbol.declarations[0]; + if (node.kind === 64 && node.parent === declaration) { + symbol = typeInfoResolver.getAliasedSymbol(symbol); + } + } var result = []; - if (node.parent.kind === 218) { + if (node.parent.kind === 219) { var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); var shorthandDeclarations = shorthandSymbol.getDeclarations(); var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver, node); @@ -27733,12 +29153,12 @@ var ts; }; } function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { - var declarations = []; + var _declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { if ((selectConstructors && d.kind === 133) || (!selectConstructors && (d.kind === 195 || d.kind === 132 || d.kind === 131))) { - declarations.push(d); + _declarations.push(d); if (d.body) definition = d; } @@ -27747,14 +29167,14 @@ var ts; result.push(getDefinitionInfo(definition, symbolKind, symbolName, containerName)); return true; } - else if (declarations.length) { - result.push(getDefinitionInfo(declarations[declarations.length - 1], symbolKind, symbolName, containerName)); + else if (_declarations.length) { + result.push(getDefinitionInfo(_declarations[_declarations.length - 1], symbolKind, symbolName, containerName)); return true; } return false; } function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (isNewExpressionTarget(location) || location.kind === 114) { + if (isNewExpressionTarget(location) || location.kind === 113) { if (symbol.flags & 32) { var classDeclaration = symbol.getDeclarations()[0]; ts.Debug.assert(classDeclaration && classDeclaration.kind === 196); @@ -27816,8 +29236,8 @@ var ts; break; case 66: case 72: - if (hasKind(parent(parent(node)), 188)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent); + if (hasKind(parent(parent(parent(node))), 188)) { + return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 65: @@ -27839,13 +29259,13 @@ var ts; return getLoopBreakContinueOccurrences(node.parent); } break; - case 114: + case 113: if (hasKind(node.parent, 133)) { return getConstructorOccurrences(node.parent); } break; - case 116: - case 120: + case 115: + case 119: if (hasKind(node.parent, 134) || hasKind(node.parent, 135)) { return getGetAndSetOccurrences(node.parent); } @@ -27864,8 +29284,8 @@ var ts; while (ifStatement) { var children = ifStatement.getChildren(); pushKeywordIf(keywords, children[0], 83); - for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 75)) { + for (var _i = children.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, children[_i], 75)) { break; } } @@ -27875,10 +29295,10 @@ var ts; ifStatement = ifStatement.elseStatement; } var result = []; - for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 75 && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; + for (var _i_1 = 0; _i_1 < keywords.length; _i_1++) { + if (keywords[_i_1].kind === 75 && _i_1 < keywords.length - 1) { + var elseKeyword = keywords[_i_1]; + var ifKeyword = keywords[_i_1 + 1]; var shouldHighlightNextKeyword = true; for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { @@ -27892,11 +29312,11 @@ var ts; textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), isWriteAccess: false }); - i++; + _i_1++; continue; } } - result.push(getReferenceEntryFromNode(keywords[i])); + result.push(getReferenceEntryFromNode(keywords[_i_1])); } return result; } @@ -27950,7 +29370,7 @@ var ts; aggregate(tryStatement.finallyBlock); } } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -27959,17 +29379,17 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent = child.parent; - if (ts.isFunctionBlock(parent) || parent.kind === 220) { - return parent; + var _parent = child.parent; + if (ts.isFunctionBlock(_parent) || _parent.kind === 221) { + return _parent; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent; + child = _parent; } return undefined; } @@ -27990,8 +29410,8 @@ var ts; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 81, 99, 74)) { if (loopNode.kind === 179) { var loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 99)) { + for (var _i = loopTokens.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, loopTokens[_i], 99)) { break; } } @@ -28008,7 +29428,7 @@ var ts; function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; pushKeywordIf(keywords, switchStatement.getFirstToken(), 91); - ts.forEach(switchStatement.clauses, function (clause) { + ts.forEach(switchStatement.caseBlock.clauses, function (clause) { pushKeywordIf(keywords, clause.getFirstToken(), 66, 72); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { @@ -28043,7 +29463,7 @@ var ts; if (node.kind === 185 || node.kind === 184) { statementAccumulator.push(node); } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -28054,8 +29474,8 @@ var ts; return actualOwner && actualOwner === owner; } function getBreakOrContinueOwner(statement) { - for (var node = statement.parent; node; node = node.parent) { - switch (node.kind) { + for (var _node = statement.parent; _node; _node = _node.parent) { + switch (_node.kind) { case 188: if (statement.kind === 184) { continue; @@ -28065,12 +29485,12 @@ var ts; case 183: case 180: case 179: - if (!statement.label || isLabeledBy(node, statement.label.text)) { - return node; + if (!statement.label || isLabeledBy(_node, statement.label.text)) { + return _node; } break; default: - if (ts.isAnyFunction(node)) { + if (ts.isFunctionLike(_node)) { return undefined; } break; @@ -28083,7 +29503,7 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 114); + return pushKeywordIf(keywords, token, 113); }); }); return ts.map(keywords, getReferenceEntryFromNode); @@ -28096,7 +29516,7 @@ var ts; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 116, 120); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 115, 119); }); } } } @@ -28114,7 +29534,7 @@ var ts; } } else if (declaration.flags & (1 | 2)) { - if (!(container.kind === 201 || container.kind === 220)) { + if (!(container.kind === 201 || container.kind === 221)) { return undefined; } } @@ -28126,7 +29546,7 @@ var ts; var nodes; switch (container.kind) { case 201: - case 220: + case 221: nodes = container.statements; break; case 133: @@ -28154,17 +29574,17 @@ var ts; return ts.map(keywords, getReferenceEntryFromNode); function getFlagFromModifier(modifier) { switch (modifier) { - case 109: - return 16; - case 107: - return 32; case 108: + return 16; + case 106: + return 32; + case 107: return 64; - case 110: + case 109: return 128; case 77: return 1; - case 115: + case 114: return 2; default: ts.Debug.fail(); @@ -28210,24 +29630,6 @@ var ts; ts.Debug.assert(node.kind === 64 || node.kind === 7 || node.kind === 8); return getReferencesForNode(node, program.getSourceFiles(), false, findInStrings, findInComments); } - function initializeNameTable(sourceFile) { - var nameTable = {}; - walk(sourceFile); - sourceFile.nameTable = nameTable; - function walk(node) { - switch (node.kind) { - case 64: - nameTable[node.text] = node.text; - break; - case 8: - case 7: - nameTable[node.text] = node.text; - break; - default: - ts.forEachChild(node, walk); - } - } - } function getReferencesForNode(node, sourceFiles, searchOnlyInCurrentFile, findInStrings, findInComments) { if (isLabelName(node)) { if (isJumpStatementTarget(node)) { @@ -28254,7 +29656,7 @@ var ts; } var result; var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); - var declaredName = getDeclaredName(symbol); + var declaredName = getDeclaredName(symbol, node); var scope = getSymbolScope(symbol); if (scope) { result = []; @@ -28267,14 +29669,11 @@ var ts; getReferencesInNode(sourceFiles[0], symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } else { - var internedName = getInternedName(symbol, declarations); + var internedName = getInternedName(symbol, node, declarations); ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - ts.Debug.assert(sourceFile.nameTable !== undefined); - if (ts.lookUp(sourceFile.nameTable, internedName)) { + var nameTable = getNameTable(sourceFile); + if (ts.lookUp(nameTable, internedName)) { result = result || []; getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } @@ -28282,56 +29681,78 @@ var ts; } } return result; - function getDeclaredName(symbol) { - var name = typeInfoResolver.symbolToString(symbol); - return stripQuotes(name); + function isImportOrExportSpecifierName(location) { + return location.parent && + (location.parent.kind === 208 || location.parent.kind === 212) && + location.parent.propertyName === location; } - function getInternedName(symbol, declarations) { - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + function isImportOrExportSpecifierImportSymbol(symbol) { + return (symbol.flags & 8388608) && ts.forEach(symbol.declarations, function (declaration) { + return declaration.kind === 208 || declaration.kind === 212; + }); + } + function getDeclaredName(symbol, location) { + var functionExpression = ts.forEach(symbol.declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name; if (functionExpression && functionExpression.name) { - var name = functionExpression.name.text; + _name = functionExpression.name.text; } - else { - var name = symbol.name; + if (isImportOrExportSpecifierName(location)) { + return location.getText(); } - return stripQuotes(name); + _name = typeInfoResolver.symbolToString(symbol); + return stripQuotes(_name); + } + function getInternedName(symbol, location, declarations) { + if (isImportOrExportSpecifierName(location)) { + return location.getText(); + } + var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name = functionExpression && functionExpression.name + ? functionExpression.name.text + : symbol.name; + return stripQuotes(_name); } function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(length - 1) === 34) { - return name.substring(1, length - 1); + var _length = name.length; + if (_length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(_length - 1) === 34) { + return name.substring(1, _length - 1); } ; return name; } function getSymbolScope(symbol) { - if (symbol.getFlags() && (4 | 8192)) { + if (symbol.flags & (4 | 8192)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32) ? d : undefined; }); if (privateDeclaration) { return ts.getAncestor(privateDeclaration, 196); } } - if (symbol.parent || (symbol.getFlags() & 268435456)) { + if (symbol.flags & 8388608) { return undefined; } - var scope = undefined; - var declarations = symbol.getDeclarations(); - if (declarations) { - for (var i = 0, n = declarations.length; i < n; i++) { - var container = getContainerNode(declarations[i]); + if (symbol.parent || (symbol.flags & 268435456)) { + return undefined; + } + var _scope = undefined; + var _declarations = symbol.getDeclarations(); + if (_declarations) { + for (var _i = 0, _n = _declarations.length; _i < _n; _i++) { + var declaration = _declarations[_i]; + var container = getContainerNode(declaration); if (!container) { return undefined; } - if (scope && scope !== container) { + if (_scope && _scope !== container) { return undefined; } - if (container.kind === 220 && !ts.isExternalModule(container)) { + if (container.kind === 221 && !ts.isExternalModule(container)) { return undefined; } - scope = container; + _scope = container; } } - return scope; + return _scope; } function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { var positions = []; @@ -28356,22 +29777,22 @@ var ts; return positions; } function getLabelReferencesInNode(container, targetLabel) { - var result = []; + var _result = []; var sourceFile = container.getSourceFile(); var labelName = targetLabel.text; var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.getWidth() !== labelName.length) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.getWidth() !== labelName.length) { return; } - if (node === targetLabel || - (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - result.push(getReferenceEntryFromNode(node)); + if (_node === targetLabel || + (isJumpStatementTarget(_node) && getTargetLabel(_node, labelName) === targetLabel)) { + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function isValidReferencePosition(node, searchSymbolName) { if (node) { @@ -28469,21 +29890,21 @@ var ts; default: return undefined; } - var result = []; + var _result = []; var sourceFile = searchSpaceNode.getSourceFile(); var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 90) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 90) { return; } - var container = ts.getSuperContainer(node, false); + var container = ts.getSuperContainer(_node, false); if (container && (128 & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { - result.push(getReferenceEntryFromNode(node)); + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) { var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); @@ -28502,7 +29923,7 @@ var ts; staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; - case 220: + case 221: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } @@ -28512,48 +29933,49 @@ var ts; default: return undefined; } - var result = []; - if (searchSpaceNode.kind === 220) { + var _result = []; + var possiblePositions; + if (searchSpaceNode.kind === 221) { ts.forEach(sourceFiles, function (sourceFile) { - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); - getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); + getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, _result); }); } else { var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, _result); } - return result; + return _result; function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) { ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 92) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 92) { return; } - var container = ts.getThisContainer(node, false); + var container = ts.getThisContainer(_node, false); switch (searchSpaceNode.kind) { case 160: case 195: if (searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 132: case 131: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 196: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128) === staticFlag) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; - case 220: - if (container.kind === 220 && !ts.isExternalModule(container)) { - result.push(getReferenceEntryFromNode(node)); + case 221: + if (container.kind === 221 && !ts.isExternalModule(container)) { + result.push(getReferenceEntryFromNode(_node)); } break; } @@ -28561,25 +29983,28 @@ var ts; } } function populateSearchSymbolSet(symbol, location) { - var result = [symbol]; + var _result = [symbol]; + if (isImportOrExportSpecifierImportSymbol(symbol)) { + _result.push(typeInfoResolver.getAliasedSymbol(symbol)); + } if (isNameOfPropertyAssignment(location)) { ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { - result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); + _result.push.apply(_result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); if (shorthandValueSymbol) { - result.push(shorthandValueSymbol); + _result.push(shorthandValueSymbol); } } ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { if (rootSymbol !== symbol) { - result.push(rootSymbol); + _result.push(rootSymbol); } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); } }); - return result; + return _result; } function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { if (symbol && symbol.flags & (32 | 64)) { @@ -28611,6 +30036,10 @@ var ts; if (searchSymbols.indexOf(referenceSymbol) >= 0) { return true; } + if (isImportOrExportSpecifierImportSymbol(referenceSymbol) && + searchSymbols.indexOf(typeInfoResolver.getAliasedSymbol(referenceSymbol)) >= 0) { + return true; + } if (isNameOfPropertyAssignment(referenceLocation)) { return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { return ts.forEach(typeInfoResolver.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0; }); @@ -28621,9 +30050,9 @@ var ts; return true; } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - var result = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); - return ts.forEach(result, function (s) { return searchSymbols.indexOf(s) >= 0; }); + var _result = []; + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); + return ts.forEach(_result, function (s) { return searchSymbols.indexOf(s) >= 0; }); } return false; }); @@ -28632,28 +30061,28 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeInfoResolver.getContextualType(objectLiteral); - var name = node.text; + var _name = node.text; if (contextualType) { if (contextualType.flags & 16384) { - var unionProperty = contextualType.getProperty(name); + var unionProperty = contextualType.getProperty(_name); if (unionProperty) { return [unionProperty]; } else { - var result = []; + var _result = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name); - if (symbol) { - result.push(symbol); + var _symbol = t.getProperty(_name); + if (_symbol) { + _result.push(_symbol); } }); - return result; + return _result; } } else { - var symbol = contextualType.getProperty(name); - if (symbol) { - return [symbol]; + var _symbol = contextualType.getProperty(_name); + if (_symbol) { + return [_symbol]; } } } @@ -28662,10 +30091,12 @@ var ts; } function getIntersectingMeaningFromDeclarations(meaning, declarations) { if (declarations) { + var lastIterationMeaning; do { - var lastIterationMeaning = meaning; - for (var i = 0, n = declarations.length; i < n; i++) { - var declarationMeaning = getMeaningFromDeclaration(declarations[i]); + lastIterationMeaning = meaning; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; + var declarationMeaning = getMeaningFromDeclaration(declaration); if (declarationMeaning & meaning) { meaning |= declarationMeaning; } @@ -28689,16 +30120,16 @@ var ts; }; } function isWriteAccess(node) { - if (node.kind === 64 && ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (node.kind === 64 && ts.isDeclarationName(node)) { return true; } - var parent = node.parent; - if (parent) { - if (parent.kind === 166 || parent.kind === 165) { + var _parent = node.parent; + if (_parent) { + if (_parent.kind === 166 || _parent.kind === 165) { return true; } - else if (parent.kind === 167 && parent.left === node) { - var operator = parent.operatorToken.kind; + else if (_parent.kind === 167 && _parent.left === node) { + var operator = _parent.operatorToken.kind; return 52 <= operator && operator <= 63; } } @@ -28735,9 +30166,9 @@ var ts; case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 133: @@ -28746,7 +30177,7 @@ var ts; case 195: case 160: case 161: - case 216: + case 217: return 1; case 127: case 197: @@ -28766,11 +30197,17 @@ var ts; else { return 4; } - case 202: + case 207: + case 208: + case 203: + case 204: + case 209: + case 210: return 1 | 2 | 4; - case 220: + case 221: return 4 | 1; } + return 1 | 2 | 4; ts.Debug.fail("Unknown declaration type"); } function isTypeReference(node) { @@ -28799,19 +30236,19 @@ var ts; ts.Debug.assert(node.kind === 64); if (node.parent.kind === 125 && node.parent.right === node && - node.parent.parent.kind === 202) { + node.parent.parent.kind === 203) { return 1 | 2 | 4; } return 4; } function getMeaningFromLocation(node) { - if (node.parent.kind === 208) { + if (node.parent.kind === 209) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { return getMeaningFromRightHandSideOfImportEquals(node); } - else if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + else if (ts.isDeclarationName(node)) { return getMeaningFromDeclaration(node.parent); } else if (isTypeReference(node)) { @@ -29095,8 +30532,8 @@ var ts; function processElement(element) { if (ts.textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { var children = element.getChildren(); - for (var i = 0, n = children.length; i < n; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (ts.isToken(child)) { classifyToken(child); } @@ -29120,8 +30557,8 @@ var ts; if (matchKind) { var parentElement = token.parent; var childNodes = parentElement.getChildren(sourceFile); - for (var i = 0, n = childNodes.length; i < n; i++) { - var current = childNodes[i]; + for (var _i = 0, _n = childNodes.length; _i < _n; _i++) { + var current = childNodes[_i]; if (current.kind === matchKind) { var range1 = ts.createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); var range2 = ts.createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); @@ -29155,7 +30592,7 @@ var ts; var start = new Date().getTime(); var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; @@ -29201,9 +30638,9 @@ var ts; continue; } var descriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; + for (var _i = 0, n = descriptors.length; _i < n; _i++) { + if (matchArray[_i + firstDescriptorCaptureIndex]) { + descriptor = descriptors[_i]; } } ts.Debug.assert(descriptor !== undefined); @@ -29226,12 +30663,12 @@ var ts; var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; + var _preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; + var regExpString = _preamble + messagePortion + endOfLineOrEndOfComment; return new RegExp(regExpString, "gim"); } function isLetterOrDigit(char) { @@ -29251,9 +30688,10 @@ var ts; if (declarations && declarations.length > 0) { var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); if (defaultLibFileName) { - for (var i = 0; i < declarations.length; i++) { - var sourceFile = declarations[i].getSourceFile(); - if (sourceFile && getCanonicalFileName(ts.normalizePath(sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var _sourceFile = current.getSourceFile(); + if (_sourceFile && getCanonicalFileName(ts.normalizePath(_sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); } } @@ -29320,8 +30758,43 @@ var ts; }; } ts.createLanguageService = createLanguageService; + function getNameTable(sourceFile) { + if (!sourceFile.nameTable) { + initializeNameTable(sourceFile); + } + return sourceFile.nameTable; + } + ts.getNameTable = getNameTable; + function initializeNameTable(sourceFile) { + var nameTable = {}; + walk(sourceFile); + sourceFile.nameTable = nameTable; + function walk(node) { + switch (node.kind) { + case 64: + nameTable[node.text] = node.text; + break; + case 8: + case 7: + if (ts.isDeclarationName(node) || + node.parent.kind === 213 || + isArgumentOfElementAccessExpression(node)) { + nameTable[node.text] = node.text; + } + break; + default: + ts.forEachChild(node, walk); + } + } + } + function isArgumentOfElementAccessExpression(node) { + return node && + node.parent && + node.parent.kind === 154 && + node.parent.argumentExpression === node; + } function createClassifier() { - var scanner = ts.createScanner(2, false); + var _scanner = ts.createScanner(2, false); var noRegexTable = []; noRegexTable[64] = true; noRegexTable[8] = true; @@ -29338,19 +30811,19 @@ var ts; var templateStack = []; function isAccessibilityModifier(kind) { switch (kind) { - case 109: - case 107: case 108: + case 106: + case 107: return true; } return false; } function canFollow(keyword1, keyword2) { if (isAccessibilityModifier(keyword1)) { - if (keyword2 === 116 || - keyword2 === 120 || - keyword2 === 114 || - keyword2 === 110) { + if (keyword2 === 115 || + keyword2 === 119 || + keyword2 === 113 || + keyword2 === 109) { return true; } return false; @@ -29388,17 +30861,17 @@ var ts; templateStack.push(11); break; } - scanner.setText(text); + _scanner.setText(text); var result = { finalLexState: 0, entries: [] }; var angleBracketStack = 0; do { - token = scanner.scan(); + token = _scanner.scan(); if (!ts.isTrivia(token)) { if ((token === 36 || token === 56) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 9) { + if (_scanner.reScanSlashToken() === 9) { token = 9; } } @@ -29415,11 +30888,11 @@ var ts; else if (token === 25 && angleBracketStack > 0) { angleBracketStack--; } - else if (token === 112 || - token === 121 || - token === 119 || - token === 113 || - token === 122) { + else if (token === 111 || + token === 120 || + token === 118 || + token === 112 || + token === 121) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 64; } @@ -29436,7 +30909,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 11) { - token = scanner.reScanTemplateToken(); + token = _scanner.reScanTemplateToken(); if (token === 13) { templateStack.pop(); } @@ -29456,13 +30929,13 @@ var ts; } while (token !== 1); return result; function processToken() { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); + var start = _scanner.getTokenPos(); + var end = _scanner.getTextPos(); addResult(end - start, classFromKind(token)); if (end >= text.length) { if (token === 8) { - var tokenText = scanner.getTokenText(); - if (scanner.isUnterminated()) { + var tokenText = _scanner.getTokenText(); + if (_scanner.isUnterminated()) { var lastCharIndex = tokenText.length - 1; var numBackslashes = 0; while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92) { @@ -29470,17 +30943,19 @@ var ts; } if (numBackslashes & 1) { var quoteChar = tokenText.charCodeAt(0); - result.finalLexState = quoteChar === 34 ? 3 : 2; + result.finalLexState = quoteChar === 34 + ? 3 + : 2; } } } else if (token === 3) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { result.finalLexState = 1; } } else if (ts.isTemplateLiteralKind(token)) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { if (token === 13) { result.finalLexState = 5; } @@ -29612,7 +31087,7 @@ var ts; getNodeConstructor: function (kind) { function Node() { } - var proto = kind === 220 ? new SourceFileObject() : new NodeObject(); + var proto = kind === 221 ? new SourceFileObject() : new NodeObject(); proto.kind = kind; proto.pos = 0; proto.end = 0; @@ -29704,13 +31179,7 @@ var ts; return this.compilationSettings; }; LSHost.prototype.getScriptFileNames = function () { - var filenames = []; - for (var filename in this.filenameToScript) { - if (this.filenameToScript[filename] && this.filenameToScript[filename].isOpen) { - filenames.push(filename); - } - } - return filenames; + return this.roots.map(function (root) { return root.fileName; }); }; LSHost.prototype.getScriptVersion = function (filename) { return this.getScriptInfo(filename).svc.latestVersion().toString(); @@ -29979,7 +31448,7 @@ var ts; var r = this.openFileRoots[i]; if (info.defaultProject.getSourceFile(r)) { this.inferredProjects = - copyListRemovingItem(r.defaultProject, this.inferredProjects); + copyListRemovingItem(r.defaultProject, this.inferredProjects); this.openFilesReferenced.push(r); r.defaultProject = info.defaultProject; } @@ -30044,15 +31513,20 @@ var ts; ProjectService.prototype.updateProjectStructure = function () { this.log("updating project structure from ...", "Info"); this.printProjects(); + var openFilesReferenced = []; + var unattachedOpenFiles = []; for (var i = 0, len = this.openFilesReferenced.length; i < len; i++) { - var refdFile = this.openFilesReferenced[i]; - refdFile.defaultProject.updateGraph(); - var sourceFile = refdFile.defaultProject.getSourceFile(refdFile); - if (!sourceFile) { - this.openFilesReferenced = copyListRemovingItem(refdFile, this.openFilesReferenced); - this.addOpenFile(refdFile); + var referencedFile = this.openFilesReferenced[i]; + referencedFile.defaultProject.updateGraph(); + var sourceFile = referencedFile.defaultProject.getSourceFile(referencedFile); + if (sourceFile) { + openFilesReferenced.push(referencedFile); + } + else { + unattachedOpenFiles.push(referencedFile); } } + this.openFilesReferenced = openFilesReferenced; var openFileRoots = []; for (var i = 0, len = this.openFileRoots.length; i < len; i++) { var rootFile = this.openFileRoots[i]; @@ -30068,6 +31542,9 @@ var ts; } } this.openFileRoots = openFileRoots; + for (var i = 0, len = unattachedOpenFiles.length; i < len; i++) { + this.addOpenFile(unattachedOpenFiles[i]); + } this.printProjects(); }; ProjectService.prototype.getScriptInfo = function (filename) { @@ -30525,6 +32002,13 @@ var ts; this.currentVersion = snap.version; this.versions[snap.version] = snap; this.changes = []; + if ((this.currentVersion - this.minVersion) >= ScriptVersionCache.maxVersions) { + var oldMin = this.minVersion; + this.minVersion = (this.currentVersion - ScriptVersionCache.maxVersions) + 1; + for (var j = oldMin; j < this.minVersion; j++) { + this.versions[j] = undefined; + } + } } return snap; }; @@ -30560,8 +32044,10 @@ var ts; }; ScriptVersionCache.changeNumberThreshold = 8; ScriptVersionCache.changeLengthThreshold = 256; + ScriptVersionCache.maxVersions = 8; return ScriptVersionCache; })(); + server.ScriptVersionCache = ScriptVersionCache; var LineIndexSnapshot = (function () { function LineIndexSnapshot(version, cache) { this.version = version; @@ -30643,7 +32129,7 @@ var ts; }; LineIndex.prototype.getText = function (rangeStart, rangeLength) { var accum = ""; - if (rangeLength > 0) { + if ((rangeLength > 0) && (rangeStart < this.root.charCount())) { this.walk(rangeStart, rangeLength, { goSubtree: true, done: false, @@ -30686,7 +32172,19 @@ var ts; var checkText = editFlat(this.getText(0, this.root.charCount()), pos, deleteLength, newText); } var walker = new EditWalker(); - if (deleteLength > 0) { + if (pos >= this.root.charCount()) { + pos = this.root.charCount() - 1; + var endString = this.getText(pos, 1); + if (newText) { + newText = endString + newText; + } + else { + newText = endString; + } + deleteLength = 0; + walker.suppressTrailingText = true; + } + else if (deleteLength > 0) { var e = pos + deleteLength; var lineInfo = this.charOffsetToLineNumberAndPos(e); if ((lineInfo && (lineInfo.col == 0))) { @@ -30699,20 +32197,10 @@ var ts; } } } - else if (pos >= this.root.charCount()) { - var endString = this.getText(pos - 1, 1); - if (newText) { - newText = endString + newText; - } - else { - newText = endString; - } - pos = pos - 1; - deleteLength = 0; - walker.suppressTrailingText = true; + if (pos < this.root.charCount()) { + this.root.walk(pos, deleteLength, walker); + walker.insertLines(newText); } - this.root.walk(pos, deleteLength, walker); - walker.insertLines(newText); if (this.checkEdits) { var updatedText = this.getText(0, this.root.charCount()); ts.Debug.assert(checkText == updatedText, "buffer edit mismatch"); @@ -30770,6 +32258,7 @@ var ts; }; return LineIndex; })(); + server.LineIndex = LineIndex; var LineNode = (function () { function LineNode() { this.totalChars = 0; @@ -31180,6 +32669,9 @@ var ts; }; Session.prototype.send = function (msg) { var json = JSON.stringify(msg); + if (this.logger.isVerbose()) { + this.logger.info(msg.type + ": " + json); + } this.sendLineToClient('Content-Length: ' + (1 + Buffer.byteLength(json, 'utf8')) + '\r\n\r\n' + json); }; @@ -31214,17 +32706,27 @@ var ts; this.response(body, commandName, requestSequence, errorMessage); }; Session.prototype.semanticCheck = function (file, project) { - var diags = project.compilerService.languageService.getSemanticDiagnostics(file); - if (diags) { - var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); }); - this.event({ file: file, diagnostics: bakedDiags }, "semanticDiag"); + try { + var diags = project.compilerService.languageService.getSemanticDiagnostics(file); + if (diags) { + var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); }); + this.event({ file: file, diagnostics: bakedDiags }, "semanticDiag"); + } + } + catch (err) { + this.logError(err, "semantic check"); } }; Session.prototype.syntacticCheck = function (file, project) { - var diags = project.compilerService.languageService.getSyntacticDiagnostics(file); - if (diags) { - var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); }); - this.event({ file: file, diagnostics: bakedDiags }, "syntaxDiag"); + try { + var diags = project.compilerService.languageService.getSyntacticDiagnostics(file); + if (diags) { + var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); }); + this.event({ file: file, diagnostics: bakedDiags }, "syntaxDiag"); + } + } + catch (err) { + this.logError(err, "syntactic check"); } }; Session.prototype.errorCheck = function (file, project) { @@ -31317,11 +32819,11 @@ var ts; if (!renameLocations) { return undefined; } - var bakedRenameLocs = renameLocations.map(function (location) { return { + var bakedRenameLocs = renameLocations.map(function (location) { return ({ file: location.fileName, start: compilerService.host.positionToLineCol(location.fileName, location.textSpan.start), end: compilerService.host.positionToLineCol(location.fileName, ts.textSpanEnd(location.textSpan)) - }; }).sort(function (a, b) { + }); }).sort(function (a, b) { if (a.file < b.file) { return -1; } @@ -31454,16 +32956,39 @@ var ts; var position = compilerService.host.lineColToPosition(file, line, col); var edits = compilerService.languageService.getFormattingEditsAfterKeystroke(file, position, key, compilerService.formatCodeOptions); if ((key == "\n") && ((!edits) || (edits.length == 0) || allEditsBeforePos(edits, position))) { - var editorOptions = { - IndentSize: 4, - TabSize: 4, - NewLineCharacter: "\n", - ConvertTabsToSpaces: true - }; - var indentPosition = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); - var spaces = generateSpaces(indentPosition); - if (indentPosition > 0) { - edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces }); + var scriptInfo = compilerService.host.getScriptInfo(file); + if (scriptInfo) { + var lineInfo = scriptInfo.getLineInfo(line); + if (lineInfo && (lineInfo.leaf) && (lineInfo.leaf.text)) { + var lineText = lineInfo.leaf.text; + if (lineText.search("\\S") < 0) { + var editorOptions = { + IndentSize: 4, + TabSize: 4, + NewLineCharacter: "\n", + ConvertTabsToSpaces: true + }; + var indentPosition = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); + for (var i = 0, len = lineText.length; i < len; i++) { + if (lineText.charAt(i) == " ") { + indentPosition--; + } + else { + break; + } + } + if (indentPosition > 0) { + var spaces = generateSpaces(indentPosition); + edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces }); + } + else if (indentPosition < 0) { + edits.push({ + span: ts.createTextSpanFromBounds(position, position - indentPosition), + newText: "" + }); + } + } + } } } if (!edits) { @@ -31530,6 +33055,7 @@ var ts; } }; Session.prototype.change = function (line, col, endLine, endCol, insertString, fileName) { + var _this = this; var file = ts.normalizePath(fileName); var project = this.projectService.getProjectForFile(file); if (project) { @@ -31540,6 +33066,7 @@ var ts; compilerService.host.editScript(file, start, end, insertString); this.changeSeq++; } + this.updateProjectStructure(this.changeSeq, function (n) { return n == _this.changeSeq; }); } }; Session.prototype.reload = function (fileName, tempFileName, reqSeq) { @@ -31651,6 +33178,10 @@ var ts; }); }); }; Session.prototype.onMessage = function (message) { + if (this.logger.isVerbose()) { + this.logger.info("request: " + message); + var start = process.hrtime(); + } try { var request = JSON.parse(message); var response; @@ -31753,6 +33284,17 @@ var ts; break; } } + if (this.logger.isVerbose()) { + var elapsed = process.hrtime(start); + var seconds = elapsed[0]; + var nanoseconds = elapsed[1]; + var elapsedMs = ((1e9 * seconds) + nanoseconds) / 1000000.0; + var leader = "Elapsed time (in milliseconds)"; + if (!responseRequired) { + leader = "Async elapsed time (in milliseconds)"; + } + this.logger.msg(leader + ": " + elapsedMs.toFixed(4).toString(), "Perf"); + } if (response) { this.output(response, request.command, request.seq); } @@ -31786,8 +33328,9 @@ var ts; terminal: false }); var Logger = (function () { - function Logger(logFilename) { + function Logger(logFilename, level) { this.logFilename = logFilename; + this.level = level; this.fd = -1; this.seq = 0; this.inGroup = false; @@ -31816,10 +33359,18 @@ var ts; this.seq++; this.firstInGroup = true; }; + Logger.prototype.loggingEnabled = function () { + return !!this.logFilename; + }; + Logger.prototype.isVerbose = function () { + return this.loggingEnabled() && (this.level == "verbose"); + }; Logger.prototype.msg = function (s, type) { if (type === void 0) { type = "Err"; } if (this.fd < 0) { - this.fd = fs.openSync(this.logFilename, "w"); + if (this.logFilename) { + this.fd = fs.openSync(this.logFilename, "w"); + } } if (this.fd >= 0) { s = s + "\n"; @@ -31923,14 +33474,51 @@ var ts; _this.onMessage(message); }); rl.on('close', function () { - _this.projectService.closeLog(); _this.projectService.log("Exiting..."); + _this.projectService.closeLog(); process.exit(0); }); }; return IOSession; })(server.Session); - var logger = new Logger(__dirname + "/.log" + process.pid.toString()); + function parseLoggingEnvironmentString(logEnvStr) { + var logEnv = {}; + var args = logEnvStr.split(' '); + for (var i = 0, len = args.length; i < (len - 1); i += 2) { + var option = args[i]; + var value = args[i + 1]; + if (option && value) { + switch (option) { + case "-file": + logEnv.file = value; + break; + case "-level": + logEnv.detailLevel = value; + break; + } + } + } + return logEnv; + } + function createLoggerFromEnv() { + var fileName = undefined; + var detailLevel = "normal"; + var logEnvStr = process.env["TSS_LOG"]; + if (logEnvStr) { + var logEnv = parseLoggingEnvironmentString(logEnvStr); + if (logEnv.file) { + fileName = logEnv.file; + } + else { + fileName = __dirname + "/.log" + process.pid.toString(); + } + if (logEnv.detailLevel) { + detailLevel = logEnv.detailLevel; + } + } + return new Logger(fileName, detailLevel); + } + var logger = createLoggerFromEnv(); var watchedFileSet = new WatchedFileSet(); ts.sys.watchFile = function (fileName, callback) { var watchedFile = watchedFileSet.addFile(fileName, callback); @@ -31938,6 +33526,10 @@ var ts; close: function () { return watchedFileSet.removeFile(watchedFile); } }; }; - new IOSession(ts.sys, logger).listen(); + var ioSession = new IOSession(ts.sys, logger); + process.on('uncaughtException', function (err) { + ioSession.logError(err, "unknown"); + }); + ioSession.listen(); })(server = ts.server || (ts.server = {})); })(ts || (ts = {})); diff --git a/bin/typescript.d.ts b/bin/typescript.d.ts index 8da331c74e1..8f71dc4ee08 100644 --- a/bin/typescript.d.ts +++ b/bin/typescript.d.ts @@ -124,28 +124,28 @@ declare module "typescript" { WhileKeyword = 99, WithKeyword = 100, AsKeyword = 101, - FromKeyword = 102, - ImplementsKeyword = 103, - InterfaceKeyword = 104, - LetKeyword = 105, - PackageKeyword = 106, - PrivateKeyword = 107, - ProtectedKeyword = 108, - PublicKeyword = 109, - StaticKeyword = 110, - YieldKeyword = 111, - AnyKeyword = 112, - BooleanKeyword = 113, - ConstructorKeyword = 114, - DeclareKeyword = 115, - GetKeyword = 116, - ModuleKeyword = 117, - RequireKeyword = 118, - NumberKeyword = 119, - SetKeyword = 120, - StringKeyword = 121, - SymbolKeyword = 122, - TypeKeyword = 123, + ImplementsKeyword = 102, + InterfaceKeyword = 103, + LetKeyword = 104, + PackageKeyword = 105, + PrivateKeyword = 106, + ProtectedKeyword = 107, + PublicKeyword = 108, + StaticKeyword = 109, + YieldKeyword = 110, + AnyKeyword = 111, + BooleanKeyword = 112, + ConstructorKeyword = 113, + DeclareKeyword = 114, + GetKeyword = 115, + ModuleKeyword = 116, + RequireKeyword = 117, + NumberKeyword = 118, + SetKeyword = 119, + StringKeyword = 120, + SymbolKeyword = 121, + TypeKeyword = 122, + FromKeyword = 123, OfKeyword = 124, QualifiedName = 125, ComputedPropertyName = 126, @@ -224,35 +224,36 @@ declare module "typescript" { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, LastReservedWord = 100, FirstKeyword = 65, LastKeyword = 124, - FirstFutureReservedWord = 103, - LastFutureReservedWord = 111, + FirstFutureReservedWord = 102, + LastFutureReservedWord = 110, FirstTypeNode = 139, LastTypeNode = 147, FirstPunctuation = 14, @@ -276,15 +277,16 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -412,7 +414,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -505,7 +507,9 @@ declare module "typescript" { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { @@ -515,6 +519,7 @@ declare module "typescript" { interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; + hasExtendedUnicodeEscape?: boolean; } interface StringLiteralExpression extends LiteralExpression { _stringLiteralExpressionBrand: any; @@ -541,6 +546,7 @@ declare module "typescript" { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -614,6 +620,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -636,16 +645,15 @@ declare module "typescript" { catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; + interface CatchClause extends Node { + variableDeclaration: VariableDeclaration; block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -675,10 +683,7 @@ declare module "typescript" { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -703,7 +708,7 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -718,8 +723,9 @@ declare module "typescript" { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression: Expression; } interface FileReference extends TextRange { fileName: string; @@ -727,7 +733,7 @@ declare module "typescript" { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -832,6 +838,7 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; + getExportsOfExternalModule(node: ImportDeclaration): Symbol[]; } interface SymbolDisplayBuilder { buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; @@ -889,10 +896,10 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -903,6 +910,7 @@ declare module "typescript" { isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isUnknownIdentifier(location: Node, name: string): boolean; + getBlockScopedVariableId(node: Identifier): number; } const enum SymbolFlags { FunctionScopedVariable = 1, @@ -928,13 +936,14 @@ declare module "typescript" { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -959,7 +968,7 @@ declare module "typescript" { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -988,10 +997,9 @@ declare module "typescript" { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1007,6 +1015,7 @@ declare module "typescript" { SuperStatic = 32, ContextChecked = 64, EnumValuesComputed = 128, + BlockScopedBindingInLoop = 256, } interface NodeLinks { resolvedType?: Type; @@ -1191,7 +1200,6 @@ declare module "typescript" { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1383,6 +1391,7 @@ declare module "typescript" { getTokenPos(): number; getTokenText(): string; getTokenValue(): string; + hasExtendedUnicodeEscape(): boolean; hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; @@ -1431,13 +1440,16 @@ declare module "typescript" { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1479,9 +1491,6 @@ declare module "typescript" { getDocumentationComment(): SymbolDisplayPart[]; } interface SourceFile { - version: string; - scriptSnapshot: IScriptSnapshot; - nameTable: Map; getNamedDeclarations(): Declaration[]; getLineAndCharacterOfPosition(pos: number): LineAndCharacter; getLineStarts(): number[]; @@ -1835,25 +1844,17 @@ declare module "typescript" { acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; /** * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will intern call updateLanguageServiceSourceFile + * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * - * Note: It is not allowed to call update on a SourceFile that was not acquired from this - * registry originally. - * - * @param sourceFile The original sourceFile object to update * @param fileName The name of the file requested * @param compilationSettings Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. - * @parm scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm textChangeRange Change ranges since the last snapshot. Only used if the file - * was not found in the registry and a new one was created. + * @param scriptSnapshot Text of the file. + * @param version Current version of the file. */ - updateDocument(sourceFile: SourceFile, fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; /** * Informs the DocumentRegistry that a file is not needed any longer. * @@ -1935,7 +1936,7 @@ declare module "typescript" { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; diff --git a/bin/typescript.js b/bin/typescript.js index 4ee694a8f19..9e939631006 100644 --- a/bin/typescript.js +++ b/bin/typescript.js @@ -118,28 +118,28 @@ var ts; SyntaxKind[SyntaxKind["WhileKeyword"] = 99] = "WhileKeyword"; SyntaxKind[SyntaxKind["WithKeyword"] = 100] = "WithKeyword"; SyntaxKind[SyntaxKind["AsKeyword"] = 101] = "AsKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 102] = "FromKeyword"; - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 103] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 104] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 105] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 106] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 107] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 108] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 109] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 110] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 111] = "YieldKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 112] = "AnyKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 113] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 114] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 115] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 116] = "GetKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 117] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 118] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 119] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 120] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 121] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 122] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 123] = "TypeKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 102] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 103] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 104] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 105] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 106] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 107] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 108] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 109] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 110] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 111] = "AnyKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 112] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 113] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 114] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 115] = "GetKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 116] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 117] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 118] = "NumberKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 119] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 120] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 121] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 122] = "TypeKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 123] = "FromKeyword"; SyntaxKind[SyntaxKind["OfKeyword"] = 124] = "OfKeyword"; SyntaxKind[SyntaxKind["QualifiedName"] = 125] = "QualifiedName"; SyntaxKind[SyntaxKind["ComputedPropertyName"] = 126] = "ComputedPropertyName"; @@ -218,35 +218,36 @@ var ts; SyntaxKind[SyntaxKind["EnumDeclaration"] = 199] = "EnumDeclaration"; SyntaxKind[SyntaxKind["ModuleDeclaration"] = 200] = "ModuleDeclaration"; SyntaxKind[SyntaxKind["ModuleBlock"] = 201] = "ModuleBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 202] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 203] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 204] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 205] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 206] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 207] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 208] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 209] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 210] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 211] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["CaseClause"] = 213] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 214] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 215] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 216] = "CatchClause"; - SyntaxKind[SyntaxKind["PropertyAssignment"] = 217] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 218] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["EnumMember"] = 219] = "EnumMember"; - SyntaxKind[SyntaxKind["SourceFile"] = 220] = "SourceFile"; - SyntaxKind[SyntaxKind["SyntaxList"] = 221] = "SyntaxList"; - SyntaxKind[SyntaxKind["Count"] = 222] = "Count"; + SyntaxKind[SyntaxKind["CaseBlock"] = 202] = "CaseBlock"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 203] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 204] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 205] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 206] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 207] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 208] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 209] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 210] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 211] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 212] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 213] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["CaseClause"] = 214] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 215] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 216] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 217] = "CatchClause"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 218] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 219] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 220] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 221] = "SourceFile"; + SyntaxKind[SyntaxKind["SyntaxList"] = 222] = "SyntaxList"; + SyntaxKind[SyntaxKind["Count"] = 223] = "Count"; SyntaxKind[SyntaxKind["FirstAssignment"] = 52] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 63] = "LastAssignment"; SyntaxKind[SyntaxKind["FirstReservedWord"] = 65] = "FirstReservedWord"; SyntaxKind[SyntaxKind["LastReservedWord"] = 100] = "LastReservedWord"; SyntaxKind[SyntaxKind["FirstKeyword"] = 65] = "FirstKeyword"; SyntaxKind[SyntaxKind["LastKeyword"] = 124] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 103] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 111] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 102] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 110] = "LastFutureReservedWord"; SyntaxKind[SyntaxKind["FirstTypeNode"] = 139] = "FirstTypeNode"; SyntaxKind[SyntaxKind["LastTypeNode"] = 147] = "LastTypeNode"; SyntaxKind[SyntaxKind["FirstPunctuation"] = 14] = "FirstPunctuation"; @@ -271,15 +272,16 @@ var ts; NodeFlags[NodeFlags["Private"] = 32] = "Private"; NodeFlags[NodeFlags["Protected"] = 64] = "Protected"; NodeFlags[NodeFlags["Static"] = 128] = "Static"; - NodeFlags[NodeFlags["MultiLine"] = 256] = "MultiLine"; - NodeFlags[NodeFlags["Synthetic"] = 512] = "Synthetic"; - NodeFlags[NodeFlags["DeclarationFile"] = 1024] = "DeclarationFile"; - NodeFlags[NodeFlags["Let"] = 2048] = "Let"; - NodeFlags[NodeFlags["Const"] = 4096] = "Const"; - NodeFlags[NodeFlags["OctalLiteral"] = 8192] = "OctalLiteral"; - NodeFlags[NodeFlags["Modifier"] = 243] = "Modifier"; + NodeFlags[NodeFlags["Default"] = 256] = "Default"; + NodeFlags[NodeFlags["MultiLine"] = 512] = "MultiLine"; + NodeFlags[NodeFlags["Synthetic"] = 1024] = "Synthetic"; + NodeFlags[NodeFlags["DeclarationFile"] = 2048] = "DeclarationFile"; + NodeFlags[NodeFlags["Let"] = 4096] = "Let"; + NodeFlags[NodeFlags["Const"] = 8192] = "Const"; + NodeFlags[NodeFlags["OctalLiteral"] = 16384] = "OctalLiteral"; + NodeFlags[NodeFlags["Modifier"] = 499] = "Modifier"; NodeFlags[NodeFlags["AccessibilityModifier"] = 112] = "AccessibilityModifier"; - NodeFlags[NodeFlags["BlockScoped"] = 6144] = "BlockScoped"; + NodeFlags[NodeFlags["BlockScoped"] = 12288] = "BlockScoped"; })(ts.NodeFlags || (ts.NodeFlags = {})); var NodeFlags = ts.NodeFlags; (function (ParserContextFlags) { @@ -353,13 +355,14 @@ var ts; SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType"; SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace"; - SymbolFlags[SymbolFlags["Import"] = 8388608] = "Import"; + SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias"; SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated"; SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged"; SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient"; SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype"; SymbolFlags[SymbolFlags["UnionProperty"] = 268435456] = "UnionProperty"; SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional"; + SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar"; SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; SymbolFlags[SymbolFlags["Value"] = 107455] = "Value"; @@ -384,7 +387,7 @@ var ts; SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes"; SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530912] = "TypeParameterExcludes"; SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793056] = "TypeAliasExcludes"; - SymbolFlags[SymbolFlags["ImportExcludes"] = 8388608] = "ImportExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes"; SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember"; SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; SymbolFlags[SymbolFlags["HasLocals"] = 255504] = "HasLocals"; @@ -404,6 +407,7 @@ var ts; NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 32] = "SuperStatic"; NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 64] = "ContextChecked"; NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 128] = "EnumValuesComputed"; + NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 256] = "BlockScopedBindingInLoop"; })(ts.NodeCheckFlags || (ts.NodeCheckFlags = {})); var NodeCheckFlags = ts.NodeCheckFlags; (function (TypeFlags) { @@ -621,8 +625,9 @@ var ts; ts.forEach = forEach; function contains(array, value) { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (v === value) { return true; } } @@ -644,8 +649,9 @@ var ts; function countWhere(array, predicate) { var count = 0; if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (predicate(array[i])) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (predicate(v)) { count++; } } @@ -654,12 +660,13 @@ var ts; } ts.countWhere = countWhere; function filter(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (f(item)) { - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (f(_item)) { + result.push(_item); } } } @@ -667,10 +674,12 @@ var ts; } ts.filter = filter; function map(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - result.push(f(array[i])); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result.push(f(v)); } } return result; @@ -685,12 +694,14 @@ var ts; } ts.concatenate = concatenate; function deduplicate(array) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (!contains(result, item)) - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (!contains(result, _item)) { + result.push(_item); + } } } return result; @@ -698,15 +709,17 @@ var ts; ts.deduplicate = deduplicate; function sum(array, prop) { var result = 0; - for (var i = 0; i < array.length; i++) { - result += array[i][prop]; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result += v[prop]; } return result; } ts.sum = sum; function addRange(to, from) { - for (var i = 0, n = from.length; i < n; i++) { - to.push(from[i]); + for (var _i = 0, _n = from.length; _i < _n; _i++) { + var v = from[_i]; + to.push(v); } } ts.addRange = addRange; @@ -767,9 +780,9 @@ var ts; for (var id in first) { result[id] = first[id]; } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; + for (var _id in second) { + if (!hasProperty(result, _id)) { + result[_id] = second[_id]; } } return result; @@ -825,12 +838,17 @@ var ts; } ts.localizedDiagnosticMessages = undefined; function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] ? ts.localizedDiagnosticMessages[message] : message; + return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] + ? ts.localizedDiagnosticMessages[message] + : message; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + var end = start + length; Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); + Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); + Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -966,21 +984,23 @@ var ts; function getNormalizedParts(normalizedSlashedPath, rootLength) { var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); var normalized = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; + for (var _i = 0, _n = parts.length; _i < _n; _i++) { + var part = parts[_i]; if (part !== ".") { if (part === ".." && normalized.length > 0 && normalized[normalized.length - 1] !== "..") { normalized.pop(); } else { - normalized.push(part); + if (part) { + normalized.push(part); + } } } } return normalized; } function normalizePath(path) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); var normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); @@ -1003,7 +1023,7 @@ var ts; return [path.substr(0, rootLength)].concat(normalizedParts); } function getNormalizedPathComponents(path, currentDirectory) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { path = combinePaths(normalizeSlashes(currentDirectory), path); @@ -1106,8 +1126,8 @@ var ts; ts.fileExtensionIs = fileExtensionIs; var supportedExtensions = [".d.ts", ".ts", ".js"]; function removeFileExtension(path) { - for (var i = 0; i < supportedExtensions.length; i++) { - var ext = supportedExtensions[i]; + for (var _i = 0, _n = supportedExtensions.length; _i < _n; _i++) { + var ext = supportedExtensions[_i]; if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); } @@ -1116,7 +1136,7 @@ var ts; } ts.removeFileExtension = removeFileExtension; var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\0-\19\t\v\f\b\0\r\n\u2028\u2029\u0085]/g; + var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var escapedCharsMap = { "\0": "\\0", "\t": "\\t", @@ -1131,20 +1151,6 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" }; - function escapeString(s) { - s = backslashOrDoubleQuote.test(s) ? s.replace(backslashOrDoubleQuote, getReplacement) : s; - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || unicodeEscape(c); - } - function unicodeEscape(c) { - var hexCharCode = c.charCodeAt(0).toString(16); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - } - ts.escapeString = escapeString; function getDefaultLibFileName(options) { return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; } @@ -1279,15 +1285,16 @@ var ts; function visitDirectory(path) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var i = 0; i < files.length; i++) { - var name = files[i]; - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(ts.combinePaths(path, name)); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var _name = files[_i]; + if (!extension || ts.fileExtensionIs(_name, extension)) { + result.push(ts.combinePaths(path, _name)); } } var subfolders = getNames(folder.subfolders); - for (var i = 0; i < subfolders.length; i++) { - visitDirectory(ts.combinePaths(path, subfolders[i])); + for (var _a = 0, _b = subfolders.length; _a < _b; _a++) { + var current = subfolders[_a]; + visitDirectory(ts.combinePaths(path, current)); } } } @@ -1372,8 +1379,9 @@ var ts; function visitDirectory(path) { var files = _fs.readdirSync(path || ".").sort(); var directories = []; - for (var i = 0; i < files.length; i++) { - var name = ts.combinePaths(path, files[i]); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var current = files[_i]; + var name = ts.combinePaths(path, current); var stat = _fs.lstatSync(name); if (stat.isFile()) { if (!extension || ts.fileExtensionIs(name, extension)) { @@ -1384,8 +1392,9 @@ var ts; directories.push(name); } } - for (var i = 0; i < directories.length; i++) { - visitDirectory(directories[i]); + for (var _a = 0, _b = directories.length; _a < _b; _a++) { + var _current = directories[_a]; + visitDirectory(_current); } } } @@ -1464,7 +1473,6 @@ var ts; Trailing_comma_not_allowed: { code: 1009, category: 1, key: "Trailing comma not allowed." }, Asterisk_Slash_expected: { code: 1010, category: 1, key: "'*/' expected." }, Unexpected_token: { code: 1012, category: 1, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1, key: "Catch clause parameter cannot have a type annotation." }, A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1, key: "A rest parameter must be last in a parameter list." }, Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1, key: "Parameter cannot have question mark and initializer." }, A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1, key: "A required parameter cannot follow an optional parameter." }, @@ -1572,7 +1580,6 @@ var ts; const_declarations_must_be_initialized: { code: 1155, category: 1, key: "'const' declarations must be initialized" }, const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1, key: "'const' declarations can only be declared inside a block." }, let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1, key: "'let' declarations can only be declared inside a block." }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, Unterminated_template_literal: { code: 1160, category: 1, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: 1, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: 1, key: "An object member cannot be declared optional." }, @@ -1609,6 +1616,11 @@ var ts; External_module_0_has_no_default_export_or_export_assignment: { code: 1192, category: 1, key: "External module '{0}' has no default export or export assignment." }, An_export_declaration_cannot_have_modifiers: { code: 1193, category: 1, key: "An export declaration cannot have modifiers." }, Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: 1, key: "Export declarations are not permitted in an internal module." }, + Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: 1, key: "Catch clause variable name must be an identifier." }, + Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: 1, key: "Catch clause variable cannot have a type annotation." }, + Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: 1, key: "Catch clause variable cannot have an initializer." }, + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: 1, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, + Unterminated_Unicode_escape_sequence: { code: 1199, category: 1, key: "Unterminated Unicode escape sequence." }, Duplicate_identifier_0: { code: 2300, category: 1, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1, key: "Static members cannot reference class type parameters." }, @@ -1779,9 +1791,19 @@ var ts; Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: 1, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: 1, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: 1, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: 1, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: 1, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: 1, key: "Export declaration conflicts with exported declaration of '{0}'" }, + The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: 1, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, + Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: 1, key: "Invalid left-hand side in 'for...of' statement." }, + The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: 1, key: "The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator." }, + The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method: { code: 2489, category: 1, key: "The iterator returned by the right-hand side of a 'for...of' statement must have a 'next()' method." }, + The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: 1, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, + Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: 1, key: "Cannot redeclare identifier '{0}' in catch clause" }, + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: 1, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: 1, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, + Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: 1, key: "Type '{0}' is not an array type or a string type." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1851,6 +1873,7 @@ var ts; Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: 1, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, The_current_host_does_not_support_the_0_option: { code: 5001, category: 1, key: "The current host does not support the '{0}' option." }, Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1, key: "Cannot find the common subdirectory path for the input files." }, Cannot_read_file_0_Colon_1: { code: 5012, category: 1, key: "Cannot read file '{0}': {1}" }, @@ -1906,6 +1929,7 @@ var ts; File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: 2, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: 2, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: 2, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: 1, key: "Member '{0}' implicitly has an '{1}' type." }, @@ -1926,25 +1950,24 @@ var ts; You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: 1, key: "You cannot rename elements that are defined in the standard TypeScript library." }, yield_expressions_are_not_currently_supported: { code: 9000, category: 1, key: "'yield' expressions are not currently supported." }, Generators_are_not_currently_supported: { code: 9001, category: 1, key: "Generators are not currently supported." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." }, - for_of_statements_are_not_currently_supported: { code: 9003, category: 1, key: "'for...of' statements are not currently supported." } + The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." } }; })(ts || (ts = {})); var ts; (function (ts) { var textToToken = { - "any": 112, + "any": 111, "as": 101, - "boolean": 113, + "boolean": 112, "break": 65, "case": 66, "catch": 67, "class": 68, "continue": 70, "const": 69, - "constructor": 114, + "constructor": 113, "debugger": 71, - "declare": 115, + "declare": 114, "default": 72, "delete": 73, "do": 74, @@ -1955,43 +1978,43 @@ var ts; "false": 79, "finally": 80, "for": 81, - "from": 102, + "from": 123, "function": 82, - "get": 116, + "get": 115, "if": 83, - "implements": 103, + "implements": 102, "import": 84, "in": 85, "instanceof": 86, - "interface": 104, - "let": 105, - "module": 117, + "interface": 103, + "let": 104, + "module": 116, "new": 87, "null": 88, - "number": 119, - "package": 106, - "private": 107, - "protected": 108, - "public": 109, - "require": 118, + "number": 118, + "package": 105, + "private": 106, + "protected": 107, + "public": 108, + "require": 117, "return": 89, - "set": 120, - "static": 110, - "string": 121, + "set": 119, + "static": 109, + "string": 120, "super": 90, "switch": 91, - "symbol": 122, + "symbol": 121, "this": 92, "throw": 93, "true": 94, "try": 95, - "type": 123, + "type": 122, "typeof": 96, "var": 97, "void": 98, "while": 99, "with": 100, - "yield": 111, + "yield": 110, "of": 124, "{": 14, "}": 15, @@ -2071,17 +2094,21 @@ var ts; return false; } function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierStart) : + lookupInUnicodeMap(code, unicodeES3IdentifierStart); } ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierPart) : + lookupInUnicodeMap(code, unicodeES3IdentifierPart); } function makeReverseMap(source) { var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; + for (var _name in source) { + if (source.hasOwnProperty(_name)) { + result[source[_name]] = _name; } } return result; @@ -2257,8 +2284,8 @@ var ts; else { ts.Debug.assert(ch === 61); while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 62 && isConflictMarkerTrivia(text, pos)) { + var _ch = text.charCodeAt(pos); + if (_ch === 62 && isConflictMarkerTrivia(text, pos)) { break; } pos++; @@ -2364,6 +2391,7 @@ var ts; var token; var tokenValue; var precedingLineBreak; + var hasExtendedUnicodeEscape; var tokenIsUnterminated; function error(message, length) { if (onError) { @@ -2413,10 +2441,16 @@ var ts; } return +(text.substring(start, pos)); } - function scanHexDigits(count, mustMatchCount) { + function scanExactNumberOfHexDigits(count) { + return scanHexDigits(count, false); + } + function scanMinimumNumberOfHexDigits(count) { + return scanHexDigits(count, true); + } + function scanHexDigits(minCount, scanAsManyAsPossible) { var digits = 0; var value = 0; - while (digits < count || !mustMatchCount) { + while (digits < minCount || scanAsManyAsPossible) { var ch = text.charCodeAt(pos); if (ch >= 48 && ch <= 57) { value = value * 16 + ch - 48; @@ -2433,7 +2467,7 @@ var ts; pos++; digits++; } - if (digits < count) { + if (digits < minCount) { value = -1; } return value; @@ -2546,16 +2580,15 @@ var ts; return "\'"; case 34: return "\""; - case 120: case 117: - var ch = scanHexDigits(ch === 120 ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; + if (pos < len && text.charCodeAt(pos) === 123) { + hasExtendedUnicodeEscape = true; + pos++; + return scanExtendedUnicodeEscape(); } + return scanHexadecimalEscape(4); + case 120: + return scanHexadecimalEscape(2); case 13: if (pos < len && text.charCodeAt(pos) === 10) { pos++; @@ -2568,11 +2601,57 @@ var ts; return String.fromCharCode(ch); } } + function scanHexadecimalEscape(numDigits) { + var escapedValue = scanExactNumberOfHexDigits(numDigits); + if (escapedValue >= 0) { + return String.fromCharCode(escapedValue); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + } + function scanExtendedUnicodeEscape() { + var escapedValue = scanMinimumNumberOfHexDigits(1); + var isInvalidExtendedEscape = false; + if (escapedValue < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + isInvalidExtendedEscape = true; + } + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + isInvalidExtendedEscape = true; + } + else if (text.charCodeAt(pos) == 125) { + pos++; + } + else { + error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + return ""; + } + return utf16EncodeAsString(escapedValue); + } + function utf16EncodeAsString(codePoint) { + ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); + if (codePoint <= 65535) { + return String.fromCharCode(codePoint); + } + var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; + var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; + return String.fromCharCode(codeUnit1, codeUnit2); + } function peekUnicodeEscape() { if (pos + 5 < len && text.charCodeAt(pos + 1) === 117) { var start = pos; pos += 2; - var value = scanHexDigits(4, true); + var value = scanExactNumberOfHexDigits(4); pos = start; return value; } @@ -2604,8 +2683,8 @@ var ts; return result; } function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { + var _len = tokenValue.length; + if (_len >= 2 && _len <= 11) { var ch = tokenValue.charCodeAt(0); if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) { return token = textToToken[tokenValue]; @@ -2634,6 +2713,7 @@ var ts; } function scan() { startPos = pos; + hasExtendedUnicodeEscape = false; precedingLineBreak = false; tokenIsUnterminated = false; while (true) { @@ -2756,13 +2836,13 @@ var ts; pos += 2; var commentClosed = false; while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 && text.charCodeAt(pos + 1) === 47) { + var _ch = text.charCodeAt(pos); + if (_ch === 42 && text.charCodeAt(pos + 1) === 47) { pos += 2; commentClosed = true; break; } - if (isLineBreak(ch)) { + if (isLineBreak(_ch)) { precedingLineBreak = true; } pos++; @@ -2785,7 +2865,7 @@ var ts; case 48: if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; - var value = scanHexDigits(1, false); + var value = scanMinimumNumberOfHexDigits(1); if (value < 0) { error(ts.Diagnostics.Hexadecimal_digit_expected); value = 0; @@ -2795,22 +2875,22 @@ var ts; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) { pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { + var _value = scanBinaryOrOctalDigits(2); + if (_value < 0) { error(ts.Diagnostics.Binary_digit_expected); - value = 0; + _value = 0; } - tokenValue = "" + value; + tokenValue = "" + _value; return token = 7; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) { pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { + var _value_1 = scanBinaryOrOctalDigits(8); + if (_value_1 < 0) { error(ts.Diagnostics.Octal_digit_expected); - value = 0; + _value_1 = 0; } - tokenValue = "" + value; + tokenValue = "" + _value_1; return token = 7; } if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { @@ -2909,10 +2989,10 @@ var ts; case 126: return pos++, token = 47; case 92: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { + var cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } error(ts.Diagnostics.Invalid_character); @@ -3055,6 +3135,7 @@ var ts; getTokenPos: function () { return tokenPos; }, getTokenText: function () { return text.substring(tokenPos, pos); }, getTokenValue: function () { return tokenValue; }, + hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, isIdentifier: function () { return token === 64 || token > 100; }, isReservedWord: function () { return token >= 65 && token <= 100; }, @@ -3075,8 +3156,8 @@ var ts; (function (ts) { function getDeclarationOfKind(symbol, kind) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if (declaration.kind === kind) { return declaration; } @@ -3133,7 +3214,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 220) { + while (node && node.kind !== 221) { node = node.parent; } return node; @@ -3203,35 +3284,75 @@ var ts; return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); } ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 12288) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function getEnclosingBlockScopeContainer(node) { + var current = node; + while (current) { + if (isFunctionLike(current)) { + return current; + } + switch (current.kind) { + case 221: + case 202: + case 217: + case 200: + case 181: + case 182: + case 183: + return current; + case 174: + if (!isFunctionLike(current.parent)) { + return current; + } + } + current = current.parent; + } + } + ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; + function isCatchClauseVariableDeclaration(declaration) { + return declaration && + declaration.kind === 193 && + declaration.parent && + declaration.parent.kind === 217; + } + ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); } ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = getTokenPosOfNode(node, file); - var length = node.end - start; - return ts.createFileDiagnostic(file, start, length, 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) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); - var length = node.end - start; + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); return { - file: file, - start: start, - length: length, + file: sourceFile, + start: span.start, + length: span.length, code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText }; } ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getErrorSpanForNode(node) { - var errorSpan; + function getSpanOfTokenAtPosition(sourceFile, pos) { + var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text); + scanner.setTextPos(pos); + scanner.scan(); + var start = scanner.getTokenPos(); + return createTextSpanFromBounds(start, scanner.getTextPos()); + } + ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForNode(sourceFile, node) { + var errorNode = node; switch (node.kind) { case 193: case 150: @@ -3239,11 +3360,19 @@ var ts; case 197: case 200: case 199: - case 219: - errorSpan = node.name; + case 220: + case 195: + case 160: + errorNode = node.name; break; } - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + if (errorNode === undefined) { + return getSpanOfTokenAtPosition(sourceFile, node.pos); + } + var pos = nodeIsMissing(errorNode) + ? errorNode.pos + : ts.skipTrivia(sourceFile.text, errorNode.pos); + return createTextSpanFromBounds(pos, errorNode.end); } ts.getErrorSpanForNode = getErrorSpanForNode; function isExternalModule(file) { @@ -3251,7 +3380,7 @@ var ts; } ts.isExternalModule = isExternalModule; function isDeclarationFile(file) { - return (file.flags & 1024) !== 0; + return (file.flags & 2048) !== 0; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { @@ -3281,11 +3410,11 @@ var ts; } ts.getCombinedNodeFlags = getCombinedNodeFlags; function isConst(node) { - return !!(getCombinedNodeFlags(node) & 4096); + return !!(getCombinedNodeFlags(node) & 8192); } ts.isConst = isConst; function isLet(node) { - return !!(getCombinedNodeFlags(node) & 2048); + return !!(getCombinedNodeFlags(node) & 4096); } ts.isLet = isLet; function isPrologueDirective(node) { @@ -3318,6 +3447,7 @@ var ts; switch (node.kind) { case 186: return visitor(node); + case 202: case 174: case 178: case 179: @@ -3327,17 +3457,34 @@ var ts; case 183: case 187: case 188: - case 213: case 214: + case 215: case 189: case 191: - case 216: + case 217: return ts.forEachChild(node, traverse); } } } ts.forEachReturnStatement = forEachReturnStatement; - function isAnyFunction(node) { + function isVariableLike(node) { + if (node) { + switch (node.kind) { + case 150: + case 220: + case 128: + case 218: + case 130: + case 129: + case 219: + case 193: + return true; + } + } + return false; + } + ts.isVariableLike = isVariableLike; + function isFunctionLike(node) { if (node) { switch (node.kind) { case 133: @@ -3361,9 +3508,9 @@ var ts; } return false; } - ts.isAnyFunction = isAnyFunction; + ts.isFunctionLike = isFunctionLike; function isFunctionBlock(node) { - return node && node.kind === 174 && isAnyFunction(node.parent); + return node && node.kind === 174 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { @@ -3373,7 +3520,7 @@ var ts; function getContainingFunction(node) { while (true) { node = node.parent; - if (!node || isAnyFunction(node)) { + if (!node || isFunctionLike(node)) { return node; } } @@ -3407,7 +3554,7 @@ var ts; case 134: case 135: case 199: - case 220: + case 221: return node; } } @@ -3492,16 +3639,16 @@ var ts; } case 7: case 8: - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: case 129: - case 219: - case 217: + case 220: + case 218: case 150: - return parent.initializer === node; + return _parent.initializer === node; case 177: case 178: case 179: @@ -3509,28 +3656,28 @@ var ts; case 186: case 187: case 188: - case 213: + case 214: case 190: case 188: - return parent.expression === node; + return _parent.expression === node; case 181: - var forStatement = parent; + var forStatement = _parent; return (forStatement.initializer === node && forStatement.initializer.kind !== 194) || forStatement.condition === node || forStatement.iterator === node; case 182: case 183: - var forInStatement = parent; + var forInStatement = _parent; return (forInStatement.initializer === node && forInStatement.initializer.kind !== 194) || forInStatement.expression === node; case 158: - return node === parent.expression; + return node === _parent.expression; case 173: - return node === parent.expression; + return node === _parent.expression; case 126: - return node === parent.expression; + return node === _parent.expression; default: - if (isExpression(parent)) { + if (isExpression(_parent)) { return true; } } @@ -3545,7 +3692,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind === 212; + return node.kind === 203 && node.moduleReference.kind === 213; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -3554,20 +3701,20 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind !== 212; + return node.kind === 203 && node.moduleReference.kind !== 213; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function getExternalModuleName(node) { - if (node.kind === 203) { + if (node.kind === 204) { return node.moduleSpecifier; } - if (node.kind === 202) { + if (node.kind === 203) { var reference = node.moduleReference; - if (reference.kind === 212) { + if (reference.kind === 213) { return reference.expression; } } - if (node.kind === 209) { + if (node.kind === 210) { return node.moduleSpecifier; } } @@ -3584,8 +3731,8 @@ var ts; case 132: case 131: return node.questionToken !== undefined; + case 219: case 218: - case 217: case 130: case 129: return node.questionToken !== undefined; @@ -3611,12 +3758,12 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return node.kind === 149 || node.kind === 148; + return !!node && (node.kind === 149 || node.kind === 148); } ts.isBindingPattern = isBindingPattern; function isInAmbientContext(node) { while (node) { - if (node.flags & (2 | 1024)) { + if (node.flags & (2 | 2048)) { return true; } node = node.parent; @@ -3626,31 +3773,33 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 127: - case 128: - case 193: + case 161: case 150: - case 130: - case 129: - case 217: - case 218: - case 219: + case 196: + case 133: + case 199: + case 220: + case 212: + case 195: + case 160: + case 134: + case 205: + case 203: + case 208: + case 197: case 132: case 131: - case 195: - case 134: - case 135: - case 133: - case 196: - case 197: - case 198: - case 199: case 200: - case 202: - case 204: - case 207: - case 205: - case 211: + case 206: + case 128: + case 218: + case 130: + case 129: + case 135: + case 219: + case 198: + case 127: + case 193: return true; } return false; @@ -3676,34 +3825,36 @@ var ts; case 175: case 180: case 187: - case 208: + case 209: return true; default: return false; } } ts.isStatement = isStatement; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + function isDeclarationName(name) { if (name.kind !== 64 && name.kind !== 8 && name.kind !== 7) { return false; } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 160) { - return parent.name === name; + var _parent = name.parent; + if (_parent.kind === 208 || _parent.kind === 212) { + if (_parent.propertyName) { + return true; + } } - if (parent.kind === 216) { - return parent.name === name; + if (isDeclaration(_parent)) { + return _parent.name === name; } return false; } - ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; + ts.isDeclarationName = isDeclarationName; function getClassBaseTypeNode(node) { var heritageClause = getHeritageClause(node.heritageClauses, 78); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassBaseTypeNode = getClassBaseTypeNode; function getClassImplementedTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 103); + var heritageClause = getHeritageClause(node.heritageClauses, 102); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementedTypeNodes = getClassImplementedTypeNodes; @@ -3714,9 +3865,10 @@ var ts; ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; function getHeritageClause(clauses, kind) { if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; + for (var _i = 0, _n = clauses.length; _i < _n; _i++) { + var clause = clauses[_i]; + if (clause.token === kind) { + return clause; } } } @@ -3817,13 +3969,14 @@ var ts; ts.isESSymbolIdentifier = isESSymbolIdentifier; function isModifier(token) { switch (token) { - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: case 77: - case 115: + case 114: case 69: + case 72: return true; } return false; @@ -3938,6 +4091,42 @@ var ts; return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; + function nodeStartsNewLexicalEnvironment(n) { + return isFunctionLike(n) || n.kind === 200 || n.kind === 221; + } + ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; + function nodeIsSynthesized(node) { + return node.pos === -1; + } + ts.nodeIsSynthesized = nodeIsSynthesized; + function createSynthesizedNode(kind, startsOnNewLine) { + var node = ts.createNode(kind); + node.pos = -1; + node.end = -1; + node.startsOnNewLine = startsOnNewLine; + return node; + } + ts.createSynthesizedNode = createSynthesizedNode; + function generateUniqueName(baseName, isExistingName) { + if (baseName.charCodeAt(0) !== 95) { + baseName = "_" + baseName; + if (!isExistingName(baseName)) { + return baseName; + } + } + if (baseName.charCodeAt(baseName.length - 1) !== 95) { + baseName += "_"; + } + var i = 1; + while (true) { + var _name = baseName + i; + if (!isExistingName(_name)) { + return _name; + } + i++; + } + } + ts.generateUniqueName = generateUniqueName; function createDiagnosticCollection() { var nonFileDiagnostics = []; var fileDiagnostics = {}; @@ -4003,10 +4192,45 @@ var ts; } } 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 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; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(222); + var nodeConstructors = new Array(223); ts.parseTime = 0; function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); @@ -4028,8 +4252,9 @@ var ts; } function visitEachNode(cbNode, nodes) { if (nodes) { - for (var i = 0, len = nodes.length; i < len; i++) { - var result = cbNode(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + var result = cbNode(node); if (result) { return result; } @@ -4053,8 +4278,8 @@ var ts; case 128: case 130: case 129: - case 217: case 218: + case 219: case 193: case 150: return visitNodes(cbNodes, node.modifiers) || @@ -4113,6 +4338,7 @@ var ts; return visitNodes(cbNodes, node.properties); case 153: return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); case 154: return visitNode(cbNode, node.expression) || @@ -4149,14 +4375,16 @@ var ts; visitNode(cbNode, node.right); case 168: return visitNode(cbNode, node.condition) || + visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || + visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); case 171: return visitNode(cbNode, node.expression); case 174: case 201: return visitNodes(cbNodes, node.statements); - case 220: + case 221: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); case 175: @@ -4199,11 +4427,13 @@ var ts; visitNode(cbNode, node.statement); case 188: return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.clauses); - case 213: + visitNode(cbNode, node.caseBlock); + case 202: + return visitNodes(cbNodes, node.clauses); + case 214: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 214: + case 215: return visitNodes(cbNodes, node.statements); case 189: return visitNode(cbNode, node.label) || @@ -4214,9 +4444,8 @@ var ts; return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 216: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type) || + case 217: + return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); case 196: return visitNodes(cbNodes, node.modifiers) || @@ -4238,49 +4467,49 @@ var ts; return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 219: + case 220: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); case 200: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 202: + case 203: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 203: + case 204: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 204: + case 205: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 205: - return visitNode(cbNode, node.name); case 206: - case 210: + return visitNode(cbNode, node.name); + case 207: + case 211: return visitNodes(cbNodes, node.elements); - case 209: + case 210: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 207: - case 211: + case 208: + case 212: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 208: + case 209: return visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportName); + visitNode(cbNode, node.expression); case 169: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); case 173: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); case 126: return visitNode(cbNode, node.expression); - case 215: + case 216: return visitNodes(cbNodes, node.types); - case 212: + case 213: return visitNode(cbNode, node.expression); } } @@ -4344,28 +4573,29 @@ var ts; ; function modifierToFlag(token) { switch (token) { - case 110: return 128; - case 109: return 16; - case 108: return 64; - case 107: return 32; + case 109: return 128; + case 108: return 16; + case 107: return 64; + case 106: return 32; case 77: return 1; - case 115: return 2; - case 69: return 4096; + case 114: return 2; + case 69: return 8192; + case 72: return 256; } return 0; } ts.modifierToFlag = modifierToFlag; function fixupParentReferences(sourceFile) { - var parent = sourceFile; + var _parent = sourceFile; forEachChild(sourceFile, visitNode); return; function visitNode(n) { - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; + if (n.parent !== _parent) { + n.parent = _parent; + var saveParent = _parent; + _parent = n; forEachChild(n, visitNode); - parent = saveParent; + _parent = saveParent; } } } @@ -4403,8 +4633,9 @@ var ts; array._children = undefined; array.pos += delta; array.end += delta; - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } } } @@ -4466,8 +4697,9 @@ var ts; array.intersectsChange = true; array._children = undefined; adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } return; } @@ -4668,7 +4900,7 @@ var ts; var identifierCount = 0; var nodeCount = 0; var token; - var sourceFile = createNode(220, 0); + var sourceFile = createNode(221, 0); sourceFile.pos = 0; sourceFile.end = sourceText.length; sourceFile.text = sourceText; @@ -4676,7 +4908,7 @@ var ts; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 1024 : 0; + sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 : 0; var contextFlags = 0; var parseErrorBeforeNextFinishedNode = false; var scanner = ts.createScanner(languageVersion, true, sourceText, scanError); @@ -4764,8 +4996,8 @@ var ts; } function parseErrorAtCurrentToken(message, arg0) { var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); + var _length = scanner.getTextPos() - start; + parseErrorAtPosition(start, _length, message, arg0); } function parseErrorAtPosition(start, length, message, arg0) { var lastError = ts.lastOrUndefined(sourceFile.parseDiagnostics); @@ -4804,7 +5036,9 @@ var ts; var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; var saveContextFlags = contextFlags; - var result = isLookAhead ? scanner.lookAhead(callback) : scanner.tryScan(callback); + var result = isLookAhead + ? scanner.lookAhead(callback) + : scanner.tryScan(callback); ts.Debug.assert(saveContextFlags === contextFlags); if (!result || isLookAhead) { token = saveToken; @@ -4823,10 +5057,10 @@ var ts; if (token === 64) { return true; } - if (token === 111 && inYieldContext()) { + if (token === 110 && inYieldContext()) { return false; } - return inStrictModeContext() ? token > 111 : token > 100; + return inStrictModeContext() ? token > 110 : token > 100; } function parseExpected(kind, diagnosticMessage) { if (token === kind) { @@ -4850,12 +5084,14 @@ var ts; } function parseOptionalToken(t) { if (token === t) { - var node = createNode(t); - nextToken(); - return finishNode(node); + return parseTokenNode(); } return undefined; } + function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { + return parseOptionalToken(t) || + createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); + } function parseTokenNode() { var node = createNode(token); nextToken(); @@ -4974,13 +5210,26 @@ var ts; } if (token === 77) { nextToken(); + if (token === 72) { + return lookAhead(nextTokenIsClassOrFunction); + } return token !== 35 && token !== 14 && canFollowModifier(); } + if (token === 72) { + return nextTokenIsClassOrFunction(); + } nextToken(); return canFollowModifier(); } function canFollowModifier() { - return token === 18 || token === 14 || token === 35 || isLiteralPropertyName(); + return token === 18 + || token === 14 + || token === 35 + || isLiteralPropertyName(); + } + function nextTokenIsClassOrFunction() { + nextToken(); + return token === 68 || token === 82; } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -5034,7 +5283,7 @@ var ts; return isIdentifier(); } function isNotHeritageClauseTypeName() { - if (token === 103 || + if (token === 102 || token === 78) { return lookAhead(nextTokenIsIdentifier); } @@ -5058,11 +5307,11 @@ var ts; case 4: return token === 15 || token === 66 || token === 72; case 8: - return token === 14 || token === 78 || token === 103; + return token === 14 || token === 78 || token === 102; case 9: return isVariableDeclaratorListTerminator(); case 16: - return token === 25 || token === 16 || token === 14 || token === 78 || token === 103; + return token === 25 || token === 16 || token === 14 || token === 78 || token === 102; case 12: return token === 17 || token === 22; case 14: @@ -5201,10 +5450,10 @@ var ts; function isReusableModuleElement(node) { if (node) { switch (node.kind) { + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 196: case 197: case 200: @@ -5232,8 +5481,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 213: case 214: + case 215: return true; } } @@ -5268,7 +5517,7 @@ var ts; return false; } function isReusableEnumMember(node) { - return node.kind === 219; + return node.kind === 220; } function isReusableTypeMember(node) { if (node) { @@ -5398,7 +5647,7 @@ var ts; literal = parseLiteralNode(); } else { - literal = createMissingNode(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); + literal = parseExpectedToken(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); } span.literal = literal; return finishNode(span); @@ -5407,14 +5656,19 @@ var ts; 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 === 7 && sourceText.charCodeAt(tokenPos) === 48 && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 8192; + if (node.kind === 7 + && sourceText.charCodeAt(tokenPos) === 48 + && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { + node.flags |= 16384; } return node; } @@ -5452,7 +5706,9 @@ var ts; } function parseParameterType() { if (parseOptional(51)) { - return token === 8 ? parseLiteralNode(true) : parseType(); + return token === 8 + ? parseLiteralNode(true) + : parseType(); } return undefined; } @@ -5567,11 +5823,11 @@ var ts; } function parsePropertyOrMethodSignature() { var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (token === 16 || token === 24) { var method = createNode(131, fullStart); - method.name = name; + method.name = _name; method.questionToken = questionToken; fillSignature(51, false, false, method); parseTypeMemberSemicolon(); @@ -5579,7 +5835,7 @@ var ts; } else { var property = createNode(129, fullStart); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); @@ -5622,7 +5878,9 @@ var ts; case 24: return parseSignatureMember(136); case 18: - return isIndexSignature() ? parseIndexSignatureDeclaration(undefined) : parsePropertyOrMethodSignature(); + return isIndexSignature() + ? parseIndexSignatureDeclaration(undefined) + : parsePropertyOrMethodSignature(); case 87: if (lookAhead(isStartOfConstructSignature)) { return parseSignatureMember(137); @@ -5644,7 +5902,9 @@ var ts; } function parseIndexSignatureWithModifiers() { var modifiers = parseModifiers(); - return isIndexSignature() ? parseIndexSignatureDeclaration(modifiers) : undefined; + return isIndexSignature() + ? parseIndexSignatureDeclaration(modifiers) + : undefined; } function isStartOfConstructSignature() { nextToken(); @@ -5692,11 +5952,11 @@ var ts; } function parseNonArrayType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 98: @@ -5715,11 +5975,11 @@ var ts; } function isStartOfType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 96: case 14: @@ -5840,7 +6100,7 @@ var ts; case 39: case 24: case 64: - case 111: + case 110: return true; default: if (isBinaryOperator()) { @@ -5887,7 +6147,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token === 111) { + if (token === 110) { if (inYieldContext()) { return true; } @@ -5902,6 +6162,11 @@ var ts; nextToken(); return !scanner.hasPrecedingLineBreak() && isIdentifier(); } + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === 14 || token === 18); + } function parseYieldExpression() { var node = createNode(170); nextToken(); @@ -5933,7 +6198,9 @@ var ts; if (triState === 0) { return undefined; } - var arrowFunction = triState === 1 ? parseParenthesizedArrowFunctionExpressionHead(true) : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); + var arrowFunction = triState === 1 + ? parseParenthesizedArrowFunctionExpressionHead(true) + : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); if (!arrowFunction) { return undefined; } @@ -6012,13 +6279,15 @@ var ts; return parseAssignmentExpressionOrHigher(); } function parseConditionalExpressionRest(leftOperand) { - if (!parseOptional(50)) { + var questionToken = parseOptionalToken(50); + if (!questionToken) { return leftOperand; } var node = createNode(168, leftOperand.pos); node.condition = leftOperand; + node.questionToken = questionToken; node.whenTrue = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(51); + node.colonToken = parseExpectedToken(51, false, ts.Diagnostics._0_expected, ts.tokenToString(51)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -6153,7 +6422,9 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token === 90 ? parseSuperExpression() : parseMemberExpressionOrHigher(); + var expression = token === 90 + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); } function parseMemberExpressionOrHigher() { @@ -6167,7 +6438,7 @@ var ts; } var node = createNode(153, expression.pos); node.expression = expression; - parseExpected(20, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.dotToken = parseExpectedToken(20, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -6181,10 +6452,11 @@ var ts; } function parseMemberExpressionRest(expression) { while (true) { - var dotOrBracketStart = scanner.getTokenPos(); - if (parseOptional(20)) { + var dotToken = parseOptionalToken(20); + if (dotToken) { var propertyAccess = createNode(153, expression.pos); propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; @@ -6206,7 +6478,9 @@ var ts; if (token === 10 || token === 11) { var tagExpression = createNode(157, expression.pos); tagExpression.tag = expression; - tagExpression.template = token === 10 ? parseLiteralNode() : parseTemplateExpression(); + tagExpression.template = token === 10 + ? parseLiteralNode() + : parseTemplateExpression(); expression = finishNode(tagExpression); continue; } @@ -6229,10 +6503,10 @@ var ts; continue; } else if (token === 16) { - var callExpr = createNode(155, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); + var _callExpr = createNode(155, expression.pos); + _callExpr.expression = expression; + _callExpr.arguments = parseArgumentList(); + expression = finishNode(_callExpr); continue; } return expression; @@ -6252,7 +6526,9 @@ var ts; if (!parseExpected(25)) { return undefined; } - return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined; + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } function canFollowTypeArgumentsInExpression() { switch (token) { @@ -6327,7 +6603,9 @@ var ts; return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token === 21 ? parseSpreadElement() : token === 23 ? createNode(172) : parseAssignmentExpressionOrHigher(); + return token === 21 ? parseSpreadElement() : + token === 23 ? createNode(172) : + parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return allowInAnd(parseArgumentOrArrayLiteralElement); @@ -6336,16 +6614,16 @@ var ts; var node = createNode(151); parseExpected(18); if (scanner.hasPrecedingLineBreak()) - node.flags |= 256; + node.flags |= 512; node.elements = parseDelimitedList(14, parseArgumentOrArrayLiteralElement); parseExpected(19); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, modifiers) { - if (parseContextualModifier(116)) { + if (parseContextualModifier(115)) { return parseAccessorDeclaration(134, fullStart, modifiers); } - else if (parseContextualModifier(120)) { + else if (parseContextualModifier(119)) { return parseAccessorDeclaration(135, fullStart, modifiers); } return undefined; @@ -6366,13 +6644,13 @@ var ts; return parseMethodDeclaration(fullStart, modifiers, asteriskToken, propertyName, questionToken); } if ((token === 23 || token === 15) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(218, fullStart); + var shorthandDeclaration = createNode(219, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(217, fullStart); + var propertyAssignment = createNode(218, fullStart); propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; parseExpected(51); @@ -6384,7 +6662,7 @@ var ts; var node = createNode(152); parseExpected(14); if (scanner.hasPrecedingLineBreak()) { - node.flags |= 256; + node.flags |= 512; } node.properties = parseDelimitedList(13, parseObjectLiteralElement, true); parseExpected(15); @@ -6471,7 +6749,7 @@ var ts; parseExpected(16); var initializer = undefined; if (token !== 22) { - if (token === 97 || token === 105 || token === 69) { + if (token === 97 || token === 104 || token === 69) { initializer = parseVariableDeclarationList(true); } else { @@ -6538,7 +6816,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(213); + var node = createNode(214); parseExpected(66); node.expression = allowInAnd(parseExpression); parseExpected(51); @@ -6546,7 +6824,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(214); + var node = createNode(215); parseExpected(72); parseExpected(51); node.statements = parseList(4, false, parseStatement); @@ -6561,9 +6839,11 @@ var ts; parseExpected(16); node.expression = allowInAnd(parseExpression); parseExpected(17); + var caseBlock = createNode(202, scanner.getStartPos()); parseExpected(14); - node.clauses = parseList(3, false, parseCaseOrDefaultClause); + caseBlock.clauses = parseList(3, false, parseCaseOrDefaultClause); parseExpected(15); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { @@ -6585,11 +6865,11 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(216); + var result = createNode(217); parseExpected(67); - parseExpected(16); - result.name = parseIdentifier(); - result.type = parseTypeAnnotation(); + if (parseExpected(16)) { + result.variableDeclaration = parseVariableDeclaration(); + } parseExpected(17); result.block = parseBlock(false, false); return finishNode(result); @@ -6628,7 +6908,7 @@ var ts; return !inErrorRecovery; case 14: case 97: - case 105: + case 104: case 82: case 83: case 74: @@ -6648,18 +6928,18 @@ var ts; case 69: var isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; - case 104: + case 103: case 68: - case 117: + case 116: case 76: - case 123: + case 122: if (isDeclarationStart()) { return false; } - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: if (lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine)) { return false; } @@ -6712,7 +6992,7 @@ var ts; return parseTryStatement(); case 71: return parseDebuggerStatement(); - case 105: + case 104: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined); } @@ -6736,7 +7016,7 @@ var ts; return undefined; } return parseVariableStatement(start, modifiers); - case 105: + case 104: if (!isLetDeclaration()) { return undefined; } @@ -6819,11 +7099,11 @@ var ts; switch (token) { case 97: break; - case 105: - node.flags |= 2048; + case 104: + node.flags |= 4096; break; case 69: - node.flags |= 4096; + node.flags |= 8192; break; default: ts.Debug.fail(); @@ -6855,7 +7135,7 @@ var ts; setModifiers(node, modifiers); parseExpected(82); node.asteriskToken = parseOptionalToken(35); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); fillSignature(51, !!node.asteriskToken, false, node); node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); return finishNode(node); @@ -6863,7 +7143,7 @@ var ts; function parseConstructorDeclaration(pos, modifiers) { var node = createNode(133, pos); setModifiers(node, modifiers); - parseExpected(114); + parseExpected(113); fillSignature(51, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); return finishNode(node); @@ -6880,15 +7160,15 @@ var ts; } function parsePropertyOrMethodDeclaration(fullStart, modifiers) { var asteriskToken = parseOptionalToken(35); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (asteriskToken || token === 16 || token === 24) { - return parseMethodDeclaration(fullStart, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + return parseMethodDeclaration(fullStart, modifiers, asteriskToken, _name, questionToken, ts.Diagnostics.or_expected); } else { var property = createNode(130, fullStart); setModifiers(property, modifiers); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); property.initializer = allowInAnd(parseNonParameterInitializer); @@ -6924,7 +7204,7 @@ var ts; return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 120 || idToken === 116) { + if (!ts.isKeyword(idToken) || idToken === 119 || idToken === 115) { return true; } switch (token) { @@ -6969,7 +7249,7 @@ var ts; if (accessor) { return accessor; } - if (token === 114) { + if (token === 113) { return parseConstructorDeclaration(fullStart, modifiers); } if (isIndexSignature()) { @@ -6988,11 +7268,13 @@ var ts; var node = createNode(196, fullStart); setModifiers(node, modifiers); parseExpected(68); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(true); if (parseExpected(14)) { - node.members = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseClassMembers) : parseClassMembers(); + node.members = inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseClassMembers) + : parseClassMembers(); parseExpected(15); } else { @@ -7002,7 +7284,9 @@ var ts; } function parseHeritageClauses(isClassHeritageClause) { if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() ? doOutsideOfYieldContext(parseHeritageClausesWorker) : parseHeritageClausesWorker(); + return isClassHeritageClause && inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseHeritageClausesWorker) + : parseHeritageClausesWorker(); } return undefined; } @@ -7010,8 +7294,8 @@ var ts; return parseList(19, false, parseHeritageClause); } function parseHeritageClause() { - if (token === 78 || token === 103) { - var node = createNode(215); + if (token === 78 || token === 102) { + var node = createNode(216); node.token = token; nextToken(); node.types = parseDelimitedList(8, parseTypeReference); @@ -7020,7 +7304,7 @@ var ts; return undefined; } function isHeritageClause() { - return token === 78 || token === 103; + return token === 78 || token === 102; } function parseClassMembers() { return parseList(6, false, parseClassElement); @@ -7028,7 +7312,7 @@ var ts; function parseInterfaceDeclaration(fullStart, modifiers) { var node = createNode(197, fullStart); setModifiers(node, modifiers); - parseExpected(104); + parseExpected(103); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(false); @@ -7038,7 +7322,7 @@ var ts; function parseTypeAliasDeclaration(fullStart, modifiers) { var node = createNode(198, fullStart); setModifiers(node, modifiers); - parseExpected(123); + parseExpected(122); node.name = parseIdentifier(); parseExpected(52); node.type = parseType(); @@ -7046,7 +7330,7 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(219, scanner.getStartPos()); + var node = createNode(220, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); @@ -7081,7 +7365,9 @@ var ts; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(20) ? parseInternalModuleTail(getNodePos(), undefined, 1) : parseModuleBlock(); + node.body = parseOptional(20) + ? parseInternalModuleTail(getNodePos(), undefined, 1) + : parseModuleBlock(); return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, modifiers) { @@ -7092,11 +7378,13 @@ var ts; return finishNode(node); } function parseModuleDeclaration(fullStart, modifiers) { - parseExpected(117); - return token === 8 ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); + parseExpected(116); + return token === 8 + ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) + : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); } function isExternalModuleReference() { - return token === 118 && + return token === 117 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { @@ -7105,7 +7393,7 @@ var ts; function nextTokenIsCommaOrFromKeyword() { nextToken(); return token === 23 || - token === 102; + token === 123; } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers) { parseExpected(84); @@ -7113,8 +7401,8 @@ var ts; var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token !== 23 && token !== 102) { - var importEqualsDeclaration = createNode(202, fullStart); + if (token !== 23 && token !== 123) { + var importEqualsDeclaration = createNode(203, fullStart); setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; parseExpected(52); @@ -7123,35 +7411,37 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(203, fullStart); + var importDeclaration = createNode(204, fullStart); setModifiers(importDeclaration, modifiers); if (identifier || token === 35 || token === 14) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(102); + parseExpected(123); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(204, fullStart); + var importClause = createNode(205, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(23)) { - importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(206); + importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(207); } return finishNode(importClause); } function parseModuleReference() { - return isExternalModuleReference() ? parseExternalModuleReference() : parseEntityName(false); + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(212); - parseExpected(118); + var node = createNode(213); + parseExpected(117); parseExpected(16); node.expression = parseModuleSpecifier(); parseExpected(17); @@ -7165,7 +7455,7 @@ var ts; return result; } function parseNamespaceImport() { - var namespaceImport = createNode(205); + var namespaceImport = createNode(206); parseExpected(35); parseExpected(101); namespaceImport.name = parseIdentifier(); @@ -7173,14 +7463,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(20, kind === 206 ? parseImportSpecifier : parseExportSpecifier, 14, 15); + node.elements = parseBracketedList(20, kind === 207 ? parseImportSpecifier : parseExportSpecifier, 14, 15); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(211); + return parseImportOrExportSpecifier(212); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(207); + return parseImportOrExportSpecifier(208); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -7206,30 +7496,36 @@ var ts; return finishNode(node); } function parseExportDeclaration(fullStart, modifiers) { - var node = createNode(209, fullStart); + var node = createNode(210, fullStart); setModifiers(node, modifiers); if (parseOptional(35)) { - parseExpected(102); + parseExpected(123); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(210); - if (parseOptional(102)) { + node.exportClause = parseNamedImportsOrExports(211); + if (parseOptional(123)) { node.moduleSpecifier = parseModuleSpecifier(); } } parseSemicolon(); return finishNode(node); } - function parseExportAssignmentTail(fullStart, modifiers) { - var node = createNode(208, fullStart); + function parseExportAssignment(fullStart, modifiers) { + var node = createNode(209, fullStart); setModifiers(node, modifiers); - node.exportName = parseIdentifier(); + if (parseOptional(52)) { + node.isExportEquals = true; + } + else { + parseExpected(72); + } + node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); return finishNode(node); } function isLetDeclaration() { - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOnSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart() { switch (token) { @@ -7237,24 +7533,24 @@ var ts; case 69: case 82: return true; - case 105: + case 104: return isLetDeclaration(); case 68: - case 104: + case 103: case 76: - case 123: + case 122: return lookAhead(nextTokenIsIdentifierOrKeyword); case 84: return lookAhead(nextTokenCanFollowImportKeyword); - case 117: + case 116: return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral); case 77: return lookAhead(nextTokenCanFollowExportKeyword); - case 115: - case 109: - case 107: + case 114: case 108: - case 110: + case 106: + case 107: + case 109: return lookAhead(nextTokenIsDeclarationStart); } } @@ -7277,7 +7573,7 @@ var ts; function nextTokenCanFollowExportKeyword() { nextToken(); return token === 52 || token === 35 || - token === 14 || isDeclarationStart(); + token === 14 || token === 72 || isDeclarationStart(); } function nextTokenIsDeclarationStart() { nextToken(); @@ -7291,8 +7587,8 @@ var ts; var modifiers = parseModifiers(); if (token === 77) { nextToken(); - if (parseOptional(52)) { - return parseExportAssignmentTail(fullStart, modifiers); + if (token === 72 || token === 52) { + return parseExportAssignment(fullStart, modifiers); } if (token === 35 || token === 14) { return parseExportDeclaration(fullStart, modifiers); @@ -7300,20 +7596,20 @@ var ts; } switch (token) { case 97: - case 105: + case 104: case 69: return parseVariableStatement(fullStart, modifiers); case 82: return parseFunctionDeclaration(fullStart, modifiers); case 68: return parseClassDeclaration(fullStart, modifiers); - case 104: + case 103: return parseInterfaceDeclaration(fullStart, modifiers); - case 123: + case 122: return parseTypeAliasDeclaration(fullStart, modifiers); case 76: return parseEnumDeclaration(fullStart, modifiers); - case 117: + case 116: return parseModuleDeclaration(fullStart, modifiers); case 84: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers); @@ -7331,7 +7627,9 @@ var ts; return parseSourceElementOrModuleElement(); } function parseSourceElementOrModuleElement() { - return isDeclarationStart() ? parseDeclaration() : parseStatement(); + return isDeclarationStart() + ? parseDeclaration() + : parseStatement(); } function processReferenceComments(sourceFile) { var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); @@ -7389,7 +7687,13 @@ var ts; } function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 1 || node.kind === 202 && node.moduleReference.kind === 212 || node.kind === 203 || node.kind === 208 || node.kind === 209 ? node : undefined; + return node.flags & 1 + || node.kind === 203 && node.moduleReference.kind === 213 + || node.kind === 204 + || node.kind === 209 + || node.kind === 210 + ? node + : undefined; }); } } @@ -7443,7 +7747,7 @@ var ts; else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 203 || node.kind === 202) && !(node.flags & 1)) { + else if ((node.kind === 204 || node.kind === 203) && !(node.flags & 1)) { return 0; } else if (node.kind === 201) { @@ -7477,7 +7781,7 @@ var ts; } ts.bindSourceFile = bindSourceFile; function bindSourceFileWorker(file) { - var parent; + var _parent; var container; var blockScopeContainer; var lastContainer; @@ -7485,7 +7789,8 @@ var ts; var Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { file.locals = {}; - container = blockScopeContainer = file; + container = file; + setBlockScopeContainer(file, false); bind(file); file.symbolCount = symbolCount; } @@ -7493,6 +7798,12 @@ var ts; symbolCount++; return new Symbol(flags, name); } + function setBlockScopeContainer(node, cleanLocals) { + blockScopeContainer = node; + if (cleanLocals) { + blockScopeContainer.locals = undefined; + } + } function addDeclarationToSymbol(symbol, node, symbolKind) { symbol.flags |= symbolKind; if (!symbol.declarations) @@ -7529,6 +7840,13 @@ var ts; return "__new"; case 138: return "__index"; + case 210: + return "__export"; + case 209: + return "default"; + case 195: + case 196: + return node.flags & 256 ? "default" : undefined; } } function getDisplayName(node) { @@ -7536,19 +7854,22 @@ var ts; } function declareSymbol(symbols, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); - var name = getDeclarationName(node); - if (name !== undefined) { - var symbol = ts.hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); + var _name = node.flags & 256 && parent ? "default" : getDeclarationName(node); + var symbol; + if (_name !== undefined) { + symbol = ts.hasProperty(symbols, _name) ? symbols[_name] : (symbols[_name] = createSymbol(0, _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; + var message = symbol.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name, message, getDisplayName(node))); - symbol = createSymbol(0, name); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); + symbol = createSymbol(0, _name); } } else { @@ -7580,7 +7901,7 @@ var ts; function declareModuleMember(node, symbolKind, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 1; if (symbolKind & 8388608) { - if (node.kind === 211 || (node.kind === 202 && hasExportModifier)) { + if (node.kind === 212 || (node.kind === 203 && hasExportModifier)) { declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); } else { @@ -7605,10 +7926,10 @@ var ts; if (symbolKind & 255504) { node.locals = {}; } - var saveParent = parent; + var saveParent = _parent; var saveContainer = container; var savedBlockScopeContainer = blockScopeContainer; - parent = node; + _parent = node; if (symbolKind & 262128) { container = node; if (lastContainer) { @@ -7617,11 +7938,11 @@ var ts; lastContainer = container; } if (isBlockScopeContainer) { - blockScopeContainer = node; + setBlockScopeContainer(node, (symbolKind & 255504) === 0 && node.kind !== 221); } ts.forEachChild(node, bind); container = saveContainer; - parent = saveParent; + _parent = saveParent; blockScopeContainer = savedBlockScopeContainer; } function bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer) { @@ -7629,7 +7950,7 @@ var ts; case 200: declareModuleMember(node, symbolKind, symbolExcludes); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolKind, symbolExcludes); break; @@ -7685,12 +8006,6 @@ var ts; } } } - function bindExportDeclaration(node) { - if (!node.exportClause) { - (container.exportStars || (container.exportStars = [])).push(node); - } - bindChildren(node, 0, false); - } function bindFunctionOrConstructorType(node) { var symbol = createSymbol(131072, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072); @@ -7706,21 +8021,14 @@ var ts; bindChildren(node, symbolKind, isBlockScopeContainer); } function bindCatchVariableDeclaration(node) { - var symbol = createSymbol(1, node.name.text || "__missing"); - addDeclarationToSymbol(symbol, node, 1); - var saveParent = parent; - var savedBlockScopeContainer = blockScopeContainer; - parent = blockScopeContainer = node; - ts.forEachChild(node, bind); - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; + bindChildren(node, 0, true); } function bindBlockScopedVariableDeclaration(node) { switch (blockScopeContainer.kind) { case 200: declareModuleMember(node, 2, 107455); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, 2, 107455); break; @@ -7737,7 +8045,7 @@ var ts; return "__" + ts.indexOf(node.parent.parameters, node); } function bind(node) { - node.parent = parent; + node.parent = _parent; switch (node.kind) { case 127: bindDeclaration(node, 262144, 530912, false); @@ -7750,7 +8058,7 @@ var ts; if (ts.isBindingPattern(node.name)) { bindChildren(node, 0, false); } - else if (ts.getCombinedNodeFlags(node) & 6144) { + else if (ts.isBlockOrCatchScoped(node)) { bindBlockScopedVariableDeclaration(node); } else { @@ -7761,11 +8069,11 @@ var ts; case 129: bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455, false); break; - case 217: case 218: + case 219: bindPropertyOrMethodOrAccessor(node, 4, 107455, false); break; - case 219: + case 220: bindPropertyOrMethodOrAccessor(node, 8, 107455, false); break; case 136: @@ -7803,7 +8111,7 @@ var ts; case 161: bindAnonymousDeclaration(node, 16, "__function", true); break; - case 216: + case 217: bindCatchVariableDeclaration(node); break; case 196: @@ -7826,16 +8134,13 @@ var ts; case 200: bindModuleDeclaration(node); break; - case 202: - case 205: - case 207: - case 211: + case 203: + case 206: + case 208: + case 212: bindDeclaration(node, 8388608, 8388608, false); break; - case 209: - bindExportDeclaration(node); - break; - case 204: + case 205: if (node.name) { bindDeclaration(node, 8388608, 8388608, false); } @@ -7843,26 +8148,41 @@ var ts; bindChildren(node, 0, false); } break; - case 220: + case 210: + if (!node.exportClause) { + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); + } + bindChildren(node, 0, false); + break; + case 209: + if (node.expression.kind === 64) { + declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 8388608); + } + else { + declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455); + } + bindChildren(node, 0, false); + break; + case 221: if (ts.isExternalModule(node)) { bindAnonymousDeclaration(node, 512, '"' + ts.removeFileExtension(node.fileName) + '"', true); break; } case 174: - bindChildren(node, 0, !ts.isAnyFunction(node.parent)); + bindChildren(node, 0, !ts.isFunctionLike(node.parent)); break; - case 216: + case 217: case 181: case 182: case 183: - case 188: + case 202: bindChildren(node, 0, true); break; default: - var saveParent = parent; - parent = node; + var saveParent = _parent; + _parent = node; ts.forEachChild(node, bind); - parent = saveParent; + _parent = saveParent; } } function bindParameter(node) { @@ -7905,6 +8225,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var languageVersion = compilerOptions.target || 0; var emitResolver = createResolver(); + var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); + var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var checker = { getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, @@ -7937,11 +8259,10 @@ var ts; isValidPropertyAccess: isValidPropertyAccess, getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveImport, - getEmitResolver: getEmitResolver + getAliasedSymbol: resolveAlias, + getEmitResolver: getEmitResolver, + getExportsOfExternalModule: getExportsOfExternalModule }; - var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); - var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var unknownSymbol = createSymbol(4 | 67108864, "unknown"); var resolvingSymbol = createSymbol(67108864, "__resolving__"); var anyType = createIntrinsicType(1, "any"); @@ -7972,6 +8293,7 @@ var ts; var globalRegExpType; var globalTemplateStringsArrayType; var globalESSymbolType; + var globalIterableType; var anyArrayType; var tupleTypes = {}; var unionTypes = {}; @@ -8005,7 +8327,9 @@ var ts; return emitResolver; } function error(location, message, arg0, arg1, arg2) { - var diagnostic = location ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); + var diagnostic = location + ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) + : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); diagnostics.add(diagnostic); } function createSymbol(flags, name) { @@ -8091,7 +8415,8 @@ var ts; recordMergedSymbol(target, source); } else { - var message = target.flags & 2 || source.flags & 2 ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; + var message = target.flags & 2 || source.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(source.declarations, function (node) { error(node.name ? node.name : node, message, symbolToString(source)); }); @@ -8125,13 +8450,6 @@ var ts; } } } - function extendSymbolTable(target, source) { - for (var id in source) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } function getSymbolLinks(symbol) { if (symbol.flags & 67108864) return symbol; @@ -8145,10 +8463,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 220); + return ts.getAncestor(node, 221); } function isGlobalSourceFile(node) { - return node.kind === 220 && !ts.isExternalModule(node); + return node.kind === 221 && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -8158,7 +8476,7 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target === unknownSymbol || target.flags & meaning) { return symbol; } @@ -8189,12 +8507,12 @@ var ts; } } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931)) { - if (!(result.flags & 8388608 && getDeclarationOfImportSymbol(result).kind === 211)) { + if (!(result.flags & 8388608 && getDeclarationOfAliasSymbol(result).kind === 212)) { break loop; } result = undefined; @@ -8258,13 +8576,6 @@ var ts; break loop; } break; - case 216: - var id = location.name; - if (name === id.text) { - result = location.symbol; - break loop; - } - break; } lastLocation = location; location = location.parent; @@ -8285,27 +8596,57 @@ var ts; return undefined; } if (result.flags & 2) { - var declaration = ts.forEach(result.declarations, function (d) { return ts.getCombinedNodeFlags(d) & 6144 ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } + checkResolvedBlockScopedVariable(result, errorLocation); } } return result; } - function isImportSymbolDeclaration(node) { - return node.kind === 202 || - node.kind === 204 && !!node.name || - node.kind === 205 || - node.kind === 207 || - node.kind === 211; + function checkResolvedBlockScopedVariable(result, errorLocation) { + ts.Debug.assert((result.flags & 2) !== 0); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); + ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); + var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); + if (!isUsedBeforeDeclaration) { + var variableDeclaration = ts.getAncestor(declaration, 193); + var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); + if (variableDeclaration.parent.parent.kind === 175 || + variableDeclaration.parent.parent.kind === 181) { + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === 183 || + variableDeclaration.parent.parent.kind === 182) { + var expression = variableDeclaration.parent.parent.expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + } + if (isUsedBeforeDeclaration) { + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); + } } - function getDeclarationOfImportSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return isImportSymbolDeclaration(d) ? d : undefined; }); + function isSameScopeDescendentOf(initial, parent, stopAt) { + if (!parent) { + return false; + } + for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { + if (current === parent) { + return true; + } + } + return false; + } + function isAliasSymbolDeclaration(node) { + return node.kind === 203 || + node.kind === 205 && !!node.name || + node.kind === 206 || + node.kind === 208 || + node.kind === 212 || + node.kind === 209; + } + function getDeclarationOfAliasSymbol(symbol) { + return ts.forEach(symbol.declarations, function (d) { return isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 212) { + if (node.moduleReference.kind === 213) { var moduleSymbol = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); var exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); return exportAssignmentSymbol || moduleSymbol; @@ -8328,14 +8669,14 @@ var ts; function getExternalModuleMember(node, specifier) { var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol) { - var name = specifier.propertyName || specifier.name; - if (name.text) { - var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, 107455 | 793056 | 1536); + var _name = specifier.propertyName || specifier.name; + if (_name.text) { + var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), _name.text, 107455 | 793056 | 1536); if (!symbol) { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(_name)); return; } - return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveImport(symbol); + return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveAlias(symbol); } } } @@ -8343,28 +8684,35 @@ var ts; return getExternalModuleMember(node.parent.parent.parent, node); } function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node, node.propertyName || node.name, 107455 | 793056 | 1536); + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536); + } + function getTargetOfExportAssignment(node) { + return resolveEntityName(node.expression, 107455 | 793056 | 1536); } function getTargetOfImportDeclaration(node) { switch (node.kind) { - case 202: + case 203: return getTargetOfImportEqualsDeclaration(node); - case 204: - return getTargetOfImportClause(node); case 205: + return getTargetOfImportClause(node); + case 206: return getTargetOfNamespaceImport(node); - case 207: + case 208: return getTargetOfImportSpecifier(node); - case 211: + case 212: return getTargetOfExportSpecifier(node); + case 209: + return getTargetOfExportAssignment(node); } } - function resolveImport(symbol) { - ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Imports here."); + function resolveAlias(symbol) { + ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here."); var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfImportSymbol(symbol); + var node = getDeclarationOfAliasSymbol(symbol); var target = getTargetOfImportDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -8378,47 +8726,73 @@ var ts; } return links.target; } + function markExportAsReferenced(node) { + var symbol = getSymbolOfNode(node); + var target = resolveAlias(symbol); + if (target && target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target)) { + markAliasSymbolAsReferenced(symbol); + } + } + function markAliasSymbolAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.referenced) { + links.referenced = true; + var node = getDeclarationOfAliasSymbol(symbol); + if (node.kind === 209) { + checkExpressionCached(node.expression); + } + else if (node.kind === 212) { + checkExpressionCached(node.propertyName || node.name); + } + else if (ts.isInternalModuleImportEqualsDeclaration(node)) { + checkExpressionCached(node.moduleReference); + } + } + } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 202); + importDeclaration = ts.getAncestor(entityName, 203); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 64 && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } if (entityName.kind === 64 || entityName.parent.kind === 125) { - return resolveEntityName(importDeclaration, entityName, 1536); + return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 202); - return resolveEntityName(importDeclaration, entityName, 107455 | 793056 | 1536); + ts.Debug.assert(entityName.parent.kind === 203); + return resolveEntityName(entityName, 107455 | 793056 | 1536); } } function getFullyQualifiedName(symbol) { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } - function resolveEntityName(location, name, meaning) { + function resolveEntityName(name, meaning) { if (ts.getFullWidth(name) === 0) { return undefined; } + var symbol; if (name.kind === 64) { - var symbol = resolveName(location, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); + symbol = resolveName(name, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); if (!symbol) { - return; + return undefined; } } else if (name.kind === 125) { - var namespace = resolveEntityName(location, name.left, 1536); - if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) - return; - var symbol = getSymbol(getExportsOfSymbol(namespace), name.right.text, meaning); + var namespace = resolveEntityName(name.left, 1536); + if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) { + return undefined; + } + var right = name.right; + symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); - return; + error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); + return undefined; } } ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveImport(symbol); + return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function isExternalModuleNameRelative(moduleName) { return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; @@ -8439,14 +8813,17 @@ var ts; return symbol; } } + var sourceFile; while (true) { var fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - var sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); - if (sourceFile || isRelative) + sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); + if (sourceFile || isRelative) { break; + } var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) + if (parentPath === searchPath) { break; + } searchPath = parentPath; } if (sourceFile) { @@ -8458,6 +8835,9 @@ var ts; } error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_external_module_0, moduleName); } + function getExportAssignmentSymbol(moduleSymbol) { + return moduleSymbol.exports["default"]; + } function getResolvedExportAssignmentSymbol(moduleSymbol) { var symbol = getExportAssignmentSymbol(moduleSymbol); if (symbol) { @@ -8465,82 +8845,52 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - return resolveImport(symbol); + return resolveAlias(symbol); } } } - function getExportAssignmentSymbol(symbol) { - checkTypeOfExportAssignmentSymbol(symbol); - return getSymbolLinks(symbol).exportAssignmentSymbol; - } - function checkTypeOfExportAssignmentSymbol(containerSymbol) { - var symbolLinks = getSymbolLinks(containerSymbol); - if (!symbolLinks.exportAssignmentChecked) { - var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol); - if (exportInformation.exportAssignments.length) { - if (exportInformation.exportAssignments.length > 1) { - ts.forEach(exportInformation.exportAssignments, function (node) { return error(node, ts.Diagnostics.A_module_cannot_have_more_than_one_export_assignment); }); - } - var node = exportInformation.exportAssignments[0]; - if (exportInformation.hasExportedMember) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - if (node.exportName.text) { - var meaning = 107455 | 793056 | 1536; - var exportSymbol = resolveName(node, node.exportName.text, meaning, ts.Diagnostics.Cannot_find_name_0, node.exportName); - } - symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol; - } - symbolLinks.exportAssignmentChecked = true; - } - } - function collectExportInformationForSourceFileOrModule(symbol) { - var seenExportedMember = false; - var result = []; - ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 220 ? declaration : declaration.body); - ts.forEach(block.statements, function (node) { - if (node.kind === 208) { - result.push(node); - } - else { - seenExportedMember = seenExportedMember || (node.flags & 1) !== 0; - } - }); - }); - return { - hasExportedMember: seenExportedMember, - exportAssignments: result - }; - } function getExportsOfSymbol(symbol) { return symbol.flags & 1536 ? getExportsOfModule(symbol) : symbol.exports; } - function getExportsOfModule(symbol) { - var links = getSymbolLinks(symbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(symbol)); + function getExportsOfModule(moduleSymbol) { + var links = getSymbolLinks(moduleSymbol); + return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); } - function getExportsForModule(symbol) { + function extendExportSymbols(target, source) { + for (var id in source) { + if (id !== "default" && !ts.hasProperty(target, id)) { + target[id] = source[id]; + } + } + } + function getExportsForModule(moduleSymbol) { + if (compilerOptions.target < 2) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + return { + "default": defaultSymbol + }; + } + } var result; var visitedSymbols = []; - visit(symbol); - return result; + visit(moduleSymbol); + return result || moduleSymbol.exports; function visit(symbol) { if (!ts.contains(visitedSymbols, symbol)) { visitedSymbols.push(symbol); - if (!result) { - result = symbol.exports; - } - else { - extendSymbolTable(result, symbol.exports); - } - ts.forEach(symbol.declarations, function (node) { - if (node.kind === 220 || node.kind === 200) { - ts.forEach(node.exportStars, function (exportStar) { - visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier)); - }); + if (symbol !== moduleSymbol) { + if (!result) { + result = cloneSymbolTable(moduleSymbol.exports); } - }); + extendExportSymbols(result, symbol.exports); + } + var exportStars = symbol.exports["__export"]; + if (exportStars) { + ts.forEach(exportStars.declarations, function (node) { + visit(resolveExternalModuleName(node, node.moduleSpecifier)); + }); + } } } } @@ -8555,7 +8905,9 @@ var ts; return getMergedSymbol(symbol.parent); } function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576) !== 0 ? getMergedSymbol(symbol.exportSymbol) : symbol; + return symbol && (symbol.flags & 1048576) !== 0 + ? getMergedSymbol(symbol.exportSymbol) + : symbol; } function symbolIsValue(symbol) { if (symbol.flags & 16777216) { @@ -8565,14 +8917,14 @@ var ts; return true; } if (symbol.flags & 8388608) { - return (resolveImport(symbol).flags & 107455) !== 0; + return (resolveAlias(symbol).flags & 107455) !== 0; } return false; } function findConstructorDeclaration(node) { var members = node.members; - for (var i = 0; i < members.length; i++) { - var member = members[i]; + for (var _i = 0, _n = members.length; _i < _n; _i++) { + var member = members[_i]; if (member.kind === 133 && ts.nodeIsPresent(member.body)) { return member; } @@ -8631,25 +8983,25 @@ var ts; } function forEachSymbolTableInScope(enclosingDeclaration, callback) { var result; - for (var location = enclosingDeclaration; location; location = location.parent) { - if (location.locals && !isGlobalSourceFile(location)) { - if (result = callback(location.locals)) { + for (var _location = enclosingDeclaration; _location; _location = _location.parent) { + if (_location.locals && !isGlobalSourceFile(_location)) { + if (result = callback(_location.locals)) { return result; } } - switch (location.kind) { - case 220: - if (!ts.isExternalModule(location)) { + switch (_location.kind) { + case 221: + if (!ts.isExternalModule(_location)) { break; } case 200: - if (result = callback(getSymbolOfNode(location).exports)) { + if (result = callback(getSymbolOfNode(_location).exports)) { return result; } break; case 196: case 197: - if (result = callback(getSymbolOfNode(location).members)) { + if (result = callback(getSymbolOfNode(_location).members)) { return result; } break; @@ -8682,8 +9034,8 @@ var ts; if (symbolFromSymbolTable.flags & 8388608) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { + var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); + if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; } var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; @@ -8708,7 +9060,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveImport(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -8764,7 +9116,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 200 && declaration.name.kind === 8) || - (declaration.kind === 220 && ts.isExternalModule(declaration)); + (declaration.kind === 221 && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -8774,7 +9126,7 @@ var ts; return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 202 && + if (declaration.kind === 203 && !(declaration.flags & 1) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; @@ -8799,7 +9151,7 @@ var ts; meaning = 107455 | 1048576; } else if (entityName.kind === 125 || - entityName.parent.kind === 202) { + entityName.parent.kind === 203) { meaning = 1536; } else { @@ -8890,8 +9242,9 @@ var ts; walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); } if (accessibleSymbolChain) { - for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) { - appendParentTypeArgumentsAndSymbolName(accessibleSymbolChain[i]); + for (var _i = 0, _n = accessibleSymbolChain.length; _i < _n; _i++) { + var accessibleSymbol = accessibleSymbolChain[_i]; + appendParentTypeArgumentsAndSymbolName(accessibleSymbol); } } else { @@ -8999,7 +9352,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056, 0, flags); } else { - writeKeyword(writer, 112); + writeKeyword(writer, 111); } } else { @@ -9017,7 +9370,7 @@ var ts; var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { - return declaration.parent.kind === 220 || declaration.parent.kind === 201; + return declaration.parent.kind === 221 || declaration.parent.kind === 201; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -9073,15 +9426,17 @@ var ts; writePunctuation(writer, 14); writer.writeLine(); writer.increaseIndent(); - for (var i = 0; i < resolved.callSignatures.length; i++) { - buildSignatureDisplay(resolved.callSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + for (var _i = 0, _a = resolved.callSignatures, _n = _a.length; _i < _n; _i++) { + var signature = _a[_i]; + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.constructSignatures.length; i++) { + for (var _b = 0, _c = resolved.constructSignatures, _d = _c.length; _b < _d; _b++) { + var _signature = _c[_b]; writeKeyword(writer, 87); writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -9090,7 +9445,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 0, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 121); + writeKeyword(writer, 120); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -9103,7 +9458,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 1, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 119); + writeKeyword(writer, 118); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -9111,17 +9466,18 @@ var ts; writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.properties.length; i++) { - var p = resolved.properties[i]; + for (var _e = 0, _f = resolved.properties, _g = _f.length; _e < _g; _e++) { + var p = _f[_e]; var t = getTypeOfSymbol(p); if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) { var signatures = getSignaturesOfType(t, 0); - for (var j = 0; j < signatures.length; j++) { + for (var _h = 0, _j = signatures.length; _h < _j; _h++) { + var _signature_1 = signatures[_h]; buildSymbolDisplay(p, writer); if (p.flags & 536870912) { writePunctuation(writer, 50); } - buildSignatureDisplay(signatures[j], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature_1, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -9251,7 +9607,7 @@ var ts; return node; } } - else if (node.kind === 220) { + else if (node.kind === 221) { return ts.isExternalModule(node) ? node : undefined; } } @@ -9259,16 +9615,17 @@ var ts; } function isUsedInExportAssignment(node) { var externalModule = getContainingExternalModule(node); + var exportAssignmentSymbol; + var resolvedExportSymbol; if (externalModule) { var externalModuleSymbol = getSymbolOfNode(externalModule); - var exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var resolvedExportSymbol; + exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); var symbolOfNode = getSymbolOfNode(node); if (isSymbolUsedInExportAssignment(symbolOfNode)) { return true; } if (symbolOfNode.flags & 8388608) { - return isSymbolUsedInExportAssignment(resolveImport(symbolOfNode)); + return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); } } function isSymbolUsedInExportAssignment(symbol) { @@ -9276,7 +9633,7 @@ var ts; return true; } if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608)) { - resolvedExportSymbol = resolvedExportSymbol || resolveImport(exportAssignmentSymbol); + resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); if (resolvedExportSymbol === symbol) { return true; } @@ -9301,13 +9658,13 @@ var ts; case 198: case 195: case 199: - case 202: - var parent = getDeclarationContainer(node); + case 203: + var _parent = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 1) && - !(node.kind !== 202 && parent.kind !== 220 && ts.isInAmbientContext(parent))) { - return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); + !(node.kind !== 203 && _parent.kind !== 221 && ts.isInAmbientContext(_parent))) { + return isGlobalSourceFile(_parent) || isUsedInExportAssignment(node); } - return isDeclarationVisible(parent); + return isDeclarationVisible(_parent); case 130: case 129: case 134: @@ -9333,7 +9690,7 @@ var ts; case 147: return isDeclarationVisible(node.parent); case 127: - case 220: + case 221: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -9377,13 +9734,14 @@ var ts; } return parentType; } + var type; if (pattern.kind === 148) { - var name = declaration.propertyName || declaration.name; - var type = getTypeOfPropertyOfType(parentType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, 1) || + var _name = declaration.propertyName || declaration.name; + type = getTypeOfPropertyOfType(parentType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(_name)); return unknownType; } } @@ -9394,14 +9752,19 @@ var ts; } if (!declaration.dotDotDotToken) { var propName = "" + ts.indexOf(pattern.elements, declaration); - var type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); + type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); if (!type) { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + if (isTupleType(parentType)) { + error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); + } + else { + error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + } return unknownType; } } else { - var type = createArrayType(getIndexTypeOfType(parentType, 1)); + type = createArrayType(getIndexTypeOfType(parentType, 1)); } } return type; @@ -9410,6 +9773,9 @@ var ts; if (declaration.parent.parent.kind === 182) { return anyType; } + if (declaration.parent.parent.kind === 183) { + return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; + } if (ts.isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); } @@ -9432,7 +9798,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 218) { + if (declaration.kind === 219) { return checkIdentifier(declaration.name); } return undefined; @@ -9450,8 +9816,8 @@ var ts; var members = {}; 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); + var _name = e.propertyName || e.name; + var symbol = createSymbol(flags, _name.text); symbol.type = getTypeFromBindingElement(e); members[symbol.name] = symbol; }); @@ -9469,7 +9835,9 @@ var ts; return !elementTypes.length ? anyArrayType : hasSpreadElement ? createArrayType(getUnionType(elementTypes)) : createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern) { - return pattern.kind === 148 ? getTypeFromObjectBindingPattern(pattern) : getTypeFromArrayBindingPattern(pattern); + return pattern.kind === 148 + ? getTypeFromObjectBindingPattern(pattern) + : getTypeFromArrayBindingPattern(pattern); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { var type = getTypeForVariableLikeDeclaration(declaration); @@ -9477,7 +9845,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - return declaration.kind !== 217 ? getWidenedType(type) : type; + return declaration.kind !== 218 ? getWidenedType(type) : type; } if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name); @@ -9498,9 +9866,12 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 216) { + if (declaration.parent.kind === 217) { return links.type = anyType; } + if (declaration.kind === 209) { + return links.type = checkExpression(declaration.expression); + } links.type = resolvingType; var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); if (links.type === resolvingType) { @@ -9510,7 +9881,9 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var diagnostic = symbol.valueDeclaration.type ? ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; + var diagnostic = symbol.valueDeclaration.type ? + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); } } @@ -9571,8 +9944,8 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var getter = ts.getDeclarationOfKind(symbol, 134); - error(getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + var _getter = ts.getDeclarationOfKind(symbol, 134); + error(_getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } } @@ -9590,10 +9963,10 @@ var ts; } return links.type; } - function getTypeOfImport(symbol) { + function getTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - links.type = getTypeOfSymbol(resolveImport(symbol)); + links.type = getTypeOfSymbol(resolveAlias(symbol)); } return links.type; } @@ -9621,7 +9994,7 @@ var ts; return getTypeOfAccessors(symbol); } if (symbol.flags & 8388608) { - return getTypeOfImport(symbol); + return getTypeOfAlias(symbol); } return unknownType; } @@ -9749,8 +10122,8 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = ts.getDeclarationOfKind(symbol, 198); - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + var _declaration = ts.getDeclarationOfKind(symbol, 198); + error(_declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; } @@ -9775,10 +10148,10 @@ var ts; } return links.declaredType; } - function getDeclaredTypeOfImport(symbol) { + function getDeclaredTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveImport(symbol)); + links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); } return links.declaredType; } @@ -9800,29 +10173,29 @@ var ts; return getDeclaredTypeOfTypeParameter(symbol); } if (symbol.flags & 8388608) { - return getDeclaredTypeOfImport(symbol); + return getDeclaredTypeOfAlias(symbol); } return unknownType; } function createSymbolTable(symbols) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = symbol; } return result; } function createInstantiatedSymbolTable(symbols, mapper) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = instantiateSymbol(symbol, mapper); } return result; } function addInheritedMembers(symbols, baseSymbols) { - for (var i = 0; i < baseSymbols.length; i++) { - var s = baseSymbols[i]; + for (var _i = 0, _n = baseSymbols.length; _i < _n; _i++) { + var s = baseSymbols[_i]; if (!ts.hasProperty(symbols, s.name)) { symbols[s.name] = s; } @@ -9830,8 +10203,9 @@ var ts; } function addInheritedSignatures(signatures, baseSignatures) { if (baseSignatures) { - for (var i = 0; i < baseSignatures.length; i++) { - signatures.push(baseSignatures[i]); + for (var _i = 0, _n = baseSignatures.length; _i < _n; _i++) { + var signature = baseSignatures[_i]; + signatures.push(signature); } } } @@ -9890,7 +10264,8 @@ var ts; var baseType = classType.baseTypes[0]; var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1); return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 ? getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); + var signature = baseType.flags & 4096 ? + getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); signature.typeParameters = classType.typeParameters; signature.resolvedReturnType = classType; return signature; @@ -9927,13 +10302,14 @@ var ts; function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var signatures = signatureLists[0]; - for (var i = 0; i < signatures.length; i++) { - if (signatures[i].typeParameters) { + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; + if (signature.typeParameters) { return emptyArray; } } - for (var i = 1; i < signatureLists.length; i++) { - if (!signatureListsIdentical(signatures, signatureLists[i])) { + for (var _i_1 = 1; _i_1 < signatureLists.length; _i_1++) { + if (!signatureListsIdentical(signatures, signatureLists[_i_1])) { return emptyArray; } } @@ -9947,8 +10323,9 @@ var ts; } function getUnionIndexType(types, kind) { var indexTypes = []; - for (var i = 0; i < types.length; i++) { - var indexType = getIndexTypeOfType(types[i], kind); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + var indexType = getIndexTypeOfType(type, kind); if (!indexType) { return undefined; } @@ -9965,17 +10342,22 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; + var members; + var callSignatures; + var constructSignatures; + var stringIndexType; + var numberIndexType; if (symbol.flags & 2048) { - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1); + members = symbol.members; + callSignatures = getSignaturesOfSymbol(members["__call"]); + constructSignatures = getSignaturesOfSymbol(members["__new"]); + stringIndexType = getIndexTypeOfSymbol(symbol, 0); + numberIndexType = getIndexTypeOfSymbol(symbol, 1); } else { - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; + members = emptySymbols; + callSignatures = emptyArray; + constructSignatures = emptyArray; if (symbol.flags & 1952) { members = getExportsOfSymbol(symbol); } @@ -9993,8 +10375,8 @@ var ts; addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(classType.baseTypes[0].symbol))); } } - var stringIndexType = undefined; - var numberIndexType = (symbol.flags & 384) ? stringType : undefined; + stringIndexType = undefined; + numberIndexType = (symbol.flags & 384) ? stringType : undefined; } setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } @@ -10077,8 +10459,9 @@ var ts; function createUnionProperty(unionType, name) { var types = unionType.types; var props; - for (var i = 0; i < types.length; i++) { - var type = getApparentType(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var type = getApparentType(current); if (type !== unknownType) { var prop = getPropertyOfType(type, name); if (!prop) { @@ -10094,12 +10477,12 @@ var ts; } var propTypes = []; var declarations = []; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); + for (var _a = 0, _b = props.length; _a < _b; _a++) { + var _prop = props[_a]; + if (_prop.declarations) { + declarations.push.apply(declarations, _prop.declarations); } - propTypes.push(getTypeOfSymbol(prop)); + propTypes.push(getTypeOfSymbol(_prop)); } var result = createSymbol(4 | 67108864 | 268435456, name); result.unionType = unionType; @@ -10136,9 +10519,9 @@ var ts; } } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) - return symbol; + var _symbol = getPropertyOfObjectType(globalFunctionType, name); + if (_symbol) + return _symbol; } return getPropertyOfObjectType(globalObjectType, name); } @@ -10171,11 +10554,22 @@ var ts; }); return result; } + function getExportsOfExternalModule(node) { + if (!node.moduleSpecifier) { + return emptyArray; + } + var module = resolveExternalModuleName(node, node.moduleSpecifier); + if (!module || !module.exports) { + return emptyArray; + } + return ts.mapToArray(getExportsOfModule(module)); + } function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var classType = declaration.kind === 133 ? getDeclaredTypeOfClass(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.typeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; + var typeParameters = classType ? classType.typeParameters : + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; var parameters = []; var hasStringLiterals = false; var minArgumentCount = -1; @@ -10248,14 +10642,15 @@ var ts; function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { signature.resolvedReturnType = resolvingType; + var type; if (signature.target) { - var type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); + type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - var type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); } else { - var type = getReturnTypeFromBody(signature.declaration); + type = getReturnTypeFromBody(signature.declaration); } if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = type; @@ -10316,12 +10711,13 @@ var ts; return symbol.members["__index"]; } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 119 : 121; + var syntaxKind = kind === 1 ? 118 : 120; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { var len = indexSymbol.declarations.length; - for (var i = 0; i < len; i++) { - var node = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var node = decl; if (node.parameters.length === 1) { var parameter = node.parameters[0]; if (parameter && parameter.type && parameter.type.kind === syntaxKind) { @@ -10334,7 +10730,9 @@ var ts; } function getIndexTypeOfSymbol(symbol, kind) { var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType : undefined; + return declaration + ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType + : undefined; } function getConstraintOfTypeParameter(type) { if (!type.constraint) { @@ -10357,8 +10755,9 @@ var ts; default: var result = ""; for (var i = 0; i < types.length; i++) { - if (i > 0) + if (i > 0) { result += ","; + } result += types[i].id; } return result; @@ -10366,8 +10765,9 @@ var ts; } function getWideningFlagsOfTypes(types) { var result = 0; - for (var i = 0; i < types.length; i++) { - result |= types[i].flags; + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + result |= type.flags; } return result & 786432; } @@ -10419,9 +10819,9 @@ var ts; function getTypeFromTypeReferenceNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = resolveEntityName(node, node.typeName, 793056); + var symbol = resolveEntityName(node.typeName, 793056); + var type; if (symbol) { - var type; if ((symbol.flags & 262144) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { type = unknownType; } @@ -10459,8 +10859,8 @@ var ts; function getTypeOfGlobalSymbol(symbol, arity) { function getTypeDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; switch (declaration.kind) { case 196: case 197: @@ -10492,8 +10892,9 @@ var ts; function getGlobalSymbol(name, meaning, diagnostic) { return resolveName(undefined, name, meaning, diagnostic, name); } - function getGlobalType(name) { - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), 0); + function getGlobalType(name, arity) { + if (arity === void 0) { arity = 0; } + return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); } function getGlobalESSymbolConstructorSymbol() { return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); @@ -10541,13 +10942,15 @@ var ts; } } function addTypesToSortedSet(sortedTypes, types) { - for (var i = 0, len = types.length; i < len; i++) { - addTypeToSortedSet(sortedTypes, types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + addTypeToSortedSet(sortedTypes, type); } } function isSubtypeOfAny(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && isTypeSubtypeOf(candidate, type)) { return true; } } @@ -10563,8 +10966,9 @@ var ts; } } function containsAnyType(types) { - for (var i = 0; i < types.length; i++) { - if (types[i].flags & 1) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (type.flags & 1) { return true; } } @@ -10637,15 +11041,15 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 112: + case 111: return anyType; - case 121: + case 120: return stringType; - case 119: + case 118: return numberType; - case 113: + case 112: return booleanType; - case 122: + case 121: return esSymbolType; case 98: return voidType; @@ -10678,8 +11082,9 @@ var ts; function instantiateList(items, mapper, instantiator) { if (items && items.length) { var result = []; - for (var i = 0; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); + for (var _i = 0, _n = items.length; _i < _n; _i++) { + var v = items[_i]; + result.push(instantiator(v, mapper)); } return result; } @@ -10698,8 +11103,9 @@ var ts; } return function (t) { for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + if (t === sources[i]) { return targets[i]; + } } return t; }; @@ -10716,9 +11122,11 @@ var ts; case 2: return createBinaryTypeEraser(sources[0], sources[1]); } return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + for (var _i = 0, _n = sources.length; _i < _n; _i++) { + var source = sources[_i]; + if (t === source) { return anyType; + } } return t; }; @@ -10752,8 +11160,9 @@ var ts; return result; } function instantiateSignature(signature, mapper, eraseTypeParameters) { + var freshTypeParameters; if (signature.typeParameters && !eraseTypeParameters) { - var freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); + freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); } var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -10797,7 +11206,8 @@ var ts; return mapper(type); } if (type.flags & 32768) { - return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? instantiateAnonymousType(type, mapper) : type; + return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? + instantiateAnonymousType(type, mapper) : type; } if (type.flags & 4096) { return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); @@ -10826,8 +11236,8 @@ var ts; isContextSensitive(node.whenFalse); case 167: return node.operatorToken.kind === 49 && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 217: + (isContextSensitive(node.left) || isContextSensitive(node.right)); + case 218: return isContextSensitive(node.initializer); case 132: case 131: @@ -10909,7 +11319,7 @@ var ts; } function isRelatedTo(source, target, reportErrors, headMessage, elaborateErrors) { if (elaborateErrors === void 0) { elaborateErrors = false; } - var result; + var _result; if (source === target) return -1; if (relation !== identityRelation) { @@ -10933,54 +11343,54 @@ var ts; if (source.flags & 16384 || target.flags & 16384) { if (relation === identityRelation) { if (source.flags & 16384 && target.flags & 16384) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; + if (_result = unionTypeRelatedToUnionType(source, target)) { + if (_result &= unionTypeRelatedToUnionType(target, source)) { + return _result; } } } else if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(target, source, reportErrors)) { + return _result; } } } else { if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; + if (_result = typeRelatedToUnionType(source, target, reportErrors)) { + return _result; } } } } else if (source.flags & 512 && target.flags & 512) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; + if (_result = typeParameterRelatedTo(source, target, reportErrors)) { + return _result; } } else { var saveErrorInfo = errorInfo; if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; + if (_result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { + return _result; } } var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); if (sourceOrApparentType.flags & 48128 && target.flags & 48128 && - (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { + (_result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { errorInfo = saveErrorInfo; - return result; + return _result; } } if (reportErrors) { @@ -10996,16 +11406,17 @@ var ts; return 0; } function unionTypeRelatedToUnionType(source, target) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = typeRelatedToUnionType(sourceTypes[i], target, false); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = typeRelatedToUnionType(sourceType, target, false); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeRelatedToUnionType(source, target, reportErrors) { var targetTypes = target.types; @@ -11018,27 +11429,28 @@ var ts; return 0; } function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = isRelatedTo(sourceType, target, reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typesRelatedTo(sources, targets, reportErrors) { - var result = -1; + var _result = -1; for (var i = 0, len = sources.length; i < len; i++) { var related = isRelatedTo(sources[i], targets[i], reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeParameterRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -11104,19 +11516,20 @@ var ts; expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; + var _result; if (expandingFlags === 3) { - var result = 1; + _result = 1; } else { - var result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); + _result = propertiesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 0, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 1, reportErrors); + if (_result) { + _result &= stringIndexTypesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= numberIndexTypesRelatedTo(source, target, reportErrors); } } } @@ -11124,23 +11537,23 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result) { + if (_result) { var maybeCache = maybeStack[depth]; - var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; + var destinationCache = (_result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; ts.copyMap(maybeCache, destinationCache); } else { relation[id] = reportErrors ? 3 : 2; } - return result; + return _result; } function isDeeplyNestedGeneric(type, stack) { if (type.flags & 4096 && depth >= 10) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) { + if (t.flags & 4096 && t.target === _target) { count++; if (count >= 10) return true; @@ -11153,11 +11566,11 @@ var ts; if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } - var result = -1; + var _result = -1; var properties = getPropertiesOfObjectType(target); var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 131072); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp !== targetProp) { if (!sourceProp) { @@ -11208,7 +11621,7 @@ var ts; } return 0; } - result &= related; + _result &= related; if (sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) { if (reportErrors) { reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); @@ -11218,7 +11631,7 @@ var ts; } } } - return result; + return _result; } function propertiesIdenticalTo(source, target) { var sourceProperties = getPropertiesOfObjectType(source); @@ -11226,9 +11639,9 @@ var ts; if (sourceProperties.length !== targetProperties.length) { return 0; } - var result = -1; - for (var i = 0, len = sourceProperties.length; i < len; ++i) { - var sourceProp = sourceProperties[i]; + var _result = -1; + for (var _i = 0, _n = sourceProperties.length; _i < _n; _i++) { + var sourceProp = sourceProperties[_i]; var targetProp = getPropertyOfObjectType(target, sourceProp.name); if (!targetProp) { return 0; @@ -11237,9 +11650,9 @@ var ts; if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function signaturesRelatedTo(source, target, kind, reportErrors) { if (relation === identityRelation) { @@ -11250,18 +11663,18 @@ var ts; } var sourceSignatures = getSignaturesOfType(source, kind); var targetSignatures = getSignaturesOfType(target, kind); - var result = -1; + var _result = -1; var saveErrorInfo = errorInfo; - outer: for (var i = 0; i < targetSignatures.length; i++) { - var t = targetSignatures[i]; + outer: for (var _i = 0, _n = targetSignatures.length; _i < _n; _i++) { + var t = targetSignatures[_i]; if (!t.hasStringLiterals || target.flags & 65536) { var localErrors = reportErrors; - for (var j = 0; j < sourceSignatures.length; j++) { - var s = sourceSignatures[j]; + for (var _a = 0, _b = sourceSignatures.length; _a < _b; _a++) { + var s = sourceSignatures[_a]; if (!s.hasStringLiterals || source.flags & 65536) { var related = signatureRelatedTo(s, t, localErrors); if (related) { - result &= related; + _result &= related; errorInfo = saveErrorInfo; continue outer; } @@ -11271,7 +11684,7 @@ var ts; return 0; } } - return result; + return _result; } function signatureRelatedTo(source, target, reportErrors) { if (source === target) { @@ -11301,14 +11714,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - var result = -1; + var _result = -1; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + var _s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + var _t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); + var related = isRelatedTo(_s, _t, reportErrors); if (!related) { - related = isRelatedTo(t, s, false); + related = isRelatedTo(_t, _s, false); if (!related) { if (reportErrors) { reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); @@ -11317,13 +11730,13 @@ var ts; } errorInfo = saveErrorInfo; } - result &= related; + _result &= related; } var t = getReturnTypeOfSignature(target); if (t === voidType) - return result; + return _result; var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); + return _result & isRelatedTo(s, t, reportErrors); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -11331,15 +11744,15 @@ var ts; if (sourceSignatures.length !== targetSignatures.length) { return 0; } - var result = -1; + var _result = -1; for (var i = 0, len = sourceSignatures.length; i < len; ++i) { var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function stringIndexTypesRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -11379,11 +11792,12 @@ var ts; } return 0; } + var related; if (sourceStringType && sourceNumberType) { - var related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { - var related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); } if (!related) { if (reportErrors) { @@ -11458,14 +11872,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { + for (var _i = 0, _len = source.parameters.length; _i < _len; _i++) { + var s = source.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[_i]); + var t = target.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[_i]); + var _related = compareTypes(s, t); + if (!_related) { return 0; } - result &= related; + result &= _related; } if (compareReturnTypes) { result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); @@ -11473,8 +11887,9 @@ var ts; return result; } function isSupertypeOfEach(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && !isTypeSubtypeOf(types[i], candidate)) + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && !isTypeSubtypeOf(type, candidate)) return false; } return true; @@ -11517,6 +11932,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isTupleType(type) { + return (type.flags & 8192) && !!type.elementTypes; + } function getWidenedTypeOfObjectLiteral(type) { var properties = getPropertiesOfObjectType(type); var members = {}; @@ -11574,29 +11992,32 @@ var ts; return reportWideningErrorsInType(type.typeArguments[0]); } if (type.flags & 131072) { - var errorReported = false; + var _errorReported = false; ts.forEach(getPropertiesOfObjectType(type), function (p) { var t = getTypeOfSymbol(p); if (t.flags & 262144) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); } - errorReported = true; + _errorReported = true; } }); - return errorReported; + return _errorReported; } return false; } function reportImplicitAnyError(declaration, type) { var typeAsString = typeToString(getWidenedType(type)); + var diagnostic; switch (declaration.kind) { case 130: case 129: - var diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; case 128: - var diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; + diagnostic = declaration.dotDotDotToken ? + ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : + ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; case 195: case 132: @@ -11609,10 +12030,10 @@ var ts; error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; } - var diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; + diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; default: - var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); } @@ -11651,7 +12072,8 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) { + for (var _i = 0, _n = typeParameters.length; _i < _n; _i++) { + var unused = typeParameters[_i]; inferences.push({ primary: undefined, secondary: undefined }); } return { @@ -11670,19 +12092,21 @@ var ts; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) + if (source === sourceStack[i] && target === targetStack[i]) { return true; + } } return false; } function isWithinDepthLimit(type, stack) { if (depth >= 5) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) + if (t.flags & 4096 && t.target === _target) { count++; + } } return count < 5; } @@ -11697,7 +12121,9 @@ var ts; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { var inferences = context.inferences[i]; - var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + var candidates = inferiority ? + inferences.secondary || (inferences.secondary = []) : + inferences.primary || (inferences.primary = []); if (!ts.contains(candidates, source)) candidates.push(source); break; @@ -11707,16 +12133,16 @@ var ts; else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { var sourceTypes = source.typeArguments; var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); + for (var _i = 0; _i < sourceTypes.length; _i++) { + inferFromTypes(sourceTypes[_i], targetTypes[_i]); } } else if (target.flags & 16384) { - var targetTypes = target.types; + var _targetTypes = target.types; var typeParameterCount = 0; var typeParameter; - for (var i = 0; i < targetTypes.length; i++) { - var t = targetTypes[i]; + for (var _a = 0, _n = _targetTypes.length; _a < _n; _a++) { + var t = _targetTypes[_a]; if (t.flags & 512 && ts.contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; @@ -11732,9 +12158,10 @@ var ts; } } else if (source.flags & 16384) { - var sourceTypes = source.types; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], target); + var _sourceTypes = source.types; + for (var _b = 0, _c = _sourceTypes.length; _b < _c; _b++) { + var sourceType = _sourceTypes[_b]; + inferFromTypes(sourceType, target); } } else if (source.flags & 48128 && (target.flags & (4096 | 8192) || @@ -11759,8 +12186,8 @@ var ts; } function inferFromProperties(source, target) { var properties = getPropertiesOfObjectType(target); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfObjectType(source, targetProp.name); if (sourceProp) { inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); @@ -11845,16 +12272,19 @@ var ts; } ts.Debug.fail("should not get here"); } - function removeTypesFromUnionType(type, typeKind, isOfTypeKind) { + function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { if (type.flags & 16384) { var types = type.types; if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (narrowedType !== emptyObjectType) { + if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { return narrowedType; } } } + else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { + return getUnionType(emptyArray); + } return type; } function hasInitializer(node) { @@ -11926,12 +12356,12 @@ var ts; case 186: case 187: case 188: - case 213: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: return ts.forEachChild(node, isAssignedIn); } return false; @@ -11939,10 +12369,10 @@ var ts; } function resolveLocation(node) { var containerNodes = []; - for (var parent = node.parent; parent; parent = parent.parent) { - if ((ts.isExpression(parent) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent)) { - containerNodes.unshift(parent); + for (var _parent = node.parent; _parent; _parent = _parent.parent) { + if ((ts.isExpression(_parent) || ts.isObjectLiteralMethod(node)) && + isContextSensitive(_parent)) { + containerNodes.unshift(_parent); } } ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); @@ -11987,7 +12417,7 @@ var ts; } } break; - case 220: + case 221: case 200: case 195: case 132: @@ -12021,16 +12451,16 @@ var ts; } if (assumeTrue) { if (!typeInfo) { - return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true); + return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true, false); } if (isTypeSubtypeOf(typeInfo.type, type)) { return typeInfo.type; } - return removeTypesFromUnionType(type, typeInfo.flags, false); + return removeTypesFromUnionType(type, typeInfo.flags, false, false); } else { if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true); + return removeTypesFromUnionType(type, typeInfo.flags, true, false); } return type; } @@ -12106,46 +12536,56 @@ var ts; return type; } } - function markLinkedImportsAsReferenced(node) { - if (node) { - var nodeLinks = getNodeLinks(node); - while (nodeLinks.importOnRightSide) { - var rightSide = nodeLinks.importOnRightSide; - nodeLinks.importOnRightSide = undefined; - getSymbolLinks(rightSide).referenced = true; - ts.Debug.assert((rightSide.flags & 8388608) !== 0); - nodeLinks = getNodeLinks(ts.getDeclarationOfKind(rightSide, 202)); - } - } - } function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 161) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression); } - if (symbol.flags & 8388608) { - var symbolLinks = getSymbolLinks(symbol); - if (!symbolLinks.referenced) { - var importOrExportAssignment = getLeftSideOfImportEqualsOrExportAssignment(node); - if (!importOrExportAssignment || - (importOrExportAssignment.flags & 1) || - (importOrExportAssignment.kind === 208)) { - symbolLinks.referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); - } - else { - var nodeLinks = getNodeLinks(importOrExportAssignment); - ts.Debug.assert(!nodeLinks.importOnRightSide); - nodeLinks.importOnRightSide = symbol; - } - } - if (symbolLinks.referenced) { - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); + checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } + function isInsideFunction(node, threshold) { + var current = node; + while (current && current !== threshold) { + if (ts.isFunctionLike(current)) { + return true; + } + current = current.parent; + } + return false; + } + function checkBlockScopedBindingCapturedInLoop(node, symbol) { + if (languageVersion >= 2 || + (symbol.flags & 2) === 0 || + symbol.valueDeclaration.parent.kind === 217) { + return; + } + var container = symbol.valueDeclaration; + while (container.kind !== 194) { + container = container.parent; + } + container = container.parent; + if (container.kind === 175) { + container = container.parent; + } + var inFunction = isInsideFunction(node.parent, container); + var current = container; + while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { + if (isIterationStatement(current, false)) { + if (inFunction) { + grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); + } + getNodeLinks(symbol.valueDeclaration).flags |= 256; + break; + } + current = current.parent; + } + } function captureLexicalThis(node, container) { var classNode = container.parent && container.parent.kind === 196 ? container.parent : undefined; getNodeLinks(node).flags |= 2; @@ -12218,11 +12658,12 @@ var ts; var container = ts.getSuperContainer(node, true); if (container) { var canUseSuperExpression = false; + var needToCaptureLexicalThis; if (isCallExpression) { canUseSuperExpression = container.kind === 133; } else { - var needToCaptureLexicalThis = false; + needToCaptureLexicalThis = false; while (container && container.kind === 161) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = true; @@ -12231,19 +12672,19 @@ var ts; if (container.flags & 128) { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135; + container.kind === 131 || + container.kind === 134 || + container.kind === 135; } else { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135 || - container.kind === 130 || - container.kind === 129 || - container.kind === 133; + container.kind === 131 || + container.kind === 134 || + container.kind === 135 || + container.kind === 130 || + container.kind === 129 || + container.kind === 133; } } } @@ -12369,8 +12810,9 @@ var ts; var types = type.types; var mappedType; var mappedTypes; - for (var i = 0; i < types.length; i++) { - var t = mapper(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var t = mapper(current); if (t) { if (!mappedType) { mappedType = t; @@ -12428,7 +12870,9 @@ var ts; var type = getContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) || getIndexTypeOfContextualType(type, 1); + return getTypeOfPropertyOfContextualType(type, "" + index) + || getIndexTypeOfContextualType(type, 1) + || (languageVersion >= 2 ? checkIteratedType(type, undefined) : undefined); } return undefined; } @@ -12443,8 +12887,8 @@ var ts; if (node.contextualType) { return node.contextualType; } - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: @@ -12456,22 +12900,22 @@ var ts; return getContextualTypeForReturnExpression(node); case 155: case 156: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(_parent, node); case 158: - return getTypeFromTypeNode(parent.type); + return getTypeFromTypeNode(_parent.type); case 167: return getContextualTypeForBinaryOperand(node); - case 217: - return getContextualTypeForObjectLiteralElement(parent); + case 218: + return getContextualTypeForObjectLiteralElement(_parent); case 151: return getContextualTypeForElementExpression(node); case 168: return getContextualTypeForConditionalOperand(node); case 173: - ts.Debug.assert(parent.parent.kind === 169); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + ts.Debug.assert(_parent.parent.kind === 169); + return getContextualTypeForSubstitutionExpression(_parent.parent, node); case 159: - return getContextualType(parent); + return getContextualType(_parent); } return undefined; } @@ -12492,7 +12936,9 @@ var ts; } function getContextualSignature(node) { ts.Debug.assert(node.kind !== 132 || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getContextualType(node); + var type = ts.isObjectLiteralMethod(node) + ? getContextualTypeForObjectLiteralMethod(node) + : getContextualType(node); if (!type) { return undefined; } @@ -12501,12 +12947,13 @@ var ts; } var signatureList; var types = type.types; - for (var i = 0; i < types.length; i++) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; if (signatureList && - getSignaturesOfObjectOrUnionType(types[i], 0).length > 1) { + getSignaturesOfObjectOrUnionType(current, 0).length > 1) { return undefined; } - var signature = getNonGenericSignature(types[i]); + var signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { signatureList = [signature]; @@ -12531,15 +12978,15 @@ var ts; return mapper && mapper !== identityMapper; } function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 167 && parent.operatorToken.kind === 52 && parent.left === node) { + var _parent = node.parent; + if (_parent.kind === 167 && _parent.operatorToken.kind === 52 && _parent.left === node) { return true; } - if (parent.kind === 217) { - return isAssignmentTarget(parent.parent); + if (_parent.kind === 218) { + return isAssignmentTarget(_parent.parent); } - if (parent.kind === 151) { - return isAssignmentTarget(parent); + if (_parent.kind === 151) { + return isAssignmentTarget(_parent); } return false; } @@ -12604,21 +13051,24 @@ var ts; var propertiesArray = []; var contextualType = getContextualType(node); var typeFlags; - for (var i = 0; i < node.properties.length; i++) { - var memberDecl = node.properties[i]; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 217 || - memberDecl.kind === 218 || + if (memberDecl.kind === 218 || + memberDecl.kind === 219 || ts.isObjectLiteralMethod(memberDecl)) { - if (memberDecl.kind === 217) { - var type = checkPropertyAssignment(memberDecl, contextualMapper); + var type = void 0; + if (memberDecl.kind === 218) { + type = checkPropertyAssignment(memberDecl, contextualMapper); } else if (memberDecl.kind === 132) { - var type = checkObjectLiteralMethod(memberDecl, contextualMapper); + type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 218); - var type = memberDecl.name.kind === 126 ? unknownType : checkExpression(memberDecl.name, contextualMapper); + ts.Debug.assert(memberDecl.kind === 219); + type = memberDecl.name.kind === 126 + ? unknownType + : checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); @@ -12651,15 +13101,15 @@ var ts; for (var i = 0; i < propertiesArray.length; i++) { var propertyDecl = node.properties[i]; if (kind === 0 || isNumericName(propertyDecl.name)) { - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); + var _type = getTypeOfSymbol(propertiesArray[i]); + if (!ts.contains(propTypes, _type)) { + propTypes.push(_type); } } } - var result = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result.flags; - return result; + var _result = propTypes.length ? getUnionType(propTypes) : undefinedType; + typeFlags |= _result.flags; + return _result; } return undefined; } @@ -12734,7 +13184,9 @@ var ts; return anyType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 153 ? node.expression : node.left; + var left = node.kind === 153 + ? node.expression + : node.left; var type = checkExpressionOrQualifiedName(left); if (type !== unknownType && type !== anyType) { var prop = getPropertyOfType(getWidenedType(type), propertyName); @@ -12760,9 +13212,9 @@ var ts; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); } else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); + var _start = node.end - "]".length; + var _end = node.end; + grammarErrorAtPos(sourceFile, _start, _end - _start, ts.Diagnostics.Expression_expected); } } var objectType = getApparentType(checkExpression(node.expression)); @@ -12777,15 +13229,15 @@ var ts; return unknownType; } if (node.argumentExpression) { - var name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name !== undefined) { - var prop = getPropertyOfType(objectType, name); + var _name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + if (_name !== undefined) { + var prop = getPropertyOfType(objectType, _name); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); } else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name, symbolToString(objectType.symbol)); + error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, _name, symbolToString(objectType.symbol)); return unknownType; } } @@ -12872,22 +13324,22 @@ var ts; var specializedIndex = -1; var spliceIndex; ts.Debug.assert(!result.length); - for (var i = 0; i < signatures.length; i++) { - var signature = signatures[i]; + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent = signature.declaration && signature.declaration.parent; + var _parent = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent === lastParent) { + if (lastParent && _parent === lastParent) { index++; } else { - lastParent = parent; + lastParent = _parent; index = cutoffIndex; } } else { index = cutoffIndex = result.length; - lastParent = parent; + lastParent = _parent; } lastSymbol = symbol; if (signature.hasStringLiterals) { @@ -12979,30 +13431,31 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); + var argType = void 0; if (i === 0 && args[i].parent.kind === 157) { - var argType = globalTemplateStringsArrayType; + argType = globalTemplateStringsArrayType; } else { var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - var argType = checkExpressionWithContextualType(arg, paramType, mapper); + argType = checkExpressionWithContextualType(arg, paramType, mapper); } inferTypes(context, argType, paramType); } } if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); + for (var _i = 0; _i < args.length; _i++) { + if (excludeArgument[_i] === false) { + var _arg = args[_i]; + var _paramType = getTypeAtPosition(signature, _arg.kind === 171 ? -1 : _i); + inferTypes(context, checkExpressionWithContextualType(_arg, _paramType, inferenceMapper), _paramType); } } } var inferredTypes = getInferredTypes(context); context.failedTypeParameterIndex = ts.indexOf(inferredTypes, inferenceFailureType); - for (var i = 0; i < inferredTypes.length; i++) { - if (inferredTypes[i] === inferenceFailureType) { - inferredTypes[i] = unknownType; + for (var _i_1 = 0; _i_1 < inferredTypes.length; _i_1++) { + if (inferredTypes[_i_1] === inferenceFailureType) { + inferredTypes[_i_1] = unknownType; } } return context; @@ -13028,7 +13481,9 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : + arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : + checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { return false; } @@ -13122,50 +13577,53 @@ var ts; error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); } if (!produceDiagnostics) { - for (var i = 0, n = candidates.length; i < n; i++) { - if (hasCorrectArity(node, args, candidates[i])) { - return candidates[i]; + for (var _i = 0, _n = candidates.length; _i < _n; _i++) { + var candidate = candidates[_i]; + if (hasCorrectArity(node, args, candidate)) { + return candidate; } } } return resolveErrorCall(node); function chooseOverload(candidates, relation) { - for (var i = 0; i < candidates.length; i++) { - if (!hasCorrectArity(node, args, candidates[i])) { + for (var _a = 0, _b = candidates.length; _a < _b; _a++) { + var current = candidates[_a]; + if (!hasCorrectArity(node, args, current)) { continue; } - var originalCandidate = candidates[i]; - var inferenceResult; + var originalCandidate = current; + var inferenceResult = void 0; + var _candidate = void 0; + var typeArgumentsAreValid = void 0; while (true) { - var candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes; - var typeArgumentsAreValid; + _candidate = originalCandidate; + if (_candidate.typeParameters) { + var typeArgumentTypes = void 0; if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); + typeArgumentTypes = new Array(_candidate.typeParameters.length); + typeArgumentsAreValid = checkTypeArguments(_candidate, typeArguments, typeArgumentTypes, false); } else { - inferenceResult = inferTypeArguments(candidate, args, excludeArgument); + inferenceResult = inferTypeArguments(_candidate, args, excludeArgument); typeArgumentsAreValid = inferenceResult.failedTypeParameterIndex < 0; typeArgumentTypes = inferenceResult.inferredTypes; } if (!typeArgumentsAreValid) { break; } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); + _candidate = getSignatureInstantiation(_candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, _candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; if (index < 0) { - return candidate; + return _candidate; } excludeArgument[index] = false; } if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; + var instantiatedCandidate = _candidate; if (typeArgumentsAreValid) { candidateForArgumentError = instantiatedCandidate; } @@ -13177,7 +13635,7 @@ var ts; } } else { - ts.Debug.assert(originalCandidate === candidate); + ts.Debug.assert(originalCandidate === _candidate); candidateForArgumentError = originalCandidate; } } @@ -13305,9 +13763,6 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - if (languageVersion < 2) { - grammarErrorOnFirstToken(node.template, ts.Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher); - } return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { @@ -13323,9 +13778,13 @@ var ts; } function getTypeAtPosition(signature, pos) { if (pos >= 0) { - return signature.hasRestParameter ? pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; + return signature.hasRestParameter ? + pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : + pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; } - return signature.hasRestParameter ? getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : anyArrayType; + return signature.hasRestParameter ? + getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : + anyArrayType; } function assignContextualParameterTypes(signature, context, mapper) { var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); @@ -13335,9 +13794,9 @@ var ts; links.type = instantiateType(getTypeAtPosition(context, i), mapper); } if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = signature.parameters[signature.parameters.length - 1]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); + var _parameter = signature.parameters[signature.parameters.length - 1]; + var _links = getSymbolLinks(_parameter); + _links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); } } function getReturnTypeFromBody(func, contextualMapper) { @@ -13345,15 +13804,16 @@ var ts; if (!func.body) { return unknownType; } + var type; if (func.body.kind !== 174) { - var type = checkExpressionCached(func.body, contextualMapper); + type = checkExpressionCached(func.body, contextualMapper); } else { var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { return voidType; } - var type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); return unknownType; @@ -13466,19 +13926,21 @@ var ts; } return true; } - function checkReferenceExpression(n, invalidReferenceMessage, constantVarianleMessage) { + function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { function findSymbol(n) { var symbol = getNodeLinks(n).resolvedSymbol; return symbol && getExportSymbolOfValueSymbolIfExported(symbol); } function isReferenceOrErrorExpression(n) { switch (n.kind) { - case 64: + case 64: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; - case 153: - var symbol = findSymbol(n); - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; + } + case 153: { + var _symbol = findSymbol(n); + return !_symbol || _symbol === unknownSymbol || (_symbol.flags & ~8) !== 0; + } case 154: return true; case 159: @@ -13490,18 +13952,20 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 64: - case 153: + case 153: { var symbol = findSymbol(n); - return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096) !== 0; - case 154: + return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192) !== 0; + } + case 154: { var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8) { - var name = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name); - return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096) !== 0; + var _symbol = findSymbol(n.expression); + if (_symbol && index && index.kind === 8) { + var _name = index.text; + var prop = getPropertyOfType(getTypeOfSymbol(_symbol), _name); + return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192) !== 0; } return false; + } case 159: return isConstVariableReference(n.expression); default: @@ -13513,7 +13977,7 @@ var ts; return false; } if (isConstVariableReference(n)) { - error(n, constantVarianleMessage); + error(n, constantVariableMessage); return false; } return true; @@ -13573,8 +14037,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (types[i].flags & kind) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (current.flags & kind) { return true; } } @@ -13588,8 +14053,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (!(types[i].flags & kind)) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (!(current.flags & kind)) { return false; } } @@ -13623,18 +14089,19 @@ var ts; } function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { var properties = node.properties; - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { - var name = p.name; - var type = sourceType.flags & 1 ? sourceType : getTypeOfPropertyOfType(sourceType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, 1) || - getIndexTypeOfType(sourceType, 0); + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { + var _name = p.name; + var type = sourceType.flags & 1 ? sourceType : + getTypeOfPropertyOfType(sourceType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(sourceType, 1) || + getIndexTypeOfType(sourceType, 0); if (type) { - checkDestructuringAssignment(p.initializer || name, type); + checkDestructuringAssignment(p.initializer || _name, type); } else { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(_name)); } } else { @@ -13654,12 +14121,19 @@ var ts; if (e.kind !== 172) { if (e.kind !== 171) { var propName = "" + i; - var type = sourceType.flags & 1 ? sourceType : isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : getIndexTypeOfType(sourceType, 1); + var type = sourceType.flags & 1 ? sourceType : + isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : + getIndexTypeOfType(sourceType, 1); if (type) { checkDestructuringAssignment(e, type, contextualMapper); } else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + if (isTupleType(sourceType)) { + error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); + } + else { + error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } } } else { @@ -13802,7 +14276,9 @@ var ts; return rightType; } function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : someConstituentTypeHasKind(rightType, 1048576) ? node.right : undefined; + var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : + someConstituentTypeHasKind(rightType, 1048576) ? node.right : + undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); return false; @@ -13913,8 +14389,8 @@ var ts; } if (isConstEnumObjectType(type)) { var ok = (node.parent.kind === 153 && node.parent.expression === node) || - (node.parent.kind === 154 && node.parent.expression === node) || - ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); + (node.parent.kind === 154 && node.parent.expression === node) || + ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -14060,11 +14536,12 @@ var ts; if (indexSymbol) { var seenNumericIndexer = false; var seenStringIndexer = false; - for (var i = 0, len = indexSymbol.declarations.length; i < len; ++i) { - var declaration = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 121: + case 120: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -14072,7 +14549,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 119: + case 118: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -14139,7 +14616,7 @@ var ts; if (ts.getClassBaseTypeNode(node.parent)) { if (containsSuperCall(node.body)) { var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); + ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); if (superCallShouldBeFirst) { var statements = node.body.statements; if (!statements.length || statements[0].kind !== 177 || !isSuperCallExpression(statements[0].expression)) { @@ -14248,8 +14725,8 @@ var ts; else { signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); } - for (var i = 0; i < signaturesToCheck.length; i++) { - var otherSignature = signaturesToCheck[i]; + for (var _i = 0, _n = signaturesToCheck.length; _i < _n; _i++) { + var otherSignature = signaturesToCheck[_i]; if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { return; } @@ -14329,16 +14806,16 @@ var ts; }); if (subsequentNode) { if (subsequentNode.kind === node.kind) { - var errorNode = subsequentNode.name || subsequentNode; + var _errorNode = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { ts.Debug.assert(node.kind === 132 || node.kind === 131); ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128)); var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode, diagnostic); + error(_errorNode, diagnostic); return; } else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); + error(_errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -14354,8 +14831,9 @@ var ts; var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536; var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; - for (var i = 0; i < declarations.length; i++) { - var node = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var node = current; var inAmbientContext = ts.isInAmbientContext(node); var inAmbientContextOrInterface = node.parent.kind === 197 || node.parent.kind === 143 || inAmbientContext; if (inAmbientContextOrInterface) { @@ -14412,9 +14890,10 @@ var ts; var signatures = getSignaturesOfSymbol(symbol); var bodySignature = getSignatureFromDeclaration(bodyDeclaration); if (!bodySignature.hasStringLiterals) { - for (var i = 0, len = signatures.length; i < len; ++i) { - if (!signatures[i].hasStringLiterals && !isSignatureAssignableTo(bodySignature, signatures[i])) { - error(signatures[i].declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + for (var _a = 0, _b = signatures.length; _a < _b; _a++) { + var signature = signatures[_a]; + if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { + error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); break; } } @@ -14426,7 +14905,6 @@ var ts; if (!produceDiagnostics) { return; } - var symbol; var symbol = node.localSymbol; if (!symbol) { symbol = getSymbolOfNode(node); @@ -14461,13 +14939,15 @@ var ts; case 197: return 2097152; case 200: - return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; + return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 + ? 4194304 | 1048576 + : 4194304; case 196: case 199: return 2097152 | 1048576; - case 202: + case 203: var result = 0; - var target = resolveImport(getSymbolOfNode(d)); + var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); return result; default: @@ -14488,7 +14968,7 @@ var ts; } function checkFunctionLikeDeclaration(node) { checkSignatureDeclaration(node); - if (node.name.kind === 126) { + if (node.name && node.name.kind === 126) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -14561,8 +15041,8 @@ var ts; var current = node; while (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { @@ -14582,8 +15062,8 @@ var ts; return; } if (ts.getClassBaseTypeNode(enclosingClass)) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } else { @@ -14598,30 +15078,30 @@ var ts; if (node.kind === 200 && ts.getModuleInstanceState(node) !== 1) { return; } - var parent = getDeclarationContainer(node); - if (parent.kind === 220 && ts.isExternalModule(parent)) { + var _parent = getDeclarationContainer(node); + if (_parent.kind === 221 && ts.isExternalModule(_parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkVarDeclaredNamesNotShadowed(node) { - if (node.initializer && (ts.getCombinedNodeFlags(node) & 6144) === 0) { + if (node.initializer && (ts.getCombinedNodeFlags(node) & 12288) === 0) { var symbol = getSymbolOfNode(node); if (symbol.flags & 1) { var localDeclarationSymbol = resolveName(node, node.name.text, 3, undefined, undefined); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 6144) { + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288) { var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 194); var container = varDeclList.parent.kind === 175 && - varDeclList.parent.parent; + varDeclList.parent.parent; var namesShareScope = container && - (container.kind === 174 && ts.isAnyFunction(container.parent) || - (container.kind === 201 && container.kind === 200) || - container.kind === 220); + (container.kind === 174 && ts.isFunctionLike(container.parent) || + (container.kind === 201 && container.kind === 200) || + container.kind === 221); if (!namesShareScope) { - var name = symbolToString(localDeclarationSymbol); - error(ts.getErrorSpanForNode(node), ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + var _name = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, _name, _name); } } } @@ -14635,10 +15115,11 @@ var ts; return node.kind === 128; } function checkParameterInitializer(node) { - if (getRootDeclaration(node).kind === 128) { - var func = ts.getContainingFunction(node); - visit(node.initializer); + if (getRootDeclaration(node).kind !== 128) { + return; } + var func = ts.getContainingFunction(node); + visit(node.initializer); function visit(n) { if (n.kind === 64) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; @@ -14777,33 +15258,153 @@ var ts; checkSourceElement(node.statement); } function checkForOfStatement(node) { - checkGrammarForOfStatement(node); + checkGrammarForInOrForOfStatement(node); + if (node.initializer.kind === 194) { + checkForInOrForOfVariableDeclaration(node); + } + else { + var varExpr = node.initializer; + var iteratedType = checkRightHandSideOfForOf(node.expression); + if (varExpr.kind === 151 || varExpr.kind === 152) { + checkDestructuringAssignment(varExpr, iteratedType || unknownType); + } + else { + var leftType = checkExpression(varExpr); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + if (iteratedType) { + checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); + } + } + } + checkSourceElement(node.statement); } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); if (node.initializer.kind === 194) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); + var variable = node.initializer.declarations[0]; + if (variable && ts.isBindingPattern(variable.name)) { + error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } + checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; - var exprType = checkExpression(varExpr); - if (!allConstituentTypesHaveKind(exprType, 1 | 258)) { + var leftType = checkExpression(varExpr); + if (varExpr.kind === 151 || varExpr.kind === 152) { + error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + } + else if (!allConstituentTypesHaveKind(leftType, 1 | 258)) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); } } - var exprType = checkExpression(node.expression); - if (!allConstituentTypesHaveKind(exprType, 1 | 48128 | 512)) { + var rightType = checkExpression(node.expression); + if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) { error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } checkSourceElement(node.statement); } + function checkForInOrForOfVariableDeclaration(iterationStatement) { + var variableDeclarationList = iterationStatement.initializer; + if (variableDeclarationList.declarations.length >= 1) { + var decl = variableDeclarationList.declarations[0]; + checkVariableDeclaration(decl); + } + } + function checkRightHandSideOfForOf(rhsExpression) { + var expressionType = getTypeOfExpression(rhsExpression); + return languageVersion >= 2 + ? checkIteratedType(expressionType, rhsExpression) + : checkElementTypeOfArrayOrString(expressionType, rhsExpression); + } + function checkIteratedType(iterable, expressionForError) { + ts.Debug.assert(languageVersion >= 2); + var iteratedType = getIteratedType(iterable, expressionForError); + if (expressionForError && iteratedType) { + var completeIterableType = globalIterableType !== emptyObjectType + ? createTypeReference(globalIterableType, [iteratedType]) + : emptyObjectType; + checkTypeAssignableTo(iterable, completeIterableType, expressionForError); + } + return iteratedType; + function getIteratedType(iterable, expressionForError) { + if (allConstituentTypesHaveKind(iterable, 1)) { + return undefined; + } + var iteratorFunction = getTypeOfPropertyOfType(iterable, ts.getPropertyNameForKnownSymbolName("iterator")); + if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, 1)) { + return undefined; + } + var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray; + if (iteratorFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator); + } + return undefined; + } + var iterator = getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iterator, 1)) { + return undefined; + } + var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); + if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, 1)) { + return undefined; + } + var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray; + if (iteratorNextFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method); + } + return undefined; + } + var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iteratorNextResult, 1)) { + return undefined; + } + var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); + if (!iteratorNextValue) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); + } + return undefined; + } + return iteratorNextValue; + } + } + function checkElementTypeOfArrayOrString(arrayOrStringType, expressionForError) { + ts.Debug.assert(languageVersion < 2); + var arrayType = removeTypesFromUnionType(arrayOrStringType, 258, true, true); + var hasStringConstituent = arrayOrStringType !== arrayType; + var reportedError = false; + if (hasStringConstituent) { + if (languageVersion < 1) { + error(expressionForError, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + reportedError = true; + } + if (arrayType === emptyObjectType) { + return stringType; + } + } + if (!isArrayLikeType(arrayType)) { + if (!reportedError) { + var diagnostic = hasStringConstituent + ? ts.Diagnostics.Type_0_is_not_an_array_type + : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; + error(expressionForError, diagnostic, typeToString(arrayType)); + } + return hasStringConstituent ? stringType : unknownType; + } + var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType; + if (hasStringConstituent) { + if (arrayElementType.flags & 258) { + return stringType; + } + return getUnionType([arrayElementType, stringType]); + } + return arrayElementType; + } function checkBreakOrContinueStatement(node) { checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } @@ -14852,8 +15453,8 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); - ts.forEach(node.clauses, function (clause) { - if (clause.kind === 214 && !hasDuplicateDefaultClause) { + ts.forEach(node.caseBlock.clauses, function (clause) { + if (clause.kind === 215 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -14865,7 +15466,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 213) { + if (produceDiagnostics && clause.kind === 214) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); if (!isTypeAssignableTo(expressionType, caseType)) { @@ -14879,7 +15480,7 @@ var ts; if (!checkGrammarStatementInAmbientContext(node)) { var current = node.parent; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { break; } if (current.kind === 189 && current.label.text === node.label.text) { @@ -14907,16 +15508,33 @@ var ts; checkBlock(node.tryBlock); var catchClause = node.catchClause; if (catchClause) { - if (catchClause.type) { - var sourceFile = ts.getSourceFileOfNode(node); - var colonStart = ts.skipTrivia(sourceFile.text, catchClause.name.end); - grammarErrorAtPos(sourceFile, colonStart, ":".length, ts.Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation); + if (catchClause.variableDeclaration) { + if (catchClause.variableDeclaration.name.kind !== 64) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); + } + else if (catchClause.variableDeclaration.type) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); + } + else if (catchClause.variableDeclaration.initializer) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); + } + else { + var identifierName = catchClause.variableDeclaration.name.text; + var locals = catchClause.block.locals; + if (locals && ts.hasProperty(locals, identifierName)) { + var localSymbol = locals[identifierName]; + if (localSymbol && (localSymbol.flags & 2) !== 0) { + grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + } + } + checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); + } } - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.name); checkBlock(catchClause.block); } - if (node.finallyBlock) + if (node.finallyBlock) { checkBlock(node.finallyBlock); + } } function checkIndexConstraints(type) { var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1); @@ -14931,8 +15549,8 @@ var ts; }); if (type.flags & 1024 && type.symbol.valueDeclaration.kind === 196) { var classDeclaration = type.symbol.valueDeclaration; - for (var i = 0; i < classDeclaration.members.length; i++) { - var member = classDeclaration.members[i]; + for (var _i = 0, _a = classDeclaration.members, _n = _a.length; _i < _n; _i++) { + var member = _a[_i]; if (!(member.flags & 128) && ts.hasDynamicName(member)) { var propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0); @@ -14959,20 +15577,22 @@ var ts; if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) { return; } - var errorNode; + var _errorNode; if (prop.valueDeclaration.name.kind === 126 || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; + _errorNode = prop.valueDeclaration; } else if (indexDeclaration) { - errorNode = indexDeclaration; + _errorNode = indexDeclaration; } else if (containingType.flags & 2048) { var someBaseClassHasBothPropertyAndIndexer = ts.forEach(containingType.baseTypes, function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; + _errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); + if (_errorNode && !isTypeAssignableTo(propertyType, indexType)) { + var errorMessage = indexKind === 0 + ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 + : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; + error(_errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); } } } @@ -14989,7 +15609,7 @@ var ts; } function checkTypeParameters(typeParameterDeclarations) { if (typeParameterDeclarations) { - for (var i = 0; i < typeParameterDeclarations.length; i++) { + for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { var node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { @@ -15004,10 +15624,12 @@ var ts; } function checkClassDeclaration(node) { checkGrammarClassDeclarationHeritageClauses(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + if (node.name) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + } checkTypeParameters(node.typeParameters); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -15020,10 +15642,10 @@ var ts; if (type.baseTypes.length) { if (produceDiagnostics) { var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); + checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(node, baseTypeNode.typeName, 107455)) { + checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + if (baseType.symbol !== resolveEntityName(baseTypeNode.typeName, 107455)) { error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -15039,7 +15661,7 @@ var ts; if (t !== unknownType) { var declaredType = (t.flags & 4096) ? t.target : t; if (declaredType.flags & (1024 | 2048)) { - checkTypeAssignableTo(type, t, node.name, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -15059,8 +15681,9 @@ var ts; } function checkKindsOfPropertyMemberOverrides(type, baseType) { var baseProperties = getPropertiesOfObjectType(baseType); - for (var i = 0, len = baseProperties.length; i < len; ++i) { - var base = getTargetSymbol(baseProperties[i]); + for (var _i = 0, _n = baseProperties.length; _i < _n; _i++) { + var baseProperty = baseProperties[_i]; + var base = getTargetSymbol(baseProperty); if (base.flags & 134217728) { continue; } @@ -15077,7 +15700,7 @@ var ts; if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) { continue; } - var errorMessage; + var errorMessage = void 0; if (base.flags & 8192) { if (derived.flags & 98304) { errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; @@ -15135,11 +15758,11 @@ var ts; var seen = {}; ts.forEach(type.declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); var ok = true; - for (var i = 0, len = type.baseTypes.length; i < len; ++i) { - var base = type.baseTypes[i]; + for (var _i = 0, _a = type.baseTypes, _n = _a.length; _i < _n; _i++) { + var base = _a[_i]; var properties = getPropertiesOfObjectType(base); - for (var j = 0, proplen = properties.length; j < proplen; ++j) { - var prop = properties[j]; + for (var _b = 0, _c = properties.length; _b < _c; _b++) { + var prop = properties[_b]; if (!ts.hasProperty(seen, prop.name)) { seen[prop.name] = { prop: prop, containingType: base }; } @@ -15194,8 +15817,8 @@ var ts; checkSourceElement(node.type); } function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128)) { + var _nodeLinks = getNodeLinks(node); + if (!(_nodeLinks.flags & 128)) { var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); var autoValue = 0; @@ -15232,7 +15855,7 @@ var ts; getNodeLinks(member).enumMemberValue = autoValue++; } }); - nodeLinks.flags |= 128; + _nodeLinks.flags |= 128; } function getConstantValueForEnumMemberInitializer(initializer, enumIsConst) { return evalConstant(initializer); @@ -15287,10 +15910,10 @@ var ts; } var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; + var _enumType; var propertyName; if (e.kind === 64) { - enumType = currentType; + _enumType = currentType; propertyName = e.text; } else { @@ -15299,21 +15922,21 @@ var ts; e.argumentExpression.kind !== 8) { return undefined; } - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.argumentExpression.text; } else { - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.name.text; } - if (enumType !== currentType) { + if (_enumType !== currentType) { return undefined; } } if (propertyName === undefined) { return undefined; } - var property = getPropertyOfObjectType(enumType, propertyName); + var property = getPropertyOfObjectType(_enumType, propertyName); if (!property || !(property.flags & 8)) { return undefined; } @@ -15373,8 +15996,8 @@ var ts; } function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if ((declaration.kind === 196 || (declaration.kind === 195 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -15387,21 +16010,15 @@ var ts; if (!ts.isInAmbientContext(node) && node.name.kind === 8) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } - else if (node.name.kind === 64 && node.body.kind === 201) { - var statements = node.body.statements; - for (var i = 0, n = statements.length; i < n; i++) { - var statement = statements[i]; - if (statement.kind === 208) { - grammarErrorOnNode(statement, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); - } - } - } } checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - if (symbol.flags & 512 && symbol.declarations.length > 1 && !ts.isInAmbientContext(node) && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { + if (symbol.flags & 512 + && symbol.declarations.length > 1 + && !ts.isInAmbientContext(node) + && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { var classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (classOrFunc) { if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(classOrFunc)) { @@ -15436,8 +16053,10 @@ var ts; return false; } var inAmbientExternalModule = node.parent.kind === 201 && node.parent.parent.name.kind === 8; - if (node.parent.kind !== 220 && !inAmbientExternalModule) { - error(moduleName, node.kind === 209 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); + if (node.parent.kind !== 221 && !inAmbientExternalModule) { + error(moduleName, node.kind === 210 ? + ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : + ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -15446,15 +16065,17 @@ var ts; } return true; } - function checkImportSymbol(node) { + function checkAliasSymbol(node) { var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target !== unknownSymbol) { var excludedMeanings = (symbol.flags & 107455 ? 107455 : 0) | - (symbol.flags & 793056 ? 793056 : 0) | - (symbol.flags & 1536 ? 1536 : 0); + (symbol.flags & 793056 ? 793056 : 0) | + (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 211 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + var message = node.kind === 212 ? + ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : + ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } } @@ -15462,10 +16083,10 @@ var ts; function checkImportBinding(node) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkImportSymbol(node); + checkAliasSymbol(node); } function checkImportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { @@ -15475,7 +16096,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { checkImportBinding(importClause.namedBindings); } else { @@ -15487,50 +16108,108 @@ var ts; } function checkImportEqualsDeclaration(node) { checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { + if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); - if (target !== unknownSymbol) { - if (target.flags & 107455) { - var moduleName = getFirstIdentifier(node.moduleReference); - if (resolveEntityName(node, moduleName, 107455 | 1536).flags & 1536) { - checkExpressionOrQualifiedName(node.moduleReference); - } - else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } + if (node.flags & 1) { + markExportAsReferenced(node); } - } - else { - if (checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); + if (ts.isInternalModuleImportEqualsDeclaration(node)) { + var target = resolveAlias(getSymbolOfNode(node)); + if (target !== unknownSymbol) { + if (target.flags & 107455) { + var moduleName = getFirstIdentifier(node.moduleReference); + if (!(resolveEntityName(moduleName, 107455 | 1536).flags & 1536)) { + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); + } + } + if (target.flags & 793056) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); + } + } } } } function checkExportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { - ts.forEach(node.exportClause.elements, checkImportSymbol); + ts.forEach(node.exportClause.elements, checkExportSpecifier); } } } + function checkExportSpecifier(node) { + checkAliasSymbol(node); + if (!node.parent.parent.moduleSpecifier) { + markExportAsReferenced(node); + } + } function checkExportAssignment(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + var container = node.parent.kind === 221 ? node.parent : node.parent.parent; + if (container.kind === 200 && container.name.kind === 64) { + error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + return; + } + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - var container = node.parent; - if (container.kind !== 220) { - container = container.parent; + if (node.expression.kind === 64) { + markExportAsReferenced(node); + } + else { + checkExpressionCached(node.expression); + } + checkExternalModuleExports(container); + } + function getModuleStatements(node) { + if (node.kind === 221) { + return node.statements; + } + if (node.kind === 200 && node.body.kind === 201) { + return node.body.statements; + } + return emptyArray; + } + function hasExportedMembers(moduleSymbol) { + var declarations = moduleSymbol.declarations; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var statements = getModuleStatements(current); + for (var _a = 0, _b = statements.length; _a < _b; _a++) { + var node = statements[_a]; + if (node.kind === 210) { + var exportClause = node.exportClause; + if (!exportClause) { + return true; + } + var specifiers = exportClause.elements; + for (var _c = 0, _d = specifiers.length; _c < _d; _c++) { + var specifier = specifiers[_c]; + if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) { + return true; + } + } + } + else if (node.kind !== 209 && node.flags & 1 && !(node.flags & 256)) { + return true; + } + } + } + } + function checkExternalModuleExports(node) { + var moduleSymbol = getSymbolOfNode(node); + var links = getSymbolLinks(moduleSymbol); + if (!links.exportsChecked) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + if (hasExportedMembers(moduleSymbol)) { + var declaration = getDeclarationOfAliasSymbol(defaultSymbol) || defaultSymbol.valueDeclaration; + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + } + links.exportsChecked = true; } - checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); } function checkSourceElement(node) { if (!node) @@ -15622,13 +16301,13 @@ var ts; return checkEnumDeclaration(node); case 200: return checkModuleDeclaration(node); - case 203: + case 204: return checkImportDeclaration(node); - case 202: + case 203: return checkImportEqualsDeclaration(node); - case 209: + case 210: return checkExportDeclaration(node); - case 208: + case 209: return checkExportAssignment(node); case 176: checkGrammarStatementInAmbientContext(node); @@ -15669,7 +16348,7 @@ var ts; case 150: case 151: case 152: - case 217: + case 218: case 153: case 154: case 155: @@ -15701,18 +16380,20 @@ var ts; case 185: case 186: case 188: - case 213: + case 202: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: case 193: case 194: case 196: case 199: - case 219: case 220: + case 209: + case 221: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15731,11 +16412,7 @@ var ts; ts.forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); if (ts.isExternalModule(node)) { - var symbol = getExportAssignmentSymbol(node.symbol); - if (symbol && symbol.flags & 8388608) { - getSymbolLinks(symbol).referenced = true; - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + checkExternalModuleExports(node); } if (potentialThisCollisions.length) { ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); @@ -15804,7 +16481,7 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: @@ -15824,11 +16501,6 @@ var ts; copySymbol(location.symbol, meaning); } break; - case 216: - if (location.name.text) { - copySymbol(location.symbol, meaning); - } - break; } memberFlags = location.flags; location = location.parent; @@ -15862,11 +16534,11 @@ var ts; return true; } switch (node.kind) { + case 111: + case 118: + case 120: case 112: - case 119: case 121: - case 113: - case 122: return true; case 98: return node.parent.kind !== 164; @@ -15878,21 +16550,21 @@ var ts; } case 125: ts.Debug.assert(node.kind === 64 || node.kind === 125, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); - var parent = node.parent; - if (parent.kind === 142) { + var _parent = node.parent; + if (_parent.kind === 142) { return false; } - if (139 <= parent.kind && parent.kind <= 147) { + if (139 <= _parent.kind && _parent.kind <= 147) { return true; } - switch (parent.kind) { + switch (_parent.kind) { case 127: - return node === parent.constraint; + return node === _parent.constraint; case 130: case 129: case 128: case 193: - return node === parent.type; + return node === _parent.type; case 195: case 160: case 161: @@ -15901,16 +16573,16 @@ var ts; case 131: case 134: case 135: - return node === parent.type; + return node === _parent.type; case 136: case 137: case 138: - return node === parent.type; + return node === _parent.type; case 158: - return node === parent.type; + return node === _parent.type; case 155: case 156: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + return _parent.typeArguments && ts.indexOf(_parent.typeArguments, node) >= 0; case 157: return false; } @@ -15921,11 +16593,11 @@ var ts; while (nodeOnRightSide.parent.kind === 125) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 202) { + if (nodeOnRightSide.parent.kind === 203) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 208) { - return nodeOnRightSide.parent.exportName === nodeOnRightSide && nodeOnRightSide.parent; + if (nodeOnRightSide.parent.kind === 209) { + return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; } @@ -15937,11 +16609,11 @@ var ts; (node.parent.kind === 153 && node.parent.name === node); } function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 208) { - return resolveEntityName(entityName.parent.parent, entityName, 107455 | 793056 | 1536 | 8388608); + if (entityName.parent.kind === 209) { + return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } if (entityName.kind !== 153) { if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15957,7 +16629,7 @@ var ts; } if (entityName.kind === 64) { var meaning = 107455 | 8388608; - return resolveEntityName(entityName, entityName, meaning); + return resolveEntityName(entityName, meaning); } else if (entityName.kind === 153) { var symbol = getNodeLinks(entityName).resolvedSymbol; @@ -15967,17 +16639,17 @@ var ts; return getNodeLinks(entityName).resolvedSymbol; } else if (entityName.kind === 125) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { + var _symbol = getNodeLinks(entityName).resolvedSymbol; + if (!_symbol) { checkQualifiedName(entityName); } return getNodeLinks(entityName).resolvedSymbol; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 139 ? 793056 : 1536; - meaning |= 8388608; - return resolveEntityName(entityName, entityName, meaning); + var _meaning = entityName.parent.kind === 139 ? 793056 : 1536; + _meaning |= 8388608; + return resolveEntityName(entityName, _meaning); } return undefined; } @@ -15985,11 +16657,13 @@ var ts; if (isInsideWithStatementBody(node)) { return undefined; } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationName(node)) { return getSymbolOfNode(node.parent); } if (node.kind === 64 && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 208 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); + return node.parent.kind === 209 + ? getSymbolOfEntityNameOrPropertyAccessExpression(node) + : getSymbolOfPartOfRightHandSideOfImportEquals(node); } switch (node.kind) { case 64: @@ -16000,18 +16674,19 @@ var ts; case 90: var type = checkExpression(node); return type.symbol; - case 114: + case 113: var constructorDeclaration = node.parent; if (constructorDeclaration && constructorDeclaration.kind === 133) { return constructorDeclaration.parent.symbol; } return undefined; case 8: - if (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) { - var importSymbol = getSymbolOfNode(node.parent.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; + var moduleName; + if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && + ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || + ((node.parent.kind === 204 || node.parent.kind === 210) && + node.parent.moduleSpecifier === node)) { + return resolveExternalModuleName(node, node); } case 7: if (node.parent.kind == 154 && node.parent.argumentExpression === node) { @@ -16028,8 +16703,8 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 218) { - return resolveEntityName(location, location.name, 107455); + if (location && location.kind === 219) { + return resolveEntityName(location.name, 107455); } return undefined; } @@ -16048,21 +16723,21 @@ var ts; return getDeclaredTypeOfSymbol(symbol); } if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); + var _symbol = getSymbolInfo(node); + return _symbol && getDeclaredTypeOfSymbol(_symbol); } if (ts.isDeclaration(node)) { - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); + var _symbol_1 = getSymbolOfNode(node); + return getTypeOfSymbol(_symbol_1); } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); + if (ts.isDeclarationName(node)) { + var _symbol_2 = getSymbolInfo(node); + return _symbol_2 && getTypeOfSymbol(_symbol_2); } if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); + var _symbol_3 = getSymbolInfo(node); + var declaredType = _symbol_3 && getDeclaredTypeOfSymbol(_symbol_3); + return declaredType !== unknownType ? declaredType : getTypeOfSymbol(_symbol_3); } return unknownType; } @@ -16073,7 +16748,7 @@ var ts; return checkExpression(expr); } function getAugmentedPropertiesOfType(type) { - var type = getApparentType(type); + type = getApparentType(type); var propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) { ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { @@ -16087,9 +16762,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name = symbol.name; + var _name = symbol.name; ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name)); + symbols.push(getPropertyOfType(t, _name)); }); return symbols; } @@ -16102,7 +16777,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 220; + return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 221; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -16132,6 +16807,10 @@ var ts; return generatedNames; function generateNames(node) { switch (node.kind) { + case 195: + case 196: + generateNameForFunctionOrClassDeclaration(node); + break; case 200: generateNameForModuleOrEnum(node); generateNames(node.body); @@ -16139,13 +16818,16 @@ var ts; case 199: generateNameForModuleOrEnum(node); break; - case 203: + case 204: generateNameForImportDeclaration(node); break; - case 209: + case 210: generateNameForExportDeclaration(node); break; - case 220: + case 209: + generateNameForExportAssignment(node); + break; + case 221: case 201: ts.forEach(node.statements, generateNames); break; @@ -16155,40 +16837,31 @@ var ts; return ts.hasProperty(globals, name) || ts.hasProperty(sourceFile.identifiers, name) || ts.hasProperty(generatedNames, name); } function makeUniqueName(baseName) { - if (baseName.charCodeAt(0) !== 95) { - var baseName = "_" + baseName; - if (!isExistingName(baseName)) { - return generatedNames[baseName] = baseName; - } - } - if (baseName.charCodeAt(baseName.length - 1) !== 95) { - baseName += "_"; - } - var i = 1; - while (true) { - name = baseName + i; - if (!isExistingName(name)) { - return generatedNames[name] = name; - } - i++; - } + var _name = ts.generateUniqueName(baseName, isExistingName); + return generatedNames[_name] = _name; } function assignGeneratedName(node, name) { getNodeLinks(node).generatedName = ts.unescapeIdentifier(name); } + function generateNameForFunctionOrClassDeclaration(node) { + if (!node.name) { + assignGeneratedName(node, makeUniqueName("default")); + } + } function generateNameForModuleOrEnum(node) { if (node.name.kind === 64) { - var name = node.name.text; - assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name)); + var _name = node.name.text; + assignGeneratedName(node, isUniqueLocalName(_name, node) ? _name : makeUniqueName(_name)); } } function generateNameForImportOrExportDeclaration(node) { var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 ? ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; + var baseName = expr.kind === 8 ? + ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; assignGeneratedName(node, makeUniqueName(baseName)); } function generateNameForImportDeclaration(node) { - if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 206) { + if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 207) { generateNameForImportOrExportDeclaration(node); } } @@ -16197,6 +16870,11 @@ var ts; generateNameForImportOrExportDeclaration(node); } } + function generateNameForExportAssignment(node) { + if (node.expression.kind !== 64) { + assignGeneratedName(node, makeUniqueName("default")); + } + } } function getGeneratedNameForNode(node) { var links = getNodeLinks(node); @@ -16211,9 +16889,9 @@ var ts; function getLocalNameForImportDeclaration(node) { return getGeneratedNameForNode(node); } - function getImportNameSubstitution(symbol) { - var declaration = getDeclarationOfImportSymbol(symbol); - if (declaration && declaration.kind === 207) { + function getAliasNameSubstitution(symbol) { + var declaration = getDeclarationOfAliasSymbol(symbol); + if (declaration && declaration.kind === 208) { var moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); var propertyName = declaration.propertyName || declaration.name; return moduleName + "." + ts.unescapeIdentifier(propertyName.text); @@ -16243,38 +16921,35 @@ var ts; return getExportNameSubstitution(exportSymbol, node.parent); } if (symbol.flags & 8388608) { - return getImportNameSubstitution(symbol); + return getAliasNameSubstitution(symbol); } } } - function getExportAssignmentName(node) { - var symbol = getExportAssignmentSymbol(getSymbolOfNode(node)); - return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; + function hasExportDefaultValue(node) { + var symbol = getResolvedExportAssignmentSymbol(getSymbolOfNode(node)); + return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol); } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 220 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 221 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } - return isImportResolvedToValue(getSymbolOfNode(node)); + return isAliasResolvedToValue(getSymbolOfNode(node)); } - function isImportResolvedToValue(symbol) { - var target = resolveImport(symbol); + function isAliasResolvedToValue(symbol) { + var target = resolveAlias(symbol); return target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || s.constEnumOnlyModule; } - function isReferencedImportDeclaration(node) { - if (isImportSymbolDeclaration(node)) { + function isReferencedAliasDeclaration(node) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (getSymbolLinks(symbol).referenced) { return true; } - if (node.kind === 202 && node.flags & 1 && isImportResolvedToValue(symbol)) { - return true; - } } - return ts.forEachChild(node, isReferencedImportDeclaration); + return ts.forEachChild(node, isReferencedAliasDeclaration); } function isImplementationOfOverload(node) { if (ts.nodeIsPresent(node.body)) { @@ -16293,14 +16968,14 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 219) { + if (node.kind === 220) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & 8)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 219) { + if (declaration.kind === 220) { return getEnumMemberValue(declaration); } } @@ -16308,7 +16983,9 @@ var ts; } function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 | 131072)) ? getTypeOfSymbol(symbol) : unknownType; + var type = symbol && !(symbol.flags & (2048 | 131072)) + ? getTypeOfSymbol(symbol) + : unknownType; getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -16316,15 +16993,42 @@ var ts; getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function isUnknownIdentifier(location, name) { + ts.Debug.assert(!ts.nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location"); return !resolveName(location, name, 107455, undefined, undefined) && !ts.hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name); } + function getBlockScopedVariableId(n) { + ts.Debug.assert(!ts.nodeIsSynthesized(n)); + if (n.parent.kind === 153 && + n.parent.name === n) { + return undefined; + } + if (n.parent.kind === 150 && + n.parent.propertyName === n) { + return undefined; + } + var declarationSymbol = (n.parent.kind === 193 && n.parent.name === n) || + n.parent.kind === 150 + ? getSymbolOfNode(n.parent) + : undefined; + var symbol = declarationSymbol || + getNodeLinks(n).resolvedSymbol || + resolveName(n, n.text, 107455 | 8388608, undefined, undefined); + var isLetOrConst = symbol && + (symbol.flags & 2) && + symbol.valueDeclaration.parent.kind !== 217; + if (isLetOrConst) { + getSymbolLinks(symbol); + return symbol.id; + } + return undefined; + } function createResolver() { return { getGeneratedNameForNode: getGeneratedNameForNode, getExpressionNameSubstitution: getExpressionNameSubstitution, - getExportAssignmentName: getExportAssignmentName, - isReferencedImportDeclaration: isReferencedImportDeclaration, + hasExportDefaultValue: hasExportDefaultValue, + isReferencedAliasDeclaration: isReferencedAliasDeclaration, getNodeCheckFlags: getNodeCheckFlags, isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, isDeclarationVisible: isDeclarationVisible, @@ -16334,7 +17038,8 @@ var ts; isSymbolAccessible: isSymbolAccessible, isEntityNameVisible: isEntityNameVisible, getConstantValue: getConstantValue, - isUnknownIdentifier: isUnknownIdentifier + isUnknownIdentifier: isUnknownIdentifier, + getBlockScopedVariableId: getBlockScopedVariableId }; } function initializeTypeChecker() { @@ -16362,6 +17067,7 @@ var ts; globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); globalESSymbolType = getGlobalType("Symbol"); globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); + globalIterableType = getGlobalType("Iterable", 1); } else { globalTemplateStringsArrayType = unknownType; @@ -16387,10 +17093,10 @@ var ts; case 175: case 195: case 198: + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 128: break; default: @@ -16401,17 +17107,17 @@ var ts; } var lastStatic, lastPrivate, lastProtected, lastDeclare; var flags = 0; - for (var i = 0, n = node.modifiers.length; i < n; i++) { - var modifier = node.modifiers[i]; + for (var _i = 0, _a = node.modifiers, _n = _a.length; _i < _n; _i++) { + var modifier = _a[_i]; switch (modifier.kind) { - case 109: case 108: case 107: - var text; - if (modifier.kind === 109) { + case 106: + var text = void 0; + if (modifier.kind === 108) { text = "public"; } - else if (modifier.kind === 108) { + else if (modifier.kind === 107) { text = "protected"; lastProtected = modifier; } @@ -16425,16 +17131,16 @@ var ts; else if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } flags |= ts.modifierToFlag(modifier.kind); break; - case 110: + case 109: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } else if (node.kind === 128) { @@ -16458,7 +17164,7 @@ var ts; } flags |= 1; break; - case 115: + case 114: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } @@ -16487,7 +17193,7 @@ var ts; return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); } } - else if ((node.kind === 203 || node.kind === 202) && flags & 2) { + else if ((node.kind === 204 || node.kind === 203) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); } else if (node.kind === 197 && flags & 2) { @@ -16564,7 +17270,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); } - if (parameter.flags & 243) { + if (parameter.flags & 499) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); } if (parameter.questionToken) { @@ -16576,7 +17282,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 121 && parameter.type.kind !== 119) { + if (parameter.type.kind !== 120 && parameter.type.kind !== 118) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -16584,7 +17290,7 @@ var ts; } } function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 243) { + if (node.flags & 499) { grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); } } @@ -16606,8 +17312,8 @@ var ts; function checkGrammarForOmittedArgument(node, arguments) { if (arguments) { var sourceFile = ts.getSourceFileOfNode(node); - for (var i = 0, n = arguments.length; i < n; i++) { - var arg = arguments[i]; + for (var _i = 0, _n = arguments.length; _i < _n; _i++) { + var arg = arguments[_i]; if (arg.kind === 172) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } @@ -16633,9 +17339,8 @@ var ts; var seenExtendsClause = false; var seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16649,7 +17354,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -16662,9 +17367,8 @@ var ts; function checkGrammarInterfaceDeclaration(node) { var seenExtendsClause = false; if (node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16672,7 +17376,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -16709,19 +17413,19 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var inStrictMode = (node.parserContextFlags & 1) !== 0; - for (var i = 0, n = node.properties.length; i < n; i++) { - var prop = node.properties[i]; - var name = prop.name; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var prop = _a[_i]; + var _name = prop.name; if (prop.kind === 172 || - name.kind === 126) { - checkGrammarComputedPropertyName(name); + _name.kind === 126) { + checkGrammarComputedPropertyName(_name); continue; } - var currentKind; - if (prop.kind === 217 || prop.kind === 218) { + var currentKind = void 0; + if (prop.kind === 218 || prop.kind === 219) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name.kind === 7) { - checkGrammarNumbericLiteral(name); + if (_name.kind === 7) { + checkGrammarNumbericLiteral(_name); } currentKind = Property; } @@ -16737,26 +17441,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name.text)) { - seen[name.text] = currentKind; + if (!ts.hasProperty(seen, _name.text)) { + seen[_name.text] = currentKind; } else { - var existingKind = seen[name.text]; + var existingKind = seen[_name.text]; if (currentKind === Property && existingKind === Property) { if (inStrictMode) { - grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name.text] = currentKind | existingKind; + seen[_name.text] = currentKind | existingKind; } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } } @@ -16769,29 +17473,28 @@ var ts; var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + var diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement + : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = variableList.declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); + var _diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer + : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return grammarErrorOnNode(firstDeclaration.name, _diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); + var _diagnostic_1 = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation + : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return grammarErrorOnNode(firstDeclaration, _diagnostic_1); } } } return false; } - function checkGrammarForOfStatement(forOfStatement) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_not_currently_supported); - if (languageVersion < 2) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - return checkGrammarForInOrForOfStatement(forOfStatement); - } function checkGrammarAccessor(accessor) { var kind = accessor.kind; if (languageVersion < 1) { @@ -16821,7 +17524,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } - else if (parameter.flags & 243) { + else if (parameter.flags & 499) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } else if (parameter.questionToken) { @@ -16886,13 +17589,14 @@ var ts; function checkGrammarBreakOrContinueStatement(node) { var current = node; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { case 189: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 184 && !isIterationStatement(current.statement, true); + var isMisplacedContinueLabel = node.kind === 184 + && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } @@ -16913,12 +17617,16 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + var message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement + : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); + var _message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement + : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return grammarErrorOnNode(node, _message); } } function checkGrammarBindingElement(node) { @@ -16934,16 +17642,17 @@ var ts; return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } function checkGrammarVariableDeclaration(node) { - if (ts.isInAmbientContext(node)) { - if (ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + if (node.parent.parent.kind !== 182 && node.parent.parent.kind !== 183) { + if (ts.isInAmbientContext(node)) { + if (ts.isBindingPattern(node.name)) { + return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + } + if (node.initializer) { + var equalsTokenLength = "=".length; + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); + } } - if (node.initializer) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else { - if (!node.initializer) { + else if (!node.initializer) { if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); } @@ -16964,8 +17673,9 @@ var ts; } else { var elements = name.elements; - for (var i = 0; i < elements.length; ++i) { - checkGrammarNameInLetOrConstDeclarations(elements[i].name); + for (var _i = 0, _n = elements.length; _i < _n; _i++) { + var element = elements[_i]; + checkGrammarNameInLetOrConstDeclarations(element.name); } } } @@ -16977,14 +17687,6 @@ var ts; if (!declarationList.declarations.length) { return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - if (languageVersion < 2) { - if (ts.isLet(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - else if (ts.isConst(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - } } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { @@ -17024,13 +17726,13 @@ var ts; return false; } function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 4096) !== 0; + var enumIsConst = (enumDecl.flags & 8192) !== 0; var hasError = false; if (!enumIsConst) { var inConstantEnumMemberSection = true; var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var i = 0, n = enumDecl.members.length; i < n; i++) { - var node = enumDecl.members[i]; + for (var _i = 0, _a = enumDecl.members, _n = _a.length; _i < _n; _i++) { + var node = _a[_i]; if (node.name.kind === 126) { hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } @@ -17052,18 +17754,11 @@ var ts; function hasParseDiagnostics(sourceFile) { return sourceFile.parseDiagnostics.length > 0; } - function scanToken(scanner, pos) { - scanner.setTextPos(pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return start; - } function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - var start = scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, scanner.getTextPos() - start, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); return true; } } @@ -17076,16 +17771,17 @@ var ts; function grammarErrorOnNode(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getErrorSpanForNode(node); - var start = span.end > span.pos ? ts.skipTrivia(sourceFile.text, span.pos) : span.pos; - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, span.end - start, message, arg0, arg1, arg2)); + diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); return true; } } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, identifier) { - if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { - var name = ts.declarationNameToString(identifier); - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, name); + function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { + if (name && name.kind === 64) { + var identifier = name; + if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { + var nameText = ts.declarationNameToString(identifier); + return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); + } } } function checkGrammarConstructorTypeParameters(node) { @@ -17121,18 +17817,18 @@ var ts; } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { if (node.kind === 197 || + node.kind === 204 || node.kind === 203 || - node.kind === 202 || + node.kind === 210 || node.kind === 209 || - node.kind === 208 || (node.flags & 2)) { return false; } return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var i = 0, n = file.statements.length; i < n; i++) { - var decl = file.statements[i]; + for (var _i = 0, _a = file.statements, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; if (ts.isDeclaration(decl) || decl.kind === 175) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; @@ -17149,13 +17845,13 @@ var ts; return getNodeLinks(node).hasReportedStatementInAmbientContext = true; } var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isAnyFunction(node.parent)) { + if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 220) { - var links = getNodeLinks(node.parent); - if (!links.hasReportedStatementInAmbientContext) { - return links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 221) { + var _links = getNodeLinks(node.parent); + if (!_links.hasReportedStatementInAmbientContext) { + return _links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -17163,7 +17859,7 @@ var ts; } } function checkGrammarNumbericLiteral(node) { - if (node.flags & 8192) { + if (node.flags & 16384) { if (node.parserContextFlags & 1) { return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); } @@ -17175,9 +17871,8 @@ var ts; function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, scanner.getTextPos(), 0, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); return true; } } @@ -17306,7 +18001,9 @@ var ts; 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 : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); + var nextLineStart = (currentLine + 1) === lineCount + ? currentSourceFile.text.length + 1 + : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); if (pos !== comment.pos) { if (firstCommentLineIndent === undefined) { firstCommentLineIndent = calculateIndent(ts.getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); @@ -17384,7 +18081,8 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 134 || member.kind === 135) && (member.flags & 128) === (accessor.flags & 128)) { + if ((member.kind === 134 || member.kind === 135) + && (member.flags & 128) === (accessor.flags & 128)) { var memberName = ts.getPropertyNameForPropertyNameNode(member.name); var accessorName = ts.getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { @@ -17414,11 +18112,12 @@ var ts; } function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); + var emitOutputFilePathWithoutExtension; if (compilerOptions.outDir) { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; } @@ -17449,7 +18148,7 @@ var ts; var addedGlobalFileReference = false; ts.forEach(root.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - if (referencedFile && ((referencedFile.flags & 1024) || + if (referencedFile && ((referencedFile.flags & 2048) || shouldEmitToOwnFile(referencedFile, compilerOptions) || !addedGlobalFileReference)) { writeReferencePath(referencedFile); @@ -17500,17 +18199,17 @@ var ts; } } function createAndSetNewTextWriterWithSymbolWriter() { - var writer = createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; + var _writer = createTextWriter(newLine); + _writer.trackSymbol = trackSymbol; + _writer.writeKeyword = _writer.write; + _writer.writeOperator = _writer.write; + _writer.writePunctuation = _writer.write; + _writer.writeSpace = _writer.write; + _writer.writeStringLiteral = _writer.writeLiteral; + _writer.writeParameter = _writer.write; + _writer.writeSymbol = _writer.write; + setWriter(_writer); + return _writer; } function setWriter(newWriter) { writer = newWriter; @@ -17578,18 +18277,20 @@ var ts; } } function emitLines(nodes) { - for (var i = 0, n = nodes.length; i < n; i++) { - emit(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + emit(node); } } function emitSeparatedList(nodes, separator, eachNodeEmitFn) { var currentWriterPos = writer.getTextPos(); - for (var i = 0, n = nodes.length; i < n; i++) { + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (currentWriterPos !== writer.getTextPos()) { write(separator); } currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(nodes[i]); + eachNodeEmitFn(node); } } function emitCommaList(nodes, eachNodeEmitFn) { @@ -17608,11 +18309,11 @@ var ts; } function emitType(type) { switch (type.kind) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 8: return writeTextOfNode(currentSourceFile, type); @@ -17641,7 +18342,7 @@ var ts; ts.Debug.fail("Unknown type annotation: " + type.kind); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 202 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 203 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); function writeEntityName(entityName) { @@ -17702,8 +18403,8 @@ var ts; emitLines(node.statements); } function emitExportAssignment(node) { - write("export = "); - writeTextOfNode(currentSourceFile, node.exportName); + write(node.isExportEquals ? "export = " : "export default "); + writeTextOfNode(currentSourceFile, node.expression); write(";"); writeLine(); } @@ -17919,7 +18620,9 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.parent.parent.kind === 196) { - diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; + diagnosticMessage = isImplementsList ? + ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : + ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; @@ -18012,17 +18715,31 @@ var ts; function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.kind === 193) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 130 || node.kind === 129) { if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; } } return diagnosticMessage !== undefined ? { @@ -18062,13 +18779,14 @@ var ts; return; } var accessors = getAllAccessorDeclarations(node.parent.members, node); + var accessorWithTypeAnnotation; if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); writeTextOfNode(currentSourceFile, node.name); if (!(node.flags & 32)) { - var accessorWithTypeAnnotation = node; + accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { var anotherAccessor = node.kind === 134 ? accessors.setAccessor : accessors.getAccessor; @@ -18084,17 +18802,25 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 134 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : undefined; + return accessor.kind === 134 + ? accessor.type + : accessor.parameters.length > 0 + ? accessor.parameters[0].type + : undefined; } } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (accessorWithTypeAnnotation.kind === 135) { if (accessorWithTypeAnnotation.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } return { diagnosticMessage: diagnosticMessage, @@ -18104,10 +18830,18 @@ var ts; } else { if (accessorWithTypeAnnotation.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; } return { diagnosticMessage: diagnosticMessage, @@ -18189,28 +18923,48 @@ var ts; var diagnosticMessage; switch (node.kind) { case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 138: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 132: case 131: if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: ts.Debug.fail("This is unknown kind for signature: " + node.kind); @@ -18249,28 +19003,50 @@ var ts; var diagnosticMessage; switch (node.parent.kind) { case 133: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; break; case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 132: case 131: if (node.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } else if (node.parent.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); @@ -18307,22 +19083,26 @@ var ts; return emitClassDeclaration(node); case 198: return emitTypeAliasDeclaration(node); - case 219: + case 220: return emitEnumMemberDeclaration(node); case 199: return emitEnumDeclaration(node); case 200: return emitModuleDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 208: + case 209: return emitExportAssignment(node); - case 220: + case 221: return emitSourceFile(node); } } function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 1024 ? referencedFile.fileName : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; + var declFileName = referencedFile.flags & 2048 + ? referencedFile.fileName + : shouldEmitToOwnFile(referencedFile, compilerOptions) + ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") + : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false); referencePathsOutput += "/// " + newLine; } @@ -18373,22 +19153,28 @@ var ts; var writeLine = writer.writeLine; var increaseIndent = writer.increaseIndent; var decreaseIndent = writer.decreaseIndent; + var preserveNewLines = compilerOptions.preserveNewLines || false; var currentSourceFile; + var lastFrame; + var currentScopeNames; + var generatedBlockScopeNames; var extendsEmitted = false; var tempCount = 0; var tempVariables; var tempParameters; var externalImports; var exportSpecifiers; + var exportDefault; var writeEmittedFiles = writeJavaScriptFile; var emitLeadingComments = compilerOptions.removeComments ? function (node) { } : emitLeadingDeclarationComments; var emitTrailingComments = compilerOptions.removeComments ? function (node) { } : emitTrailingDeclarationComments; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfLocalPosition; var detachedCommentsInfo; var emitDetachedComments = compilerOptions.removeComments ? function (node) { } : emitDetachedCommentsAtPosition; - var emitPinnedOrTripleSlashComments = compilerOptions.removeComments ? function (node) { } : emitPinnedOrTripleSlashCommentsOfNode; var writeComment = writeCommentRange; - var emit = emitNode; + var emitNodeWithoutSourceMap = compilerOptions.removeComments ? emitNodeWithoutSourceMapWithoutComments : emitNodeWithoutSourceMapWithComments; + var emit = emitNodeWithoutSourceMap; + var emitWithoutComments = emitNodeWithoutSourceMapWithoutComments; var emitStart = function (node) { }; var emitEnd = function (node) { }; var emitToken = emitTokenText; @@ -18399,18 +19185,72 @@ var ts; initializeEmitterWithSourceMaps(); } if (root) { - emit(root); + emitSourceFile(root); } else { ts.forEach(host.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emit(sourceFile); + emitSourceFile(sourceFile); } }); } writeLine(); writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); return; + function emitSourceFile(sourceFile) { + currentSourceFile = sourceFile; + emit(sourceFile); + } + function enterNameScope() { + var names = currentScopeNames; + currentScopeNames = undefined; + if (names) { + lastFrame = { names: names, previous: lastFrame }; + return true; + } + return false; + } + function exitNameScope(popFrame) { + if (popFrame) { + currentScopeNames = lastFrame.names; + lastFrame = lastFrame.previous; + } + else { + currentScopeNames = undefined; + } + } + function generateUniqueNameForLocation(location, baseName) { + var _name; + if (!isExistingName(location, baseName)) { + _name = baseName; + } + else { + _name = ts.generateUniqueName(baseName, function (n) { return isExistingName(location, n); }); + } + return recordNameInCurrentScope(_name); + } + function recordNameInCurrentScope(name) { + if (!currentScopeNames) { + currentScopeNames = {}; + } + return currentScopeNames[name] = name; + } + function isExistingName(location, name) { + if (!resolver.isUnknownIdentifier(location, name)) { + return true; + } + if (currentScopeNames && ts.hasProperty(currentScopeNames, name)) { + return true; + } + var frame = lastFrame; + while (frame) { + if (ts.hasProperty(frame.names, name)) { + return true; + } + frame = frame.previous; + } + return false; + } function initializeEmitterWithSourceMaps() { var sourceMapDir; var sourceMapSourceIndex = -1; @@ -18535,8 +19375,8 @@ var ts; if (scopeName) { var parentIndex = getSourceMapNameIndex(); if (parentIndex !== -1) { - var name = node.name; - if (!name || name.kind !== 126) { + var _name = node.name; + if (!_name || _name.kind !== 126) { scopeName = "." + scopeName; } scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; @@ -18563,8 +19403,10 @@ var ts; node.kind === 196 || node.kind === 199) { if (node.name) { - var name = node.name; - scopeName = name.kind === 126 ? ts.getTextOfNode(name) : node.name.text; + var _name = node.name; + scopeName = _name.kind === 126 + ? ts.getTextOfNode(_name) + : node.name.text; } recordScopeNameStart(scopeName); } @@ -18642,21 +19484,32 @@ var ts; else { sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); } - function emitNodeWithMap(node) { + function emitNodeWithSourceMap(node) { if (node) { - if (node.kind != 220) { + if (ts.nodeIsSynthesized(node)) { + return emitNodeWithoutSourceMap(node); + } + if (node.kind != 221) { recordEmitNodeStartSpan(node); - emitNode(node); + emitNodeWithoutSourceMap(node); recordEmitNodeEndSpan(node); } else { recordNewSourceFileStart(node); - emitNode(node); + emitNodeWithoutSourceMap(node); } } } + function emitNodeWithSourceMapWithoutComments(node) { + if (node) { + recordEmitNodeStartSpan(node); + emitNodeWithoutSourceMapWithoutComments(node); + recordEmitNodeEndSpan(node); + } + } writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithMap; + emit = emitNodeWithSourceMap; + emitWithoutComments = emitNodeWithSourceMapWithoutComments; emitStart = recordEmitNodeStartSpan; emitEnd = recordEmitNodeEndSpan; emitToken = writeTextWithSpanRecord; @@ -18667,16 +19520,21 @@ var ts; function writeJavaScriptFile(emitOutput, writeByteOrderMark) { writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } - function createTempVariable(location, forLoopVariable) { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && resolver.isUnknownIdentifier(location, name)) { - break; + function createTempVariable(location, preferredName) { + for (var name = preferredName; !name || isExistingName(location, name); tempCount++) { + var char = 97 + tempCount; + if (char === 105 || char === 110) { + continue; + } + if (tempCount < 26) { + name = "_" + String.fromCharCode(char); + } + else { + name = "_" + (tempCount - 26); } - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + 97) : tempCount - 25); - tempCount++; } - var result = ts.createNode(64); + recordNameInCurrentScope(name); + var result = ts.createSynthesizedNode(64); result.text = name; return result; } @@ -18686,8 +19544,8 @@ var ts; } tempVariables.push(name); } - function createAndRecordTempVariable(location) { - var temp = createTempVariable(location, false); + function createAndRecordTempVariable(location, preferredName) { + var temp = createTempVariable(location, preferredName); recordTempDeclaration(temp); return temp; } @@ -18720,7 +19578,7 @@ var ts; emit(node); } } - function emitParenthesized(node, parenthesized) { + function emitParenthesizedIf(node, parenthesized) { if (parenthesized) { write("("); } @@ -18737,7 +19595,7 @@ var ts; function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { ts.Debug.assert(nodes.length > 0); increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -18747,7 +19605,7 @@ var ts; } for (var i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -18757,12 +19615,11 @@ var ts; } emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes)); if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -18807,37 +19664,109 @@ var ts; emit(nodes[i]); } } - function isBinaryOrOctalIntegerLiteral(text) { - if (text.length <= 0) { - return false; - } - if (text.charCodeAt(1) === 66 || text.charCodeAt(1) === 98 || - text.charCodeAt(1) === 79 || text.charCodeAt(1) === 111) { - return true; + function isBinaryOrOctalIntegerLiteral(node, text) { + if (node.kind === 7 && text.length > 1) { + switch (text.charCodeAt(1)) { + case 98: + case 66: + case 111: + case 79: + return true; + } } return false; } function emitLiteral(node) { - var text = languageVersion < 2 && ts.isTemplateLiteralKind(node.kind) ? getTemplateLiteralAsStringLiteral(node) : node.parent ? ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node) : node.text; + var text = getLiteralText(node); if (compilerOptions.sourceMap && (node.kind === 8 || ts.isTemplateLiteralKind(node.kind))) { writer.writeLiteral(text); } - else if (languageVersion < 2 && node.kind === 7 && isBinaryOrOctalIntegerLiteral(text)) { + else if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) { write(node.text); } else { write(text); } } - function getTemplateLiteralAsStringLiteral(node) { - return '"' + ts.escapeString(node.text) + '"'; + function getLiteralText(node) { + if (languageVersion < 2 && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { + return getQuotedEscapedLiteralText('"', node.text, '"'); + } + if (node.parent) { + return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + } + switch (node.kind) { + case 8: + return getQuotedEscapedLiteralText('"', node.text, '"'); + case 10: + return getQuotedEscapedLiteralText('`', node.text, '`'); + case 11: + return getQuotedEscapedLiteralText('`', node.text, '${'); + case 12: + return getQuotedEscapedLiteralText('}', node.text, '${'); + case 13: + return getQuotedEscapedLiteralText('}', node.text, '`'); + case 7: + return node.text; + } + ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); + } + function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { + return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; + } + function emitDownlevelRawTemplateLiteral(node) { + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var isLast = node.kind === 10 || node.kind === 13; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + text = text.replace(/\r\n?/g, "\n"); + text = ts.escapeString(text); + write('"' + text + '"'); + } + function emitDownlevelTaggedTemplateArray(node, literalEmitter) { + write("["); + if (node.template.kind === 10) { + literalEmitter(node.template); + } + else { + literalEmitter(node.template.head); + ts.forEach(node.template.templateSpans, function (child) { + write(", "); + literalEmitter(child.literal); + }); + } + write("]"); + } + function emitDownlevelTaggedTemplate(node) { + var tempVariable = createAndRecordTempVariable(node); + write("("); + emit(tempVariable); + write(" = "); + emitDownlevelTaggedTemplateArray(node, emit); + write(", "); + emit(tempVariable); + write(".raw = "); + emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); + write(", "); + emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); + write("("); + emit(tempVariable); + if (node.template.kind === 169) { + ts.forEach(node.template.templateSpans, function (templateSpan) { + write(", "); + var needsParens = templateSpan.expression.kind === 167 + && templateSpan.expression.operatorToken.kind === 23; + emitParenthesizedIf(templateSpan.expression, needsParens); + }); + } + write("))"); } function emitTemplateExpression(node) { if (languageVersion >= 2) { ts.forEachChild(node, emit); return; } - var emitOuterParens = ts.isExpression(node.parent) && templateNeedsParens(node, node.parent); + var emitOuterParens = ts.isExpression(node.parent) + && templateNeedsParens(node, node.parent); if (emitOuterParens) { write("("); } @@ -18846,13 +19775,14 @@ var ts; emitLiteral(node.head); headEmitted = true; } - for (var i = 0; i < node.templateSpans.length; i++) { + for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 159 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; + var needsParens = templateSpan.expression.kind !== 159 + && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); } - emitParenthesized(templateSpan.expression, needsParens); + emitParenthesizedIf(templateSpan.expression, needsParens); if (templateSpan.literal.text.length !== 0) { write(" + "); emitLiteral(templateSpan.literal); @@ -18922,16 +19852,16 @@ var ts; } } function isNotExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 128: case 193: case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 195: @@ -18942,16 +19872,14 @@ var ts; case 197: case 199: case 200: - case 202: - return parent.name === node; + case 203: + return _parent.name === node; case 185: case 184: - case 208: + case 209: return false; case 189: return node.parent.label === node; - case 216: - return node.parent.name === node; } } function emitExpressionIdentifier(node) { @@ -18963,7 +19891,18 @@ var ts; writeTextOfNode(currentSourceFile, node); } } + function getBlockScopedVariableId(node) { + return !ts.nodeIsSynthesized(node) && resolver.getBlockScopedVariableId(node); + } function emitIdentifier(node) { + var variableId = getBlockScopedVariableId(node); + if (variableId !== undefined && generatedBlockScopeNames) { + var text = generatedBlockScopeNames[variableId]; + if (text) { + write(text); + return; + } + } if (!node.parent) { write(node.text); } @@ -19026,7 +19965,7 @@ var ts; write("..."); emit(node.expression); } - function needsParenthesisForPropertyAccess(node) { + function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 64: case 151: @@ -19041,8 +19980,8 @@ var ts; function emitListWithSpread(elements, multiLine, trailingComma) { var pos = 0; var group = 0; - var length = elements.length; - while (pos < length) { + var _length = elements.length; + while (pos < _length) { if (group === 1) { write(".concat("); } @@ -19052,19 +19991,19 @@ var ts; var e = elements[pos]; if (e.kind === 171) { e = e.expression; - emitParenthesized(e, group === 0 && needsParenthesisForPropertyAccess(e)); + emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; } else { var i = pos; - while (i < length && elements[i].kind !== 171) { + while (i < _length && elements[i].kind !== 171) { i++; } write("["); if (multiLine) { increaseIndent(); } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); + emitList(elements, pos, i - pos, multiLine, trailingComma && i === _length); if (multiLine) { decreaseIndent(); } @@ -19091,24 +20030,18 @@ var ts; write("]"); } else { - emitListWithSpread(elements, (node.flags & 256) !== 0, elements.hasTrailingComma); + emitListWithSpread(elements, (node.flags & 512) !== 0, elements.hasTrailingComma); } } - function createSynthesizedNode(kind) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - return node; - } function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { var parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); return emit(parenthesizedObjectLiteral); } function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral, firstComputedPropertyIndex) { var tempVar = createAndRecordTempVariable(originalObjectLiteral); - var initialObjectLiteral = createSynthesizedNode(152); + var initialObjectLiteral = ts.createSynthesizedNode(152); initialObjectLiteral.properties = originalObjectLiteral.properties.slice(0, firstComputedPropertyIndex); - initialObjectLiteral.flags |= 256; + initialObjectLiteral.flags |= 512; var propertyPatches = createBinaryExpression(tempVar, 52, initialObjectLiteral); ts.forEach(originalObjectLiteral.properties, function (property) { var patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); @@ -19116,7 +20049,7 @@ var ts; propertyPatches = createBinaryExpression(propertyPatches, 23, patchedProperty); } }); - propertyPatches = createBinaryExpression(propertyPatches, 23, tempVar); + propertyPatches = createBinaryExpression(propertyPatches, 23, createIdentifier(tempVar.text, true)); var result = createParenthesizedExpression(propertyPatches); return result; } @@ -19127,13 +20060,13 @@ var ts; function tryCreatePatchingPropertyAssignment(objectLiteral, tempVar, property) { var leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); var maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); - return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide); + return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide, true); } function tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property) { switch (property.kind) { - case 217: - return property.initializer; case 218: + return property.initializer; + case 219: return createIdentifier(resolver.getExpressionNameSubstitution(property.name)); case 132: return createFunctionExpression(property.parameters, property.body); @@ -19143,17 +20076,17 @@ var ts; if (firstAccessor !== property) { return undefined; } - var propertyDescriptor = createSynthesizedNode(152); + var propertyDescriptor = ts.createSynthesizedNode(152); var descriptorProperties = []; if (getAccessor) { - var getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); - descriptorProperties.push(getProperty); + var _getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); + descriptorProperties.push(_getProperty); } if (setAccessor) { var setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); descriptorProperties.push(setProperty); } - var trueExpr = createSynthesizedNode(94); + var trueExpr = ts.createSynthesizedNode(94); var enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); descriptorProperties.push(enumerableTrue); var configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); @@ -19166,7 +20099,7 @@ var ts; } } function createParenthesizedExpression(expression) { - var result = createSynthesizedNode(159); + var result = ts.createSynthesizedNode(159); result.expression = expression; return result; } @@ -19180,13 +20113,18 @@ var ts; result.end = -1; return result; } - function createBinaryExpression(left, operator, right) { - var result = createSynthesizedNode(167); - result.operatorToken = createSynthesizedNode(operator); + function createBinaryExpression(left, operator, right, startsOnNewLine) { + var result = ts.createSynthesizedNode(167, startsOnNewLine); + result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } + function createExpressionStatement(expression) { + var result = ts.createSynthesizedNode(177); + result.expression = expression; + return result; + } function createMemberAccessForPropertyName(expression, memberName) { if (memberName.kind === 64) { return createPropertyAccessExpression(expression, memberName); @@ -19202,36 +20140,37 @@ var ts; } } function createPropertyAssignment(name, initializer) { - var result = createSynthesizedNode(217); + var result = ts.createSynthesizedNode(218); result.name = name; result.initializer = initializer; return result; } function createFunctionExpression(parameters, body) { - var result = createSynthesizedNode(160); + var result = ts.createSynthesizedNode(160); result.parameters = parameters; result.body = body; return result; } function createPropertyAccessExpression(expression, name) { - var result = createSynthesizedNode(153); + var result = ts.createSynthesizedNode(153); result.expression = expression; + result.dotToken = ts.createSynthesizedNode(20); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = createSynthesizedNode(154); + var result = ts.createSynthesizedNode(154); result.expression = expression; result.argumentExpression = argumentExpression; return result; } - function createIdentifier(name) { - var result = createSynthesizedNode(64); + function createIdentifier(name, startsOnNewLine) { + var result = ts.createSynthesizedNode(64, startsOnNewLine); result.text = name; return result; } function createCallExpression(invokedExpression, arguments) { - var result = createSynthesizedNode(155); + var result = ts.createSynthesizedNode(155); result.expression = invokedExpression; result.arguments = arguments; return result; @@ -19254,7 +20193,6 @@ var ts; } } write("{"); - var properties = node.properties; if (properties.length) { emitLinePreservingList(node, properties, languageVersion >= 1, true); } @@ -19296,13 +20234,31 @@ var ts; } return false; } + function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { + var realNodesAreOnDifferentLines = preserveNewLines && !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { + increaseIndent(); + writeLine(); + return true; + } + else { + if (valueToWriteWhenNotIndenting) { + write(valueToWriteWhenNotIndenting); + } + return false; + } + } function emitPropertyAccess(node) { if (tryEmitConstantValue(node)) { return; } emit(node.expression); + var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); write("."); + var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); emit(node.name); + decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } function emitQualifiedName(node) { emit(node.left); @@ -19416,26 +20372,33 @@ var ts; } } function emitTaggedTemplateExpression(node) { - emit(node.tag); - write(" "); - emit(node.template); + if (compilerOptions.target >= 2) { + emit(node.tag); + write(" "); + emit(node.template); + } + else { + emitDownlevelTaggedTemplate(node); + } } function emitParenExpression(node) { - if (node.expression.kind === 158) { - var operand = node.expression.expression; - while (operand.kind == 158) { - operand = operand.expression; - } - if (operand.kind !== 165 && - operand.kind !== 164 && - operand.kind !== 163 && - operand.kind !== 162 && - operand.kind !== 166 && - operand.kind !== 156 && - !(operand.kind === 155 && node.parent.kind === 156) && - !(operand.kind === 160 && node.parent.kind === 155)) { - emit(operand); - return; + if (!node.parent || node.parent.kind !== 161) { + if (node.expression.kind === 158) { + var operand = node.expression.expression; + while (operand.kind == 158) { + operand = operand.expression; + } + if (operand.kind !== 165 && + operand.kind !== 164 && + operand.kind !== 163 && + operand.kind !== 162 && + operand.kind !== 166 && + operand.kind !== 156 && + !(operand.kind === 155 && node.parent.kind === 156) && + !(operand.kind === 160 && node.parent.kind === 155)) { + emit(operand); + return; + } } } write("("); @@ -19477,52 +20440,40 @@ var ts; function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 52 && (node.left.kind === 152 || node.left.kind === 151)) { - emitDestructuring(node); + emitDestructuring(node, node.parent.kind === 177); } else { emit(node.left); - if (node.operatorToken.kind !== 23) { - write(" "); - } + var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 ? " " : undefined); write(ts.tokenToString(node.operatorToken.kind)); - var operatorEnd = ts.getLineAndCharacterOfPosition(currentSourceFile, node.operatorToken.end); - var rightStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.right.pos)); - var onDifferentLine = operatorEnd.line !== rightStart.line; - if (onDifferentLine) { - var exprStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - var firstCharOfExpr = getFirstNonWhitespaceCharacterIndexOnLine(exprStart.line); - var shouldIndent = rightStart.character > firstCharOfExpr; - if (shouldIndent) { - increaseIndent(); - } - writeLine(); - } - else { - write(" "); - } + var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); emit(node.right); - if (shouldIndent) { - decreaseIndent(); - } + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } } - function getFirstNonWhitespaceCharacterIndexOnLine(line) { - var lineStart = ts.getLineStarts(currentSourceFile)[line]; - var text = currentSourceFile.text; - for (var i = lineStart; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (!ts.isWhiteSpace(text.charCodeAt(i)) || ts.isLineBreak(ch)) { - break; - } - } - return i - lineStart; + function synthesizedNodeStartsOnNewLine(node) { + return ts.nodeIsSynthesized(node) && node.startsOnNewLine; } function emitConditionalExpression(node) { emit(node.condition); - write(" ? "); + var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); + write("?"); + var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); emit(node.whenTrue); - write(" : "); + decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); + var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); + write(":"); + var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); emit(node.whenFalse); + decreaseIndentIf(indentedBeforeColon, indentedAfterColon); + } + function decreaseIndentIf(value1, value2) { + if (value1) { + decreaseIndent(); + } + if (value2) { + decreaseIndent(); + } } function isSingleLineEmptyBlock(node) { if (node && node.kind === 174) { @@ -19531,7 +20482,7 @@ var ts; } } function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(14, node.pos); write(" "); emitToken(15, node.statements.end); @@ -19566,7 +20517,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesized(node.expression, node.expression.kind === 161); + emitParenthesizedIf(node.expression, node.expression.kind === 161); write(";"); } function emitIfStatement(node) { @@ -19607,6 +20558,30 @@ var ts; write(")"); emitEmbeddedStatement(node.statement); } + function emitStartOfVariableDeclarationList(decl, startPos) { + var tokenKind = 97; + if (decl && languageVersion >= 2) { + if (ts.isLet(decl)) { + tokenKind = 104; + } + else if (ts.isConst(decl)) { + tokenKind = 69; + } + } + if (startPos !== undefined) { + emitToken(tokenKind, startPos); + } + else { + switch (tokenKind) { + case 97: + return write("var "); + case 104: + return write("let "); + case 69: + return write("const "); + } + } + } function emitForStatement(node) { var endPos = emitToken(81, node.pos); write(" "); @@ -19614,17 +20589,9 @@ var ts; if (node.initializer && node.initializer.kind === 194) { var variableDeclarationList = node.initializer; var declarations = variableDeclarationList.declarations; - if (declarations[0] && ts.isLet(declarations[0])) { - emitToken(105, endPos); - } - else if (declarations[0] && ts.isConst(declarations[0])) { - emitToken(69, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(declarations[0], endPos); write(" "); - emitCommaList(variableDeclarationList.declarations); + emitCommaList(declarations); } else if (node.initializer) { emit(node.initializer); @@ -19637,6 +20604,9 @@ var ts; emitEmbeddedStatement(node.statement); } function emitForInOrForOfStatement(node) { + if (languageVersion < 2 && node.kind === 183) { + return emitDownLevelForOfStatement(node); + } var endPos = emitToken(81, node.pos); write(" "); endPos = emitToken(16, endPos); @@ -19644,12 +20614,7 @@ var ts; var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { var decl = variableDeclarationList.declarations[0]; - if (ts.isLet(decl)) { - emitToken(105, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(decl, endPos); write(" "); emit(decl); } @@ -19667,6 +20632,99 @@ var ts; emitToken(17, node.expression.end); emitEmbeddedStatement(node.statement); } + function emitDownLevelForOfStatement(node) { + var endPos = emitToken(81, node.pos); + write(" "); + endPos = emitToken(16, endPos); + var rhsIsIdentifier = node.expression.kind === 64; + var counter = createTempVariable(node, "_i"); + var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(node); + var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, "_n") : undefined; + emitStart(node.expression); + write("var "); + emitNodeWithoutSourceMap(counter); + write(" = 0"); + emitEnd(node.expression); + if (!rhsIsIdentifier) { + write(", "); + emitStart(node.expression); + emitNodeWithoutSourceMap(rhsReference); + write(" = "); + emitNodeWithoutSourceMap(node.expression); + emitEnd(node.expression); + } + if (cachedLength) { + write(", "); + emitNodeWithoutSourceMap(cachedLength); + write(" = "); + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write(" < "); + if (cachedLength) { + emitNodeWithoutSourceMap(cachedLength); + } + else { + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + emitEnd(node.initializer); + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write("++"); + emitEnd(node.initializer); + emitToken(17, node.expression.end); + write(" {"); + writeLine(); + increaseIndent(); + var rhsIterationValue = createElementAccessExpression(rhsReference, counter); + emitStart(node.initializer); + if (node.initializer.kind === 194) { + write("var "); + var variableDeclarationList = node.initializer; + if (variableDeclarationList.declarations.length > 0) { + var declaration = variableDeclarationList.declarations[0]; + if (ts.isBindingPattern(declaration.name)) { + emitDestructuring(declaration, false, rhsIterationValue); + } + else { + emitNodeWithoutSourceMap(declaration); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + emitNodeWithoutSourceMap(createTempVariable(node)); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + var assignmentExpression = createBinaryExpression(node.initializer, 52, rhsIterationValue, false); + if (node.initializer.kind === 151 || node.initializer.kind === 152) { + emitDestructuring(assignmentExpression, true, undefined, node); + } + else { + emitNodeWithoutSourceMap(assignmentExpression); + } + } + emitEnd(node.initializer); + write(";"); + if (node.statement.kind === 174) { + emitLines(node.statement.statements); + } + else { + writeLine(); + emit(node.statement); + } + writeLine(); + decreaseIndent(); + write("}"); + } function emitBreakOrContinueStatement(node) { emitToken(node.kind === 185 ? 65 : 70, node.pos); emitOptional(" ", node.label); @@ -19690,7 +20748,10 @@ var ts; emit(node.expression); endPos = emitToken(17, node.expression.end); write(" "); - emitToken(14, endPos); + emitCaseBlock(node.caseBlock, endPos); + } + function emitCaseBlock(node, startPos) { + emitToken(14, startPos); increaseIndent(); emitLines(node.clauses); decreaseIndent(); @@ -19710,7 +20771,7 @@ var ts; getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 213) { + if (node.kind === 214) { write("case "); emit(node.expression); write(":"); @@ -19718,7 +20779,7 @@ var ts; else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -19748,8 +20809,8 @@ var ts; var endPos = emitToken(67, node.pos); write(" "); emitToken(16, endPos); - emit(node.name); - emitToken(17, node.name.end); + emit(node.variableDeclaration); + emitToken(17, node.variableDeclaration ? node.variableDeclaration.end : endPos); write(" "); emitBlock(node.block); } @@ -19778,37 +20839,46 @@ var ts; emitContainingModuleName(node); write("."); } - emitNode(node.name); + emitNodeWithoutSourceMap(node.name); emitEnd(node.name); } + function createVoidZero() { + var zero = ts.createSynthesizedNode(7); + zero.text = "0"; + var result = ts.createSynthesizedNode(164); + result.expression = zero; + return result; + } function emitExportMemberAssignments(name) { - if (exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { + if (!exportDefault && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { ts.forEach(exportSpecifiers[name.text], function (specifier) { writeLine(); emitStart(specifier.name); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); emitEnd(specifier.name); write(" = "); - emitNode(name); + emitNodeWithoutSourceMap(name); write(";"); }); } } - function emitDestructuring(root, value) { + function emitDestructuring(root, isAssignmentExpressionStatement, value, lowestNonSynthesizedAncestor) { var emitCount = 0; - var isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; + var _isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; if (root.kind === 167) { emitAssignmentExpression(root); } else { + ts.Debug.assert(!isAssignmentExpressionStatement); emitBindingElement(root, value); } function emitAssignment(name, value) { if (emitCount++) { write(", "); } + renameNonTopLevelLetAndConst(name); if (name.parent && (name.parent.kind === 193 || name.parent.kind === 150)) { emitModuleMemberName(name.parent); } @@ -19820,8 +20890,8 @@ var ts; } function ensureIdentifier(expr) { if (expr.kind !== 64) { - var identifier = createTempVariable(root); - if (!isDeclaration) { + var identifier = createTempVariable(lowestNonSynthesizedAncestor || root); + if (!_isDeclaration) { recordTempDeclaration(identifier); } emitAssignment(identifier, expr); @@ -19829,27 +20899,25 @@ var ts; } return expr; } - function createVoidZero() { - var zero = ts.createNode(7); - zero.text = "0"; - var result = ts.createNode(164); - result.expression = zero; - return result; - } function createDefaultValueCheck(value, defaultValue) { value = ensureIdentifier(value); - var equals = ts.createNode(167); + var equals = ts.createSynthesizedNode(167); equals.left = value; - equals.operatorToken = ts.createNode(30); + equals.operatorToken = ts.createSynthesizedNode(30); equals.right = createVoidZero(); - var cond = ts.createNode(168); - cond.condition = equals; - cond.whenTrue = defaultValue; - cond.whenFalse = value; + return createConditionalExpression(equals, defaultValue, value); + } + function createConditionalExpression(condition, whenTrue, whenFalse) { + var cond = ts.createSynthesizedNode(168); + cond.condition = condition; + cond.questionToken = ts.createSynthesizedNode(50); + cond.whenTrue = whenTrue; + cond.colonToken = ts.createSynthesizedNode(51); + cond.whenFalse = whenFalse; return cond; } function createNumericLiteral(value) { - var node = ts.createNode(7); + var node = ts.createSynthesizedNode(7); node.text = "" + value; return node; } @@ -19857,7 +20925,7 @@ var ts; if (expr.kind === 64 || expr.kind === 153 || expr.kind === 154) { return expr; } - var node = ts.createNode(159); + var node = ts.createSynthesizedNode(159); node.expression = expr; return node; } @@ -19865,13 +20933,10 @@ var ts; if (propName.kind !== 64) { return createElementAccess(object, propName); } - var node = ts.createNode(153); - node.expression = parenthesizeForAccess(object); - node.name = propName; - return node; + return createPropertyAccessExpression(parenthesizeForAccess(object), propName); } function createElementAccess(object, index) { - var node = ts.createNode(154); + var node = ts.createSynthesizedNode(154); node.expression = parenthesizeForAccess(object); node.argumentExpression = index; return node; @@ -19881,9 +20946,9 @@ var ts; if (properties.length !== 1) { value = ensureIdentifier(value); } - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { var propName = (p.name); emitDestructuringAssignment(p.initializer || propName, createPropertyAccess(value, propName)); } @@ -19927,18 +20992,18 @@ var ts; } function emitAssignmentExpression(root) { var target = root.left; - var value = root.right; - if (root.parent.kind === 177) { - emitDestructuringAssignment(target, value); + var _value = root.right; + if (isAssignmentExpressionStatement) { + emitDestructuringAssignment(target, _value); } else { if (root.parent.kind !== 159) { write("("); } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); + _value = ensureIdentifier(_value); + emitDestructuringAssignment(target, _value); write(", "); - emit(value); + emit(_value); if (root.parent.kind !== 159) { write(")"); } @@ -19985,7 +21050,7 @@ var ts; function emitVariableDeclaration(node) { if (ts.isBindingPattern(node.name)) { if (languageVersion < 2) { - emitDestructuring(node); + emitDestructuring(node, false); } else { emit(node.name); @@ -19993,30 +21058,65 @@ var ts; } } else { + renameNonTopLevelLetAndConst(node.name); emitModuleMemberName(node); - emitOptional(" = ", node.initializer); + var initializer = node.initializer; + if (!initializer && languageVersion < 2) { + var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256) && + (getCombinedFlagsForIdentifier(node.name) & 4096); + if (isUninitializedLet && + node.parent.parent.kind !== 182 && + node.parent.parent.kind !== 183) { + initializer = createVoidZero(); + } + } + emitOptional(" = ", initializer); } } function emitExportVariableAssignments(node) { - var name = node.name; - if (name.kind === 64) { - emitExportMemberAssignments(name); + var _name = node.name; + if (_name.kind === 64) { + emitExportMemberAssignments(_name); } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); + else if (ts.isBindingPattern(_name)) { + ts.forEach(_name.elements, emitExportVariableAssignments); } } + function getCombinedFlagsForIdentifier(node) { + if (!node.parent || (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return 0; + } + return ts.getCombinedNodeFlags(node.parent); + } + function renameNonTopLevelLetAndConst(node) { + if (languageVersion >= 2 || + ts.nodeIsSynthesized(node) || + node.kind !== 64 || + (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return; + } + var combinedFlags = getCombinedFlagsForIdentifier(node); + if (((combinedFlags & 12288) === 0) || combinedFlags & 1) { + return; + } + var list = ts.getAncestor(node, 194); + if (list.parent.kind === 175 && list.parent.parent.kind === 221) { + return; + } + var blockScopeContainer = ts.getEnclosingBlockScopeContainer(node); + var _parent = blockScopeContainer.kind === 221 + ? blockScopeContainer + : blockScopeContainer.parent; + var generatedName = generateUniqueNameForLocation(_parent, node.text); + var variableId = resolver.getBlockScopedVariableId(node); + if (!generatedBlockScopeNames) { + generatedBlockScopeNames = []; + } + generatedBlockScopeNames[variableId] = generatedName; + } function emitVariableStatement(node) { if (!(node.flags & 1)) { - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } + emitStartOfVariableDeclarationList(node.declarationList); } emitCommaList(node.declarationList.declarations); write(";"); @@ -20027,12 +21127,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name = createTempVariable(node); + var _name = createTempVariable(node); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name); - emit(name); + tempParameters.push(_name); + emit(_name); } else { emit(node.name); @@ -20053,7 +21153,7 @@ var ts; if (ts.isBindingPattern(p.name)) { writeLine(); write("var "); - emitDestructuring(p, tempParameters[tempIndex]); + emitDestructuring(p, false, tempParameters[tempIndex]); write(";"); tempIndex++; } @@ -20061,14 +21161,14 @@ var ts; writeLine(); emitStart(p); write("if ("); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" === void 0)"); emitEnd(p); write(" { "); emitStart(p); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" = "); - emitNode(p.initializer); + emitNodeWithoutSourceMap(p.initializer); emitEnd(p); write("; }"); } @@ -20079,12 +21179,12 @@ var ts; if (languageVersion < 2 && ts.hasRestParameters(node)) { var restIndex = node.parameters.length - 1; var restParam = node.parameters[restIndex]; - var tempName = createTempVariable(node, true).text; + var tempName = createTempVariable(node, "_i").text; writeLine(); emitLeadingComments(restParam); emitStart(restParam); write("var "); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write(" = [];"); emitEnd(restParam); emitTrailingComments(restParam); @@ -20105,7 +21205,7 @@ var ts; increaseIndent(); writeLine(); emitStart(restParam); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); emitEnd(restParam); decreaseIndent(); @@ -20121,6 +21221,14 @@ var ts; function shouldEmitAsArrowFunction(node) { return node.kind === 161 && languageVersion >= 2; } + function emitDeclarationName(node) { + if (node.name) { + emitNodeWithoutSourceMap(node.name); + } + else { + write(resolver.getGeneratedNameForNode(node)); + } + } function emitFunctionDeclaration(node) { if (ts.nodeIsMissing(node.body)) { return emitPinnedOrTripleSlashComments(node); @@ -20132,10 +21240,10 @@ var ts; write("function "); } if (node.kind === 195 || (node.kind === 160 && node.name)) { - emit(node.name); + emitDeclarationName(node); } emitSignatureAndBody(node); - if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } if (node.kind !== 132 && node.kind !== 131) { @@ -20175,6 +21283,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); if (shouldEmitAsArrowFunction(node)) { emitSignatureParametersForArrow(node); write(" =>"); @@ -20191,15 +21300,16 @@ var ts; else { emitExpressionFunctionBody(node, node.body); } - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20215,7 +21325,11 @@ var ts; return; } write(" "); - emit(body); + var current = body; + while (current.kind === 158) { + current = current.expression; + } + emitParenthesizedIf(body, current.kind === 152); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -20226,11 +21340,11 @@ var ts; emitFunctionBodyPreamble(node); var preambleEmitted = writer.getTextPos() !== outPos; decreaseIndent(); - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); - emitNode(body, true); + emitWithoutComments(body); emitEnd(body); write(";"); emitTempDeclarations(false); @@ -20241,7 +21355,7 @@ var ts; writeLine(); emitLeadingComments(node.body); write("return "); - emit(node.body, true); + emitWithoutComments(node.body); write(";"); emitTrailingComments(node.body); emitTempDeclarations(true); @@ -20254,49 +21368,20 @@ var ts; scopeEmitEnd(); } function emitBlockFunctionBody(node, body) { - if (body.statements.length === 0 && !anyParameterHasBindingPatternOrInitializer(node)) { - emitFunctionBodyWithNoStatements(node, body); - } - else { - emitFunctionBodyWithStatements(node, body); - } - } - function anyParameterHasBindingPatternOrInitializer(func) { - return ts.forEach(func.parameters, hasBindingPatternOrInitializer); - } - function hasBindingPatternOrInitializer(parameter) { - return parameter.initializer || ts.isBindingPattern(parameter.name); - } - function emitFunctionBodyWithNoStatements(node, body) { - var singleLine = isSingleLineEmptyBlock(node.body); - write(" {"); - if (singleLine) { - write(" "); - } - else { - increaseIndent(); - writeLine(); - } - emitLeadingCommentsOfPosition(body.statements.end); - if (!singleLine) { - decreaseIndent(); - } - emitToken(15, body.statements.end); - } - function emitFunctionBodyWithStatements(node, body) { write(" {"); scopeEmitStart(node); - var outPos = writer.getTextPos(); + var initialTextPos = writer.getTextPos(); increaseIndent(); emitDetachedComments(body.statements); var startIndex = emitDirectivePrologues(body.statements, true); emitFunctionBodyPreamble(node); decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== outPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var i = 0, n = body.statements.length; i < n; i++) { + var preambleEmitted = writer.getTextPos() !== initialTextPos; + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + for (var _i = 0, _a = body.statements, _n = _a.length; _i < _n; _i++) { + var statement = _a[_i]; write(" "); - emit(body.statements[i]); + emit(statement); } emitTempDeclarations(false); write(" "); @@ -20334,7 +21419,7 @@ var ts; emitStart(param); emitStart(param.name); write("this."); - emitNode(param.name); + emitNodeWithoutSourceMap(param.name); emitEnd(param.name); write(" = "); emit(param.name); @@ -20346,7 +21431,7 @@ var ts; function emitMemberAccessForPropertyName(memberName) { if (memberName.kind === 8 || memberName.kind === 7) { write("["); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); write("]"); } else if (memberName.kind === 126) { @@ -20354,7 +21439,7 @@ var ts; } else { write("."); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); } } function emitMemberAssignments(node, staticFlag) { @@ -20365,7 +21450,7 @@ var ts; emitStart(member); emitStart(member.name); if (staticFlag) { - emitNode(node.name); + emitDeclarationName(node); } else { write("this"); @@ -20390,7 +21475,7 @@ var ts; emitLeadingComments(member); emitStart(member); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20411,7 +21496,7 @@ var ts; emitStart(member); write("Object.defineProperty("); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20456,7 +21541,7 @@ var ts; } function emitClassDeclaration(node) { write("var "); - emit(node.name); + emitDeclarationName(node); write(" = (function ("); var baseTypeNode = ts.getClassBaseTypeNode(node); if (baseTypeNode) { @@ -20469,7 +21554,7 @@ var ts; writeLine(); emitStart(baseTypeNode); write("__extends("); - emit(node.name); + emitDeclarationName(node); write(", _super);"); emitEnd(baseTypeNode); } @@ -20478,11 +21563,10 @@ var ts; emitMemberFunctions(node); emitMemberAssignments(node, 128); writeLine(); - function emitClassReturnStatement() { + emitToken(15, node.members.end, function () { write("return "); - emitNode(node.name); - } - emitToken(15, node.members.end, emitClassReturnStatement); + emitDeclarationName(node); + }); write(";"); decreaseIndent(); writeLine(); @@ -20495,16 +21579,16 @@ var ts; } write(");"); emitEnd(node); - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } - if (languageVersion < 2 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } function emitConstructorOfClass() { @@ -20514,6 +21598,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); ts.forEach(node.members, function (member) { if (member.kind === 133 && !member.body) { emitPinnedOrTripleSlashComments(member); @@ -20525,7 +21610,7 @@ var ts; } emitStart(ctor || node); write("function "); - emit(node.name); + emitDeclarationName(node); emitSignatureParameters(ctor); write(" {"); scopeEmitStart(node, "constructor"); @@ -20534,11 +21619,12 @@ var ts; emitDetachedComments(ctor.body.statements); } emitCaptureThisForNodeIfNecessary(node); + var superCall; if (ctor) { emitDefaultValueAssignments(ctor); emitRestParameter(ctor); if (baseTypeNode) { - var superCall = findInitialSuperCall(ctor); + superCall = findInitialSuperCall(ctor); if (superCall) { writeLine(); emit(superCall); @@ -20573,6 +21659,7 @@ var ts; if (ctor) { emitTrailingComments(ctor); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20691,7 +21778,9 @@ var ts; var saveTempVariables = tempVariables; tempCount = 0; tempVariables = undefined; + var popFrame = enterNameScope(); emit(node.body); + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; } @@ -20780,7 +21869,7 @@ var ts; emitImportDeclaration(node); return; } - if (resolver.isReferencedImportDeclaration(node) || + if (resolver.isReferencedAliasDeclaration(node) || (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); @@ -20810,11 +21899,11 @@ var ts; emitStart(specifier); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); write(" = "); write(generatedName); write("."); - emitNode(specifier.propertyName || specifier.name); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); write(";"); emitEnd(specifier); }); @@ -20832,15 +21921,15 @@ var ts; } } function createExternalImportInfo(node) { - if (node.kind === 202) { - if (node.moduleReference.kind === 212) { + if (node.kind === 203) { + if (node.moduleReference.kind === 213) { return { rootNode: node, declarationNode: node }; } } - else if (node.kind === 203) { + else if (node.kind === 204) { var importClause = node.importClause; if (importClause) { if (importClause.name) { @@ -20849,7 +21938,7 @@ var ts; declarationNode: importClause }; } - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { return { rootNode: node, declarationNode: importClause.namedBindings @@ -20865,7 +21954,7 @@ var ts; rootNode: node }; } - else if (node.kind === 209) { + else if (node.kind === 210) { if (node.moduleSpecifier) { return { rootNode: node @@ -20876,17 +21965,29 @@ var ts; function createExternalModuleInfo(sourceFile) { externalImports = []; exportSpecifiers = {}; + exportDefault = undefined; ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 209 && !node.moduleSpecifier) { + if (node.kind === 210 && !node.moduleSpecifier) { ts.forEach(node.exportClause.elements, function (specifier) { - var name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (specifier.name.text === "default") { + exportDefault = exportDefault || specifier; + } + var _name = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[_name] || (exportSpecifiers[_name] = [])).push(specifier); }); } + else if (node.kind === 209) { + exportDefault = exportDefault || node; + } + else if (node.kind === 195 || node.kind === 196) { + if (node.flags & 1 && node.flags & 256) { + exportDefault = exportDefault || node; + } + } else { var info = createExternalImportInfo(node); if (info) { - if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedImportDeclaration(node)) { + if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedAliasDeclaration(node)) { externalImports.push(info); } } @@ -20895,8 +21996,8 @@ var ts; } function getExternalImportInfo(node) { if (externalImports) { - for (var i = 0; i < externalImports.length; i++) { - var info = externalImports[i]; + for (var _i = 0, _n = externalImports.length; _i < _n; _i++) { + var info = externalImports[_i]; if (info.rootNode === node) { return info; } @@ -20905,7 +22006,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 208) { + if (node.kind === 209) { return node; } }); @@ -20967,18 +22068,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { - writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("return "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); - } + emitExportDefault(node, true); decreaseIndent(); writeLine(); write("});"); @@ -20987,17 +22077,24 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { + emitExportDefault(node, false); + } + function emitExportDefault(sourceFile, emitAsReturn) { + if (exportDefault && resolver.hasExportDefaultValue(sourceFile)) { writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("module.exports = "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); + emitStart(exportDefault); + write(emitAsReturn ? "return " : "module.exports = "); + if (exportDefault.kind === 209) { + emit(exportDefault.expression); + } + else if (exportDefault.kind === 212) { + emit(exportDefault.propertyName); + } + else { + emitDeclarationName(exportDefault); + } write(";"); - emitEnd(exportAssignment); + emitEnd(exportDefault); } } function emitDirectivePrologues(statements, startWithNewLine) { @@ -21014,8 +22111,7 @@ var ts; } return statements.length; } - function emitSourceFile(node) { - currentSourceFile = node; + function emitSourceFileNode(node) { writeLine(); emitDetachedComments(node); var startIndex = emitDirectivePrologues(node.statements, false); @@ -21048,36 +22144,46 @@ var ts; else { externalImports = undefined; exportSpecifiers = undefined; + exportDefault = undefined; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); } emitLeadingComments(node.endOfFileToken); } - function emitNode(node, disableComments) { + function emitNodeWithoutSourceMapWithComments(node) { if (!node) { return; } if (node.flags & 2) { return emitPinnedOrTripleSlashComments(node); } - var emitComments = !disableComments && shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { + var _emitComments = shouldEmitLeadingAndTrailingComments(node); + if (_emitComments) { emitLeadingComments(node); } emitJavaScriptWorker(node); - if (emitComments) { + if (_emitComments) { emitTrailingComments(node); } } + function emitNodeWithoutSourceMapWithoutComments(node) { + if (!node) { + return; + } + if (node.flags & 2) { + return emitPinnedOrTripleSlashComments(node); + } + emitJavaScriptWorker(node); + } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { case 197: case 195: + case 204: case 203: - case 202: case 198: - case 208: + case 209: return false; case 200: return shouldEmitModuleDeclaration(node); @@ -21132,9 +22238,9 @@ var ts; return emitArrayLiteral(node); case 152: return emitObjectLiteral(node); - case 217: - return emitPropertyAssignment(node); case 218: + return emitPropertyAssignment(node); + case 219: return emitShorthandPropertyAssignment(node); case 126: return emitComputedPropertyName(node); @@ -21203,8 +22309,8 @@ var ts; return emitWithStatement(node); case 188: return emitSwitchStatement(node); - case 213: case 214: + case 215: return emitCaseOrDefaultClause(node); case 189: return emitLabelledStatement(node); @@ -21212,7 +22318,7 @@ var ts; return emitThrowStatement(node); case 191: return emitTryStatement(node); - case 216: + case 217: return emitCatchClause(node); case 192: return emitDebuggerStatement(node); @@ -21224,18 +22330,18 @@ var ts; return emitInterfaceDeclaration(node); case 199: return emitEnumDeclaration(node); - case 219: + case 220: return emitEnumMember(node); case 200: return emitModuleDeclaration(node); - case 203: + case 204: return emitImportDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 209: + case 210: return emitExportDeclaration(node); - case 220: - return emitSourceFile(node); + case 221: + return emitSourceFileNode(node); } } function hasDetachedComments(pos) { @@ -21253,7 +22359,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 220 || node.pos !== node.parent.pos) { + if (node.parent.kind === 221 || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -21272,7 +22378,7 @@ var ts; } function emitTrailingDeclarationComments(node) { if (node.parent) { - if (node.parent.kind === 220 || node.end !== node.parent.end) { + if (node.parent.kind === 221 || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); } @@ -21322,7 +22428,7 @@ var ts; } } } - function emitPinnedOrTripleSlashCommentsOfNode(node) { + function emitPinnedOrTripleSlashComments(node) { var pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); function isPinnedOrTripleSlashComment(comment) { if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { @@ -21367,6 +22473,8 @@ var ts; var ts; (function (ts) { ts.emitTime = 0; + ts.ioReadTime = 0; + ts.version = "1.5.0.0"; function createCompilerHost(options) { var currentDirectory; var existingDirectories = {}; @@ -21375,12 +22483,17 @@ var ts; } var unsupportedFileEncodingErrorCode = -2147024809; function getSourceFile(fileName, languageVersion, onError) { + var text; try { - var text = ts.sys.readFile(fileName, options.charset); + var start = new Date().getTime(); + text = ts.sys.readFile(fileName, options.charset); + ts.ioReadTime += new Date().getTime() - start; } catch (e) { if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText : e.message); + onError(e.number === unsupportedFileEncodingErrorCode + ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText + : e.message); } text = ""; } @@ -21513,8 +22626,9 @@ var ts; if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; } + var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); var start = new Date().getTime(); - var emitResult = ts.emitFiles(getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile), getEmitHost(writeFileCallback), sourceFile); + var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); ts.emitTime += new Date().getTime() - start; return emitResult; } @@ -21563,9 +22677,11 @@ var ts; processSourceFile(ts.normalizePath(fileName), isDefaultLib); } function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { + var start; + var _length; if (refEnd !== undefined && refPos !== undefined) { - var start = refPos; - var length = refEnd - refPos; + start = refPos; + _length = refEnd - refPos; } var diagnostic; if (hasExtension(fileName)) { @@ -21590,7 +22706,7 @@ var ts; } if (diagnostic) { if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, start, length, diagnostic, fileName)); + diagnostics.add(ts.createFileDiagnostic(refFile, start, _length, diagnostic, fileName)); } else { diagnostics.add(ts.createCompilerDiagnostic(diagnostic, fileName)); @@ -21631,17 +22747,17 @@ var ts; files.push(file); } } + return file; } - return file; function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName[canonicalName]; - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; + var _file = filesByName[canonicalName]; + if (_file && host.useCaseSensitiveFileNames()) { + var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(_file.fileName, host.getCurrentDirectory()) : _file.fileName; if (canonicalName !== sourceFileName) { diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); } } - return file; + return _file; } } function processReferencedFiles(file, basePath) { @@ -21652,7 +22768,7 @@ var ts; } function processImportedModules(file, basePath) { ts.forEach(file.statements, function (node) { - if (node.kind === 203 || node.kind === 202 || node.kind === 209) { + if (node.kind === 204 || node.kind === 203 || node.kind === 210) { var moduleNameExpr = ts.getExternalModuleName(node); if (moduleNameExpr && moduleNameExpr.kind === 8) { var moduleNameText = moduleNameExpr.text; @@ -21679,10 +22795,10 @@ var ts; var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); var moduleName = nameLiteral.text; if (moduleName) { - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - var tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); + var _searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); + var tsFile = findModuleSourceFile(_searchName + ".ts", nameLiteral); if (!tsFile) { - findModuleSourceFile(searchName + ".d.ts", nameLiteral); + findModuleSourceFile(_searchName + ".d.ts", nameLiteral); } } } @@ -21703,20 +22819,19 @@ var ts; } return; } - var firstExternalModule = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (firstExternalModule && !options.module) { - var externalModuleErrorSpan = ts.getErrorSpanForNode(firstExternalModule.externalModuleIndicator); - var errorStart = ts.skipTrivia(firstExternalModule.text, externalModuleErrorSpan.pos); - var errorLength = externalModuleErrorSpan.end - errorStart; - diagnostics.add(ts.createFileDiagnostic(firstExternalModule, errorStart, errorLength, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); + if (firstExternalModuleSourceFile && !options.module) { + var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); + diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); } if (options.outDir || options.sourceRoot || (options.mapRoot && - (!options.out || firstExternalModule !== undefined))) { + (!options.out || firstExternalModuleSourceFile !== undefined))) { var commonPathComponents; ts.forEach(files, function (sourceFile) { - if (!(sourceFile.flags & 1024) && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { + if (!(sourceFile.flags & 2048) + && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); sourcePathComponents.pop(); if (commonPathComponents) { @@ -21894,6 +23009,18 @@ var ts; description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveNewLines", + type: "boolean", + description: ts.Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, + { + name: "cacheDownlevelForOfLength", + type: "boolean", + description: "Cache length access when downlevel emitting for-of statements", + experimental: true + }, { name: "target", shortName: "t", @@ -22124,24 +23251,24 @@ var ts; switch (n.kind) { case 174: if (!ts.isFunctionBlock(n)) { - var parent = n.parent; + var _parent = n.parent; var openBrace = ts.findChildOfKind(n, 14, sourceFile); var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - if (parent.kind === 179 || - parent.kind === 182 || - parent.kind === 183 || - parent.kind === 181 || - parent.kind === 178 || - parent.kind === 180 || - parent.kind === 187 || - parent.kind === 216) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + if (_parent.kind === 179 || + _parent.kind === 182 || + _parent.kind === 183 || + _parent.kind === 181 || + _parent.kind === 178 || + _parent.kind === 180 || + _parent.kind === 187 || + _parent.kind === 217) { + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -22161,20 +23288,22 @@ var ts; }); break; } - case 201: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); + case 201: { + var _openBrace = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n.parent, _openBrace, _closeBrace, autoCollapse(n)); break; + } case 196: case 197: case 199: case 152: - case 188: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); + case 202: { + var _openBrace_1 = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace_1 = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n, _openBrace_1, _closeBrace_1, autoCollapse(n)); break; + } case 151: var openBracket = ts.findChildOfKind(n, 18, sourceFile); var closeBracket = ts.findChildOfKind(n, 19, sourceFile); @@ -22201,8 +23330,8 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var declarations = sourceFile.getNamedDeclarations(); - for (var i = 0, n = declarations.length; i < n; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; var name = getDeclarationName(declaration); if (name !== undefined) { var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name); @@ -22233,8 +23362,9 @@ var ts; return items; function allMatchesAreCaseSensitive(matches) { ts.Debug.assert(matches.length > 0); - for (var i = 0, n = matches.length; i < n; i++) { - if (!matches[i].isCaseSensitive) { + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + if (!match.isCaseSensitive) { return false; } } @@ -22312,14 +23442,15 @@ var ts; } function bestMatchKind(matches) { ts.Debug.assert(matches.length > 0); - var bestMatchKind = 3; - for (var i = 0, n = matches.length; i < n; i++) { - var kind = matches[i].kind; - if (kind < bestMatchKind) { - bestMatchKind = kind; + var _bestMatchKind = 3; + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + var kind = match.kind; + if (kind < _bestMatchKind) { + _bestMatchKind = kind; } } - return bestMatchKind; + return _bestMatchKind; } var baseSensitivity = { sensitivity: "base" }; function compareNavigateToItems(i1, i2) { @@ -22383,6 +23514,27 @@ var ts; case 149: ts.forEach(node.elements, visit); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + childNodes.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + childNodes.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; case 150: case 193: if (ts.isBindingPattern(node.name)) { @@ -22394,7 +23546,11 @@ var ts; case 197: case 200: case 195: + case 203: + case 208: + case 212: childNodes.push(node); + break; } } ts.forEach(nodes, visit); @@ -22424,8 +23580,8 @@ var ts; } function addTopLevelNodes(nodes, topLevelNodes) { nodes = sortNodes(nodes); - for (var i = 0, n = nodes.length; i < n; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; switch (node.kind) { case 196: case 199: @@ -22463,19 +23619,19 @@ var ts; function getItemsWorker(nodes, createItem) { var items = []; var keyToItem = {}; - for (var i = 0, n = nodes.length; i < n; i++) { - var child = nodes[i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + var _item = createItem(child); + if (_item !== undefined) { + if (_item.text.length > 0) { + var key = _item.text + "-" + _item.kind + "-" + _item.indent; var itemWithSameName = keyToItem[key]; if (itemWithSameName) { - merge(itemWithSameName, item); + merge(itemWithSameName, _item); } else { - keyToItem[key] = item; - items.push(item); + keyToItem[key] = _item; + items.push(_item); } } } @@ -22488,10 +23644,10 @@ var ts; if (!target.childItems) { target.childItems = []; } - outer: for (var i = 0, n = source.childItems.length; i < n; i++) { - var sourceChild = source.childItems[i]; - for (var j = 0, m = target.childItems.length; j < m; j++) { - var targetChild = target.childItems[j]; + outer: for (var _i = 0, _a = source.childItems, _n = _a.length; _i < _n; _i++) { + var sourceChild = _a[_i]; + for (var _b = 0, _c = target.childItems, _d = _c.length; _b < _d; _b++) { + var targetChild = _c[_b]; if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { merge(targetChild, sourceChild); continue outer; @@ -22507,7 +23663,7 @@ var ts; if (ts.isBindingPattern(node.name)) { break; } - if ((node.flags & 243) === 0) { + if ((node.flags & 499) === 0) { return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); @@ -22520,7 +23676,7 @@ var ts; return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); case 138: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 219: + case 220: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); case 136: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); @@ -22534,9 +23690,9 @@ var ts; case 193: case 150: var variableDeclarationNode; - var name; + var _name; if (node.kind === 150) { - name = node.name; + _name = node.name; variableDeclarationNode = node; while (variableDeclarationNode && variableDeclarationNode.kind !== 193) { variableDeclarationNode = variableDeclarationNode.parent; @@ -22546,19 +23702,25 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name = node.name; + _name = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.variableElement); } case 133: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); + case 212: + case 208: + case 203: + case 205: + case 206: + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; function createItem(node, name, scriptElementKind) { @@ -22587,7 +23749,7 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 220: + case 221: return createSourceFileItem(node); case 196: return createClassItem(node); @@ -22631,10 +23793,15 @@ var ts; return undefined; } hasGlobalNode = true; - var rootName = ts.isExternalModule(node) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" : ""; + var rootName = ts.isExternalModule(node) + ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" + : ""; return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); } function createClassItem(node) { + if (!node.name) { + return undefined; + } var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { @@ -22644,7 +23811,7 @@ var ts; if (constructor) { nodes.push.apply(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); } - var childItems = getItemsWorker(sortNodes(nodes), createChildItem); + childItems = getItemsWorker(sortNodes(nodes), createChildItem); } return getNavigationBarItem(node.name.text, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -22670,7 +23837,9 @@ var ts; return node; } function getNodeSpan(node) { - return node.kind === 220 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); + return node.kind === 221 + ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) + : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } function getTextOfNode(node) { return ts.getTextOfNodeFromSourceText(sourceFile.text, node); @@ -22760,8 +23929,8 @@ var ts; if (isLowercase) { if (index > 0) { var wordSpans = getWordSpans(candidate); - for (var i = 0, n = wordSpans.length; i < n; i++) { - var span = wordSpans[i]; + for (var _i = 0, _n = wordSpans.length; _i < _n; _i++) { + var span = wordSpans[_i]; if (partStartsWith(candidate, span, chunk.text, true)) { return createPatternMatch(2, punctuationStripped, partStartsWith(candidate, span, chunk.text, false)); } @@ -22813,8 +23982,8 @@ var ts; } var subWordTextChunks = segment.subWordTextChunks; var matches = undefined; - for (var i = 0, n = subWordTextChunks.length; i < n; i++) { - var subWordTextChunk = subWordTextChunks[i]; + for (var _i = 0, _n = subWordTextChunks.length; _i < _n; _i++) { + var subWordTextChunk = subWordTextChunks[_i]; var result = matchTextChunk(candidate, subWordTextChunk, true); if (!result) { return undefined; @@ -22840,10 +24009,10 @@ var ts; } } else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (ch1 !== ch2) { + for (var _i = 0; _i < patternPartLength; _i++) { + var _ch1 = pattern.charCodeAt(patternPartStart + _i); + var _ch2 = candidate.charCodeAt(candidateSpan.start + _i); + if (_ch1 !== _ch2) { return false; } } @@ -23124,7 +24293,9 @@ var ts; function transitionFromLowerToUpper(identifier, word, index) { var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var transition = word ? (currentIsUpper && !lastIsUpper) : currentIsUpper; + var transition = word + ? (currentIsUpper && !lastIsUpper) + : currentIsUpper; return transition; } })(ts || (ts = {})); @@ -23170,20 +24341,22 @@ var ts; invocation: callExpression, argumentsSpan: getApplicableSpanForArguments(list), argumentIndex: 0, - argumentCount: getCommaBasedArgCount(list) + argumentCount: getArgumentCount(list) }; } var listItemInfo = ts.findListItemInfo(node); if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = (listItemInfo.listItemIndex + 1) >> 1; + var _list = listItemInfo.list; + var _isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === _list.pos; + var argumentIndex = getArgumentIndex(_list, node); + var argumentCount = getArgumentCount(_list); + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { - kind: isTypeArgList ? 0 : 1, + kind: _isTypeArgList ? 0 : 1, invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), + argumentsSpan: getApplicableSpanForArguments(_list), argumentIndex: argumentIndex, - argumentCount: getCommaBasedArgCount(list) + argumentCount: argumentCount }; } } @@ -23196,25 +24369,44 @@ var ts; var templateExpression = node.parent; var tagExpression = templateExpression.parent; ts.Debug.assert(templateExpression.kind === 169); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var _argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; + return getArgumentListInfoForTemplate(tagExpression, _argumentIndex); } else if (node.parent.kind === 173 && node.parent.parent.parent.kind === 157) { var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 169); + var _templateExpression = templateSpan.parent; + var _tagExpression = _templateExpression.parent; + ts.Debug.assert(_templateExpression.kind === 169); if (node.kind === 13 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var spanIndex = _templateExpression.templateSpans.indexOf(templateSpan); + var _argumentIndex_1 = getArgumentIndexForTemplatePiece(spanIndex, node); + return getArgumentListInfoForTemplate(_tagExpression, _argumentIndex_1); } return undefined; } - function getCommaBasedArgCount(argumentsList) { - return argumentsList.getChildCount() === 0 ? 0 : 1 + ts.countWhere(argumentsList.getChildren(), function (arg) { return arg.kind === 23; }); + function getArgumentIndex(argumentsList, node) { + var argumentIndex = 0; + var listChildren = argumentsList.getChildren(); + for (var _i = 0, _n = listChildren.length; _i < _n; _i++) { + var child = listChildren[_i]; + if (child === node) { + break; + } + if (child.kind !== 23) { + argumentIndex++; + } + } + return argumentIndex; + } + function getArgumentCount(argumentsList) { + var listChildren = argumentsList.getChildren(); + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 23; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 23) { + argumentCount++; + } + return argumentCount; } function getArgumentIndexForTemplatePiece(spanIndex, node) { ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); @@ -23227,7 +24419,10 @@ var ts; return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - var argumentCount = tagExpression.template.kind === 10 ? 1 : tagExpression.template.templateSpans.length + 1; + var argumentCount = tagExpression.template.kind === 10 + ? 1 + : tagExpression.template.templateSpans.length + 1; + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { kind: 2, invocation: tagExpression, @@ -23254,16 +24449,16 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 220; n = n.parent) { + for (var n = node; n.kind !== 221; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } if (n.pos < n.parent.pos || n.end > n.parent.end) { ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); } - var argumentInfo = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo) { - return argumentInfo; + var _argumentInfo = getImmediatelyContainingArgumentInfo(n); + if (_argumentInfo) { + return _argumentInfo; } } return undefined; @@ -23342,6 +24537,7 @@ var ts; if (selectedItemIndex < 0) { selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); } + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { items: items, applicableSpan: applicableSpan, @@ -23444,10 +24640,11 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 221 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 222 && c.pos <= node.pos && c.end >= node.end) { return c; } }); + ts.Debug.assert(!syntaxList || ts.contains(syntaxList.getChildren(), node)); return syntaxList; } ts.findContainingList = findContainingList; @@ -23508,10 +24705,10 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; var shouldDiveInChildNode = (child.pos <= previousToken.pos && child.end > previousToken.end) || - (child.pos === previousToken.end); + (child.pos === previousToken.end); if (shouldDiveInChildNode && nodeHasTokens(child)) { return find(child); } @@ -23535,7 +24732,7 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { + for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; if (nodeHasTokens(child)) { if (position <= child.end) { @@ -23549,10 +24746,10 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 220); + ts.Debug.assert(startNode !== undefined || n.kind === 221); if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); + var _candidate = findRightmostChildNodeWithTokens(children, children.length); + return _candidate && findRightmostToken(_candidate); } } function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { @@ -23589,7 +24786,7 @@ var ts; if (node.kind === 139 || node.kind === 155) { return node.typeArguments; } - if (ts.isAnyFunction(node) || node.kind === 196 || node.kind === 197) { + if (ts.isFunctionLike(node) || node.kind === 196 || node.kind === 197) { return node.typeParameters; } return undefined; @@ -23614,7 +24811,8 @@ var ts; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { - return ts.isTemplateLiteralKind(node.kind) && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); + return ts.isTemplateLiteralKind(node.kind) + && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); } ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function compareDataObjects(dst, src) { @@ -23846,21 +25044,21 @@ var ts; var t; var pos = scanner.getStartPos(); while (pos < endPos) { - var t = scanner.getToken(); - if (!ts.isTrivia(t)) { + var _t = scanner.getToken(); + if (!ts.isTrivia(_t)) { break; } scanner.scan(); - var item = { + var _item = { pos: pos, end: scanner.getStartPos(), - kind: t + kind: _t }; pos = scanner.getStartPos(); if (!leadingTrivia) { leadingTrivia = []; } - leadingTrivia.push(item); + leadingTrivia.push(_item); } savedPos = scanner.getStartPos(); } @@ -23895,7 +25093,13 @@ var ts; token: undefined }; } - var expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 : shouldRescanSlashToken(n) ? 2 : shouldRescanTemplateToken(n) ? 3 : 0; + var expectedScanAction = shouldRescanGreaterThanToken(n) + ? 1 + : shouldRescanSlashToken(n) + ? 2 + : shouldRescanTemplateToken(n) + ? 3 + : 0; if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } @@ -23958,8 +25162,8 @@ var ts; } function isOnToken() { var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < endPos && current !== 1 && !ts.isTrivia(current); + var _startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return _startPos < endPos && current !== 1 && !ts.isTrivia(current); } function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -24184,8 +25388,9 @@ var ts; if (this.IsAny()) { return true; } - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { + for (var _i = 0, _a = this.customContextChecks, _n = _a.length; _i < _n; _i++) { + var check = _a[_i]; + if (!check(context)) { return false; } } @@ -24246,7 +25451,7 @@ var ts; this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(34, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([97, 93, 87, 73, 89, 96]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([105, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(82, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); @@ -24254,13 +25459,13 @@ var ts; this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(89, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([17, 74, 75, 66]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2)); this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([95, 80]), 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 120]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([115, 119]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(114, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([117, 118]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 115, 76, 77, 78, 116, 103, 84, 104, 117, 107, 109, 120, 110]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 103])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(113, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 117]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 114, 76, 77, 78, 115, 102, 84, 103, 116, 106, 108, 119, 109]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 102])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(8, 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(32, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(21, 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); @@ -24272,52 +25477,52 @@ var ts; this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.FromTokens([16, 18, 25, 23])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8)); this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14, 15), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8)); this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, - this.NoSpaceAfterQuestionMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.SpaceAfterLetConstInVariableDeclaration, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket - ]; + [ + this.IgnoreBeforeComment, this.IgnoreAfterLineComment, + this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, + this.NoSpaceAfterQuestionMark, + this.NoSpaceBeforeDot, this.NoSpaceAfterDot, + this.NoSpaceAfterUnaryPrefixOperator, + this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, + this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, + this.SpaceAfterPostincrementWhenFollowedByAdd, + this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, + this.SpaceAfterPostdecrementWhenFollowedBySubtract, + this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, + this.NoSpaceAfterCloseBrace, + this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, + this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, + this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, + this.NoSpaceBetweenReturnAndSemicolon, + this.SpaceAfterCertainKeywords, + this.SpaceAfterLetConstInVariableDeclaration, + this.NoSpaceBeforeOpenParenInFuncCall, + this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, + this.SpaceAfterVoidOperator, + this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, + this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, + this.SpaceAfterModuleName, + this.SpaceAfterArrow, + this.NoSpaceAfterEllipsis, + this.NoSpaceAfterOptionalParameters, + this.NoSpaceBetweenEmptyInterfaceBraceBrackets, + this.NoSpaceBeforeOpenAngularBracket, + this.NoSpaceBetweenCloseParenAndAngularBracket, + this.NoSpaceAfterOpenAngularBracket, + this.NoSpaceBeforeCloseAngularBracket, + this.NoSpaceAfterCloseAngularBracket + ]; this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; + [ + this.NoSpaceBeforeSemicolon, + this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, + this.NoSpaceBeforeComma, + this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, + this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, + this.SpaceAfterSemicolon, + this.NoSpaceBeforeOpenParenInFuncDecl, + this.SpaceBetweenStatements, this.SpaceAfterTryFinally + ]; this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); @@ -24341,9 +25546,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name in o) { - if (o[name] === rule) { - return name; + for (var _name in o) { + if (o[_name] === rule) { + return _name; } } throw new Error("Unknown rule"); @@ -24359,10 +25564,10 @@ var ts; case 167: case 168: return true; - case 202: + case 203: case 193: case 128: - case 219: + case 220: case 130: case 129: return context.currentTokenSpan.kind === 52 || context.nextTokenSpan.kind === 52; @@ -24405,7 +25610,7 @@ var ts; } switch (node.kind) { case 174: - case 188: + case 202: case 152: case 201: return true; @@ -24448,7 +25653,7 @@ var ts; case 200: case 199: case 174: - case 216: + case 217: case 201: case 188: return true; @@ -24466,7 +25671,7 @@ var ts; case 191: case 179: case 187: - case 216: + case 217: return true; default: return false; @@ -24587,10 +25792,11 @@ var ts; var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); var bucket = this.map[bucketIndex]; if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) + for (var _i = 0, _a = bucket.Rules(), _n = _a.length; _i < _n; _i++) { + var rule = _a[_i]; + if (rule.Operation.Context.InContext(context)) { return rule; + } } } return null; @@ -24645,13 +25851,19 @@ var ts; RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { var position; if (rule.Operation.Action == 1) { - position = specificTokens ? 0 : RulesPosition.IgnoreRulesAny; + position = specificTokens ? + 0 : + RulesPosition.IgnoreRulesAny; } else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny; + position = specificTokens ? + RulesPosition.ContextRulesSpecific : + RulesPosition.ContextRulesAny; } else { - position = specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; + position = specificTokens ? + RulesPosition.NoContextRulesSpecific : + RulesPosition.NoContextRulesAny; } var state = constructionState[rulesBucketIndex]; if (state === undefined) { @@ -24773,7 +25985,7 @@ var ts; TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([64, 16, 92, 87]); TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([64, 17, 19, 87]); TokenRange.Comments = TokenRange.FromTokens([2, 3]); - TokenRange.TypeNames = TokenRange.FromTokens([64, 119, 121, 113, 122, 98, 112]); + TokenRange.TypeNames = TokenRange.FromTokens([64, 118, 120, 112, 121, 98, 111]); return TokenRange; })(); Shared.TokenRange = TokenRange; @@ -24910,13 +26122,13 @@ var ts; } formatting.formatSelection = formatSelection; function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); - if (!parent) { + var _parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!_parent) { return []; } var span = { - pos: ts.getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), - end: parent.end + pos: ts.getLineStartPositionForPosition(_parent.getStart(sourceFile), sourceFile), + end: _parent.end }; return formatSpan(span, sourceFile, options, rulesProvider, requestKind); } @@ -24944,11 +26156,11 @@ var ts; case 200: var body = parent.body; return body && body.kind === 174 && ts.rangeContainsRange(body.statements, node); - case 220: + case 221: case 174: case 201: return ts.rangeContainsRange(parent.statements, node); - case 216: + case 217: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -24970,7 +26182,9 @@ var ts; if (!errors.length) { return rangeHasNoErrors; } - var sorted = errors.filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }).sort(function (e1, e2) { return e1.start - e2.start; }); + var sorted = errors + .filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }) + .sort(function (e1, e2) { return e1.start - e2.start; }); if (!sorted.length) { return rangeHasNoErrors; } @@ -25051,10 +26265,10 @@ var ts; } } else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { + if (_startLine !== parentStartLine || startPos === column) { return column; } } @@ -25065,9 +26279,9 @@ var ts; if (indentation === -1) { if (isSomeBlock(node.kind)) { if (isSomeBlock(parent.kind) || - parent.kind === 220 || - parent.kind === 213 || - parent.kind === 214) { + parent.kind === 221 || + parent.kind === 214 || + parent.kind === 215) { indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); } else { @@ -25171,19 +26385,19 @@ var ts; return inheritedIndentation; } while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > childStartPos) { + var _tokenInfo = formattingScanner.readTokenInfo(node); + if (_tokenInfo.token.end > childStartPos) { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, node, parentDynamicIndentation); } if (!formattingScanner.isOnToken()) { return inheritedIndentation; } if (ts.isToken(child)) { - var tokenInfo = formattingScanner.readTokenInfo(child); - ts.Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(child); + ts.Debug.assert(_tokenInfo_1.token.end === child.end); + consumeTokenAndAdvanceScanner(_tokenInfo_1, node, parentDynamicIndentation); return inheritedIndentation; } var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); @@ -25195,33 +26409,34 @@ var ts; var listStartToken = getOpenTokenForList(parent, nodes); var listEndToken = getCloseTokenForOpenToken(listStartToken); var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; + var _startLine = parentStartLine; if (listStartToken !== 0) { while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.end > nodes.pos) { + var _tokenInfo = formattingScanner.readTokenInfo(parent); + if (_tokenInfo.token.end > nodes.pos) { break; } - else if (tokenInfo.token.kind === listStartToken) { - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation = computeIndentation(tokenInfo.token, startLine, -1, parent, parentDynamicIndentation, startLine); - listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + else if (_tokenInfo.token.kind === listStartToken) { + _startLine = sourceFile.getLineAndCharacterOfPosition(_tokenInfo.token.pos).line; + var _indentation = computeIndentation(_tokenInfo.token, _startLine, -1, parent, parentDynamicIndentation, _startLine); + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, _indentation.indentation, _indentation.delta); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, listDynamicIndentation); } else { - consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, parentDynamicIndentation); } } } var inheritedIndentation = -1; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, true); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, _startLine, true); } if (listEndToken !== 0) { if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(parent); + if (_tokenInfo_1.token.kind === listEndToken && ts.rangeContainsRange(parent, _tokenInfo_1.token)) { + consumeTokenAndAdvanceScanner(_tokenInfo_1, parent, listDynamicIndentation); } } } @@ -25258,8 +26473,8 @@ var ts; if (indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { - for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { - var triviaItem = currentTokenInfo.leadingTrivia[i]; + for (var _i = 0, _a = currentTokenInfo.leadingTrivia, _n = _a.length; _i < _n; _i++) { + var triviaItem = _a[_i]; if (!ts.rangeContainsRange(originalRange, triviaItem)) { continue; } @@ -25272,8 +26487,8 @@ var ts; break; case 2: if (indentNextTokenOrTrivia) { - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - insertIndentation(triviaItem.pos, commentIndentation, false); + var _commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, _commentIndentation, false); indentNextTokenOrTrivia = false; } break; @@ -25293,8 +26508,8 @@ var ts; } } function processTrivia(trivia, parent, contextNode, dynamicIndentation) { - for (var i = 0, len = trivia.length; i < len; ++i) { - var triviaItem = trivia[i]; + for (var _i = 0, _n = trivia.length; _i < _n; _i++) { + var triviaItem = trivia[_i]; if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); @@ -25340,8 +26555,8 @@ var ts; } } trimTrailingWhitespaces = - (rule.Operation.Action & (4 | 2)) && - rule.Flag !== 1; + (rule.Operation.Action & (4 | 2)) && + rule.Flag !== 1; } else { trimTrailingWhitespaces = true; @@ -25365,25 +26580,26 @@ var ts; } } function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - if (startLine === endLine) { + var parts; + if (_startLine === endLine) { if (!firstLineIsIndented) { insertIndentation(commentRange.pos, indentation, false); } return; } else { - var parts = []; + parts = []; var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { + for (var line = _startLine; line < endLine; ++line) { var endOfLine = ts.getEndLinePosition(line, sourceFile); parts.push({ pos: startPos, end: endOfLine }); startPos = ts.getStartPositionOfLine(line + 1, sourceFile); } parts.push({ pos: startPos, end: commentRange.end }); } - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); + var startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); if (indentation === nonWhitespaceColumnInFirstPart.column) { return; @@ -25391,19 +26607,21 @@ var ts; var startIndex = 0; if (firstLineIsIndented) { startIndex = 1; - startLine++; + _startLine++; } - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; + var _delta = indentation - nonWhitespaceColumnInFirstPart.column; + for (var i = startIndex, len = parts.length; i < len; ++i, ++_startLine) { + var _startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); + var nonWhitespaceCharacterAndColumn = i === 0 + ? nonWhitespaceColumnInFirstPart + : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + var newIndentation = nonWhitespaceCharacterAndColumn.column + _delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); + recordReplace(_startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); } else { - recordDelete(startLinePos, nonWhitespaceCharacterAndColumn.character); + recordDelete(_startLinePos, nonWhitespaceCharacterAndColumn.character); } } } @@ -25567,6 +26785,10 @@ var ts; (function (formatting) { var SmartIndenter; (function (SmartIndenter) { + var Value; + (function (Value) { + Value[Value["Unknown"] = -1] = "Unknown"; + })(Value || (Value = {})); function getIndentation(position, sourceFile, options) { if (position > sourceFile.text.length) { return 0; @@ -25576,11 +26798,11 @@ var ts; return 0; } var precedingTokenIsLiteral = precedingToken.kind === 8 || - precedingToken.kind === 9 || - precedingToken.kind === 10 || - precedingToken.kind === 11 || - precedingToken.kind === 12 || - precedingToken.kind === 13; + precedingToken.kind === 9 || + precedingToken.kind === 10 || + precedingToken.kind === 11 || + precedingToken.kind === 12 || + precedingToken.kind === 13; if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { return 0; } @@ -25606,9 +26828,9 @@ var ts; } break; } - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation; + var _actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation; } previous = current; current = current.parent; @@ -25625,9 +26847,9 @@ var ts; } SmartIndenter.getIndentationForNode = getIndentationForNode; function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { - var parent = current.parent; + var _parent = current.parent; var parentStart; - while (parent) { + while (_parent) { var useActualIndentation = true; if (ignoreActualIndentationRange) { var start = current.getStart(sourceFile); @@ -25639,21 +26861,21 @@ var ts; return actualIndentation + indentationDelta; } } - parentStart = getParentStart(parent, current, sourceFile); + parentStart = getParentStart(_parent, current, sourceFile); var parentAndChildShareLine = parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); + childStartsOnTheSameLineWithElseInIfStatement(_parent, current, currentStart.line, sourceFile); if (useActualIndentation) { - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var _actualIndentation = getActualIndentationForNode(current, _parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation + indentationDelta; } } - if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { + if (shouldIndentChildNode(_parent.kind, current.kind) && !parentAndChildShareLine) { indentationDelta += options.IndentSize; } - current = parent; + current = _parent; currentStart = parentStart; - parent = current.parent; + _parent = current.parent; } return indentationDelta; } @@ -25666,12 +26888,16 @@ var ts; } function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { var commaItemInfo = ts.findListItemInfo(commaToken); - ts.Debug.assert(commaItemInfo && commaItemInfo.listItemIndex > 0); - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + if (commaItemInfo && commaItemInfo.listItemIndex > 0) { + return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + } + else { + return -1; + } } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 220 || !parentAndChildShareLine); + (parent.kind === 221 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -25726,7 +26952,7 @@ var ts; case 132: case 131: case 136: - case 137: + case 137: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -25736,18 +26962,20 @@ var ts; return node.parent.parameters; } break; + } case 156: - case 155: - var start = node.getStart(sourceFile); + case 155: { + var _start = node.getStart(sourceFile); if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.typeArguments, _start, node.getEnd())) { return node.parent.typeArguments; } if (node.parent.arguments && - ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.arguments, _start, node.getEnd())) { return node.parent.arguments; } break; + } } } return undefined; @@ -25813,15 +27041,15 @@ var ts; case 201: case 152: case 143: - case 188: + case 202: + case 215: case 214: - case 213: case 159: case 155: case 156: case 175: case 193: - case 208: + case 209: case 186: case 168: return true; @@ -25877,9 +27105,9 @@ var ts; case 152: case 174: case 201: - case 188: + case 202: return nodeEndsWith(n, 15, sourceFile); - case 216: + case 217: return isCompletedNode(n.block, sourceFile); case 159: case 136: @@ -25903,9 +27131,15 @@ var ts; return isCompletedNode(n.expression, sourceFile); case 151: return nodeEndsWith(n, 19, sourceFile); - case 213: case 214: + case 215: return false; + case 181: + return isCompletedNode(n.statement, sourceFile); + case 182: + return isCompletedNode(n.statement, sourceFile); + case 183: + return isCompletedNode(n.statement, sourceFile); case 180: return isCompletedNode(n.statement, sourceFile); case 179: @@ -25998,17 +27232,17 @@ var ts; while (pos < end) { var token = scanner.scan(); var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 512, this)); + nodes.push(createNode(token, pos, textPos, 1024, this)); pos = textPos; } return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(221, nodes.pos, nodes.end, 512, this); + var list = createNode(222, nodes.pos, nodes.end, 1024, this); list._children = []; var pos = nodes.pos; - for (var i = 0, len = nodes.length; i < len; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (pos < node.pos) { pos = this.addSyntheticNodes(list._children, pos, node.pos); } @@ -26022,9 +27256,10 @@ var ts; }; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; + var children; if (this.kind >= 125) { scanner.setText((sourceFile || this.getSourceFile()).text); - var children = []; + children = []; var pos = this.pos; var processNode = function (node) { if (pos < node.pos) { @@ -26065,8 +27300,8 @@ var ts; }; NodeObject.prototype.getFirstToken = function (sourceFile) { var children = this.getChildren(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (child.kind < 125) { return child; } @@ -26188,7 +27423,7 @@ var ts; } function getCleanedJsDocComment(pos, end, sourceFile) { var spacesToRemoveAfterAsterisk; - var docComments = []; + var _docComments = []; var blankLineCount = 0; var isInParamTag = false; while (pos < end) { @@ -26223,14 +27458,14 @@ var ts; } pos = consumeLineBreaks(pos, end, sourceFile); if (docCommentTextOfLine) { - pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); + pushDocCommentLineText(_docComments, docCommentTextOfLine, blankLineCount); blankLineCount = 0; } - else if (!isInParamTag && docComments.length) { + else if (!isInParamTag && _docComments.length) { blankLineCount++; } } - return docComments; + return _docComments; } function getCleanedParamJsDocComment(pos, end, sourceFile) { var paramHelpStringMargin; @@ -26331,8 +27566,8 @@ var ts; } var consumedSpaces = pos - startOfLinePos; if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); - if (ch === 42) { + var _ch = sourceFile.text.charCodeAt(pos); + if (_ch === 42) { pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); } } @@ -26426,7 +27661,9 @@ var ts; case 131: var functionDeclaration = node; if (functionDeclaration.name && functionDeclaration.name.getFullWidth() > 0) { - var lastDeclaration = namedDeclarations.length > 0 ? namedDeclarations[namedDeclarations.length - 1] : undefined; + var lastDeclaration = namedDeclarations.length > 0 ? + namedDeclarations[namedDeclarations.length - 1] : + undefined; if (lastDeclaration && functionDeclaration.symbol === lastDeclaration.symbol) { if (functionDeclaration.body && !lastDeclaration.body) { namedDeclarations[namedDeclarations.length - 1] = functionDeclaration; @@ -26443,7 +27680,12 @@ var ts; case 198: case 199: case 200: - case 202: + case 203: + case 212: + case 208: + case 203: + case 205: + case 206: case 134: case 135: case 143: @@ -26473,11 +27715,32 @@ var ts; ts.forEachChild(node.name, visit); break; } - case 219: + case 220: case 130: case 129: namedDeclarations.push(node); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + namedDeclarations.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + namedDeclarations.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; } }); this.namedDeclarations = namedDeclarations; @@ -26630,8 +27893,8 @@ var ts; if (declaration.kind !== 193 && declaration.kind !== 195) { return false; } - for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { - if (parent.kind === 220 || parent.kind === 201) { + for (var _parent = declaration.parent; !ts.isFunctionBlock(_parent); _parent = _parent.parent) { + if (_parent.kind === 221 || _parent.kind === 201) { return false; } } @@ -26672,8 +27935,9 @@ var ts; this.host = host; this.fileNameToEntry = {}; var rootFileNames = host.getScriptFileNames(); - for (var i = 0, n = rootFileNames.length; i < n; i++) { - this.createEntry(rootFileNames[i]); + for (var _i = 0, _n = rootFileNames.length; _i < _n; _i++) { + var fileName = rootFileNames[_i]; + this.createEntry(fileName); } this._compilationSettings = host.getCompilationSettings() || getDefaultCompilerOptions(); } @@ -26732,17 +27996,17 @@ var ts; if (!scriptSnapshot) { throw new Error("Could not find file: '" + fileName + "'."); } - var version = this.host.getScriptVersion(fileName); + var _version = this.host.getScriptVersion(fileName); var sourceFile; if (this.currentFileName !== fileName) { - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, version, true); + sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, _version, true); } - else if (this.currentFileVersion !== version) { + else if (this.currentFileVersion !== _version) { var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); + sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, _version, editRange); } if (sourceFile) { - this.currentFileVersion = version; + this.currentFileVersion = _version; this.currentFileName = fileName; this.currentFileScriptSnapshot = scriptSnapshot; this.currentSourceFile = sourceFile; @@ -26798,7 +28062,7 @@ var ts; var entry = entries[i]; sourceFiles.push({ name: i, - refCount: entry.refCount, + refCount: entry.languageServiceRefCount, references: entry.owners.slice(0) }); } @@ -26811,34 +28075,40 @@ var ts; return JSON.stringify(bucketInfoArray, null, 2); } function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, true); + } + function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, false); + } + function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { var bucket = getBucketForCompilationSettings(compilationSettings, true); var entry = ts.lookUp(bucket, fileName); if (!entry) { + ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, false); bucket[fileName] = entry = { sourceFile: sourceFile, - refCount: 0, + languageServiceRefCount: 0, owners: [] }; } - entry.refCount++; - return entry.sourceFile; - } - function updateDocument(sourceFile, fileName, compilationSettings, scriptSnapshot, version, textChangeRange) { - var bucket = getBucketForCompilationSettings(compilationSettings, false); - ts.Debug.assert(bucket !== undefined); - var entry = ts.lookUp(bucket, fileName); - ts.Debug.assert(entry !== undefined); - entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, textChangeRange); + else { + if (entry.sourceFile.version !== version) { + entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); + } + } + if (acquiring) { + entry.languageServiceRefCount++; + } return entry.sourceFile; } function releaseDocument(fileName, compilationSettings) { var bucket = getBucketForCompilationSettings(compilationSettings, false); ts.Debug.assert(bucket !== undefined); var entry = ts.lookUp(bucket, fileName); - entry.refCount--; - ts.Debug.assert(entry.refCount >= 0); - if (entry.refCount === 0) { + entry.languageServiceRefCount--; + ts.Debug.assert(entry.languageServiceRefCount >= 0); + if (entry.languageServiceRefCount === 0) { delete bucket[fileName]; } } @@ -26869,31 +28139,111 @@ var ts; } }); } + function recordModuleName() { + var importPath = scanner.getTokenValue(); + var pos = scanner.getTokenPos(); + importedFiles.push({ + fileName: importPath, + pos: pos, + end: pos + importPath.length + }); + } function processImport() { scanner.setText(sourceText); var token = scanner.scan(); while (token !== 1) { if (token === 84) { token = scanner.scan(); - if (token === 64) { - token = scanner.scan(); - if (token === 52) { + if (token === 8) { + recordModuleName(); + continue; + } + else { + if (token === 64) { token = scanner.scan(); - if (token === 118) { + if (token === 123) { token = scanner.scan(); - if (token === 16) { + if (token === 8) { + recordModuleName(); + continue; + } + } + else if (token === 52) { + token = scanner.scan(); + if (token === 117) { token = scanner.scan(); - if (token === 8) { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); + if (token === 16) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + continue; + } } } } + else if (token === 23) { + token = scanner.scan(); + } + else { + continue; + } + } + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 101) { + token = scanner.scan(); + if (token === 64) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + } + } + } + else if (token === 77) { + token = scanner.scan(); + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } } } } @@ -26961,19 +28311,19 @@ var ts; } function isNameOfFunctionDeclaration(node) { return node.kind === 64 && - ts.isAnyFunction(node.parent) && node.parent.name === node; + ts.isFunctionLike(node.parent) && node.parent.name === node; } function isNameOfPropertyAssignment(node) { return (node.kind === 64 || node.kind === 8 || node.kind === 7) && - (node.parent.kind === 217 || node.parent.kind === 218) && node.parent.name === node; + (node.parent.kind === 218 || node.parent.kind === 219) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 8 || node.kind === 7) { switch (node.parent.kind) { case 130: case 129: - case 217: - case 219: + case 218: + case 220: case 132: case 131: case 134: @@ -27047,7 +28397,7 @@ var ts; return undefined; } switch (node.kind) { - case 220: + case 221: case 132: case 131: case 195: @@ -27071,7 +28421,11 @@ var ts; case 198: return ScriptElementKind.typeElement; case 199: return ScriptElementKind.enumElement; case 193: - return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; + return ts.isConst(node) + ? ScriptElementKind.constElement + : ts.isLet(node) + ? ScriptElementKind.letElement + : ScriptElementKind.variableElement; case 195: return ScriptElementKind.functionElement; case 134: return ScriptElementKind.memberGetAccessorElement; case 135: return ScriptElementKind.memberSetAccessorElement; @@ -27086,8 +28440,14 @@ var ts; case 136: return ScriptElementKind.callSignatureElement; case 133: return ScriptElementKind.constructorImplementationElement; case 127: return ScriptElementKind.typeParameterElement; - case 219: return ScriptElementKind.variableElement; + case 220: return ScriptElementKind.variableElement; case 128: return (node.flags & 112) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 203: + case 208: + case 205: + case 212: + case 206: + return ScriptElementKind.alias; } return ScriptElementKind.unknown; } @@ -27147,8 +28507,9 @@ var ts; }); if (program) { var oldSourceFiles = program.getSourceFiles(); - for (var i = 0, n = oldSourceFiles.length; i < n; i++) { - var fileName = oldSourceFiles[i].fileName; + for (var _i = 0, _n = oldSourceFiles.length; _i < _n; _i++) { + var oldSourceFile = oldSourceFiles[_i]; + var fileName = oldSourceFile.fileName; if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { documentRegistry.releaseDocument(fileName, oldSettings); } @@ -27163,13 +28524,9 @@ var ts; return undefined; } if (!changesInCompilationSettingsAffectSyntax) { - var oldSourceFile = program && program.getSourceFile(fileName); - if (oldSourceFile) { - if (sourceFileUpToDate(oldSourceFile)) { - return oldSourceFile; - } - var textChangeRange = hostFileInformation.scriptSnapshot.getChangeRange(oldSourceFile.scriptSnapshot); - return documentRegistry.updateDocument(oldSourceFile, fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, textChangeRange); + var _oldSourceFile = program && program.getSourceFile(fileName); + if (_oldSourceFile) { + return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); } } return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); @@ -27185,8 +28542,9 @@ var ts; if (program.getSourceFiles().length !== rootFileNames.length) { return false; } - for (var i = 0, n = rootFileNames.length; i < n; i++) { - if (!sourceFileUpToDate(program.getSourceFile(rootFileNames[i]))) { + for (var _a = 0, _b = rootFileNames.length; _a < _b; _a++) { + var _fileName = rootFileNames[_a]; + if (!sourceFileUpToDate(program.getSourceFile(_fileName))) { return false; } } @@ -27204,7 +28562,9 @@ var ts; } function dispose() { if (program) { - ts.forEach(program.getSourceFiles(), function (f) { documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); }); + ts.forEach(program.getSourceFiles(), function (f) { + return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); + }); } } function getSyntacticDiagnostics(fileName) { @@ -27237,8 +28597,8 @@ var ts; displayName = displayName.substring(1, displayName.length - 1); } var isValid = ts.isIdentifierStart(displayName.charCodeAt(0), target); - for (var i = 1, n = displayName.length; isValid && i < n; i++) { - isValid = ts.isIdentifierPart(displayName.charCodeAt(i), target); + for (var _i = 1, n = displayName.length; isValid && _i < n; _i++) { + isValid = ts.isIdentifierPart(displayName.charCodeAt(_i), target); } if (isValid) { return ts.unescapeIdentifier(displayName); @@ -27264,20 +28624,20 @@ var ts; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); log("getCompletionsAtPosition: Get current token: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var insideComment = isInsideComment(sourceFile, currentToken, position); log("getCompletionsAtPosition: Is inside comment: " + (new Date().getTime() - start)); if (insideComment) { log("Returning an empty list because completion was inside a comment."); return undefined; } - var start = new Date().getTime(); + start = new Date().getTime(); var previousToken = ts.findPrecedingToken(position, sourceFile); log("getCompletionsAtPosition: Get previous token 1: " + (new Date().getTime() - start)); if (previousToken && position <= previousToken.end && previousToken.kind === 64) { - var start = new Date().getTime(); + var _start = new Date().getTime(); previousToken = ts.findPrecedingToken(previousToken.pos, sourceFile); - log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - _start)); } if (previousToken && isCompletionListBlocker(previousToken)) { log("Returning an empty list because completion was requested in an invalid position."); @@ -27305,12 +28665,14 @@ var ts; typeChecker: typeInfoResolver }; log("getCompletionsAtPosition: Syntactic work: " + (new Date().getTime() - syntacticStart)); - var location = ts.getTouchingPropertyName(sourceFile, position); + var _location = ts.getTouchingPropertyName(sourceFile, position); var semanticStart = new Date().getTime(); + var isMemberCompletion; + var isNewIdentifierLocation; if (isRightOfDot) { var symbols = []; - var isMemberCompletion = true; - var isNewIdentifierLocation = false; + isMemberCompletion = true; + isNewIdentifierLocation = false; if (node.kind === 64 || node.kind === 125 || node.kind === 153) { var symbol = typeInfoResolver.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { @@ -27349,12 +28711,23 @@ var ts; getCompletionEntriesFromSymbols(filteredMembers, activeCompletionSession); } } + else if (ts.getAncestor(previousToken, 205)) { + isMemberCompletion = true; + isNewIdentifierLocation = true; + if (showCompletionsInImportsClause(previousToken)) { + var importDeclaration = ts.getAncestor(previousToken, 204); + ts.Debug.assert(importDeclaration !== undefined); + var exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); + var filteredExports = filterModuleExports(exports, importDeclaration); + getCompletionEntriesFromSymbols(filteredExports, activeCompletionSession); + } + } else { isMemberCompletion = false; isNewIdentifierLocation = isNewIdentifierDefinitionLocation(previousToken); var symbolMeanings = 793056 | 107455 | 1536 | 8388608; - var symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); - getCompletionEntriesFromSymbols(symbols, activeCompletionSession); + var _symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); + getCompletionEntriesFromSymbols(_symbols, activeCompletionSession); } } if (!isMemberCompletion) { @@ -27368,9 +28741,9 @@ var ts; entries: activeCompletionSession.entries }; function getCompletionEntriesFromSymbols(symbols, session) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); ts.forEach(symbols, function (symbol) { - var entry = createCompletionEntry(symbol, session.typeChecker, location); + var entry = createCompletionEntry(symbol, session.typeChecker, _location); if (entry) { var id = ts.escapeIdentifier(entry.name); if (!ts.lookUp(session.symbols, id)) { @@ -27379,41 +28752,57 @@ var ts; } } }); - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - _start_1)); } function isCompletionListBlocker(previousToken) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || isIdentifierDefinitionLocation(previousToken) || isRightOfIllegalDot(previousToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - _start_1)); return result; } + function showCompletionsInImportsClause(node) { + if (node) { + if (node.kind === 14 || node.kind === 23) { + return node.parent.kind === 207; + } + } + return false; + } function isNewIdentifierDefinitionLocation(previousToken) { if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 23: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 151 || containingNodeKind === 167; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 151 + || containingNodeKind === 167; case 16: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 159; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 159; case 18: return containingNodeKind === 151; - case 117: + case 116: return true; case 20: return containingNodeKind === 200; case 14: return containingNodeKind === 196; case 52: - return containingNodeKind === 193 || containingNodeKind === 167; + return containingNodeKind === 193 + || containingNodeKind === 167; case 11: return containingNodeKind === 169; case 12: return containingNodeKind === 173; - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 130; } switch (previousToken.getText()) { @@ -27426,10 +28815,12 @@ var ts; return false; } function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { - if (previousToken.kind === 8 || previousToken.kind === 9 || ts.isTemplateLiteralKind(previousToken.kind)) { - var start = previousToken.getStart(); + if (previousToken.kind === 8 + || previousToken.kind === 9 + || ts.isTemplateLiteralKind(previousToken.kind)) { + var _start_1 = previousToken.getStart(); var end = previousToken.getEnd(); - if (start < position && position < end) { + if (_start_1 < position && position < end) { return true; } else if (position === end) { @@ -27440,12 +28831,12 @@ var ts; } function getContainingObjectLiteralApplicableForCompletion(previousToken) { if (previousToken) { - var parent = previousToken.parent; + var _parent = previousToken.parent; switch (previousToken.kind) { case 14: case 23: - if (parent && parent.kind === 152) { - return parent; + if (_parent && _parent.kind === 152) { + return _parent; } break; } @@ -27488,7 +28879,7 @@ var ts; case 18: return containingNodeKind === 149; case 16: - return containingNodeKind === 216 || + return containingNodeKind === 217 || isFunction(containingNodeKind); case 14: return containingNodeKind === 199 || @@ -27504,27 +28895,27 @@ var ts; containingNodeKind === 195 || containingNodeKind === 197 || isFunction(containingNodeKind); - case 110: + case 109: return containingNodeKind === 130; case 21: return containingNodeKind === 128 || containingNodeKind === 133 || (previousToken.parent.parent.kind === 149); - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 128; case 68: case 76: - case 104: + case 103: case 82: case 97: - case 116: - case 120: + case 115: + case 119: case 84: - case 105: + case 104: case 69: - case 111: + case 110: return true; } switch (previousToken.getText()) { @@ -27549,13 +28940,30 @@ var ts; } return false; } + function filterModuleExports(exports, importDeclaration) { + var exisingImports = {}; + if (!importDeclaration.importClause) { + return exports; + } + if (importDeclaration.importClause.namedBindings && + importDeclaration.importClause.namedBindings.kind === 207) { + ts.forEach(importDeclaration.importClause.namedBindings.elements, function (el) { + var _name = el.propertyName || el.name; + exisingImports[_name.text] = true; + }); + } + if (ts.isEmpty(exisingImports)) { + return exports; + } + return ts.filter(exports, function (e) { return !ts.lookUp(exisingImports, e.name); }); + } function filterContextualMembersList(contextualMemberSymbols, existingMembers) { if (!existingMembers || existingMembers.length === 0) { return contextualMemberSymbols; } var existingMemberNames = {}; ts.forEach(existingMembers, function (m) { - if (m.kind !== 217 && m.kind !== 218) { + if (m.kind !== 218 && m.kind !== 219) { return; } if (m.getStart() <= position && position <= m.getEnd()) { @@ -27563,13 +28971,13 @@ var ts; } existingMemberNames[m.name.text] = true; }); - var filteredMembers = []; + var _filteredMembers = []; ts.forEach(contextualMemberSymbols, function (s) { if (!existingMemberNames[s.name]) { - filteredMembers.push(s); + _filteredMembers.push(s); } }); - return filteredMembers; + return _filteredMembers; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -27580,10 +28988,10 @@ var ts; } var symbol = ts.lookUp(activeCompletionSession.symbols, ts.escapeIdentifier(entryName)); if (symbol) { - var location = ts.getTouchingPropertyName(sourceFile, position); - var completionEntry = createCompletionEntry(symbol, session.typeChecker, location); - ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, location) !== undefined, "Could not find type for symbol"); - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location, session.typeChecker, location, 7); + var _location = ts.getTouchingPropertyName(sourceFile, position); + var completionEntry = createCompletionEntry(symbol, session.typeChecker, _location); + ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, _location) !== undefined, "Could not find type for symbol"); + var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), _location, session.typeChecker, _location, 7); return { name: entryName, kind: displayPartsDocumentationsAndSymbolKind.symbolKind, @@ -27695,7 +29103,9 @@ var ts; return ScriptElementKind.unknown; } function getSymbolModifiers(symbol) { - return symbol && symbol.declarations && symbol.declarations.length > 0 ? ts.getNodeModifiers(symbol.declarations[0]) : ScriptElementKindModifier.none; + return symbol && symbol.declarations && symbol.declarations.length > 0 + ? ts.getNodeModifiers(symbol.declarations[0]) + : ScriptElementKindModifier.none; } function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, typeResolver, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } @@ -27704,11 +29114,13 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); var hasAddedSymbolInfo; + var type; if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 || symbolFlags & 8388608) { if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { symbolKind = ScriptElementKind.memberVariableElement; } - var type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); + var signature; + type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); if (type) { if (location.parent && location.parent.kind === 153) { var right = location.parent.name; @@ -27779,15 +29191,14 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 114 && location.parent.kind === 133)) { - var signature; + (location.kind === 113 && location.parent.kind === 133)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); + var _allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeResolver.isImplementationOfOverload(functionDeclaration)) { signature = typeResolver.getSignatureFromDeclaration(functionDeclaration); } else { - signature = allSignatures[0]; + signature = _allSignatures[0]; } if (functionDeclaration.kind === 133) { symbolKind = ScriptElementKind.constructorImplementationElement; @@ -27797,7 +29208,7 @@ var ts; addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 136 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } - addSignatureDisplayParts(signature, allSignatures); + addSignatureDisplayParts(signature, _allSignatures); hasAddedSymbolInfo = true; } } @@ -27810,14 +29221,14 @@ var ts; } if ((symbolFlags & 64) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(104)); + displayParts.push(ts.keywordPart(103)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(123)); + displayParts.push(ts.keywordPart(122)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); displayParts.push(ts.spacePart()); @@ -27837,7 +29248,7 @@ var ts; } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(117)); + displayParts.push(ts.keywordPart(116)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } @@ -27857,7 +29268,7 @@ var ts; } else { var signatureDeclaration = ts.getDeclarationOfKind(symbol, 127).parent; - var signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); + var _signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); if (signatureDeclaration.kind === 137) { displayParts.push(ts.keywordPart(87)); displayParts.push(ts.spacePart()); @@ -27865,13 +29276,13 @@ var ts; else if (signatureDeclaration.kind !== 136 && signatureDeclaration.name) { addFullSymbolName(signatureDeclaration.symbol); } - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, signature, sourceFile, 32)); + displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, _signature, sourceFile, 32)); } } if (symbolFlags & 8) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 219) { + if (declaration.kind === 220) { var constantValue = typeResolver.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -27887,13 +29298,13 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 202) { + if (declaration.kind === 203) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); displayParts.push(ts.operatorPart(52)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(118)); + displayParts.push(ts.keywordPart(117)); displayParts.push(ts.punctuationPart(16)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8)); displayParts.push(ts.punctuationPart(17)); @@ -27936,8 +29347,8 @@ var ts; symbolFlags & 131072 || symbolFlags & 98304 || symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); - addSignatureDisplayParts(allSignatures[0], allSignatures); + var _allSignatures_1 = type.getCallSignatures(); + addSignatureDisplayParts(_allSignatures_1[0], _allSignatures_1); } } } @@ -27982,10 +29393,10 @@ var ts; documentation = signature.getDocumentationComment(); } function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { + var _typeParameterParts = ts.mapToDisplayParts(function (writer) { typeResolver.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); }); - displayParts.push.apply(displayParts, typeParameterParts); + displayParts.push.apply(displayParts, _typeParameterParts); } } function getQuickInfoAtPosition(fileName, position) { @@ -28056,8 +29467,14 @@ var ts; if (!symbol) { return undefined; } + if (symbol.flags & 8388608) { + var declaration = symbol.declarations[0]; + if (node.kind === 64 && node.parent === declaration) { + symbol = typeInfoResolver.getAliasedSymbol(symbol); + } + } var result = []; - if (node.parent.kind === 218) { + if (node.parent.kind === 219) { var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); var shorthandDeclarations = shorthandSymbol.getDeclarations(); var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver, node); @@ -28091,12 +29508,12 @@ var ts; }; } function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { - var declarations = []; + var _declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { if ((selectConstructors && d.kind === 133) || (!selectConstructors && (d.kind === 195 || d.kind === 132 || d.kind === 131))) { - declarations.push(d); + _declarations.push(d); if (d.body) definition = d; } @@ -28105,14 +29522,14 @@ var ts; result.push(getDefinitionInfo(definition, symbolKind, symbolName, containerName)); return true; } - else if (declarations.length) { - result.push(getDefinitionInfo(declarations[declarations.length - 1], symbolKind, symbolName, containerName)); + else if (_declarations.length) { + result.push(getDefinitionInfo(_declarations[_declarations.length - 1], symbolKind, symbolName, containerName)); return true; } return false; } function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (isNewExpressionTarget(location) || location.kind === 114) { + if (isNewExpressionTarget(location) || location.kind === 113) { if (symbol.flags & 32) { var classDeclaration = symbol.getDeclarations()[0]; ts.Debug.assert(classDeclaration && classDeclaration.kind === 196); @@ -28174,8 +29591,8 @@ var ts; break; case 66: case 72: - if (hasKind(parent(parent(node)), 188)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent); + if (hasKind(parent(parent(parent(node))), 188)) { + return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 65: @@ -28197,13 +29614,13 @@ var ts; return getLoopBreakContinueOccurrences(node.parent); } break; - case 114: + case 113: if (hasKind(node.parent, 133)) { return getConstructorOccurrences(node.parent); } break; - case 116: - case 120: + case 115: + case 119: if (hasKind(node.parent, 134) || hasKind(node.parent, 135)) { return getGetAndSetOccurrences(node.parent); } @@ -28222,8 +29639,8 @@ var ts; while (ifStatement) { var children = ifStatement.getChildren(); pushKeywordIf(keywords, children[0], 83); - for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 75)) { + for (var _i = children.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, children[_i], 75)) { break; } } @@ -28233,10 +29650,10 @@ var ts; ifStatement = ifStatement.elseStatement; } var result = []; - for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 75 && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; + for (var _i_1 = 0; _i_1 < keywords.length; _i_1++) { + if (keywords[_i_1].kind === 75 && _i_1 < keywords.length - 1) { + var elseKeyword = keywords[_i_1]; + var ifKeyword = keywords[_i_1 + 1]; var shouldHighlightNextKeyword = true; for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { @@ -28250,11 +29667,11 @@ var ts; textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), isWriteAccess: false }); - i++; + _i_1++; continue; } } - result.push(getReferenceEntryFromNode(keywords[i])); + result.push(getReferenceEntryFromNode(keywords[_i_1])); } return result; } @@ -28308,7 +29725,7 @@ var ts; aggregate(tryStatement.finallyBlock); } } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -28317,17 +29734,17 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent = child.parent; - if (ts.isFunctionBlock(parent) || parent.kind === 220) { - return parent; + var _parent = child.parent; + if (ts.isFunctionBlock(_parent) || _parent.kind === 221) { + return _parent; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent; + child = _parent; } return undefined; } @@ -28348,8 +29765,8 @@ var ts; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 81, 99, 74)) { if (loopNode.kind === 179) { var loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 99)) { + for (var _i = loopTokens.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, loopTokens[_i], 99)) { break; } } @@ -28366,7 +29783,7 @@ var ts; function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; pushKeywordIf(keywords, switchStatement.getFirstToken(), 91); - ts.forEach(switchStatement.clauses, function (clause) { + ts.forEach(switchStatement.caseBlock.clauses, function (clause) { pushKeywordIf(keywords, clause.getFirstToken(), 66, 72); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { @@ -28401,7 +29818,7 @@ var ts; if (node.kind === 185 || node.kind === 184) { statementAccumulator.push(node); } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -28412,8 +29829,8 @@ var ts; return actualOwner && actualOwner === owner; } function getBreakOrContinueOwner(statement) { - for (var node = statement.parent; node; node = node.parent) { - switch (node.kind) { + for (var _node = statement.parent; _node; _node = _node.parent) { + switch (_node.kind) { case 188: if (statement.kind === 184) { continue; @@ -28423,12 +29840,12 @@ var ts; case 183: case 180: case 179: - if (!statement.label || isLabeledBy(node, statement.label.text)) { - return node; + if (!statement.label || isLabeledBy(_node, statement.label.text)) { + return _node; } break; default: - if (ts.isAnyFunction(node)) { + if (ts.isFunctionLike(_node)) { return undefined; } break; @@ -28441,7 +29858,7 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 114); + return pushKeywordIf(keywords, token, 113); }); }); return ts.map(keywords, getReferenceEntryFromNode); @@ -28454,7 +29871,7 @@ var ts; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 116, 120); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 115, 119); }); } } } @@ -28472,7 +29889,7 @@ var ts; } } else if (declaration.flags & (1 | 2)) { - if (!(container.kind === 201 || container.kind === 220)) { + if (!(container.kind === 201 || container.kind === 221)) { return undefined; } } @@ -28484,7 +29901,7 @@ var ts; var nodes; switch (container.kind) { case 201: - case 220: + case 221: nodes = container.statements; break; case 133: @@ -28512,17 +29929,17 @@ var ts; return ts.map(keywords, getReferenceEntryFromNode); function getFlagFromModifier(modifier) { switch (modifier) { - case 109: - return 16; - case 107: - return 32; case 108: + return 16; + case 106: + return 32; + case 107: return 64; - case 110: + case 109: return 128; case 77: return 1; - case 115: + case 114: return 2; default: ts.Debug.fail(); @@ -28568,24 +29985,6 @@ var ts; ts.Debug.assert(node.kind === 64 || node.kind === 7 || node.kind === 8); return getReferencesForNode(node, program.getSourceFiles(), false, findInStrings, findInComments); } - function initializeNameTable(sourceFile) { - var nameTable = {}; - walk(sourceFile); - sourceFile.nameTable = nameTable; - function walk(node) { - switch (node.kind) { - case 64: - nameTable[node.text] = node.text; - break; - case 8: - case 7: - nameTable[node.text] = node.text; - break; - default: - ts.forEachChild(node, walk); - } - } - } function getReferencesForNode(node, sourceFiles, searchOnlyInCurrentFile, findInStrings, findInComments) { if (isLabelName(node)) { if (isJumpStatementTarget(node)) { @@ -28612,7 +30011,7 @@ var ts; } var result; var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); - var declaredName = getDeclaredName(symbol); + var declaredName = getDeclaredName(symbol, node); var scope = getSymbolScope(symbol); if (scope) { result = []; @@ -28625,14 +30024,11 @@ var ts; getReferencesInNode(sourceFiles[0], symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } else { - var internedName = getInternedName(symbol, declarations); + var internedName = getInternedName(symbol, node, declarations); ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - ts.Debug.assert(sourceFile.nameTable !== undefined); - if (ts.lookUp(sourceFile.nameTable, internedName)) { + var nameTable = getNameTable(sourceFile); + if (ts.lookUp(nameTable, internedName)) { result = result || []; getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } @@ -28640,56 +30036,78 @@ var ts; } } return result; - function getDeclaredName(symbol) { - var name = typeInfoResolver.symbolToString(symbol); - return stripQuotes(name); + function isImportOrExportSpecifierName(location) { + return location.parent && + (location.parent.kind === 208 || location.parent.kind === 212) && + location.parent.propertyName === location; } - function getInternedName(symbol, declarations) { - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + function isImportOrExportSpecifierImportSymbol(symbol) { + return (symbol.flags & 8388608) && ts.forEach(symbol.declarations, function (declaration) { + return declaration.kind === 208 || declaration.kind === 212; + }); + } + function getDeclaredName(symbol, location) { + var functionExpression = ts.forEach(symbol.declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name; if (functionExpression && functionExpression.name) { - var name = functionExpression.name.text; + _name = functionExpression.name.text; } - else { - var name = symbol.name; + if (isImportOrExportSpecifierName(location)) { + return location.getText(); } - return stripQuotes(name); + _name = typeInfoResolver.symbolToString(symbol); + return stripQuotes(_name); + } + function getInternedName(symbol, location, declarations) { + if (isImportOrExportSpecifierName(location)) { + return location.getText(); + } + var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name = functionExpression && functionExpression.name + ? functionExpression.name.text + : symbol.name; + return stripQuotes(_name); } function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(length - 1) === 34) { - return name.substring(1, length - 1); + var _length = name.length; + if (_length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(_length - 1) === 34) { + return name.substring(1, _length - 1); } ; return name; } function getSymbolScope(symbol) { - if (symbol.getFlags() && (4 | 8192)) { + if (symbol.flags & (4 | 8192)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32) ? d : undefined; }); if (privateDeclaration) { return ts.getAncestor(privateDeclaration, 196); } } - if (symbol.parent || (symbol.getFlags() & 268435456)) { + if (symbol.flags & 8388608) { return undefined; } - var scope = undefined; - var declarations = symbol.getDeclarations(); - if (declarations) { - for (var i = 0, n = declarations.length; i < n; i++) { - var container = getContainerNode(declarations[i]); + if (symbol.parent || (symbol.flags & 268435456)) { + return undefined; + } + var _scope = undefined; + var _declarations = symbol.getDeclarations(); + if (_declarations) { + for (var _i = 0, _n = _declarations.length; _i < _n; _i++) { + var declaration = _declarations[_i]; + var container = getContainerNode(declaration); if (!container) { return undefined; } - if (scope && scope !== container) { + if (_scope && _scope !== container) { return undefined; } - if (container.kind === 220 && !ts.isExternalModule(container)) { + if (container.kind === 221 && !ts.isExternalModule(container)) { return undefined; } - scope = container; + _scope = container; } } - return scope; + return _scope; } function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { var positions = []; @@ -28714,22 +30132,22 @@ var ts; return positions; } function getLabelReferencesInNode(container, targetLabel) { - var result = []; + var _result = []; var sourceFile = container.getSourceFile(); var labelName = targetLabel.text; var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.getWidth() !== labelName.length) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.getWidth() !== labelName.length) { return; } - if (node === targetLabel || - (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - result.push(getReferenceEntryFromNode(node)); + if (_node === targetLabel || + (isJumpStatementTarget(_node) && getTargetLabel(_node, labelName) === targetLabel)) { + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function isValidReferencePosition(node, searchSymbolName) { if (node) { @@ -28827,21 +30245,21 @@ var ts; default: return undefined; } - var result = []; + var _result = []; var sourceFile = searchSpaceNode.getSourceFile(); var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 90) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 90) { return; } - var container = ts.getSuperContainer(node, false); + var container = ts.getSuperContainer(_node, false); if (container && (128 & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { - result.push(getReferenceEntryFromNode(node)); + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) { var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); @@ -28860,7 +30278,7 @@ var ts; staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; - case 220: + case 221: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } @@ -28870,48 +30288,49 @@ var ts; default: return undefined; } - var result = []; - if (searchSpaceNode.kind === 220) { + var _result = []; + var possiblePositions; + if (searchSpaceNode.kind === 221) { ts.forEach(sourceFiles, function (sourceFile) { - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); - getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); + getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, _result); }); } else { var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, _result); } - return result; + return _result; function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) { ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 92) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 92) { return; } - var container = ts.getThisContainer(node, false); + var container = ts.getThisContainer(_node, false); switch (searchSpaceNode.kind) { case 160: case 195: if (searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 132: case 131: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 196: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128) === staticFlag) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; - case 220: - if (container.kind === 220 && !ts.isExternalModule(container)) { - result.push(getReferenceEntryFromNode(node)); + case 221: + if (container.kind === 221 && !ts.isExternalModule(container)) { + result.push(getReferenceEntryFromNode(_node)); } break; } @@ -28919,25 +30338,28 @@ var ts; } } function populateSearchSymbolSet(symbol, location) { - var result = [symbol]; + var _result = [symbol]; + if (isImportOrExportSpecifierImportSymbol(symbol)) { + _result.push(typeInfoResolver.getAliasedSymbol(symbol)); + } if (isNameOfPropertyAssignment(location)) { ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { - result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); + _result.push.apply(_result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); if (shorthandValueSymbol) { - result.push(shorthandValueSymbol); + _result.push(shorthandValueSymbol); } } ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { if (rootSymbol !== symbol) { - result.push(rootSymbol); + _result.push(rootSymbol); } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); } }); - return result; + return _result; } function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { if (symbol && symbol.flags & (32 | 64)) { @@ -28969,6 +30391,10 @@ var ts; if (searchSymbols.indexOf(referenceSymbol) >= 0) { return true; } + if (isImportOrExportSpecifierImportSymbol(referenceSymbol) && + searchSymbols.indexOf(typeInfoResolver.getAliasedSymbol(referenceSymbol)) >= 0) { + return true; + } if (isNameOfPropertyAssignment(referenceLocation)) { return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { return ts.forEach(typeInfoResolver.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0; }); @@ -28979,9 +30405,9 @@ var ts; return true; } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - var result = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); - return ts.forEach(result, function (s) { return searchSymbols.indexOf(s) >= 0; }); + var _result = []; + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); + return ts.forEach(_result, function (s) { return searchSymbols.indexOf(s) >= 0; }); } return false; }); @@ -28990,28 +30416,28 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeInfoResolver.getContextualType(objectLiteral); - var name = node.text; + var _name = node.text; if (contextualType) { if (contextualType.flags & 16384) { - var unionProperty = contextualType.getProperty(name); + var unionProperty = contextualType.getProperty(_name); if (unionProperty) { return [unionProperty]; } else { - var result = []; + var _result = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name); - if (symbol) { - result.push(symbol); + var _symbol = t.getProperty(_name); + if (_symbol) { + _result.push(_symbol); } }); - return result; + return _result; } } else { - var symbol = contextualType.getProperty(name); - if (symbol) { - return [symbol]; + var _symbol = contextualType.getProperty(_name); + if (_symbol) { + return [_symbol]; } } } @@ -29020,10 +30446,12 @@ var ts; } function getIntersectingMeaningFromDeclarations(meaning, declarations) { if (declarations) { + var lastIterationMeaning; do { - var lastIterationMeaning = meaning; - for (var i = 0, n = declarations.length; i < n; i++) { - var declarationMeaning = getMeaningFromDeclaration(declarations[i]); + lastIterationMeaning = meaning; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; + var declarationMeaning = getMeaningFromDeclaration(declaration); if (declarationMeaning & meaning) { meaning |= declarationMeaning; } @@ -29047,16 +30475,16 @@ var ts; }; } function isWriteAccess(node) { - if (node.kind === 64 && ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (node.kind === 64 && ts.isDeclarationName(node)) { return true; } - var parent = node.parent; - if (parent) { - if (parent.kind === 166 || parent.kind === 165) { + var _parent = node.parent; + if (_parent) { + if (_parent.kind === 166 || _parent.kind === 165) { return true; } - else if (parent.kind === 167 && parent.left === node) { - var operator = parent.operatorToken.kind; + else if (_parent.kind === 167 && _parent.left === node) { + var operator = _parent.operatorToken.kind; return 52 <= operator && operator <= 63; } } @@ -29093,9 +30521,9 @@ var ts; case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 133: @@ -29104,7 +30532,7 @@ var ts; case 195: case 160: case 161: - case 216: + case 217: return 1; case 127: case 197: @@ -29124,11 +30552,17 @@ var ts; else { return 4; } - case 202: + case 207: + case 208: + case 203: + case 204: + case 209: + case 210: return 1 | 2 | 4; - case 220: + case 221: return 4 | 1; } + return 1 | 2 | 4; ts.Debug.fail("Unknown declaration type"); } function isTypeReference(node) { @@ -29157,19 +30591,19 @@ var ts; ts.Debug.assert(node.kind === 64); if (node.parent.kind === 125 && node.parent.right === node && - node.parent.parent.kind === 202) { + node.parent.parent.kind === 203) { return 1 | 2 | 4; } return 4; } function getMeaningFromLocation(node) { - if (node.parent.kind === 208) { + if (node.parent.kind === 209) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { return getMeaningFromRightHandSideOfImportEquals(node); } - else if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + else if (ts.isDeclarationName(node)) { return getMeaningFromDeclaration(node.parent); } else if (isTypeReference(node)) { @@ -29453,8 +30887,8 @@ var ts; function processElement(element) { if (ts.textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { var children = element.getChildren(); - for (var i = 0, n = children.length; i < n; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (ts.isToken(child)) { classifyToken(child); } @@ -29478,8 +30912,8 @@ var ts; if (matchKind) { var parentElement = token.parent; var childNodes = parentElement.getChildren(sourceFile); - for (var i = 0, n = childNodes.length; i < n; i++) { - var current = childNodes[i]; + for (var _i = 0, _n = childNodes.length; _i < _n; _i++) { + var current = childNodes[_i]; if (current.kind === matchKind) { var range1 = ts.createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); var range2 = ts.createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); @@ -29513,7 +30947,7 @@ var ts; var start = new Date().getTime(); var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; @@ -29559,9 +30993,9 @@ var ts; continue; } var descriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; + for (var _i = 0, n = descriptors.length; _i < n; _i++) { + if (matchArray[_i + firstDescriptorCaptureIndex]) { + descriptor = descriptors[_i]; } } ts.Debug.assert(descriptor !== undefined); @@ -29584,12 +31018,12 @@ var ts; var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; + var _preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; + var regExpString = _preamble + messagePortion + endOfLineOrEndOfComment; return new RegExp(regExpString, "gim"); } function isLetterOrDigit(char) { @@ -29609,9 +31043,10 @@ var ts; if (declarations && declarations.length > 0) { var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); if (defaultLibFileName) { - for (var i = 0; i < declarations.length; i++) { - var sourceFile = declarations[i].getSourceFile(); - if (sourceFile && getCanonicalFileName(ts.normalizePath(sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var _sourceFile = current.getSourceFile(); + if (_sourceFile && getCanonicalFileName(ts.normalizePath(_sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); } } @@ -29678,8 +31113,43 @@ var ts; }; } ts.createLanguageService = createLanguageService; + function getNameTable(sourceFile) { + if (!sourceFile.nameTable) { + initializeNameTable(sourceFile); + } + return sourceFile.nameTable; + } + ts.getNameTable = getNameTable; + function initializeNameTable(sourceFile) { + var nameTable = {}; + walk(sourceFile); + sourceFile.nameTable = nameTable; + function walk(node) { + switch (node.kind) { + case 64: + nameTable[node.text] = node.text; + break; + case 8: + case 7: + if (ts.isDeclarationName(node) || + node.parent.kind === 213 || + isArgumentOfElementAccessExpression(node)) { + nameTable[node.text] = node.text; + } + break; + default: + ts.forEachChild(node, walk); + } + } + } + function isArgumentOfElementAccessExpression(node) { + return node && + node.parent && + node.parent.kind === 154 && + node.parent.argumentExpression === node; + } function createClassifier() { - var scanner = ts.createScanner(2, false); + var _scanner = ts.createScanner(2, false); var noRegexTable = []; noRegexTable[64] = true; noRegexTable[8] = true; @@ -29696,19 +31166,19 @@ var ts; var templateStack = []; function isAccessibilityModifier(kind) { switch (kind) { - case 109: - case 107: case 108: + case 106: + case 107: return true; } return false; } function canFollow(keyword1, keyword2) { if (isAccessibilityModifier(keyword1)) { - if (keyword2 === 116 || - keyword2 === 120 || - keyword2 === 114 || - keyword2 === 110) { + if (keyword2 === 115 || + keyword2 === 119 || + keyword2 === 113 || + keyword2 === 109) { return true; } return false; @@ -29746,17 +31216,17 @@ var ts; templateStack.push(11); break; } - scanner.setText(text); + _scanner.setText(text); var result = { finalLexState: 0, entries: [] }; var angleBracketStack = 0; do { - token = scanner.scan(); + token = _scanner.scan(); if (!ts.isTrivia(token)) { if ((token === 36 || token === 56) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 9) { + if (_scanner.reScanSlashToken() === 9) { token = 9; } } @@ -29773,11 +31243,11 @@ var ts; else if (token === 25 && angleBracketStack > 0) { angleBracketStack--; } - else if (token === 112 || - token === 121 || - token === 119 || - token === 113 || - token === 122) { + else if (token === 111 || + token === 120 || + token === 118 || + token === 112 || + token === 121) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 64; } @@ -29794,7 +31264,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 11) { - token = scanner.reScanTemplateToken(); + token = _scanner.reScanTemplateToken(); if (token === 13) { templateStack.pop(); } @@ -29814,13 +31284,13 @@ var ts; } while (token !== 1); return result; function processToken() { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); + var start = _scanner.getTokenPos(); + var end = _scanner.getTextPos(); addResult(end - start, classFromKind(token)); if (end >= text.length) { if (token === 8) { - var tokenText = scanner.getTokenText(); - if (scanner.isUnterminated()) { + var tokenText = _scanner.getTokenText(); + if (_scanner.isUnterminated()) { var lastCharIndex = tokenText.length - 1; var numBackslashes = 0; while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92) { @@ -29828,17 +31298,19 @@ var ts; } if (numBackslashes & 1) { var quoteChar = tokenText.charCodeAt(0); - result.finalLexState = quoteChar === 34 ? 3 : 2; + result.finalLexState = quoteChar === 34 + ? 3 + : 2; } } } else if (token === 3) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { result.finalLexState = 1; } } else if (ts.isTemplateLiteralKind(token)) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { if (token === 13) { result.finalLexState = 5; } @@ -29970,7 +31442,7 @@ var ts; getNodeConstructor: function (kind) { function Node() { } - var proto = kind === 220 ? new SourceFileObject() : new NodeObject(); + var proto = kind === 221 ? new SourceFileObject() : new NodeObject(); proto.kind = kind; proto.pos = 0; proto.end = 0; @@ -29991,7 +31463,7 @@ var ts; var BreakpointResolver; (function (BreakpointResolver) { function spanInSourceFileAtLocation(sourceFile, position) { - if (sourceFile.flags & 1024) { + if (sourceFile.flags & 2048) { return undefined; } var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); @@ -30061,7 +31533,7 @@ var ts; } case 201: return spanInBlock(node); - case 216: + case 217: return spanInBlock(node.block); case 177: return textSpan(node.expression); @@ -30087,24 +31559,28 @@ var ts; return textSpan(node, ts.findNextToken(node.expression, node)); case 188: return textSpan(node, ts.findNextToken(node.expression, node)); - case 213: case 214: + case 215: return spanInNode(node.statements[0]); case 191: return spanInBlock(node.tryBlock); case 190: return textSpan(node, node.expression); - case 208: - return textSpan(node, node.exportName); - case 202: + case 209: + return textSpan(node, node.expression); + case 203: return textSpan(node, node.moduleReference); + case 204: + return textSpan(node, node.moduleSpecifier); + case 210: + return textSpan(node, node.moduleSpecifier); case 200: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } case 196: case 199: - case 219: + case 220: case 155: case 156: return textSpan(node); @@ -30138,13 +31614,13 @@ var ts; case 80: return spanInNextNode(node); default: - if (node.parent.kind === 217 && node.parent.name === node) { + if (node.parent.kind === 218 && node.parent.name === node) { return spanInNode(node.parent.initializer); } if (node.parent.kind === 158 && node.parent.type === node) { return spanInNode(node.parent.expression); } - if (ts.isAnyFunction(node.parent) && node.parent.type === node) { + if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } return spanInNode(node.parent); @@ -30157,7 +31633,11 @@ var ts; } var isParentVariableStatement = variableDeclaration.parent.parent.kind === 175; var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 181 && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement ? variableDeclaration.parent.parent.declarationList.declarations : isDeclarationOfForStatement ? variableDeclaration.parent.parent.initializer.declarations : undefined; + var declarations = isParentVariableStatement + ? variableDeclaration.parent.parent.declarationList.declarations + : isDeclarationOfForStatement + ? variableDeclaration.parent.parent.initializer.declarations + : undefined; if (variableDeclaration.initializer || (variableDeclaration.flags & 1)) { if (declarations && declarations[0] === variableDeclaration) { if (isParentVariableStatement) { @@ -30259,8 +31739,8 @@ var ts; case 196: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 188: - return spanInNodeIfStartsOnSameLine(node.parent, node.parent.clauses[0]); + case 202: + return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } @@ -30277,12 +31757,12 @@ var ts; if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 216: + case 217: return spanInNode(node.parent.statements[node.parent.statements.length - 1]); ; - case 188: - var switchStatement = node.parent; - var lastClause = switchStatement.clauses[switchStatement.clauses.length - 1]; + case 202: + var caseBlock = node.parent; + var lastClause = caseBlock.clauses[caseBlock.clauses.length - 1]; if (lastClause) { return spanInNode(lastClause.statements[lastClause.statements.length - 1]); } @@ -30317,7 +31797,7 @@ var ts; return spanInNode(node.parent); } function spanInColonToken(node) { - if (ts.isAnyFunction(node.parent) || node.parent.kind === 217) { + if (ts.isFunctionLike(node.parent) || node.parent.kind === 218) { return spanInPreviousNode(node); } return spanInNode(node.parent); diff --git a/bin/typescriptServices.d.ts b/bin/typescriptServices.d.ts index 81c5bac2d03..a557e814a79 100644 --- a/bin/typescriptServices.d.ts +++ b/bin/typescriptServices.d.ts @@ -124,28 +124,28 @@ declare module ts { WhileKeyword = 99, WithKeyword = 100, AsKeyword = 101, - FromKeyword = 102, - ImplementsKeyword = 103, - InterfaceKeyword = 104, - LetKeyword = 105, - PackageKeyword = 106, - PrivateKeyword = 107, - ProtectedKeyword = 108, - PublicKeyword = 109, - StaticKeyword = 110, - YieldKeyword = 111, - AnyKeyword = 112, - BooleanKeyword = 113, - ConstructorKeyword = 114, - DeclareKeyword = 115, - GetKeyword = 116, - ModuleKeyword = 117, - RequireKeyword = 118, - NumberKeyword = 119, - SetKeyword = 120, - StringKeyword = 121, - SymbolKeyword = 122, - TypeKeyword = 123, + ImplementsKeyword = 102, + InterfaceKeyword = 103, + LetKeyword = 104, + PackageKeyword = 105, + PrivateKeyword = 106, + ProtectedKeyword = 107, + PublicKeyword = 108, + StaticKeyword = 109, + YieldKeyword = 110, + AnyKeyword = 111, + BooleanKeyword = 112, + ConstructorKeyword = 113, + DeclareKeyword = 114, + GetKeyword = 115, + ModuleKeyword = 116, + RequireKeyword = 117, + NumberKeyword = 118, + SetKeyword = 119, + StringKeyword = 120, + SymbolKeyword = 121, + TypeKeyword = 122, + FromKeyword = 123, OfKeyword = 124, QualifiedName = 125, ComputedPropertyName = 126, @@ -224,35 +224,36 @@ declare module ts { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, LastReservedWord = 100, FirstKeyword = 65, LastKeyword = 124, - FirstFutureReservedWord = 103, - LastFutureReservedWord = 111, + FirstFutureReservedWord = 102, + LastFutureReservedWord = 110, FirstTypeNode = 139, LastTypeNode = 147, FirstPunctuation = 14, @@ -276,15 +277,16 @@ declare module ts { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -412,7 +414,7 @@ declare module ts { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -505,7 +507,9 @@ declare module ts { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { @@ -515,6 +519,7 @@ declare module ts { interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; + hasExtendedUnicodeEscape?: boolean; } interface StringLiteralExpression extends LiteralExpression { _stringLiteralExpressionBrand: any; @@ -541,6 +546,7 @@ declare module ts { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -614,6 +620,9 @@ declare module ts { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -636,16 +645,15 @@ declare module ts { catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; + interface CatchClause extends Node { + variableDeclaration: VariableDeclaration; block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -675,10 +683,7 @@ declare module ts { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -703,7 +708,7 @@ declare module ts { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -718,8 +723,9 @@ declare module ts { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression: Expression; } interface FileReference extends TextRange { fileName: string; @@ -727,7 +733,7 @@ declare module ts { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -832,6 +838,7 @@ declare module ts { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; + getExportsOfExternalModule(node: ImportDeclaration): Symbol[]; } interface SymbolDisplayBuilder { buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; @@ -889,10 +896,10 @@ declare module ts { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -903,6 +910,7 @@ declare module ts { isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isUnknownIdentifier(location: Node, name: string): boolean; + getBlockScopedVariableId(node: Identifier): number; } const enum SymbolFlags { FunctionScopedVariable = 1, @@ -928,13 +936,14 @@ declare module ts { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -959,7 +968,7 @@ declare module ts { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -988,10 +997,9 @@ declare module ts { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1007,6 +1015,7 @@ declare module ts { SuperStatic = 32, ContextChecked = 64, EnumValuesComputed = 128, + BlockScopedBindingInLoop = 256, } interface NodeLinks { resolvedType?: Type; @@ -1191,7 +1200,6 @@ declare module ts { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1383,6 +1391,7 @@ declare module ts { getTokenPos(): number; getTokenText(): string; getTokenValue(): string; + hasExtendedUnicodeEscape(): boolean; hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; @@ -1431,13 +1440,16 @@ declare module ts { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module ts { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module ts { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1479,9 +1491,6 @@ declare module ts { getDocumentationComment(): SymbolDisplayPart[]; } interface SourceFile { - version: string; - scriptSnapshot: IScriptSnapshot; - nameTable: Map; getNamedDeclarations(): Declaration[]; getLineAndCharacterOfPosition(pos: number): LineAndCharacter; getLineStarts(): number[]; @@ -1835,25 +1844,17 @@ declare module ts { acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; /** * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will intern call updateLanguageServiceSourceFile + * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * - * Note: It is not allowed to call update on a SourceFile that was not acquired from this - * registry originally. - * - * @param sourceFile The original sourceFile object to update * @param fileName The name of the file requested * @param compilationSettings Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. - * @parm scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm textChangeRange Change ranges since the last snapshot. Only used if the file - * was not found in the registry and a new one was created. + * @param scriptSnapshot Text of the file. + * @param version Current version of the file. */ - updateDocument(sourceFile: SourceFile, fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; /** * Informs the DocumentRegistry that a file is not needed any longer. * @@ -1935,7 +1936,7 @@ declare module ts { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; diff --git a/bin/typescriptServices.js b/bin/typescriptServices.js index 4ee694a8f19..9e939631006 100644 --- a/bin/typescriptServices.js +++ b/bin/typescriptServices.js @@ -118,28 +118,28 @@ var ts; SyntaxKind[SyntaxKind["WhileKeyword"] = 99] = "WhileKeyword"; SyntaxKind[SyntaxKind["WithKeyword"] = 100] = "WithKeyword"; SyntaxKind[SyntaxKind["AsKeyword"] = 101] = "AsKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 102] = "FromKeyword"; - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 103] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 104] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 105] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 106] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 107] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 108] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 109] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 110] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 111] = "YieldKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 112] = "AnyKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 113] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 114] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 115] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 116] = "GetKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 117] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 118] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 119] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 120] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 121] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 122] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 123] = "TypeKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 102] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 103] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 104] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 105] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 106] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 107] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 108] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 109] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 110] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 111] = "AnyKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 112] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 113] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 114] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 115] = "GetKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 116] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 117] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 118] = "NumberKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 119] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 120] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 121] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 122] = "TypeKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 123] = "FromKeyword"; SyntaxKind[SyntaxKind["OfKeyword"] = 124] = "OfKeyword"; SyntaxKind[SyntaxKind["QualifiedName"] = 125] = "QualifiedName"; SyntaxKind[SyntaxKind["ComputedPropertyName"] = 126] = "ComputedPropertyName"; @@ -218,35 +218,36 @@ var ts; SyntaxKind[SyntaxKind["EnumDeclaration"] = 199] = "EnumDeclaration"; SyntaxKind[SyntaxKind["ModuleDeclaration"] = 200] = "ModuleDeclaration"; SyntaxKind[SyntaxKind["ModuleBlock"] = 201] = "ModuleBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 202] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 203] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 204] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 205] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 206] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 207] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 208] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 209] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 210] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 211] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["CaseClause"] = 213] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 214] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 215] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 216] = "CatchClause"; - SyntaxKind[SyntaxKind["PropertyAssignment"] = 217] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 218] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["EnumMember"] = 219] = "EnumMember"; - SyntaxKind[SyntaxKind["SourceFile"] = 220] = "SourceFile"; - SyntaxKind[SyntaxKind["SyntaxList"] = 221] = "SyntaxList"; - SyntaxKind[SyntaxKind["Count"] = 222] = "Count"; + SyntaxKind[SyntaxKind["CaseBlock"] = 202] = "CaseBlock"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 203] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 204] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 205] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 206] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 207] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 208] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 209] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 210] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 211] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 212] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 213] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["CaseClause"] = 214] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 215] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 216] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 217] = "CatchClause"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 218] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 219] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 220] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 221] = "SourceFile"; + SyntaxKind[SyntaxKind["SyntaxList"] = 222] = "SyntaxList"; + SyntaxKind[SyntaxKind["Count"] = 223] = "Count"; SyntaxKind[SyntaxKind["FirstAssignment"] = 52] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 63] = "LastAssignment"; SyntaxKind[SyntaxKind["FirstReservedWord"] = 65] = "FirstReservedWord"; SyntaxKind[SyntaxKind["LastReservedWord"] = 100] = "LastReservedWord"; SyntaxKind[SyntaxKind["FirstKeyword"] = 65] = "FirstKeyword"; SyntaxKind[SyntaxKind["LastKeyword"] = 124] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 103] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 111] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 102] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 110] = "LastFutureReservedWord"; SyntaxKind[SyntaxKind["FirstTypeNode"] = 139] = "FirstTypeNode"; SyntaxKind[SyntaxKind["LastTypeNode"] = 147] = "LastTypeNode"; SyntaxKind[SyntaxKind["FirstPunctuation"] = 14] = "FirstPunctuation"; @@ -271,15 +272,16 @@ var ts; NodeFlags[NodeFlags["Private"] = 32] = "Private"; NodeFlags[NodeFlags["Protected"] = 64] = "Protected"; NodeFlags[NodeFlags["Static"] = 128] = "Static"; - NodeFlags[NodeFlags["MultiLine"] = 256] = "MultiLine"; - NodeFlags[NodeFlags["Synthetic"] = 512] = "Synthetic"; - NodeFlags[NodeFlags["DeclarationFile"] = 1024] = "DeclarationFile"; - NodeFlags[NodeFlags["Let"] = 2048] = "Let"; - NodeFlags[NodeFlags["Const"] = 4096] = "Const"; - NodeFlags[NodeFlags["OctalLiteral"] = 8192] = "OctalLiteral"; - NodeFlags[NodeFlags["Modifier"] = 243] = "Modifier"; + NodeFlags[NodeFlags["Default"] = 256] = "Default"; + NodeFlags[NodeFlags["MultiLine"] = 512] = "MultiLine"; + NodeFlags[NodeFlags["Synthetic"] = 1024] = "Synthetic"; + NodeFlags[NodeFlags["DeclarationFile"] = 2048] = "DeclarationFile"; + NodeFlags[NodeFlags["Let"] = 4096] = "Let"; + NodeFlags[NodeFlags["Const"] = 8192] = "Const"; + NodeFlags[NodeFlags["OctalLiteral"] = 16384] = "OctalLiteral"; + NodeFlags[NodeFlags["Modifier"] = 499] = "Modifier"; NodeFlags[NodeFlags["AccessibilityModifier"] = 112] = "AccessibilityModifier"; - NodeFlags[NodeFlags["BlockScoped"] = 6144] = "BlockScoped"; + NodeFlags[NodeFlags["BlockScoped"] = 12288] = "BlockScoped"; })(ts.NodeFlags || (ts.NodeFlags = {})); var NodeFlags = ts.NodeFlags; (function (ParserContextFlags) { @@ -353,13 +355,14 @@ var ts; SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType"; SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace"; - SymbolFlags[SymbolFlags["Import"] = 8388608] = "Import"; + SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias"; SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated"; SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged"; SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient"; SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype"; SymbolFlags[SymbolFlags["UnionProperty"] = 268435456] = "UnionProperty"; SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional"; + SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar"; SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; SymbolFlags[SymbolFlags["Value"] = 107455] = "Value"; @@ -384,7 +387,7 @@ var ts; SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes"; SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530912] = "TypeParameterExcludes"; SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793056] = "TypeAliasExcludes"; - SymbolFlags[SymbolFlags["ImportExcludes"] = 8388608] = "ImportExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes"; SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember"; SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; SymbolFlags[SymbolFlags["HasLocals"] = 255504] = "HasLocals"; @@ -404,6 +407,7 @@ var ts; NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 32] = "SuperStatic"; NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 64] = "ContextChecked"; NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 128] = "EnumValuesComputed"; + NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 256] = "BlockScopedBindingInLoop"; })(ts.NodeCheckFlags || (ts.NodeCheckFlags = {})); var NodeCheckFlags = ts.NodeCheckFlags; (function (TypeFlags) { @@ -621,8 +625,9 @@ var ts; ts.forEach = forEach; function contains(array, value) { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (v === value) { return true; } } @@ -644,8 +649,9 @@ var ts; function countWhere(array, predicate) { var count = 0; if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (predicate(array[i])) { + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + if (predicate(v)) { count++; } } @@ -654,12 +660,13 @@ var ts; } ts.countWhere = countWhere; function filter(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (f(item)) { - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (f(_item)) { + result.push(_item); } } } @@ -667,10 +674,12 @@ var ts; } ts.filter = filter; function map(array, f) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - result.push(f(array[i])); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result.push(f(v)); } } return result; @@ -685,12 +694,14 @@ var ts; } ts.concatenate = concatenate; function deduplicate(array) { + var result; if (array) { - var result = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (!contains(result, item)) - result.push(item); + result = []; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var _item = array[_i]; + if (!contains(result, _item)) { + result.push(_item); + } } } return result; @@ -698,15 +709,17 @@ var ts; ts.deduplicate = deduplicate; function sum(array, prop) { var result = 0; - for (var i = 0; i < array.length; i++) { - result += array[i][prop]; + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var v = array[_i]; + result += v[prop]; } return result; } ts.sum = sum; function addRange(to, from) { - for (var i = 0, n = from.length; i < n; i++) { - to.push(from[i]); + for (var _i = 0, _n = from.length; _i < _n; _i++) { + var v = from[_i]; + to.push(v); } } ts.addRange = addRange; @@ -767,9 +780,9 @@ var ts; for (var id in first) { result[id] = first[id]; } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; + for (var _id in second) { + if (!hasProperty(result, _id)) { + result[_id] = second[_id]; } } return result; @@ -825,12 +838,17 @@ var ts; } ts.localizedDiagnosticMessages = undefined; function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] ? ts.localizedDiagnosticMessages[message] : message; + return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] + ? ts.localizedDiagnosticMessages[message] + : message; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + var end = start + length; Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); + Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); + Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -966,21 +984,23 @@ var ts; function getNormalizedParts(normalizedSlashedPath, rootLength) { var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); var normalized = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; + for (var _i = 0, _n = parts.length; _i < _n; _i++) { + var part = parts[_i]; if (part !== ".") { if (part === ".." && normalized.length > 0 && normalized[normalized.length - 1] !== "..") { normalized.pop(); } else { - normalized.push(part); + if (part) { + normalized.push(part); + } } } } return normalized; } function normalizePath(path) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); var normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); @@ -1003,7 +1023,7 @@ var ts; return [path.substr(0, rootLength)].concat(normalizedParts); } function getNormalizedPathComponents(path, currentDirectory) { - var path = normalizeSlashes(path); + path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { path = combinePaths(normalizeSlashes(currentDirectory), path); @@ -1106,8 +1126,8 @@ var ts; ts.fileExtensionIs = fileExtensionIs; var supportedExtensions = [".d.ts", ".ts", ".js"]; function removeFileExtension(path) { - for (var i = 0; i < supportedExtensions.length; i++) { - var ext = supportedExtensions[i]; + for (var _i = 0, _n = supportedExtensions.length; _i < _n; _i++) { + var ext = supportedExtensions[_i]; if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); } @@ -1116,7 +1136,7 @@ var ts; } ts.removeFileExtension = removeFileExtension; var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\0-\19\t\v\f\b\0\r\n\u2028\u2029\u0085]/g; + var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var escapedCharsMap = { "\0": "\\0", "\t": "\\t", @@ -1131,20 +1151,6 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" }; - function escapeString(s) { - s = backslashOrDoubleQuote.test(s) ? s.replace(backslashOrDoubleQuote, getReplacement) : s; - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || unicodeEscape(c); - } - function unicodeEscape(c) { - var hexCharCode = c.charCodeAt(0).toString(16); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - } - ts.escapeString = escapeString; function getDefaultLibFileName(options) { return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts"; } @@ -1279,15 +1285,16 @@ var ts; function visitDirectory(path) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var i = 0; i < files.length; i++) { - var name = files[i]; - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(ts.combinePaths(path, name)); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var _name = files[_i]; + if (!extension || ts.fileExtensionIs(_name, extension)) { + result.push(ts.combinePaths(path, _name)); } } var subfolders = getNames(folder.subfolders); - for (var i = 0; i < subfolders.length; i++) { - visitDirectory(ts.combinePaths(path, subfolders[i])); + for (var _a = 0, _b = subfolders.length; _a < _b; _a++) { + var current = subfolders[_a]; + visitDirectory(ts.combinePaths(path, current)); } } } @@ -1372,8 +1379,9 @@ var ts; function visitDirectory(path) { var files = _fs.readdirSync(path || ".").sort(); var directories = []; - for (var i = 0; i < files.length; i++) { - var name = ts.combinePaths(path, files[i]); + for (var _i = 0, _n = files.length; _i < _n; _i++) { + var current = files[_i]; + var name = ts.combinePaths(path, current); var stat = _fs.lstatSync(name); if (stat.isFile()) { if (!extension || ts.fileExtensionIs(name, extension)) { @@ -1384,8 +1392,9 @@ var ts; directories.push(name); } } - for (var i = 0; i < directories.length; i++) { - visitDirectory(directories[i]); + for (var _a = 0, _b = directories.length; _a < _b; _a++) { + var _current = directories[_a]; + visitDirectory(_current); } } } @@ -1464,7 +1473,6 @@ var ts; Trailing_comma_not_allowed: { code: 1009, category: 1, key: "Trailing comma not allowed." }, Asterisk_Slash_expected: { code: 1010, category: 1, key: "'*/' expected." }, Unexpected_token: { code: 1012, category: 1, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1, key: "Catch clause parameter cannot have a type annotation." }, A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1, key: "A rest parameter must be last in a parameter list." }, Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1, key: "Parameter cannot have question mark and initializer." }, A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1, key: "A required parameter cannot follow an optional parameter." }, @@ -1572,7 +1580,6 @@ var ts; const_declarations_must_be_initialized: { code: 1155, category: 1, key: "'const' declarations must be initialized" }, const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1, key: "'const' declarations can only be declared inside a block." }, let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1, key: "'let' declarations can only be declared inside a block." }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, Unterminated_template_literal: { code: 1160, category: 1, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: 1, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: 1, key: "An object member cannot be declared optional." }, @@ -1609,6 +1616,11 @@ var ts; External_module_0_has_no_default_export_or_export_assignment: { code: 1192, category: 1, key: "External module '{0}' has no default export or export assignment." }, An_export_declaration_cannot_have_modifiers: { code: 1193, category: 1, key: "An export declaration cannot have modifiers." }, Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: 1, key: "Export declarations are not permitted in an internal module." }, + Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: 1, key: "Catch clause variable name must be an identifier." }, + Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: 1, key: "Catch clause variable cannot have a type annotation." }, + Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: 1, key: "Catch clause variable cannot have an initializer." }, + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: 1, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, + Unterminated_Unicode_escape_sequence: { code: 1199, category: 1, key: "Unterminated Unicode escape sequence." }, Duplicate_identifier_0: { code: 2300, category: 1, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1, key: "Static members cannot reference class type parameters." }, @@ -1779,9 +1791,19 @@ var ts; Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: 1, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: 1, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: 1, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: 1, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: 1, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: 1, key: "Export declaration conflicts with exported declaration of '{0}'" }, + The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: 1, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, + Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: 1, key: "Invalid left-hand side in 'for...of' statement." }, + The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: 1, key: "The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator." }, + The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method: { code: 2489, category: 1, key: "The iterator returned by the right-hand side of a 'for...of' statement must have a 'next()' method." }, + The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: 1, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: 1, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, + Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: 1, key: "Cannot redeclare identifier '{0}' in catch clause" }, + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: 1, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: 1, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, + Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: 1, key: "Type '{0}' is not an array type or a string type." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1851,6 +1873,7 @@ var ts; Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: 1, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, The_current_host_does_not_support_the_0_option: { code: 5001, category: 1, key: "The current host does not support the '{0}' option." }, Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1, key: "Cannot find the common subdirectory path for the input files." }, Cannot_read_file_0_Colon_1: { code: 5012, category: 1, key: "Cannot read file '{0}': {1}" }, @@ -1906,6 +1929,7 @@ var ts; File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: 2, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: 2, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: 2, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: 1, key: "Member '{0}' implicitly has an '{1}' type." }, @@ -1926,25 +1950,24 @@ var ts; You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: 1, key: "You cannot rename elements that are defined in the standard TypeScript library." }, yield_expressions_are_not_currently_supported: { code: 9000, category: 1, key: "'yield' expressions are not currently supported." }, Generators_are_not_currently_supported: { code: 9001, category: 1, key: "Generators are not currently supported." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." }, - for_of_statements_are_not_currently_supported: { code: 9003, category: 1, key: "'for...of' statements are not currently supported." } + The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: 1, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." } }; })(ts || (ts = {})); var ts; (function (ts) { var textToToken = { - "any": 112, + "any": 111, "as": 101, - "boolean": 113, + "boolean": 112, "break": 65, "case": 66, "catch": 67, "class": 68, "continue": 70, "const": 69, - "constructor": 114, + "constructor": 113, "debugger": 71, - "declare": 115, + "declare": 114, "default": 72, "delete": 73, "do": 74, @@ -1955,43 +1978,43 @@ var ts; "false": 79, "finally": 80, "for": 81, - "from": 102, + "from": 123, "function": 82, - "get": 116, + "get": 115, "if": 83, - "implements": 103, + "implements": 102, "import": 84, "in": 85, "instanceof": 86, - "interface": 104, - "let": 105, - "module": 117, + "interface": 103, + "let": 104, + "module": 116, "new": 87, "null": 88, - "number": 119, - "package": 106, - "private": 107, - "protected": 108, - "public": 109, - "require": 118, + "number": 118, + "package": 105, + "private": 106, + "protected": 107, + "public": 108, + "require": 117, "return": 89, - "set": 120, - "static": 110, - "string": 121, + "set": 119, + "static": 109, + "string": 120, "super": 90, "switch": 91, - "symbol": 122, + "symbol": 121, "this": 92, "throw": 93, "true": 94, "try": 95, - "type": 123, + "type": 122, "typeof": 96, "var": 97, "void": 98, "while": 99, "with": 100, - "yield": 111, + "yield": 110, "of": 124, "{": 14, "}": 15, @@ -2071,17 +2094,21 @@ var ts; return false; } function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierStart) : + lookupInUnicodeMap(code, unicodeES3IdentifierStart); } ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart); + return languageVersion >= 1 ? + lookupInUnicodeMap(code, unicodeES5IdentifierPart) : + lookupInUnicodeMap(code, unicodeES3IdentifierPart); } function makeReverseMap(source) { var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; + for (var _name in source) { + if (source.hasOwnProperty(_name)) { + result[source[_name]] = _name; } } return result; @@ -2257,8 +2284,8 @@ var ts; else { ts.Debug.assert(ch === 61); while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 62 && isConflictMarkerTrivia(text, pos)) { + var _ch = text.charCodeAt(pos); + if (_ch === 62 && isConflictMarkerTrivia(text, pos)) { break; } pos++; @@ -2364,6 +2391,7 @@ var ts; var token; var tokenValue; var precedingLineBreak; + var hasExtendedUnicodeEscape; var tokenIsUnterminated; function error(message, length) { if (onError) { @@ -2413,10 +2441,16 @@ var ts; } return +(text.substring(start, pos)); } - function scanHexDigits(count, mustMatchCount) { + function scanExactNumberOfHexDigits(count) { + return scanHexDigits(count, false); + } + function scanMinimumNumberOfHexDigits(count) { + return scanHexDigits(count, true); + } + function scanHexDigits(minCount, scanAsManyAsPossible) { var digits = 0; var value = 0; - while (digits < count || !mustMatchCount) { + while (digits < minCount || scanAsManyAsPossible) { var ch = text.charCodeAt(pos); if (ch >= 48 && ch <= 57) { value = value * 16 + ch - 48; @@ -2433,7 +2467,7 @@ var ts; pos++; digits++; } - if (digits < count) { + if (digits < minCount) { value = -1; } return value; @@ -2546,16 +2580,15 @@ var ts; return "\'"; case 34: return "\""; - case 120: case 117: - var ch = scanHexDigits(ch === 120 ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; + if (pos < len && text.charCodeAt(pos) === 123) { + hasExtendedUnicodeEscape = true; + pos++; + return scanExtendedUnicodeEscape(); } + return scanHexadecimalEscape(4); + case 120: + return scanHexadecimalEscape(2); case 13: if (pos < len && text.charCodeAt(pos) === 10) { pos++; @@ -2568,11 +2601,57 @@ var ts; return String.fromCharCode(ch); } } + function scanHexadecimalEscape(numDigits) { + var escapedValue = scanExactNumberOfHexDigits(numDigits); + if (escapedValue >= 0) { + return String.fromCharCode(escapedValue); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + } + function scanExtendedUnicodeEscape() { + var escapedValue = scanMinimumNumberOfHexDigits(1); + var isInvalidExtendedEscape = false; + if (escapedValue < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + isInvalidExtendedEscape = true; + } + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + isInvalidExtendedEscape = true; + } + else if (text.charCodeAt(pos) == 125) { + pos++; + } + else { + error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + return ""; + } + return utf16EncodeAsString(escapedValue); + } + function utf16EncodeAsString(codePoint) { + ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); + if (codePoint <= 65535) { + return String.fromCharCode(codePoint); + } + var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; + var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; + return String.fromCharCode(codeUnit1, codeUnit2); + } function peekUnicodeEscape() { if (pos + 5 < len && text.charCodeAt(pos + 1) === 117) { var start = pos; pos += 2; - var value = scanHexDigits(4, true); + var value = scanExactNumberOfHexDigits(4); pos = start; return value; } @@ -2604,8 +2683,8 @@ var ts; return result; } function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { + var _len = tokenValue.length; + if (_len >= 2 && _len <= 11) { var ch = tokenValue.charCodeAt(0); if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) { return token = textToToken[tokenValue]; @@ -2634,6 +2713,7 @@ var ts; } function scan() { startPos = pos; + hasExtendedUnicodeEscape = false; precedingLineBreak = false; tokenIsUnterminated = false; while (true) { @@ -2756,13 +2836,13 @@ var ts; pos += 2; var commentClosed = false; while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 && text.charCodeAt(pos + 1) === 47) { + var _ch = text.charCodeAt(pos); + if (_ch === 42 && text.charCodeAt(pos + 1) === 47) { pos += 2; commentClosed = true; break; } - if (isLineBreak(ch)) { + if (isLineBreak(_ch)) { precedingLineBreak = true; } pos++; @@ -2785,7 +2865,7 @@ var ts; case 48: if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; - var value = scanHexDigits(1, false); + var value = scanMinimumNumberOfHexDigits(1); if (value < 0) { error(ts.Diagnostics.Hexadecimal_digit_expected); value = 0; @@ -2795,22 +2875,22 @@ var ts; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) { pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { + var _value = scanBinaryOrOctalDigits(2); + if (_value < 0) { error(ts.Diagnostics.Binary_digit_expected); - value = 0; + _value = 0; } - tokenValue = "" + value; + tokenValue = "" + _value; return token = 7; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) { pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { + var _value_1 = scanBinaryOrOctalDigits(8); + if (_value_1 < 0) { error(ts.Diagnostics.Octal_digit_expected); - value = 0; + _value_1 = 0; } - tokenValue = "" + value; + tokenValue = "" + _value_1; return token = 7; } if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { @@ -2909,10 +2989,10 @@ var ts; case 126: return pos++, token = 47; case 92: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { + var cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } error(ts.Diagnostics.Invalid_character); @@ -3055,6 +3135,7 @@ var ts; getTokenPos: function () { return tokenPos; }, getTokenText: function () { return text.substring(tokenPos, pos); }, getTokenValue: function () { return tokenValue; }, + hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, isIdentifier: function () { return token === 64 || token > 100; }, isReservedWord: function () { return token >= 65 && token <= 100; }, @@ -3075,8 +3156,8 @@ var ts; (function (ts) { function getDeclarationOfKind(symbol, kind) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if (declaration.kind === kind) { return declaration; } @@ -3133,7 +3214,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 220) { + while (node && node.kind !== 221) { node = node.parent; } return node; @@ -3203,35 +3284,75 @@ var ts; return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); } ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; + function isBlockOrCatchScoped(declaration) { + return (getCombinedNodeFlags(declaration) & 12288) !== 0 || + isCatchClauseVariableDeclaration(declaration); + } + ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function getEnclosingBlockScopeContainer(node) { + var current = node; + while (current) { + if (isFunctionLike(current)) { + return current; + } + switch (current.kind) { + case 221: + case 202: + case 217: + case 200: + case 181: + case 182: + case 183: + return current; + case 174: + if (!isFunctionLike(current.parent)) { + return current; + } + } + current = current.parent; + } + } + ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; + function isCatchClauseVariableDeclaration(declaration) { + return declaration && + declaration.kind === 193 && + declaration.parent && + declaration.parent.kind === 217; + } + ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); } ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = getTokenPosOfNode(node, file); - var length = node.end - start; - return ts.createFileDiagnostic(file, start, length, 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) { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); - var length = node.end - start; + var sourceFile = getSourceFileOfNode(node); + var span = getErrorSpanForNode(sourceFile, node); return { - file: file, - start: start, - length: length, + file: sourceFile, + start: span.start, + length: span.length, code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText }; } ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getErrorSpanForNode(node) { - var errorSpan; + function getSpanOfTokenAtPosition(sourceFile, pos) { + var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text); + scanner.setTextPos(pos); + scanner.scan(); + var start = scanner.getTokenPos(); + return createTextSpanFromBounds(start, scanner.getTextPos()); + } + ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForNode(sourceFile, node) { + var errorNode = node; switch (node.kind) { case 193: case 150: @@ -3239,11 +3360,19 @@ var ts; case 197: case 200: case 199: - case 219: - errorSpan = node.name; + case 220: + case 195: + case 160: + errorNode = node.name; break; } - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + if (errorNode === undefined) { + return getSpanOfTokenAtPosition(sourceFile, node.pos); + } + var pos = nodeIsMissing(errorNode) + ? errorNode.pos + : ts.skipTrivia(sourceFile.text, errorNode.pos); + return createTextSpanFromBounds(pos, errorNode.end); } ts.getErrorSpanForNode = getErrorSpanForNode; function isExternalModule(file) { @@ -3251,7 +3380,7 @@ var ts; } ts.isExternalModule = isExternalModule; function isDeclarationFile(file) { - return (file.flags & 1024) !== 0; + return (file.flags & 2048) !== 0; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { @@ -3281,11 +3410,11 @@ var ts; } ts.getCombinedNodeFlags = getCombinedNodeFlags; function isConst(node) { - return !!(getCombinedNodeFlags(node) & 4096); + return !!(getCombinedNodeFlags(node) & 8192); } ts.isConst = isConst; function isLet(node) { - return !!(getCombinedNodeFlags(node) & 2048); + return !!(getCombinedNodeFlags(node) & 4096); } ts.isLet = isLet; function isPrologueDirective(node) { @@ -3318,6 +3447,7 @@ var ts; switch (node.kind) { case 186: return visitor(node); + case 202: case 174: case 178: case 179: @@ -3327,17 +3457,34 @@ var ts; case 183: case 187: case 188: - case 213: case 214: + case 215: case 189: case 191: - case 216: + case 217: return ts.forEachChild(node, traverse); } } } ts.forEachReturnStatement = forEachReturnStatement; - function isAnyFunction(node) { + function isVariableLike(node) { + if (node) { + switch (node.kind) { + case 150: + case 220: + case 128: + case 218: + case 130: + case 129: + case 219: + case 193: + return true; + } + } + return false; + } + ts.isVariableLike = isVariableLike; + function isFunctionLike(node) { if (node) { switch (node.kind) { case 133: @@ -3361,9 +3508,9 @@ var ts; } return false; } - ts.isAnyFunction = isAnyFunction; + ts.isFunctionLike = isFunctionLike; function isFunctionBlock(node) { - return node && node.kind === 174 && isAnyFunction(node.parent); + return node && node.kind === 174 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { @@ -3373,7 +3520,7 @@ var ts; function getContainingFunction(node) { while (true) { node = node.parent; - if (!node || isAnyFunction(node)) { + if (!node || isFunctionLike(node)) { return node; } } @@ -3407,7 +3554,7 @@ var ts; case 134: case 135: case 199: - case 220: + case 221: return node; } } @@ -3492,16 +3639,16 @@ var ts; } case 7: case 8: - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: case 129: - case 219: - case 217: + case 220: + case 218: case 150: - return parent.initializer === node; + return _parent.initializer === node; case 177: case 178: case 179: @@ -3509,28 +3656,28 @@ var ts; case 186: case 187: case 188: - case 213: + case 214: case 190: case 188: - return parent.expression === node; + return _parent.expression === node; case 181: - var forStatement = parent; + var forStatement = _parent; return (forStatement.initializer === node && forStatement.initializer.kind !== 194) || forStatement.condition === node || forStatement.iterator === node; case 182: case 183: - var forInStatement = parent; + var forInStatement = _parent; return (forInStatement.initializer === node && forInStatement.initializer.kind !== 194) || forInStatement.expression === node; case 158: - return node === parent.expression; + return node === _parent.expression; case 173: - return node === parent.expression; + return node === _parent.expression; case 126: - return node === parent.expression; + return node === _parent.expression; default: - if (isExpression(parent)) { + if (isExpression(_parent)) { return true; } } @@ -3545,7 +3692,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind === 212; + return node.kind === 203 && node.moduleReference.kind === 213; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -3554,20 +3701,20 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 202 && node.moduleReference.kind !== 212; + return node.kind === 203 && node.moduleReference.kind !== 213; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function getExternalModuleName(node) { - if (node.kind === 203) { + if (node.kind === 204) { return node.moduleSpecifier; } - if (node.kind === 202) { + if (node.kind === 203) { var reference = node.moduleReference; - if (reference.kind === 212) { + if (reference.kind === 213) { return reference.expression; } } - if (node.kind === 209) { + if (node.kind === 210) { return node.moduleSpecifier; } } @@ -3584,8 +3731,8 @@ var ts; case 132: case 131: return node.questionToken !== undefined; + case 219: case 218: - case 217: case 130: case 129: return node.questionToken !== undefined; @@ -3611,12 +3758,12 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return node.kind === 149 || node.kind === 148; + return !!node && (node.kind === 149 || node.kind === 148); } ts.isBindingPattern = isBindingPattern; function isInAmbientContext(node) { while (node) { - if (node.flags & (2 | 1024)) { + if (node.flags & (2 | 2048)) { return true; } node = node.parent; @@ -3626,31 +3773,33 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 127: - case 128: - case 193: + case 161: case 150: - case 130: - case 129: - case 217: - case 218: - case 219: + case 196: + case 133: + case 199: + case 220: + case 212: + case 195: + case 160: + case 134: + case 205: + case 203: + case 208: + case 197: case 132: case 131: - case 195: - case 134: - case 135: - case 133: - case 196: - case 197: - case 198: - case 199: case 200: - case 202: - case 204: - case 207: - case 205: - case 211: + case 206: + case 128: + case 218: + case 130: + case 129: + case 135: + case 219: + case 198: + case 127: + case 193: return true; } return false; @@ -3676,34 +3825,36 @@ var ts; case 175: case 180: case 187: - case 208: + case 209: return true; default: return false; } } ts.isStatement = isStatement; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + function isDeclarationName(name) { if (name.kind !== 64 && name.kind !== 8 && name.kind !== 7) { return false; } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 160) { - return parent.name === name; + var _parent = name.parent; + if (_parent.kind === 208 || _parent.kind === 212) { + if (_parent.propertyName) { + return true; + } } - if (parent.kind === 216) { - return parent.name === name; + if (isDeclaration(_parent)) { + return _parent.name === name; } return false; } - ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; + ts.isDeclarationName = isDeclarationName; function getClassBaseTypeNode(node) { var heritageClause = getHeritageClause(node.heritageClauses, 78); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassBaseTypeNode = getClassBaseTypeNode; function getClassImplementedTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 103); + var heritageClause = getHeritageClause(node.heritageClauses, 102); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementedTypeNodes = getClassImplementedTypeNodes; @@ -3714,9 +3865,10 @@ var ts; ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; function getHeritageClause(clauses, kind) { if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; + for (var _i = 0, _n = clauses.length; _i < _n; _i++) { + var clause = clauses[_i]; + if (clause.token === kind) { + return clause; } } } @@ -3817,13 +3969,14 @@ var ts; ts.isESSymbolIdentifier = isESSymbolIdentifier; function isModifier(token) { switch (token) { - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: case 77: - case 115: + case 114: case 69: + case 72: return true; } return false; @@ -3938,6 +4091,42 @@ var ts; return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; + function nodeStartsNewLexicalEnvironment(n) { + return isFunctionLike(n) || n.kind === 200 || n.kind === 221; + } + ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; + function nodeIsSynthesized(node) { + return node.pos === -1; + } + ts.nodeIsSynthesized = nodeIsSynthesized; + function createSynthesizedNode(kind, startsOnNewLine) { + var node = ts.createNode(kind); + node.pos = -1; + node.end = -1; + node.startsOnNewLine = startsOnNewLine; + return node; + } + ts.createSynthesizedNode = createSynthesizedNode; + function generateUniqueName(baseName, isExistingName) { + if (baseName.charCodeAt(0) !== 95) { + baseName = "_" + baseName; + if (!isExistingName(baseName)) { + return baseName; + } + } + if (baseName.charCodeAt(baseName.length - 1) !== 95) { + baseName += "_"; + } + var i = 1; + while (true) { + var _name = baseName + i; + if (!isExistingName(_name)) { + return _name; + } + i++; + } + } + ts.generateUniqueName = generateUniqueName; function createDiagnosticCollection() { var nonFileDiagnostics = []; var fileDiagnostics = {}; @@ -4003,10 +4192,45 @@ var ts; } } 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 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; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(222); + var nodeConstructors = new Array(223); ts.parseTime = 0; function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); @@ -4028,8 +4252,9 @@ var ts; } function visitEachNode(cbNode, nodes) { if (nodes) { - for (var i = 0, len = nodes.length; i < len; i++) { - var result = cbNode(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + var result = cbNode(node); if (result) { return result; } @@ -4053,8 +4278,8 @@ var ts; case 128: case 130: case 129: - case 217: case 218: + case 219: case 193: case 150: return visitNodes(cbNodes, node.modifiers) || @@ -4113,6 +4338,7 @@ var ts; return visitNodes(cbNodes, node.properties); case 153: return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); case 154: return visitNode(cbNode, node.expression) || @@ -4149,14 +4375,16 @@ var ts; visitNode(cbNode, node.right); case 168: return visitNode(cbNode, node.condition) || + visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || + visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); case 171: return visitNode(cbNode, node.expression); case 174: case 201: return visitNodes(cbNodes, node.statements); - case 220: + case 221: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); case 175: @@ -4199,11 +4427,13 @@ var ts; visitNode(cbNode, node.statement); case 188: return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.clauses); - case 213: + visitNode(cbNode, node.caseBlock); + case 202: + return visitNodes(cbNodes, node.clauses); + case 214: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 214: + case 215: return visitNodes(cbNodes, node.statements); case 189: return visitNode(cbNode, node.label) || @@ -4214,9 +4444,8 @@ var ts; return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 216: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type) || + case 217: + return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); case 196: return visitNodes(cbNodes, node.modifiers) || @@ -4238,49 +4467,49 @@ var ts; return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 219: + case 220: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); case 200: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 202: + case 203: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 203: + case 204: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 204: + case 205: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 205: - return visitNode(cbNode, node.name); case 206: - case 210: + return visitNode(cbNode, node.name); + case 207: + case 211: return visitNodes(cbNodes, node.elements); - case 209: + case 210: return visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 207: - case 211: + case 208: + case 212: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 208: + case 209: return visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportName); + visitNode(cbNode, node.expression); case 169: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); case 173: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); case 126: return visitNode(cbNode, node.expression); - case 215: + case 216: return visitNodes(cbNodes, node.types); - case 212: + case 213: return visitNode(cbNode, node.expression); } } @@ -4344,28 +4573,29 @@ var ts; ; function modifierToFlag(token) { switch (token) { - case 110: return 128; - case 109: return 16; - case 108: return 64; - case 107: return 32; + case 109: return 128; + case 108: return 16; + case 107: return 64; + case 106: return 32; case 77: return 1; - case 115: return 2; - case 69: return 4096; + case 114: return 2; + case 69: return 8192; + case 72: return 256; } return 0; } ts.modifierToFlag = modifierToFlag; function fixupParentReferences(sourceFile) { - var parent = sourceFile; + var _parent = sourceFile; forEachChild(sourceFile, visitNode); return; function visitNode(n) { - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; + if (n.parent !== _parent) { + n.parent = _parent; + var saveParent = _parent; + _parent = n; forEachChild(n, visitNode); - parent = saveParent; + _parent = saveParent; } } } @@ -4403,8 +4633,9 @@ var ts; array._children = undefined; array.pos += delta; array.end += delta; - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } } } @@ -4466,8 +4697,9 @@ var ts; array.intersectsChange = true; array._children = undefined; adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (var _i = 0, _n = array.length; _i < _n; _i++) { + var node = array[_i]; + visitNode(node); } return; } @@ -4668,7 +4900,7 @@ var ts; var identifierCount = 0; var nodeCount = 0; var token; - var sourceFile = createNode(220, 0); + var sourceFile = createNode(221, 0); sourceFile.pos = 0; sourceFile.end = sourceText.length; sourceFile.text = sourceText; @@ -4676,7 +4908,7 @@ var ts; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 1024 : 0; + sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 : 0; var contextFlags = 0; var parseErrorBeforeNextFinishedNode = false; var scanner = ts.createScanner(languageVersion, true, sourceText, scanError); @@ -4764,8 +4996,8 @@ var ts; } function parseErrorAtCurrentToken(message, arg0) { var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); + var _length = scanner.getTextPos() - start; + parseErrorAtPosition(start, _length, message, arg0); } function parseErrorAtPosition(start, length, message, arg0) { var lastError = ts.lastOrUndefined(sourceFile.parseDiagnostics); @@ -4804,7 +5036,9 @@ var ts; var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; var saveContextFlags = contextFlags; - var result = isLookAhead ? scanner.lookAhead(callback) : scanner.tryScan(callback); + var result = isLookAhead + ? scanner.lookAhead(callback) + : scanner.tryScan(callback); ts.Debug.assert(saveContextFlags === contextFlags); if (!result || isLookAhead) { token = saveToken; @@ -4823,10 +5057,10 @@ var ts; if (token === 64) { return true; } - if (token === 111 && inYieldContext()) { + if (token === 110 && inYieldContext()) { return false; } - return inStrictModeContext() ? token > 111 : token > 100; + return inStrictModeContext() ? token > 110 : token > 100; } function parseExpected(kind, diagnosticMessage) { if (token === kind) { @@ -4850,12 +5084,14 @@ var ts; } function parseOptionalToken(t) { if (token === t) { - var node = createNode(t); - nextToken(); - return finishNode(node); + return parseTokenNode(); } return undefined; } + function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { + return parseOptionalToken(t) || + createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); + } function parseTokenNode() { var node = createNode(token); nextToken(); @@ -4974,13 +5210,26 @@ var ts; } if (token === 77) { nextToken(); + if (token === 72) { + return lookAhead(nextTokenIsClassOrFunction); + } return token !== 35 && token !== 14 && canFollowModifier(); } + if (token === 72) { + return nextTokenIsClassOrFunction(); + } nextToken(); return canFollowModifier(); } function canFollowModifier() { - return token === 18 || token === 14 || token === 35 || isLiteralPropertyName(); + return token === 18 + || token === 14 + || token === 35 + || isLiteralPropertyName(); + } + function nextTokenIsClassOrFunction() { + nextToken(); + return token === 68 || token === 82; } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -5034,7 +5283,7 @@ var ts; return isIdentifier(); } function isNotHeritageClauseTypeName() { - if (token === 103 || + if (token === 102 || token === 78) { return lookAhead(nextTokenIsIdentifier); } @@ -5058,11 +5307,11 @@ var ts; case 4: return token === 15 || token === 66 || token === 72; case 8: - return token === 14 || token === 78 || token === 103; + return token === 14 || token === 78 || token === 102; case 9: return isVariableDeclaratorListTerminator(); case 16: - return token === 25 || token === 16 || token === 14 || token === 78 || token === 103; + return token === 25 || token === 16 || token === 14 || token === 78 || token === 102; case 12: return token === 17 || token === 22; case 14: @@ -5201,10 +5450,10 @@ var ts; function isReusableModuleElement(node) { if (node) { switch (node.kind) { + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 196: case 197: case 200: @@ -5232,8 +5481,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 213: case 214: + case 215: return true; } } @@ -5268,7 +5517,7 @@ var ts; return false; } function isReusableEnumMember(node) { - return node.kind === 219; + return node.kind === 220; } function isReusableTypeMember(node) { if (node) { @@ -5398,7 +5647,7 @@ var ts; literal = parseLiteralNode(); } else { - literal = createMissingNode(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); + literal = parseExpectedToken(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15)); } span.literal = literal; return finishNode(span); @@ -5407,14 +5656,19 @@ var ts; 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 === 7 && sourceText.charCodeAt(tokenPos) === 48 && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 8192; + if (node.kind === 7 + && sourceText.charCodeAt(tokenPos) === 48 + && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { + node.flags |= 16384; } return node; } @@ -5452,7 +5706,9 @@ var ts; } function parseParameterType() { if (parseOptional(51)) { - return token === 8 ? parseLiteralNode(true) : parseType(); + return token === 8 + ? parseLiteralNode(true) + : parseType(); } return undefined; } @@ -5567,11 +5823,11 @@ var ts; } function parsePropertyOrMethodSignature() { var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (token === 16 || token === 24) { var method = createNode(131, fullStart); - method.name = name; + method.name = _name; method.questionToken = questionToken; fillSignature(51, false, false, method); parseTypeMemberSemicolon(); @@ -5579,7 +5835,7 @@ var ts; } else { var property = createNode(129, fullStart); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); @@ -5622,7 +5878,9 @@ var ts; case 24: return parseSignatureMember(136); case 18: - return isIndexSignature() ? parseIndexSignatureDeclaration(undefined) : parsePropertyOrMethodSignature(); + return isIndexSignature() + ? parseIndexSignatureDeclaration(undefined) + : parsePropertyOrMethodSignature(); case 87: if (lookAhead(isStartOfConstructSignature)) { return parseSignatureMember(137); @@ -5644,7 +5902,9 @@ var ts; } function parseIndexSignatureWithModifiers() { var modifiers = parseModifiers(); - return isIndexSignature() ? parseIndexSignatureDeclaration(modifiers) : undefined; + return isIndexSignature() + ? parseIndexSignatureDeclaration(modifiers) + : undefined; } function isStartOfConstructSignature() { nextToken(); @@ -5692,11 +5952,11 @@ var ts; } function parseNonArrayType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 98: @@ -5715,11 +5975,11 @@ var ts; } function isStartOfType() { switch (token) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 96: case 14: @@ -5840,7 +6100,7 @@ var ts; case 39: case 24: case 64: - case 111: + case 110: return true; default: if (isBinaryOperator()) { @@ -5887,7 +6147,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token === 111) { + if (token === 110) { if (inYieldContext()) { return true; } @@ -5902,6 +6162,11 @@ var ts; nextToken(); return !scanner.hasPrecedingLineBreak() && isIdentifier(); } + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === 14 || token === 18); + } function parseYieldExpression() { var node = createNode(170); nextToken(); @@ -5933,7 +6198,9 @@ var ts; if (triState === 0) { return undefined; } - var arrowFunction = triState === 1 ? parseParenthesizedArrowFunctionExpressionHead(true) : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); + var arrowFunction = triState === 1 + ? parseParenthesizedArrowFunctionExpressionHead(true) + : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); if (!arrowFunction) { return undefined; } @@ -6012,13 +6279,15 @@ var ts; return parseAssignmentExpressionOrHigher(); } function parseConditionalExpressionRest(leftOperand) { - if (!parseOptional(50)) { + var questionToken = parseOptionalToken(50); + if (!questionToken) { return leftOperand; } var node = createNode(168, leftOperand.pos); node.condition = leftOperand; + node.questionToken = questionToken; node.whenTrue = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(51); + node.colonToken = parseExpectedToken(51, false, ts.Diagnostics._0_expected, ts.tokenToString(51)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -6153,7 +6422,9 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token === 90 ? parseSuperExpression() : parseMemberExpressionOrHigher(); + var expression = token === 90 + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); } function parseMemberExpressionOrHigher() { @@ -6167,7 +6438,7 @@ var ts; } var node = createNode(153, expression.pos); node.expression = expression; - parseExpected(20, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.dotToken = parseExpectedToken(20, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -6181,10 +6452,11 @@ var ts; } function parseMemberExpressionRest(expression) { while (true) { - var dotOrBracketStart = scanner.getTokenPos(); - if (parseOptional(20)) { + var dotToken = parseOptionalToken(20); + if (dotToken) { var propertyAccess = createNode(153, expression.pos); propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; @@ -6206,7 +6478,9 @@ var ts; if (token === 10 || token === 11) { var tagExpression = createNode(157, expression.pos); tagExpression.tag = expression; - tagExpression.template = token === 10 ? parseLiteralNode() : parseTemplateExpression(); + tagExpression.template = token === 10 + ? parseLiteralNode() + : parseTemplateExpression(); expression = finishNode(tagExpression); continue; } @@ -6229,10 +6503,10 @@ var ts; continue; } else if (token === 16) { - var callExpr = createNode(155, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); + var _callExpr = createNode(155, expression.pos); + _callExpr.expression = expression; + _callExpr.arguments = parseArgumentList(); + expression = finishNode(_callExpr); continue; } return expression; @@ -6252,7 +6526,9 @@ var ts; if (!parseExpected(25)) { return undefined; } - return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined; + return typeArguments && canFollowTypeArgumentsInExpression() + ? typeArguments + : undefined; } function canFollowTypeArgumentsInExpression() { switch (token) { @@ -6327,7 +6603,9 @@ var ts; return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token === 21 ? parseSpreadElement() : token === 23 ? createNode(172) : parseAssignmentExpressionOrHigher(); + return token === 21 ? parseSpreadElement() : + token === 23 ? createNode(172) : + parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return allowInAnd(parseArgumentOrArrayLiteralElement); @@ -6336,16 +6614,16 @@ var ts; var node = createNode(151); parseExpected(18); if (scanner.hasPrecedingLineBreak()) - node.flags |= 256; + node.flags |= 512; node.elements = parseDelimitedList(14, parseArgumentOrArrayLiteralElement); parseExpected(19); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, modifiers) { - if (parseContextualModifier(116)) { + if (parseContextualModifier(115)) { return parseAccessorDeclaration(134, fullStart, modifiers); } - else if (parseContextualModifier(120)) { + else if (parseContextualModifier(119)) { return parseAccessorDeclaration(135, fullStart, modifiers); } return undefined; @@ -6366,13 +6644,13 @@ var ts; return parseMethodDeclaration(fullStart, modifiers, asteriskToken, propertyName, questionToken); } if ((token === 23 || token === 15) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(218, fullStart); + var shorthandDeclaration = createNode(219, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(217, fullStart); + var propertyAssignment = createNode(218, fullStart); propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; parseExpected(51); @@ -6384,7 +6662,7 @@ var ts; var node = createNode(152); parseExpected(14); if (scanner.hasPrecedingLineBreak()) { - node.flags |= 256; + node.flags |= 512; } node.properties = parseDelimitedList(13, parseObjectLiteralElement, true); parseExpected(15); @@ -6471,7 +6749,7 @@ var ts; parseExpected(16); var initializer = undefined; if (token !== 22) { - if (token === 97 || token === 105 || token === 69) { + if (token === 97 || token === 104 || token === 69) { initializer = parseVariableDeclarationList(true); } else { @@ -6538,7 +6816,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(213); + var node = createNode(214); parseExpected(66); node.expression = allowInAnd(parseExpression); parseExpected(51); @@ -6546,7 +6824,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(214); + var node = createNode(215); parseExpected(72); parseExpected(51); node.statements = parseList(4, false, parseStatement); @@ -6561,9 +6839,11 @@ var ts; parseExpected(16); node.expression = allowInAnd(parseExpression); parseExpected(17); + var caseBlock = createNode(202, scanner.getStartPos()); parseExpected(14); - node.clauses = parseList(3, false, parseCaseOrDefaultClause); + caseBlock.clauses = parseList(3, false, parseCaseOrDefaultClause); parseExpected(15); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { @@ -6585,11 +6865,11 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(216); + var result = createNode(217); parseExpected(67); - parseExpected(16); - result.name = parseIdentifier(); - result.type = parseTypeAnnotation(); + if (parseExpected(16)) { + result.variableDeclaration = parseVariableDeclaration(); + } parseExpected(17); result.block = parseBlock(false, false); return finishNode(result); @@ -6628,7 +6908,7 @@ var ts; return !inErrorRecovery; case 14: case 97: - case 105: + case 104: case 82: case 83: case 74: @@ -6648,18 +6928,18 @@ var ts; case 69: var isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; - case 104: + case 103: case 68: - case 117: + case 116: case 76: - case 123: + case 122: if (isDeclarationStart()) { return false; } - case 109: - case 107: case 108: - case 110: + case 106: + case 107: + case 109: if (lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine)) { return false; } @@ -6712,7 +6992,7 @@ var ts; return parseTryStatement(); case 71: return parseDebuggerStatement(); - case 105: + case 104: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined); } @@ -6736,7 +7016,7 @@ var ts; return undefined; } return parseVariableStatement(start, modifiers); - case 105: + case 104: if (!isLetDeclaration()) { return undefined; } @@ -6819,11 +7099,11 @@ var ts; switch (token) { case 97: break; - case 105: - node.flags |= 2048; + case 104: + node.flags |= 4096; break; case 69: - node.flags |= 4096; + node.flags |= 8192; break; default: ts.Debug.fail(); @@ -6855,7 +7135,7 @@ var ts; setModifiers(node, modifiers); parseExpected(82); node.asteriskToken = parseOptionalToken(35); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); fillSignature(51, !!node.asteriskToken, false, node); node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); return finishNode(node); @@ -6863,7 +7143,7 @@ var ts; function parseConstructorDeclaration(pos, modifiers) { var node = createNode(133, pos); setModifiers(node, modifiers); - parseExpected(114); + parseExpected(113); fillSignature(51, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); return finishNode(node); @@ -6880,15 +7160,15 @@ var ts; } function parsePropertyOrMethodDeclaration(fullStart, modifiers) { var asteriskToken = parseOptionalToken(35); - var name = parsePropertyName(); + var _name = parsePropertyName(); var questionToken = parseOptionalToken(50); if (asteriskToken || token === 16 || token === 24) { - return parseMethodDeclaration(fullStart, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); + return parseMethodDeclaration(fullStart, modifiers, asteriskToken, _name, questionToken, ts.Diagnostics.or_expected); } else { var property = createNode(130, fullStart); setModifiers(property, modifiers); - property.name = name; + property.name = _name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); property.initializer = allowInAnd(parseNonParameterInitializer); @@ -6924,7 +7204,7 @@ var ts; return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 120 || idToken === 116) { + if (!ts.isKeyword(idToken) || idToken === 119 || idToken === 115) { return true; } switch (token) { @@ -6969,7 +7249,7 @@ var ts; if (accessor) { return accessor; } - if (token === 114) { + if (token === 113) { return parseConstructorDeclaration(fullStart, modifiers); } if (isIndexSignature()) { @@ -6988,11 +7268,13 @@ var ts; var node = createNode(196, fullStart); setModifiers(node, modifiers); parseExpected(68); - node.name = parseIdentifier(); + node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(true); if (parseExpected(14)) { - node.members = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseClassMembers) : parseClassMembers(); + node.members = inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseClassMembers) + : parseClassMembers(); parseExpected(15); } else { @@ -7002,7 +7284,9 @@ var ts; } function parseHeritageClauses(isClassHeritageClause) { if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() ? doOutsideOfYieldContext(parseHeritageClausesWorker) : parseHeritageClausesWorker(); + return isClassHeritageClause && inGeneratorParameterContext() + ? doOutsideOfYieldContext(parseHeritageClausesWorker) + : parseHeritageClausesWorker(); } return undefined; } @@ -7010,8 +7294,8 @@ var ts; return parseList(19, false, parseHeritageClause); } function parseHeritageClause() { - if (token === 78 || token === 103) { - var node = createNode(215); + if (token === 78 || token === 102) { + var node = createNode(216); node.token = token; nextToken(); node.types = parseDelimitedList(8, parseTypeReference); @@ -7020,7 +7304,7 @@ var ts; return undefined; } function isHeritageClause() { - return token === 78 || token === 103; + return token === 78 || token === 102; } function parseClassMembers() { return parseList(6, false, parseClassElement); @@ -7028,7 +7312,7 @@ var ts; function parseInterfaceDeclaration(fullStart, modifiers) { var node = createNode(197, fullStart); setModifiers(node, modifiers); - parseExpected(104); + parseExpected(103); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(false); @@ -7038,7 +7322,7 @@ var ts; function parseTypeAliasDeclaration(fullStart, modifiers) { var node = createNode(198, fullStart); setModifiers(node, modifiers); - parseExpected(123); + parseExpected(122); node.name = parseIdentifier(); parseExpected(52); node.type = parseType(); @@ -7046,7 +7330,7 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(219, scanner.getStartPos()); + var node = createNode(220, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); @@ -7081,7 +7365,9 @@ var ts; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(20) ? parseInternalModuleTail(getNodePos(), undefined, 1) : parseModuleBlock(); + node.body = parseOptional(20) + ? parseInternalModuleTail(getNodePos(), undefined, 1) + : parseModuleBlock(); return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, modifiers) { @@ -7092,11 +7378,13 @@ var ts; return finishNode(node); } function parseModuleDeclaration(fullStart, modifiers) { - parseExpected(117); - return token === 8 ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); + parseExpected(116); + return token === 8 + ? parseAmbientExternalModuleDeclaration(fullStart, modifiers) + : parseInternalModuleTail(fullStart, modifiers, modifiers ? modifiers.flags : 0); } function isExternalModuleReference() { - return token === 118 && + return token === 117 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { @@ -7105,7 +7393,7 @@ var ts; function nextTokenIsCommaOrFromKeyword() { nextToken(); return token === 23 || - token === 102; + token === 123; } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers) { parseExpected(84); @@ -7113,8 +7401,8 @@ var ts; var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token !== 23 && token !== 102) { - var importEqualsDeclaration = createNode(202, fullStart); + if (token !== 23 && token !== 123) { + var importEqualsDeclaration = createNode(203, fullStart); setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; parseExpected(52); @@ -7123,35 +7411,37 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(203, fullStart); + var importDeclaration = createNode(204, fullStart); setModifiers(importDeclaration, modifiers); if (identifier || token === 35 || token === 14) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(102); + parseExpected(123); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(204, fullStart); + var importClause = createNode(205, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(23)) { - importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(206); + importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(207); } return finishNode(importClause); } function parseModuleReference() { - return isExternalModuleReference() ? parseExternalModuleReference() : parseEntityName(false); + return isExternalModuleReference() + ? parseExternalModuleReference() + : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(212); - parseExpected(118); + var node = createNode(213); + parseExpected(117); parseExpected(16); node.expression = parseModuleSpecifier(); parseExpected(17); @@ -7165,7 +7455,7 @@ var ts; return result; } function parseNamespaceImport() { - var namespaceImport = createNode(205); + var namespaceImport = createNode(206); parseExpected(35); parseExpected(101); namespaceImport.name = parseIdentifier(); @@ -7173,14 +7463,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(20, kind === 206 ? parseImportSpecifier : parseExportSpecifier, 14, 15); + node.elements = parseBracketedList(20, kind === 207 ? parseImportSpecifier : parseExportSpecifier, 14, 15); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(211); + return parseImportOrExportSpecifier(212); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(207); + return parseImportOrExportSpecifier(208); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -7206,30 +7496,36 @@ var ts; return finishNode(node); } function parseExportDeclaration(fullStart, modifiers) { - var node = createNode(209, fullStart); + var node = createNode(210, fullStart); setModifiers(node, modifiers); if (parseOptional(35)) { - parseExpected(102); + parseExpected(123); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(210); - if (parseOptional(102)) { + node.exportClause = parseNamedImportsOrExports(211); + if (parseOptional(123)) { node.moduleSpecifier = parseModuleSpecifier(); } } parseSemicolon(); return finishNode(node); } - function parseExportAssignmentTail(fullStart, modifiers) { - var node = createNode(208, fullStart); + function parseExportAssignment(fullStart, modifiers) { + var node = createNode(209, fullStart); setModifiers(node, modifiers); - node.exportName = parseIdentifier(); + if (parseOptional(52)) { + node.isExportEquals = true; + } + else { + parseExpected(72); + } + node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); return finishNode(node); } function isLetDeclaration() { - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOnSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart() { switch (token) { @@ -7237,24 +7533,24 @@ var ts; case 69: case 82: return true; - case 105: + case 104: return isLetDeclaration(); case 68: - case 104: + case 103: case 76: - case 123: + case 122: return lookAhead(nextTokenIsIdentifierOrKeyword); case 84: return lookAhead(nextTokenCanFollowImportKeyword); - case 117: + case 116: return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral); case 77: return lookAhead(nextTokenCanFollowExportKeyword); - case 115: - case 109: - case 107: + case 114: case 108: - case 110: + case 106: + case 107: + case 109: return lookAhead(nextTokenIsDeclarationStart); } } @@ -7277,7 +7573,7 @@ var ts; function nextTokenCanFollowExportKeyword() { nextToken(); return token === 52 || token === 35 || - token === 14 || isDeclarationStart(); + token === 14 || token === 72 || isDeclarationStart(); } function nextTokenIsDeclarationStart() { nextToken(); @@ -7291,8 +7587,8 @@ var ts; var modifiers = parseModifiers(); if (token === 77) { nextToken(); - if (parseOptional(52)) { - return parseExportAssignmentTail(fullStart, modifiers); + if (token === 72 || token === 52) { + return parseExportAssignment(fullStart, modifiers); } if (token === 35 || token === 14) { return parseExportDeclaration(fullStart, modifiers); @@ -7300,20 +7596,20 @@ var ts; } switch (token) { case 97: - case 105: + case 104: case 69: return parseVariableStatement(fullStart, modifiers); case 82: return parseFunctionDeclaration(fullStart, modifiers); case 68: return parseClassDeclaration(fullStart, modifiers); - case 104: + case 103: return parseInterfaceDeclaration(fullStart, modifiers); - case 123: + case 122: return parseTypeAliasDeclaration(fullStart, modifiers); case 76: return parseEnumDeclaration(fullStart, modifiers); - case 117: + case 116: return parseModuleDeclaration(fullStart, modifiers); case 84: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, modifiers); @@ -7331,7 +7627,9 @@ var ts; return parseSourceElementOrModuleElement(); } function parseSourceElementOrModuleElement() { - return isDeclarationStart() ? parseDeclaration() : parseStatement(); + return isDeclarationStart() + ? parseDeclaration() + : parseStatement(); } function processReferenceComments(sourceFile) { var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); @@ -7389,7 +7687,13 @@ var ts; } function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 1 || node.kind === 202 && node.moduleReference.kind === 212 || node.kind === 203 || node.kind === 208 || node.kind === 209 ? node : undefined; + return node.flags & 1 + || node.kind === 203 && node.moduleReference.kind === 213 + || node.kind === 204 + || node.kind === 209 + || node.kind === 210 + ? node + : undefined; }); } } @@ -7443,7 +7747,7 @@ var ts; else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 203 || node.kind === 202) && !(node.flags & 1)) { + else if ((node.kind === 204 || node.kind === 203) && !(node.flags & 1)) { return 0; } else if (node.kind === 201) { @@ -7477,7 +7781,7 @@ var ts; } ts.bindSourceFile = bindSourceFile; function bindSourceFileWorker(file) { - var parent; + var _parent; var container; var blockScopeContainer; var lastContainer; @@ -7485,7 +7789,8 @@ var ts; var Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { file.locals = {}; - container = blockScopeContainer = file; + container = file; + setBlockScopeContainer(file, false); bind(file); file.symbolCount = symbolCount; } @@ -7493,6 +7798,12 @@ var ts; symbolCount++; return new Symbol(flags, name); } + function setBlockScopeContainer(node, cleanLocals) { + blockScopeContainer = node; + if (cleanLocals) { + blockScopeContainer.locals = undefined; + } + } function addDeclarationToSymbol(symbol, node, symbolKind) { symbol.flags |= symbolKind; if (!symbol.declarations) @@ -7529,6 +7840,13 @@ var ts; return "__new"; case 138: return "__index"; + case 210: + return "__export"; + case 209: + return "default"; + case 195: + case 196: + return node.flags & 256 ? "default" : undefined; } } function getDisplayName(node) { @@ -7536,19 +7854,22 @@ var ts; } function declareSymbol(symbols, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); - var name = getDeclarationName(node); - if (name !== undefined) { - var symbol = ts.hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); + var _name = node.flags & 256 && parent ? "default" : getDeclarationName(node); + var symbol; + if (_name !== undefined) { + symbol = ts.hasProperty(symbols, _name) ? symbols[_name] : (symbols[_name] = createSymbol(0, _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; + var message = symbol.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name, message, getDisplayName(node))); - symbol = createSymbol(0, name); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); + symbol = createSymbol(0, _name); } } else { @@ -7580,7 +7901,7 @@ var ts; function declareModuleMember(node, symbolKind, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 1; if (symbolKind & 8388608) { - if (node.kind === 211 || (node.kind === 202 && hasExportModifier)) { + if (node.kind === 212 || (node.kind === 203 && hasExportModifier)) { declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); } else { @@ -7605,10 +7926,10 @@ var ts; if (symbolKind & 255504) { node.locals = {}; } - var saveParent = parent; + var saveParent = _parent; var saveContainer = container; var savedBlockScopeContainer = blockScopeContainer; - parent = node; + _parent = node; if (symbolKind & 262128) { container = node; if (lastContainer) { @@ -7617,11 +7938,11 @@ var ts; lastContainer = container; } if (isBlockScopeContainer) { - blockScopeContainer = node; + setBlockScopeContainer(node, (symbolKind & 255504) === 0 && node.kind !== 221); } ts.forEachChild(node, bind); container = saveContainer; - parent = saveParent; + _parent = saveParent; blockScopeContainer = savedBlockScopeContainer; } function bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer) { @@ -7629,7 +7950,7 @@ var ts; case 200: declareModuleMember(node, symbolKind, symbolExcludes); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolKind, symbolExcludes); break; @@ -7685,12 +8006,6 @@ var ts; } } } - function bindExportDeclaration(node) { - if (!node.exportClause) { - (container.exportStars || (container.exportStars = [])).push(node); - } - bindChildren(node, 0, false); - } function bindFunctionOrConstructorType(node) { var symbol = createSymbol(131072, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072); @@ -7706,21 +8021,14 @@ var ts; bindChildren(node, symbolKind, isBlockScopeContainer); } function bindCatchVariableDeclaration(node) { - var symbol = createSymbol(1, node.name.text || "__missing"); - addDeclarationToSymbol(symbol, node, 1); - var saveParent = parent; - var savedBlockScopeContainer = blockScopeContainer; - parent = blockScopeContainer = node; - ts.forEachChild(node, bind); - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; + bindChildren(node, 0, true); } function bindBlockScopedVariableDeclaration(node) { switch (blockScopeContainer.kind) { case 200: declareModuleMember(node, 2, 107455); break; - case 220: + case 221: if (ts.isExternalModule(container)) { declareModuleMember(node, 2, 107455); break; @@ -7737,7 +8045,7 @@ var ts; return "__" + ts.indexOf(node.parent.parameters, node); } function bind(node) { - node.parent = parent; + node.parent = _parent; switch (node.kind) { case 127: bindDeclaration(node, 262144, 530912, false); @@ -7750,7 +8058,7 @@ var ts; if (ts.isBindingPattern(node.name)) { bindChildren(node, 0, false); } - else if (ts.getCombinedNodeFlags(node) & 6144) { + else if (ts.isBlockOrCatchScoped(node)) { bindBlockScopedVariableDeclaration(node); } else { @@ -7761,11 +8069,11 @@ var ts; case 129: bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455, false); break; - case 217: case 218: + case 219: bindPropertyOrMethodOrAccessor(node, 4, 107455, false); break; - case 219: + case 220: bindPropertyOrMethodOrAccessor(node, 8, 107455, false); break; case 136: @@ -7803,7 +8111,7 @@ var ts; case 161: bindAnonymousDeclaration(node, 16, "__function", true); break; - case 216: + case 217: bindCatchVariableDeclaration(node); break; case 196: @@ -7826,16 +8134,13 @@ var ts; case 200: bindModuleDeclaration(node); break; - case 202: - case 205: - case 207: - case 211: + case 203: + case 206: + case 208: + case 212: bindDeclaration(node, 8388608, 8388608, false); break; - case 209: - bindExportDeclaration(node); - break; - case 204: + case 205: if (node.name) { bindDeclaration(node, 8388608, 8388608, false); } @@ -7843,26 +8148,41 @@ var ts; bindChildren(node, 0, false); } break; - case 220: + case 210: + if (!node.exportClause) { + declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0); + } + bindChildren(node, 0, false); + break; + case 209: + if (node.expression.kind === 64) { + declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 8388608); + } + else { + declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455); + } + bindChildren(node, 0, false); + break; + case 221: if (ts.isExternalModule(node)) { bindAnonymousDeclaration(node, 512, '"' + ts.removeFileExtension(node.fileName) + '"', true); break; } case 174: - bindChildren(node, 0, !ts.isAnyFunction(node.parent)); + bindChildren(node, 0, !ts.isFunctionLike(node.parent)); break; - case 216: + case 217: case 181: case 182: case 183: - case 188: + case 202: bindChildren(node, 0, true); break; default: - var saveParent = parent; - parent = node; + var saveParent = _parent; + _parent = node; ts.forEachChild(node, bind); - parent = saveParent; + _parent = saveParent; } } function bindParameter(node) { @@ -7905,6 +8225,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var languageVersion = compilerOptions.target || 0; var emitResolver = createResolver(); + var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); + var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var checker = { getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, @@ -7937,11 +8259,10 @@ var ts; isValidPropertyAccess: isValidPropertyAccess, getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveImport, - getEmitResolver: getEmitResolver + getAliasedSymbol: resolveAlias, + getEmitResolver: getEmitResolver, + getExportsOfExternalModule: getExportsOfExternalModule }; - var undefinedSymbol = createSymbol(4 | 67108864, "undefined"); - var argumentsSymbol = createSymbol(4 | 67108864, "arguments"); var unknownSymbol = createSymbol(4 | 67108864, "unknown"); var resolvingSymbol = createSymbol(67108864, "__resolving__"); var anyType = createIntrinsicType(1, "any"); @@ -7972,6 +8293,7 @@ var ts; var globalRegExpType; var globalTemplateStringsArrayType; var globalESSymbolType; + var globalIterableType; var anyArrayType; var tupleTypes = {}; var unionTypes = {}; @@ -8005,7 +8327,9 @@ var ts; return emitResolver; } function error(location, message, arg0, arg1, arg2) { - var diagnostic = location ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); + var diagnostic = location + ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) + : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); diagnostics.add(diagnostic); } function createSymbol(flags, name) { @@ -8091,7 +8415,8 @@ var ts; recordMergedSymbol(target, source); } else { - var message = target.flags & 2 || source.flags & 2 ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; + var message = target.flags & 2 || source.flags & 2 + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; ts.forEach(source.declarations, function (node) { error(node.name ? node.name : node, message, symbolToString(source)); }); @@ -8125,13 +8450,6 @@ var ts; } } } - function extendSymbolTable(target, source) { - for (var id in source) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } function getSymbolLinks(symbol) { if (symbol.flags & 67108864) return symbol; @@ -8145,10 +8463,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 220); + return ts.getAncestor(node, 221); } function isGlobalSourceFile(node) { - return node.kind === 220 && !ts.isExternalModule(node); + return node.kind === 221 && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -8158,7 +8476,7 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target === unknownSymbol || target.flags & meaning) { return symbol; } @@ -8189,12 +8507,12 @@ var ts; } } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931)) { - if (!(result.flags & 8388608 && getDeclarationOfImportSymbol(result).kind === 211)) { + if (!(result.flags & 8388608 && getDeclarationOfAliasSymbol(result).kind === 212)) { break loop; } result = undefined; @@ -8258,13 +8576,6 @@ var ts; break loop; } break; - case 216: - var id = location.name; - if (name === id.text) { - result = location.symbol; - break loop; - } - break; } lastLocation = location; location = location.parent; @@ -8285,27 +8596,57 @@ var ts; return undefined; } if (result.flags & 2) { - var declaration = ts.forEach(result.declarations, function (d) { return ts.getCombinedNodeFlags(d) & 6144 ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } + checkResolvedBlockScopedVariable(result, errorLocation); } } return result; } - function isImportSymbolDeclaration(node) { - return node.kind === 202 || - node.kind === 204 && !!node.name || - node.kind === 205 || - node.kind === 207 || - node.kind === 211; + function checkResolvedBlockScopedVariable(result, errorLocation) { + ts.Debug.assert((result.flags & 2) !== 0); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); + ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); + var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); + if (!isUsedBeforeDeclaration) { + var variableDeclaration = ts.getAncestor(declaration, 193); + var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); + if (variableDeclaration.parent.parent.kind === 175 || + variableDeclaration.parent.parent.kind === 181) { + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === 183 || + variableDeclaration.parent.parent.kind === 182) { + var expression = variableDeclaration.parent.parent.expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + } + if (isUsedBeforeDeclaration) { + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); + } } - function getDeclarationOfImportSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return isImportSymbolDeclaration(d) ? d : undefined; }); + function isSameScopeDescendentOf(initial, parent, stopAt) { + if (!parent) { + return false; + } + for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { + if (current === parent) { + return true; + } + } + return false; + } + function isAliasSymbolDeclaration(node) { + return node.kind === 203 || + node.kind === 205 && !!node.name || + node.kind === 206 || + node.kind === 208 || + node.kind === 212 || + node.kind === 209; + } + function getDeclarationOfAliasSymbol(symbol) { + return ts.forEach(symbol.declarations, function (d) { return isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 212) { + if (node.moduleReference.kind === 213) { var moduleSymbol = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); var exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); return exportAssignmentSymbol || moduleSymbol; @@ -8328,14 +8669,14 @@ var ts; function getExternalModuleMember(node, specifier) { var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol) { - var name = specifier.propertyName || specifier.name; - if (name.text) { - var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, 107455 | 793056 | 1536); + var _name = specifier.propertyName || specifier.name; + if (_name.text) { + var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), _name.text, 107455 | 793056 | 1536); if (!symbol) { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(_name)); return; } - return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveImport(symbol); + return symbol.flags & (107455 | 793056 | 1536) ? symbol : resolveAlias(symbol); } } } @@ -8343,28 +8684,35 @@ var ts; return getExternalModuleMember(node.parent.parent.parent, node); } function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node, node.propertyName || node.name, 107455 | 793056 | 1536); + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536); + } + function getTargetOfExportAssignment(node) { + return resolveEntityName(node.expression, 107455 | 793056 | 1536); } function getTargetOfImportDeclaration(node) { switch (node.kind) { - case 202: + case 203: return getTargetOfImportEqualsDeclaration(node); - case 204: - return getTargetOfImportClause(node); case 205: + return getTargetOfImportClause(node); + case 206: return getTargetOfNamespaceImport(node); - case 207: + case 208: return getTargetOfImportSpecifier(node); - case 211: + case 212: return getTargetOfExportSpecifier(node); + case 209: + return getTargetOfExportAssignment(node); } } - function resolveImport(symbol) { - ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Imports here."); + function resolveAlias(symbol) { + ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here."); var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfImportSymbol(symbol); + var node = getDeclarationOfAliasSymbol(symbol); var target = getTargetOfImportDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -8378,47 +8726,73 @@ var ts; } return links.target; } + function markExportAsReferenced(node) { + var symbol = getSymbolOfNode(node); + var target = resolveAlias(symbol); + if (target && target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target)) { + markAliasSymbolAsReferenced(symbol); + } + } + function markAliasSymbolAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.referenced) { + links.referenced = true; + var node = getDeclarationOfAliasSymbol(symbol); + if (node.kind === 209) { + checkExpressionCached(node.expression); + } + else if (node.kind === 212) { + checkExpressionCached(node.propertyName || node.name); + } + else if (ts.isInternalModuleImportEqualsDeclaration(node)) { + checkExpressionCached(node.moduleReference); + } + } + } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 202); + importDeclaration = ts.getAncestor(entityName, 203); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 64 && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } if (entityName.kind === 64 || entityName.parent.kind === 125) { - return resolveEntityName(importDeclaration, entityName, 1536); + return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 202); - return resolveEntityName(importDeclaration, entityName, 107455 | 793056 | 1536); + ts.Debug.assert(entityName.parent.kind === 203); + return resolveEntityName(entityName, 107455 | 793056 | 1536); } } function getFullyQualifiedName(symbol) { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } - function resolveEntityName(location, name, meaning) { + function resolveEntityName(name, meaning) { if (ts.getFullWidth(name) === 0) { return undefined; } + var symbol; if (name.kind === 64) { - var symbol = resolveName(location, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); + symbol = resolveName(name, name.text, meaning, ts.Diagnostics.Cannot_find_name_0, name); if (!symbol) { - return; + return undefined; } } else if (name.kind === 125) { - var namespace = resolveEntityName(location, name.left, 1536); - if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) - return; - var symbol = getSymbol(getExportsOfSymbol(namespace), name.right.text, meaning); + var namespace = resolveEntityName(name.left, 1536); + if (!namespace || namespace === unknownSymbol || ts.getFullWidth(name.right) === 0) { + return undefined; + } + var right = name.right; + symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); - return; + error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); + return undefined; } } ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveImport(symbol); + return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function isExternalModuleNameRelative(moduleName) { return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; @@ -8439,14 +8813,17 @@ var ts; return symbol; } } + var sourceFile; while (true) { var fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - var sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); - if (sourceFile || isRelative) + sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); + if (sourceFile || isRelative) { break; + } var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) + if (parentPath === searchPath) { break; + } searchPath = parentPath; } if (sourceFile) { @@ -8458,6 +8835,9 @@ var ts; } error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_external_module_0, moduleName); } + function getExportAssignmentSymbol(moduleSymbol) { + return moduleSymbol.exports["default"]; + } function getResolvedExportAssignmentSymbol(moduleSymbol) { var symbol = getExportAssignmentSymbol(moduleSymbol); if (symbol) { @@ -8465,82 +8845,52 @@ var ts; return symbol; } if (symbol.flags & 8388608) { - return resolveImport(symbol); + return resolveAlias(symbol); } } } - function getExportAssignmentSymbol(symbol) { - checkTypeOfExportAssignmentSymbol(symbol); - return getSymbolLinks(symbol).exportAssignmentSymbol; - } - function checkTypeOfExportAssignmentSymbol(containerSymbol) { - var symbolLinks = getSymbolLinks(containerSymbol); - if (!symbolLinks.exportAssignmentChecked) { - var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol); - if (exportInformation.exportAssignments.length) { - if (exportInformation.exportAssignments.length > 1) { - ts.forEach(exportInformation.exportAssignments, function (node) { return error(node, ts.Diagnostics.A_module_cannot_have_more_than_one_export_assignment); }); - } - var node = exportInformation.exportAssignments[0]; - if (exportInformation.hasExportedMember) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - if (node.exportName.text) { - var meaning = 107455 | 793056 | 1536; - var exportSymbol = resolveName(node, node.exportName.text, meaning, ts.Diagnostics.Cannot_find_name_0, node.exportName); - } - symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol; - } - symbolLinks.exportAssignmentChecked = true; - } - } - function collectExportInformationForSourceFileOrModule(symbol) { - var seenExportedMember = false; - var result = []; - ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 220 ? declaration : declaration.body); - ts.forEach(block.statements, function (node) { - if (node.kind === 208) { - result.push(node); - } - else { - seenExportedMember = seenExportedMember || (node.flags & 1) !== 0; - } - }); - }); - return { - hasExportedMember: seenExportedMember, - exportAssignments: result - }; - } function getExportsOfSymbol(symbol) { return symbol.flags & 1536 ? getExportsOfModule(symbol) : symbol.exports; } - function getExportsOfModule(symbol) { - var links = getSymbolLinks(symbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(symbol)); + function getExportsOfModule(moduleSymbol) { + var links = getSymbolLinks(moduleSymbol); + return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); } - function getExportsForModule(symbol) { + function extendExportSymbols(target, source) { + for (var id in source) { + if (id !== "default" && !ts.hasProperty(target, id)) { + target[id] = source[id]; + } + } + } + function getExportsForModule(moduleSymbol) { + if (compilerOptions.target < 2) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + return { + "default": defaultSymbol + }; + } + } var result; var visitedSymbols = []; - visit(symbol); - return result; + visit(moduleSymbol); + return result || moduleSymbol.exports; function visit(symbol) { if (!ts.contains(visitedSymbols, symbol)) { visitedSymbols.push(symbol); - if (!result) { - result = symbol.exports; - } - else { - extendSymbolTable(result, symbol.exports); - } - ts.forEach(symbol.declarations, function (node) { - if (node.kind === 220 || node.kind === 200) { - ts.forEach(node.exportStars, function (exportStar) { - visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier)); - }); + if (symbol !== moduleSymbol) { + if (!result) { + result = cloneSymbolTable(moduleSymbol.exports); } - }); + extendExportSymbols(result, symbol.exports); + } + var exportStars = symbol.exports["__export"]; + if (exportStars) { + ts.forEach(exportStars.declarations, function (node) { + visit(resolveExternalModuleName(node, node.moduleSpecifier)); + }); + } } } } @@ -8555,7 +8905,9 @@ var ts; return getMergedSymbol(symbol.parent); } function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576) !== 0 ? getMergedSymbol(symbol.exportSymbol) : symbol; + return symbol && (symbol.flags & 1048576) !== 0 + ? getMergedSymbol(symbol.exportSymbol) + : symbol; } function symbolIsValue(symbol) { if (symbol.flags & 16777216) { @@ -8565,14 +8917,14 @@ var ts; return true; } if (symbol.flags & 8388608) { - return (resolveImport(symbol).flags & 107455) !== 0; + return (resolveAlias(symbol).flags & 107455) !== 0; } return false; } function findConstructorDeclaration(node) { var members = node.members; - for (var i = 0; i < members.length; i++) { - var member = members[i]; + for (var _i = 0, _n = members.length; _i < _n; _i++) { + var member = members[_i]; if (member.kind === 133 && ts.nodeIsPresent(member.body)) { return member; } @@ -8631,25 +8983,25 @@ var ts; } function forEachSymbolTableInScope(enclosingDeclaration, callback) { var result; - for (var location = enclosingDeclaration; location; location = location.parent) { - if (location.locals && !isGlobalSourceFile(location)) { - if (result = callback(location.locals)) { + for (var _location = enclosingDeclaration; _location; _location = _location.parent) { + if (_location.locals && !isGlobalSourceFile(_location)) { + if (result = callback(_location.locals)) { return result; } } - switch (location.kind) { - case 220: - if (!ts.isExternalModule(location)) { + switch (_location.kind) { + case 221: + if (!ts.isExternalModule(_location)) { break; } case 200: - if (result = callback(getSymbolOfNode(location).exports)) { + if (result = callback(getSymbolOfNode(_location).exports)) { return result; } break; case 196: case 197: - if (result = callback(getSymbolOfNode(location).members)) { + if (result = callback(getSymbolOfNode(_location).members)) { return result; } break; @@ -8682,8 +9034,8 @@ var ts; if (symbolFromSymbolTable.flags & 8388608) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { + var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); + if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; } var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; @@ -8708,7 +9060,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveImport(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -8764,7 +9116,7 @@ var ts; } function hasExternalModuleSymbol(declaration) { return (declaration.kind === 200 && declaration.name.kind === 8) || - (declaration.kind === 220 && ts.isExternalModule(declaration)); + (declaration.kind === 221 && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -8774,7 +9126,7 @@ var ts; return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 202 && + if (declaration.kind === 203 && !(declaration.flags & 1) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; @@ -8799,7 +9151,7 @@ var ts; meaning = 107455 | 1048576; } else if (entityName.kind === 125 || - entityName.parent.kind === 202) { + entityName.parent.kind === 203) { meaning = 1536; } else { @@ -8890,8 +9242,9 @@ var ts; walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); } if (accessibleSymbolChain) { - for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) { - appendParentTypeArgumentsAndSymbolName(accessibleSymbolChain[i]); + for (var _i = 0, _n = accessibleSymbolChain.length; _i < _n; _i++) { + var accessibleSymbol = accessibleSymbolChain[_i]; + appendParentTypeArgumentsAndSymbolName(accessibleSymbol); } } else { @@ -8999,7 +9352,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056, 0, flags); } else { - writeKeyword(writer, 112); + writeKeyword(writer, 111); } } else { @@ -9017,7 +9370,7 @@ var ts; var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { - return declaration.parent.kind === 220 || declaration.parent.kind === 201; + return declaration.parent.kind === 221 || declaration.parent.kind === 201; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -9073,15 +9426,17 @@ var ts; writePunctuation(writer, 14); writer.writeLine(); writer.increaseIndent(); - for (var i = 0; i < resolved.callSignatures.length; i++) { - buildSignatureDisplay(resolved.callSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + for (var _i = 0, _a = resolved.callSignatures, _n = _a.length; _i < _n; _i++) { + var signature = _a[_i]; + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.constructSignatures.length; i++) { + for (var _b = 0, _c = resolved.constructSignatures, _d = _c.length; _b < _d; _b++) { + var _signature = _c[_b]; writeKeyword(writer, 87); writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -9090,7 +9445,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 0, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 121); + writeKeyword(writer, 120); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -9103,7 +9458,7 @@ var ts; writer.writeParameter(getIndexerParameterName(resolved, 1, "x")); writePunctuation(writer, 51); writeSpace(writer); - writeKeyword(writer, 119); + writeKeyword(writer, 118); writePunctuation(writer, 19); writePunctuation(writer, 51); writeSpace(writer); @@ -9111,17 +9466,18 @@ var ts; writePunctuation(writer, 22); writer.writeLine(); } - for (var i = 0; i < resolved.properties.length; i++) { - var p = resolved.properties[i]; + for (var _e = 0, _f = resolved.properties, _g = _f.length; _e < _g; _e++) { + var p = _f[_e]; var t = getTypeOfSymbol(p); if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) { var signatures = getSignaturesOfType(t, 0); - for (var j = 0; j < signatures.length; j++) { + for (var _h = 0, _j = signatures.length; _h < _j; _h++) { + var _signature_1 = signatures[_h]; buildSymbolDisplay(p, writer); if (p.flags & 536870912) { writePunctuation(writer, 50); } - buildSignatureDisplay(signatures[j], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(_signature_1, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, 22); writer.writeLine(); } @@ -9251,7 +9607,7 @@ var ts; return node; } } - else if (node.kind === 220) { + else if (node.kind === 221) { return ts.isExternalModule(node) ? node : undefined; } } @@ -9259,16 +9615,17 @@ var ts; } function isUsedInExportAssignment(node) { var externalModule = getContainingExternalModule(node); + var exportAssignmentSymbol; + var resolvedExportSymbol; if (externalModule) { var externalModuleSymbol = getSymbolOfNode(externalModule); - var exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var resolvedExportSymbol; + exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); var symbolOfNode = getSymbolOfNode(node); if (isSymbolUsedInExportAssignment(symbolOfNode)) { return true; } if (symbolOfNode.flags & 8388608) { - return isSymbolUsedInExportAssignment(resolveImport(symbolOfNode)); + return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); } } function isSymbolUsedInExportAssignment(symbol) { @@ -9276,7 +9633,7 @@ var ts; return true; } if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608)) { - resolvedExportSymbol = resolvedExportSymbol || resolveImport(exportAssignmentSymbol); + resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); if (resolvedExportSymbol === symbol) { return true; } @@ -9301,13 +9658,13 @@ var ts; case 198: case 195: case 199: - case 202: - var parent = getDeclarationContainer(node); + case 203: + var _parent = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 1) && - !(node.kind !== 202 && parent.kind !== 220 && ts.isInAmbientContext(parent))) { - return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); + !(node.kind !== 203 && _parent.kind !== 221 && ts.isInAmbientContext(_parent))) { + return isGlobalSourceFile(_parent) || isUsedInExportAssignment(node); } - return isDeclarationVisible(parent); + return isDeclarationVisible(_parent); case 130: case 129: case 134: @@ -9333,7 +9690,7 @@ var ts; case 147: return isDeclarationVisible(node.parent); case 127: - case 220: + case 221: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -9377,13 +9734,14 @@ var ts; } return parentType; } + var type; if (pattern.kind === 148) { - var name = declaration.propertyName || declaration.name; - var type = getTypeOfPropertyOfType(parentType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, 1) || + var _name = declaration.propertyName || declaration.name; + type = getTypeOfPropertyOfType(parentType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(parentType, 1) || getIndexTypeOfType(parentType, 0); if (!type) { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(_name)); return unknownType; } } @@ -9394,14 +9752,19 @@ var ts; } if (!declaration.dotDotDotToken) { var propName = "" + ts.indexOf(pattern.elements, declaration); - var type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); + type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, 1); if (!type) { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + if (isTupleType(parentType)) { + error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); + } + else { + error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + } return unknownType; } } else { - var type = createArrayType(getIndexTypeOfType(parentType, 1)); + type = createArrayType(getIndexTypeOfType(parentType, 1)); } } return type; @@ -9410,6 +9773,9 @@ var ts; if (declaration.parent.parent.kind === 182) { return anyType; } + if (declaration.parent.parent.kind === 183) { + return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; + } if (ts.isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); } @@ -9432,7 +9798,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 218) { + if (declaration.kind === 219) { return checkIdentifier(declaration.name); } return undefined; @@ -9450,8 +9816,8 @@ var ts; var members = {}; 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); + var _name = e.propertyName || e.name; + var symbol = createSymbol(flags, _name.text); symbol.type = getTypeFromBindingElement(e); members[symbol.name] = symbol; }); @@ -9469,7 +9835,9 @@ var ts; return !elementTypes.length ? anyArrayType : hasSpreadElement ? createArrayType(getUnionType(elementTypes)) : createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern) { - return pattern.kind === 148 ? getTypeFromObjectBindingPattern(pattern) : getTypeFromArrayBindingPattern(pattern); + return pattern.kind === 148 + ? getTypeFromObjectBindingPattern(pattern) + : getTypeFromArrayBindingPattern(pattern); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { var type = getTypeForVariableLikeDeclaration(declaration); @@ -9477,7 +9845,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - return declaration.kind !== 217 ? getWidenedType(type) : type; + return declaration.kind !== 218 ? getWidenedType(type) : type; } if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name); @@ -9498,9 +9866,12 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 216) { + if (declaration.parent.kind === 217) { return links.type = anyType; } + if (declaration.kind === 209) { + return links.type = checkExpression(declaration.expression); + } links.type = resolvingType; var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); if (links.type === resolvingType) { @@ -9510,7 +9881,9 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var diagnostic = symbol.valueDeclaration.type ? ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; + var diagnostic = symbol.valueDeclaration.type ? + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : + ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); } } @@ -9571,8 +9944,8 @@ var ts; else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var getter = ts.getDeclarationOfKind(symbol, 134); - error(getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + var _getter = ts.getDeclarationOfKind(symbol, 134); + error(_getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } } @@ -9590,10 +9963,10 @@ var ts; } return links.type; } - function getTypeOfImport(symbol) { + function getTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - links.type = getTypeOfSymbol(resolveImport(symbol)); + links.type = getTypeOfSymbol(resolveAlias(symbol)); } return links.type; } @@ -9621,7 +9994,7 @@ var ts; return getTypeOfAccessors(symbol); } if (symbol.flags & 8388608) { - return getTypeOfImport(symbol); + return getTypeOfAlias(symbol); } return unknownType; } @@ -9749,8 +10122,8 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = ts.getDeclarationOfKind(symbol, 198); - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + var _declaration = ts.getDeclarationOfKind(symbol, 198); + error(_declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; } @@ -9775,10 +10148,10 @@ var ts; } return links.declaredType; } - function getDeclaredTypeOfImport(symbol) { + function getDeclaredTypeOfAlias(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveImport(symbol)); + links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); } return links.declaredType; } @@ -9800,29 +10173,29 @@ var ts; return getDeclaredTypeOfTypeParameter(symbol); } if (symbol.flags & 8388608) { - return getDeclaredTypeOfImport(symbol); + return getDeclaredTypeOfAlias(symbol); } return unknownType; } function createSymbolTable(symbols) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = symbol; } return result; } function createInstantiatedSymbolTable(symbols, mapper) { var result = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + for (var _i = 0, _n = symbols.length; _i < _n; _i++) { + var symbol = symbols[_i]; result[symbol.name] = instantiateSymbol(symbol, mapper); } return result; } function addInheritedMembers(symbols, baseSymbols) { - for (var i = 0; i < baseSymbols.length; i++) { - var s = baseSymbols[i]; + for (var _i = 0, _n = baseSymbols.length; _i < _n; _i++) { + var s = baseSymbols[_i]; if (!ts.hasProperty(symbols, s.name)) { symbols[s.name] = s; } @@ -9830,8 +10203,9 @@ var ts; } function addInheritedSignatures(signatures, baseSignatures) { if (baseSignatures) { - for (var i = 0; i < baseSignatures.length; i++) { - signatures.push(baseSignatures[i]); + for (var _i = 0, _n = baseSignatures.length; _i < _n; _i++) { + var signature = baseSignatures[_i]; + signatures.push(signature); } } } @@ -9890,7 +10264,8 @@ var ts; var baseType = classType.baseTypes[0]; var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1); return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 ? getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); + var signature = baseType.flags & 4096 ? + getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); signature.typeParameters = classType.typeParameters; signature.resolvedReturnType = classType; return signature; @@ -9927,13 +10302,14 @@ var ts; function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var signatures = signatureLists[0]; - for (var i = 0; i < signatures.length; i++) { - if (signatures[i].typeParameters) { + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; + if (signature.typeParameters) { return emptyArray; } } - for (var i = 1; i < signatureLists.length; i++) { - if (!signatureListsIdentical(signatures, signatureLists[i])) { + for (var _i_1 = 1; _i_1 < signatureLists.length; _i_1++) { + if (!signatureListsIdentical(signatures, signatureLists[_i_1])) { return emptyArray; } } @@ -9947,8 +10323,9 @@ var ts; } function getUnionIndexType(types, kind) { var indexTypes = []; - for (var i = 0; i < types.length; i++) { - var indexType = getIndexTypeOfType(types[i], kind); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + var indexType = getIndexTypeOfType(type, kind); if (!indexType) { return undefined; } @@ -9965,17 +10342,22 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; + var members; + var callSignatures; + var constructSignatures; + var stringIndexType; + var numberIndexType; if (symbol.flags & 2048) { - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1); + members = symbol.members; + callSignatures = getSignaturesOfSymbol(members["__call"]); + constructSignatures = getSignaturesOfSymbol(members["__new"]); + stringIndexType = getIndexTypeOfSymbol(symbol, 0); + numberIndexType = getIndexTypeOfSymbol(symbol, 1); } else { - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; + members = emptySymbols; + callSignatures = emptyArray; + constructSignatures = emptyArray; if (symbol.flags & 1952) { members = getExportsOfSymbol(symbol); } @@ -9993,8 +10375,8 @@ var ts; addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(classType.baseTypes[0].symbol))); } } - var stringIndexType = undefined; - var numberIndexType = (symbol.flags & 384) ? stringType : undefined; + stringIndexType = undefined; + numberIndexType = (symbol.flags & 384) ? stringType : undefined; } setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } @@ -10077,8 +10459,9 @@ var ts; function createUnionProperty(unionType, name) { var types = unionType.types; var props; - for (var i = 0; i < types.length; i++) { - var type = getApparentType(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var type = getApparentType(current); if (type !== unknownType) { var prop = getPropertyOfType(type, name); if (!prop) { @@ -10094,12 +10477,12 @@ var ts; } var propTypes = []; var declarations = []; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); + for (var _a = 0, _b = props.length; _a < _b; _a++) { + var _prop = props[_a]; + if (_prop.declarations) { + declarations.push.apply(declarations, _prop.declarations); } - propTypes.push(getTypeOfSymbol(prop)); + propTypes.push(getTypeOfSymbol(_prop)); } var result = createSymbol(4 | 67108864 | 268435456, name); result.unionType = unionType; @@ -10136,9 +10519,9 @@ var ts; } } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) - return symbol; + var _symbol = getPropertyOfObjectType(globalFunctionType, name); + if (_symbol) + return _symbol; } return getPropertyOfObjectType(globalObjectType, name); } @@ -10171,11 +10554,22 @@ var ts; }); return result; } + function getExportsOfExternalModule(node) { + if (!node.moduleSpecifier) { + return emptyArray; + } + var module = resolveExternalModuleName(node, node.moduleSpecifier); + if (!module || !module.exports) { + return emptyArray; + } + return ts.mapToArray(getExportsOfModule(module)); + } function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var classType = declaration.kind === 133 ? getDeclaredTypeOfClass(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.typeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; + var typeParameters = classType ? classType.typeParameters : + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; var parameters = []; var hasStringLiterals = false; var minArgumentCount = -1; @@ -10248,14 +10642,15 @@ var ts; function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { signature.resolvedReturnType = resolvingType; + var type; if (signature.target) { - var type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); + type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - var type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); } else { - var type = getReturnTypeFromBody(signature.declaration); + type = getReturnTypeFromBody(signature.declaration); } if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = type; @@ -10316,12 +10711,13 @@ var ts; return symbol.members["__index"]; } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 119 : 121; + var syntaxKind = kind === 1 ? 118 : 120; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { var len = indexSymbol.declarations.length; - for (var i = 0; i < len; i++) { - var node = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var node = decl; if (node.parameters.length === 1) { var parameter = node.parameters[0]; if (parameter && parameter.type && parameter.type.kind === syntaxKind) { @@ -10334,7 +10730,9 @@ var ts; } function getIndexTypeOfSymbol(symbol, kind) { var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType : undefined; + return declaration + ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType + : undefined; } function getConstraintOfTypeParameter(type) { if (!type.constraint) { @@ -10357,8 +10755,9 @@ var ts; default: var result = ""; for (var i = 0; i < types.length; i++) { - if (i > 0) + if (i > 0) { result += ","; + } result += types[i].id; } return result; @@ -10366,8 +10765,9 @@ var ts; } function getWideningFlagsOfTypes(types) { var result = 0; - for (var i = 0; i < types.length; i++) { - result |= types[i].flags; + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + result |= type.flags; } return result & 786432; } @@ -10419,9 +10819,9 @@ var ts; function getTypeFromTypeReferenceNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = resolveEntityName(node, node.typeName, 793056); + var symbol = resolveEntityName(node.typeName, 793056); + var type; if (symbol) { - var type; if ((symbol.flags & 262144) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { type = unknownType; } @@ -10459,8 +10859,8 @@ var ts; function getTypeOfGlobalSymbol(symbol, arity) { function getTypeDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; switch (declaration.kind) { case 196: case 197: @@ -10492,8 +10892,9 @@ var ts; function getGlobalSymbol(name, meaning, diagnostic) { return resolveName(undefined, name, meaning, diagnostic, name); } - function getGlobalType(name) { - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), 0); + function getGlobalType(name, arity) { + if (arity === void 0) { arity = 0; } + return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); } function getGlobalESSymbolConstructorSymbol() { return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); @@ -10541,13 +10942,15 @@ var ts; } } function addTypesToSortedSet(sortedTypes, types) { - for (var i = 0, len = types.length; i < len; i++) { - addTypeToSortedSet(sortedTypes, types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + addTypeToSortedSet(sortedTypes, type); } } function isSubtypeOfAny(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && isTypeSubtypeOf(candidate, type)) { return true; } } @@ -10563,8 +10966,9 @@ var ts; } } function containsAnyType(types) { - for (var i = 0; i < types.length; i++) { - if (types[i].flags & 1) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (type.flags & 1) { return true; } } @@ -10637,15 +11041,15 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 112: + case 111: return anyType; - case 121: + case 120: return stringType; - case 119: + case 118: return numberType; - case 113: + case 112: return booleanType; - case 122: + case 121: return esSymbolType; case 98: return voidType; @@ -10678,8 +11082,9 @@ var ts; function instantiateList(items, mapper, instantiator) { if (items && items.length) { var result = []; - for (var i = 0; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); + for (var _i = 0, _n = items.length; _i < _n; _i++) { + var v = items[_i]; + result.push(instantiator(v, mapper)); } return result; } @@ -10698,8 +11103,9 @@ var ts; } return function (t) { for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + if (t === sources[i]) { return targets[i]; + } } return t; }; @@ -10716,9 +11122,11 @@ var ts; case 2: return createBinaryTypeEraser(sources[0], sources[1]); } return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) + for (var _i = 0, _n = sources.length; _i < _n; _i++) { + var source = sources[_i]; + if (t === source) { return anyType; + } } return t; }; @@ -10752,8 +11160,9 @@ var ts; return result; } function instantiateSignature(signature, mapper, eraseTypeParameters) { + var freshTypeParameters; if (signature.typeParameters && !eraseTypeParameters) { - var freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); + freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); } var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -10797,7 +11206,8 @@ var ts; return mapper(type); } if (type.flags & 32768) { - return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? instantiateAnonymousType(type, mapper) : type; + return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ? + instantiateAnonymousType(type, mapper) : type; } if (type.flags & 4096) { return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); @@ -10826,8 +11236,8 @@ var ts; isContextSensitive(node.whenFalse); case 167: return node.operatorToken.kind === 49 && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 217: + (isContextSensitive(node.left) || isContextSensitive(node.right)); + case 218: return isContextSensitive(node.initializer); case 132: case 131: @@ -10909,7 +11319,7 @@ var ts; } function isRelatedTo(source, target, reportErrors, headMessage, elaborateErrors) { if (elaborateErrors === void 0) { elaborateErrors = false; } - var result; + var _result; if (source === target) return -1; if (relation !== identityRelation) { @@ -10933,54 +11343,54 @@ var ts; if (source.flags & 16384 || target.flags & 16384) { if (relation === identityRelation) { if (source.flags & 16384 && target.flags & 16384) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; + if (_result = unionTypeRelatedToUnionType(source, target)) { + if (_result &= unionTypeRelatedToUnionType(target, source)) { + return _result; } } } else if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(target, source, reportErrors)) { + return _result; } } } else { if (source.flags & 16384) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; + if (_result = unionTypeRelatedToType(source, target, reportErrors)) { + return _result; } } else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; + if (_result = typeRelatedToUnionType(source, target, reportErrors)) { + return _result; } } } } else if (source.flags & 512 && target.flags & 512) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; + if (_result = typeParameterRelatedTo(source, target, reportErrors)) { + return _result; } } else { var saveErrorInfo = errorInfo; if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; + if (_result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { + return _result; } } var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); if (sourceOrApparentType.flags & 48128 && target.flags & 48128 && - (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { + (_result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { errorInfo = saveErrorInfo; - return result; + return _result; } } if (reportErrors) { @@ -10996,16 +11406,17 @@ var ts; return 0; } function unionTypeRelatedToUnionType(source, target) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = typeRelatedToUnionType(sourceTypes[i], target, false); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = typeRelatedToUnionType(sourceType, target, false); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeRelatedToUnionType(source, target, reportErrors) { var targetTypes = target.types; @@ -11018,27 +11429,28 @@ var ts; return 0; } function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1; + var _result = -1; var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors); + for (var _i = 0, _n = sourceTypes.length; _i < _n; _i++) { + var sourceType = sourceTypes[_i]; + var related = isRelatedTo(sourceType, target, reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typesRelatedTo(sources, targets, reportErrors) { - var result = -1; + var _result = -1; for (var i = 0, len = sources.length; i < len; i++) { var related = isRelatedTo(sources[i], targets[i], reportErrors); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function typeParameterRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -11104,19 +11516,20 @@ var ts; expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; + var _result; if (expandingFlags === 3) { - var result = 1; + _result = 1; } else { - var result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); + _result = propertiesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 0, reportErrors); + if (_result) { + _result &= signaturesRelatedTo(source, target, 1, reportErrors); + if (_result) { + _result &= stringIndexTypesRelatedTo(source, target, reportErrors); + if (_result) { + _result &= numberIndexTypesRelatedTo(source, target, reportErrors); } } } @@ -11124,23 +11537,23 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result) { + if (_result) { var maybeCache = maybeStack[depth]; - var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; + var destinationCache = (_result === -1 || depth === 0) ? relation : maybeStack[depth - 1]; ts.copyMap(maybeCache, destinationCache); } else { relation[id] = reportErrors ? 3 : 2; } - return result; + return _result; } function isDeeplyNestedGeneric(type, stack) { if (type.flags & 4096 && depth >= 10) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) { + if (t.flags & 4096 && t.target === _target) { count++; if (count >= 10) return true; @@ -11153,11 +11566,11 @@ var ts; if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } - var result = -1; + var _result = -1; var properties = getPropertiesOfObjectType(target); var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 131072); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp !== targetProp) { if (!sourceProp) { @@ -11208,7 +11621,7 @@ var ts; } return 0; } - result &= related; + _result &= related; if (sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) { if (reportErrors) { reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); @@ -11218,7 +11631,7 @@ var ts; } } } - return result; + return _result; } function propertiesIdenticalTo(source, target) { var sourceProperties = getPropertiesOfObjectType(source); @@ -11226,9 +11639,9 @@ var ts; if (sourceProperties.length !== targetProperties.length) { return 0; } - var result = -1; - for (var i = 0, len = sourceProperties.length; i < len; ++i) { - var sourceProp = sourceProperties[i]; + var _result = -1; + for (var _i = 0, _n = sourceProperties.length; _i < _n; _i++) { + var sourceProp = sourceProperties[_i]; var targetProp = getPropertyOfObjectType(target, sourceProp.name); if (!targetProp) { return 0; @@ -11237,9 +11650,9 @@ var ts; if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function signaturesRelatedTo(source, target, kind, reportErrors) { if (relation === identityRelation) { @@ -11250,18 +11663,18 @@ var ts; } var sourceSignatures = getSignaturesOfType(source, kind); var targetSignatures = getSignaturesOfType(target, kind); - var result = -1; + var _result = -1; var saveErrorInfo = errorInfo; - outer: for (var i = 0; i < targetSignatures.length; i++) { - var t = targetSignatures[i]; + outer: for (var _i = 0, _n = targetSignatures.length; _i < _n; _i++) { + var t = targetSignatures[_i]; if (!t.hasStringLiterals || target.flags & 65536) { var localErrors = reportErrors; - for (var j = 0; j < sourceSignatures.length; j++) { - var s = sourceSignatures[j]; + for (var _a = 0, _b = sourceSignatures.length; _a < _b; _a++) { + var s = sourceSignatures[_a]; if (!s.hasStringLiterals || source.flags & 65536) { var related = signatureRelatedTo(s, t, localErrors); if (related) { - result &= related; + _result &= related; errorInfo = saveErrorInfo; continue outer; } @@ -11271,7 +11684,7 @@ var ts; return 0; } } - return result; + return _result; } function signatureRelatedTo(source, target, reportErrors) { if (source === target) { @@ -11301,14 +11714,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - var result = -1; + var _result = -1; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + var _s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + var _t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); + var related = isRelatedTo(_s, _t, reportErrors); if (!related) { - related = isRelatedTo(t, s, false); + related = isRelatedTo(_t, _s, false); if (!related) { if (reportErrors) { reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); @@ -11317,13 +11730,13 @@ var ts; } errorInfo = saveErrorInfo; } - result &= related; + _result &= related; } var t = getReturnTypeOfSignature(target); if (t === voidType) - return result; + return _result; var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); + return _result & isRelatedTo(s, t, reportErrors); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -11331,15 +11744,15 @@ var ts; if (sourceSignatures.length !== targetSignatures.length) { return 0; } - var result = -1; + var _result = -1; for (var i = 0, len = sourceSignatures.length; i < len; ++i) { var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); if (!related) { return 0; } - result &= related; + _result &= related; } - return result; + return _result; } function stringIndexTypesRelatedTo(source, target, reportErrors) { if (relation === identityRelation) { @@ -11379,11 +11792,12 @@ var ts; } return 0; } + var related; if (sourceStringType && sourceNumberType) { - var related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { - var related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); } if (!related) { if (reportErrors) { @@ -11458,14 +11872,14 @@ var ts; } source = getErasedSignature(source); target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { + for (var _i = 0, _len = source.parameters.length; _i < _len; _i++) { + var s = source.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[_i]); + var t = target.hasRestParameter && _i === _len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[_i]); + var _related = compareTypes(s, t); + if (!_related) { return 0; } - result &= related; + result &= _related; } if (compareReturnTypes) { result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); @@ -11473,8 +11887,9 @@ var ts; return result; } function isSupertypeOfEach(candidate, types) { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && !isTypeSubtypeOf(types[i], candidate)) + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var type = types[_i]; + if (candidate !== type && !isTypeSubtypeOf(type, candidate)) return false; } return true; @@ -11517,6 +11932,9 @@ var ts; function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } + function isTupleType(type) { + return (type.flags & 8192) && !!type.elementTypes; + } function getWidenedTypeOfObjectLiteral(type) { var properties = getPropertiesOfObjectType(type); var members = {}; @@ -11574,29 +11992,32 @@ var ts; return reportWideningErrorsInType(type.typeArguments[0]); } if (type.flags & 131072) { - var errorReported = false; + var _errorReported = false; ts.forEach(getPropertiesOfObjectType(type), function (p) { var t = getTypeOfSymbol(p); if (t.flags & 262144) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); } - errorReported = true; + _errorReported = true; } }); - return errorReported; + return _errorReported; } return false; } function reportImplicitAnyError(declaration, type) { var typeAsString = typeToString(getWidenedType(type)); + var diagnostic; switch (declaration.kind) { case 130: case 129: - var diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; case 128: - var diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; + diagnostic = declaration.dotDotDotToken ? + ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : + ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; case 195: case 132: @@ -11609,10 +12030,10 @@ var ts; error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; } - var diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; + diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; default: - var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; + diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); } @@ -11651,7 +12072,8 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) { + for (var _i = 0, _n = typeParameters.length; _i < _n; _i++) { + var unused = typeParameters[_i]; inferences.push({ primary: undefined, secondary: undefined }); } return { @@ -11670,19 +12092,21 @@ var ts; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) + if (source === sourceStack[i] && target === targetStack[i]) { return true; + } } return false; } function isWithinDepthLimit(type, stack) { if (depth >= 5) { - var target = type.target; + var _target = type.target; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & 4096 && t.target === target) + if (t.flags & 4096 && t.target === _target) { count++; + } } return count < 5; } @@ -11697,7 +12121,9 @@ var ts; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { var inferences = context.inferences[i]; - var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + var candidates = inferiority ? + inferences.secondary || (inferences.secondary = []) : + inferences.primary || (inferences.primary = []); if (!ts.contains(candidates, source)) candidates.push(source); break; @@ -11707,16 +12133,16 @@ var ts; else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) { var sourceTypes = source.typeArguments; var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); + for (var _i = 0; _i < sourceTypes.length; _i++) { + inferFromTypes(sourceTypes[_i], targetTypes[_i]); } } else if (target.flags & 16384) { - var targetTypes = target.types; + var _targetTypes = target.types; var typeParameterCount = 0; var typeParameter; - for (var i = 0; i < targetTypes.length; i++) { - var t = targetTypes[i]; + for (var _a = 0, _n = _targetTypes.length; _a < _n; _a++) { + var t = _targetTypes[_a]; if (t.flags & 512 && ts.contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; @@ -11732,9 +12158,10 @@ var ts; } } else if (source.flags & 16384) { - var sourceTypes = source.types; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], target); + var _sourceTypes = source.types; + for (var _b = 0, _c = _sourceTypes.length; _b < _c; _b++) { + var sourceType = _sourceTypes[_b]; + inferFromTypes(sourceType, target); } } else if (source.flags & 48128 && (target.flags & (4096 | 8192) || @@ -11759,8 +12186,8 @@ var ts; } function inferFromProperties(source, target) { var properties = getPropertiesOfObjectType(target); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var targetProp = properties[_i]; var sourceProp = getPropertyOfObjectType(source, targetProp.name); if (sourceProp) { inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); @@ -11845,16 +12272,19 @@ var ts; } ts.Debug.fail("should not get here"); } - function removeTypesFromUnionType(type, typeKind, isOfTypeKind) { + function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { if (type.flags & 16384) { var types = type.types; if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (narrowedType !== emptyObjectType) { + if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { return narrowedType; } } } + else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { + return getUnionType(emptyArray); + } return type; } function hasInitializer(node) { @@ -11926,12 +12356,12 @@ var ts; case 186: case 187: case 188: - case 213: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: return ts.forEachChild(node, isAssignedIn); } return false; @@ -11939,10 +12369,10 @@ var ts; } function resolveLocation(node) { var containerNodes = []; - for (var parent = node.parent; parent; parent = parent.parent) { - if ((ts.isExpression(parent) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent)) { - containerNodes.unshift(parent); + for (var _parent = node.parent; _parent; _parent = _parent.parent) { + if ((ts.isExpression(_parent) || ts.isObjectLiteralMethod(node)) && + isContextSensitive(_parent)) { + containerNodes.unshift(_parent); } } ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); @@ -11987,7 +12417,7 @@ var ts; } } break; - case 220: + case 221: case 200: case 195: case 132: @@ -12021,16 +12451,16 @@ var ts; } if (assumeTrue) { if (!typeInfo) { - return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true); + return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true, false); } if (isTypeSubtypeOf(typeInfo.type, type)) { return typeInfo.type; } - return removeTypesFromUnionType(type, typeInfo.flags, false); + return removeTypesFromUnionType(type, typeInfo.flags, false, false); } else { if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true); + return removeTypesFromUnionType(type, typeInfo.flags, true, false); } return type; } @@ -12106,46 +12536,56 @@ var ts; return type; } } - function markLinkedImportsAsReferenced(node) { - if (node) { - var nodeLinks = getNodeLinks(node); - while (nodeLinks.importOnRightSide) { - var rightSide = nodeLinks.importOnRightSide; - nodeLinks.importOnRightSide = undefined; - getSymbolLinks(rightSide).referenced = true; - ts.Debug.assert((rightSide.flags & 8388608) !== 0); - nodeLinks = getNodeLinks(ts.getDeclarationOfKind(rightSide, 202)); - } - } - } function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 161) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression); } - if (symbol.flags & 8388608) { - var symbolLinks = getSymbolLinks(symbol); - if (!symbolLinks.referenced) { - var importOrExportAssignment = getLeftSideOfImportEqualsOrExportAssignment(node); - if (!importOrExportAssignment || - (importOrExportAssignment.flags & 1) || - (importOrExportAssignment.kind === 208)) { - symbolLinks.referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); - } - else { - var nodeLinks = getNodeLinks(importOrExportAssignment); - ts.Debug.assert(!nodeLinks.importOnRightSide); - nodeLinks.importOnRightSide = symbol; - } - } - if (symbolLinks.referenced) { - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); + checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } + function isInsideFunction(node, threshold) { + var current = node; + while (current && current !== threshold) { + if (ts.isFunctionLike(current)) { + return true; + } + current = current.parent; + } + return false; + } + function checkBlockScopedBindingCapturedInLoop(node, symbol) { + if (languageVersion >= 2 || + (symbol.flags & 2) === 0 || + symbol.valueDeclaration.parent.kind === 217) { + return; + } + var container = symbol.valueDeclaration; + while (container.kind !== 194) { + container = container.parent; + } + container = container.parent; + if (container.kind === 175) { + container = container.parent; + } + var inFunction = isInsideFunction(node.parent, container); + var current = container; + while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { + if (isIterationStatement(current, false)) { + if (inFunction) { + grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); + } + getNodeLinks(symbol.valueDeclaration).flags |= 256; + break; + } + current = current.parent; + } + } function captureLexicalThis(node, container) { var classNode = container.parent && container.parent.kind === 196 ? container.parent : undefined; getNodeLinks(node).flags |= 2; @@ -12218,11 +12658,12 @@ var ts; var container = ts.getSuperContainer(node, true); if (container) { var canUseSuperExpression = false; + var needToCaptureLexicalThis; if (isCallExpression) { canUseSuperExpression = container.kind === 133; } else { - var needToCaptureLexicalThis = false; + needToCaptureLexicalThis = false; while (container && container.kind === 161) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = true; @@ -12231,19 +12672,19 @@ var ts; if (container.flags & 128) { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135; + container.kind === 131 || + container.kind === 134 || + container.kind === 135; } else { canUseSuperExpression = container.kind === 132 || - container.kind === 131 || - container.kind === 134 || - container.kind === 135 || - container.kind === 130 || - container.kind === 129 || - container.kind === 133; + container.kind === 131 || + container.kind === 134 || + container.kind === 135 || + container.kind === 130 || + container.kind === 129 || + container.kind === 133; } } } @@ -12369,8 +12810,9 @@ var ts; var types = type.types; var mappedType; var mappedTypes; - for (var i = 0; i < types.length; i++) { - var t = mapper(types[i]); + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + var t = mapper(current); if (t) { if (!mappedType) { mappedType = t; @@ -12428,7 +12870,9 @@ var ts; var type = getContextualType(arrayLiteral); if (type) { var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) || getIndexTypeOfContextualType(type, 1); + return getTypeOfPropertyOfContextualType(type, "" + index) + || getIndexTypeOfContextualType(type, 1) + || (languageVersion >= 2 ? checkIteratedType(type, undefined) : undefined); } return undefined; } @@ -12443,8 +12887,8 @@ var ts; if (node.contextualType) { return node.contextualType; } - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 193: case 128: case 130: @@ -12456,22 +12900,22 @@ var ts; return getContextualTypeForReturnExpression(node); case 155: case 156: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(_parent, node); case 158: - return getTypeFromTypeNode(parent.type); + return getTypeFromTypeNode(_parent.type); case 167: return getContextualTypeForBinaryOperand(node); - case 217: - return getContextualTypeForObjectLiteralElement(parent); + case 218: + return getContextualTypeForObjectLiteralElement(_parent); case 151: return getContextualTypeForElementExpression(node); case 168: return getContextualTypeForConditionalOperand(node); case 173: - ts.Debug.assert(parent.parent.kind === 169); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + ts.Debug.assert(_parent.parent.kind === 169); + return getContextualTypeForSubstitutionExpression(_parent.parent, node); case 159: - return getContextualType(parent); + return getContextualType(_parent); } return undefined; } @@ -12492,7 +12936,9 @@ var ts; } function getContextualSignature(node) { ts.Debug.assert(node.kind !== 132 || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getContextualType(node); + var type = ts.isObjectLiteralMethod(node) + ? getContextualTypeForObjectLiteralMethod(node) + : getContextualType(node); if (!type) { return undefined; } @@ -12501,12 +12947,13 @@ var ts; } var signatureList; var types = type.types; - for (var i = 0; i < types.length; i++) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; if (signatureList && - getSignaturesOfObjectOrUnionType(types[i], 0).length > 1) { + getSignaturesOfObjectOrUnionType(current, 0).length > 1) { return undefined; } - var signature = getNonGenericSignature(types[i]); + var signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { signatureList = [signature]; @@ -12531,15 +12978,15 @@ var ts; return mapper && mapper !== identityMapper; } function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 167 && parent.operatorToken.kind === 52 && parent.left === node) { + var _parent = node.parent; + if (_parent.kind === 167 && _parent.operatorToken.kind === 52 && _parent.left === node) { return true; } - if (parent.kind === 217) { - return isAssignmentTarget(parent.parent); + if (_parent.kind === 218) { + return isAssignmentTarget(_parent.parent); } - if (parent.kind === 151) { - return isAssignmentTarget(parent); + if (_parent.kind === 151) { + return isAssignmentTarget(_parent); } return false; } @@ -12604,21 +13051,24 @@ var ts; var propertiesArray = []; var contextualType = getContextualType(node); var typeFlags; - for (var i = 0; i < node.properties.length; i++) { - var memberDecl = node.properties[i]; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 217 || - memberDecl.kind === 218 || + if (memberDecl.kind === 218 || + memberDecl.kind === 219 || ts.isObjectLiteralMethod(memberDecl)) { - if (memberDecl.kind === 217) { - var type = checkPropertyAssignment(memberDecl, contextualMapper); + var type = void 0; + if (memberDecl.kind === 218) { + type = checkPropertyAssignment(memberDecl, contextualMapper); } else if (memberDecl.kind === 132) { - var type = checkObjectLiteralMethod(memberDecl, contextualMapper); + type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 218); - var type = memberDecl.name.kind === 126 ? unknownType : checkExpression(memberDecl.name, contextualMapper); + ts.Debug.assert(memberDecl.kind === 219); + type = memberDecl.name.kind === 126 + ? unknownType + : checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); @@ -12651,15 +13101,15 @@ var ts; for (var i = 0; i < propertiesArray.length; i++) { var propertyDecl = node.properties[i]; if (kind === 0 || isNumericName(propertyDecl.name)) { - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); + var _type = getTypeOfSymbol(propertiesArray[i]); + if (!ts.contains(propTypes, _type)) { + propTypes.push(_type); } } } - var result = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result.flags; - return result; + var _result = propTypes.length ? getUnionType(propTypes) : undefinedType; + typeFlags |= _result.flags; + return _result; } return undefined; } @@ -12734,7 +13184,9 @@ var ts; return anyType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 153 ? node.expression : node.left; + var left = node.kind === 153 + ? node.expression + : node.left; var type = checkExpressionOrQualifiedName(left); if (type !== unknownType && type !== anyType) { var prop = getPropertyOfType(getWidenedType(type), propertyName); @@ -12760,9 +13212,9 @@ var ts; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); } else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); + var _start = node.end - "]".length; + var _end = node.end; + grammarErrorAtPos(sourceFile, _start, _end - _start, ts.Diagnostics.Expression_expected); } } var objectType = getApparentType(checkExpression(node.expression)); @@ -12777,15 +13229,15 @@ var ts; return unknownType; } if (node.argumentExpression) { - var name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name !== undefined) { - var prop = getPropertyOfType(objectType, name); + var _name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + if (_name !== undefined) { + var prop = getPropertyOfType(objectType, _name); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); } else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name, symbolToString(objectType.symbol)); + error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, _name, symbolToString(objectType.symbol)); return unknownType; } } @@ -12872,22 +13324,22 @@ var ts; var specializedIndex = -1; var spliceIndex; ts.Debug.assert(!result.length); - for (var i = 0; i < signatures.length; i++) { - var signature = signatures[i]; + for (var _i = 0, _n = signatures.length; _i < _n; _i++) { + var signature = signatures[_i]; var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent = signature.declaration && signature.declaration.parent; + var _parent = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent === lastParent) { + if (lastParent && _parent === lastParent) { index++; } else { - lastParent = parent; + lastParent = _parent; index = cutoffIndex; } } else { index = cutoffIndex = result.length; - lastParent = parent; + lastParent = _parent; } lastSymbol = symbol; if (signature.hasStringLiterals) { @@ -12979,30 +13431,31 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); + var argType = void 0; if (i === 0 && args[i].parent.kind === 157) { - var argType = globalTemplateStringsArrayType; + argType = globalTemplateStringsArrayType; } else { var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - var argType = checkExpressionWithContextualType(arg, paramType, mapper); + argType = checkExpressionWithContextualType(arg, paramType, mapper); } inferTypes(context, argType, paramType); } } if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); + for (var _i = 0; _i < args.length; _i++) { + if (excludeArgument[_i] === false) { + var _arg = args[_i]; + var _paramType = getTypeAtPosition(signature, _arg.kind === 171 ? -1 : _i); + inferTypes(context, checkExpressionWithContextualType(_arg, _paramType, inferenceMapper), _paramType); } } } var inferredTypes = getInferredTypes(context); context.failedTypeParameterIndex = ts.indexOf(inferredTypes, inferenceFailureType); - for (var i = 0; i < inferredTypes.length; i++) { - if (inferredTypes[i] === inferenceFailureType) { - inferredTypes[i] = unknownType; + for (var _i_1 = 0; _i_1 < inferredTypes.length; _i_1++) { + if (inferredTypes[_i_1] === inferenceFailureType) { + inferredTypes[_i_1] = unknownType; } } return context; @@ -13028,7 +13481,9 @@ var ts; var arg = args[i]; if (arg.kind !== 172) { var paramType = getTypeAtPosition(signature, arg.kind === 171 ? -1 : i); - var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + var argType = i === 0 && node.kind === 157 ? globalTemplateStringsArrayType : + arg.kind === 8 && !reportErrors ? getStringLiteralType(arg) : + checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { return false; } @@ -13122,50 +13577,53 @@ var ts; error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); } if (!produceDiagnostics) { - for (var i = 0, n = candidates.length; i < n; i++) { - if (hasCorrectArity(node, args, candidates[i])) { - return candidates[i]; + for (var _i = 0, _n = candidates.length; _i < _n; _i++) { + var candidate = candidates[_i]; + if (hasCorrectArity(node, args, candidate)) { + return candidate; } } } return resolveErrorCall(node); function chooseOverload(candidates, relation) { - for (var i = 0; i < candidates.length; i++) { - if (!hasCorrectArity(node, args, candidates[i])) { + for (var _a = 0, _b = candidates.length; _a < _b; _a++) { + var current = candidates[_a]; + if (!hasCorrectArity(node, args, current)) { continue; } - var originalCandidate = candidates[i]; - var inferenceResult; + var originalCandidate = current; + var inferenceResult = void 0; + var _candidate = void 0; + var typeArgumentsAreValid = void 0; while (true) { - var candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes; - var typeArgumentsAreValid; + _candidate = originalCandidate; + if (_candidate.typeParameters) { + var typeArgumentTypes = void 0; if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); + typeArgumentTypes = new Array(_candidate.typeParameters.length); + typeArgumentsAreValid = checkTypeArguments(_candidate, typeArguments, typeArgumentTypes, false); } else { - inferenceResult = inferTypeArguments(candidate, args, excludeArgument); + inferenceResult = inferTypeArguments(_candidate, args, excludeArgument); typeArgumentsAreValid = inferenceResult.failedTypeParameterIndex < 0; typeArgumentTypes = inferenceResult.inferredTypes; } if (!typeArgumentsAreValid) { break; } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); + _candidate = getSignatureInstantiation(_candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, _candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; if (index < 0) { - return candidate; + return _candidate; } excludeArgument[index] = false; } if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; + var instantiatedCandidate = _candidate; if (typeArgumentsAreValid) { candidateForArgumentError = instantiatedCandidate; } @@ -13177,7 +13635,7 @@ var ts; } } else { - ts.Debug.assert(originalCandidate === candidate); + ts.Debug.assert(originalCandidate === _candidate); candidateForArgumentError = originalCandidate; } } @@ -13305,9 +13763,6 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - if (languageVersion < 2) { - grammarErrorOnFirstToken(node.template, ts.Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher); - } return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { @@ -13323,9 +13778,13 @@ var ts; } function getTypeAtPosition(signature, pos) { if (pos >= 0) { - return signature.hasRestParameter ? pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; + return signature.hasRestParameter ? + pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : + pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; } - return signature.hasRestParameter ? getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : anyArrayType; + return signature.hasRestParameter ? + getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]) : + anyArrayType; } function assignContextualParameterTypes(signature, context, mapper) { var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); @@ -13335,9 +13794,9 @@ var ts; links.type = instantiateType(getTypeAtPosition(context, i), mapper); } if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = signature.parameters[signature.parameters.length - 1]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); + var _parameter = signature.parameters[signature.parameters.length - 1]; + var _links = getSymbolLinks(_parameter); + _links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); } } function getReturnTypeFromBody(func, contextualMapper) { @@ -13345,15 +13804,16 @@ var ts; if (!func.body) { return unknownType; } + var type; if (func.body.kind !== 174) { - var type = checkExpressionCached(func.body, contextualMapper); + type = checkExpressionCached(func.body, contextualMapper); } else { var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { return voidType; } - var type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); return unknownType; @@ -13466,19 +13926,21 @@ var ts; } return true; } - function checkReferenceExpression(n, invalidReferenceMessage, constantVarianleMessage) { + function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { function findSymbol(n) { var symbol = getNodeLinks(n).resolvedSymbol; return symbol && getExportSymbolOfValueSymbolIfExported(symbol); } function isReferenceOrErrorExpression(n) { switch (n.kind) { - case 64: + case 64: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; - case 153: - var symbol = findSymbol(n); - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; + } + case 153: { + var _symbol = findSymbol(n); + return !_symbol || _symbol === unknownSymbol || (_symbol.flags & ~8) !== 0; + } case 154: return true; case 159: @@ -13490,18 +13952,20 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 64: - case 153: + case 153: { var symbol = findSymbol(n); - return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096) !== 0; - case 154: + return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192) !== 0; + } + case 154: { var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8) { - var name = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name); - return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096) !== 0; + var _symbol = findSymbol(n.expression); + if (_symbol && index && index.kind === 8) { + var _name = index.text; + var prop = getPropertyOfType(getTypeOfSymbol(_symbol), _name); + return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192) !== 0; } return false; + } case 159: return isConstVariableReference(n.expression); default: @@ -13513,7 +13977,7 @@ var ts; return false; } if (isConstVariableReference(n)) { - error(n, constantVarianleMessage); + error(n, constantVariableMessage); return false; } return true; @@ -13573,8 +14037,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (types[i].flags & kind) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (current.flags & kind) { return true; } } @@ -13588,8 +14053,9 @@ var ts; } if (type.flags & 16384) { var types = type.types; - for (var i = 0; i < types.length; i++) { - if (!(types[i].flags & kind)) { + for (var _i = 0, _n = types.length; _i < _n; _i++) { + var current = types[_i]; + if (!(current.flags & kind)) { return false; } } @@ -13623,18 +14089,19 @@ var ts; } function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { var properties = node.properties; - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { - var name = p.name; - var type = sourceType.flags & 1 ? sourceType : getTypeOfPropertyOfType(sourceType, name.text) || - isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, 1) || - getIndexTypeOfType(sourceType, 0); + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { + var _name = p.name; + var type = sourceType.flags & 1 ? sourceType : + getTypeOfPropertyOfType(sourceType, _name.text) || + isNumericLiteralName(_name.text) && getIndexTypeOfType(sourceType, 1) || + getIndexTypeOfType(sourceType, 0); if (type) { - checkDestructuringAssignment(p.initializer || name, type); + checkDestructuringAssignment(p.initializer || _name, type); } else { - error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name)); + error(_name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(_name)); } } else { @@ -13654,12 +14121,19 @@ var ts; if (e.kind !== 172) { if (e.kind !== 171) { var propName = "" + i; - var type = sourceType.flags & 1 ? sourceType : isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : getIndexTypeOfType(sourceType, 1); + var type = sourceType.flags & 1 ? sourceType : + isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : + getIndexTypeOfType(sourceType, 1); if (type) { checkDestructuringAssignment(e, type, contextualMapper); } else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + if (isTupleType(sourceType)) { + error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); + } + else { + error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } } } else { @@ -13802,7 +14276,9 @@ var ts; return rightType; } function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : someConstituentTypeHasKind(rightType, 1048576) ? node.right : undefined; + var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left : + someConstituentTypeHasKind(rightType, 1048576) ? node.right : + undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); return false; @@ -13913,8 +14389,8 @@ var ts; } if (isConstEnumObjectType(type)) { var ok = (node.parent.kind === 153 && node.parent.expression === node) || - (node.parent.kind === 154 && node.parent.expression === node) || - ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); + (node.parent.kind === 154 && node.parent.expression === node) || + ((node.kind === 64 || node.kind === 125) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -14060,11 +14536,12 @@ var ts; if (indexSymbol) { var seenNumericIndexer = false; var seenStringIndexer = false; - for (var i = 0, len = indexSymbol.declarations.length; i < len; ++i) { - var declaration = indexSymbol.declarations[i]; + for (var _i = 0, _a = indexSymbol.declarations, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; + var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 121: + case 120: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -14072,7 +14549,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 119: + case 118: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -14139,7 +14616,7 @@ var ts; if (ts.getClassBaseTypeNode(node.parent)) { if (containsSuperCall(node.body)) { var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); + ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); }); if (superCallShouldBeFirst) { var statements = node.body.statements; if (!statements.length || statements[0].kind !== 177 || !isSuperCallExpression(statements[0].expression)) { @@ -14248,8 +14725,8 @@ var ts; else { signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); } - for (var i = 0; i < signaturesToCheck.length; i++) { - var otherSignature = signaturesToCheck[i]; + for (var _i = 0, _n = signaturesToCheck.length; _i < _n; _i++) { + var otherSignature = signaturesToCheck[_i]; if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { return; } @@ -14329,16 +14806,16 @@ var ts; }); if (subsequentNode) { if (subsequentNode.kind === node.kind) { - var errorNode = subsequentNode.name || subsequentNode; + var _errorNode = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { ts.Debug.assert(node.kind === 132 || node.kind === 131); ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128)); var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode, diagnostic); + error(_errorNode, diagnostic); return; } else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); + error(_errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -14354,8 +14831,9 @@ var ts; var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536; var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; - for (var i = 0; i < declarations.length; i++) { - var node = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var node = current; var inAmbientContext = ts.isInAmbientContext(node); var inAmbientContextOrInterface = node.parent.kind === 197 || node.parent.kind === 143 || inAmbientContext; if (inAmbientContextOrInterface) { @@ -14412,9 +14890,10 @@ var ts; var signatures = getSignaturesOfSymbol(symbol); var bodySignature = getSignatureFromDeclaration(bodyDeclaration); if (!bodySignature.hasStringLiterals) { - for (var i = 0, len = signatures.length; i < len; ++i) { - if (!signatures[i].hasStringLiterals && !isSignatureAssignableTo(bodySignature, signatures[i])) { - error(signatures[i].declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + for (var _a = 0, _b = signatures.length; _a < _b; _a++) { + var signature = signatures[_a]; + if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { + error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); break; } } @@ -14426,7 +14905,6 @@ var ts; if (!produceDiagnostics) { return; } - var symbol; var symbol = node.localSymbol; if (!symbol) { symbol = getSymbolOfNode(node); @@ -14461,13 +14939,15 @@ var ts; case 197: return 2097152; case 200: - return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; + return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0 + ? 4194304 | 1048576 + : 4194304; case 196: case 199: return 2097152 | 1048576; - case 202: + case 203: var result = 0; - var target = resolveImport(getSymbolOfNode(d)); + var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); return result; default: @@ -14488,7 +14968,7 @@ var ts; } function checkFunctionLikeDeclaration(node) { checkSignatureDeclaration(node); - if (node.name.kind === 126) { + if (node.name && node.name.kind === 126) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -14561,8 +15041,8 @@ var ts; var current = node; while (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { @@ -14582,8 +15062,8 @@ var ts; return; } if (ts.getClassBaseTypeNode(enclosingClass)) { - var isDeclaration = node.kind !== 64; - if (isDeclaration) { + var _isDeclaration = node.kind !== 64; + if (_isDeclaration) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } else { @@ -14598,30 +15078,30 @@ var ts; if (node.kind === 200 && ts.getModuleInstanceState(node) !== 1) { return; } - var parent = getDeclarationContainer(node); - if (parent.kind === 220 && ts.isExternalModule(parent)) { + var _parent = getDeclarationContainer(node); + if (_parent.kind === 221 && ts.isExternalModule(_parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkVarDeclaredNamesNotShadowed(node) { - if (node.initializer && (ts.getCombinedNodeFlags(node) & 6144) === 0) { + if (node.initializer && (ts.getCombinedNodeFlags(node) & 12288) === 0) { var symbol = getSymbolOfNode(node); if (symbol.flags & 1) { var localDeclarationSymbol = resolveName(node, node.name.text, 3, undefined, undefined); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 6144) { + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288) { var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 194); var container = varDeclList.parent.kind === 175 && - varDeclList.parent.parent; + varDeclList.parent.parent; var namesShareScope = container && - (container.kind === 174 && ts.isAnyFunction(container.parent) || - (container.kind === 201 && container.kind === 200) || - container.kind === 220); + (container.kind === 174 && ts.isFunctionLike(container.parent) || + (container.kind === 201 && container.kind === 200) || + container.kind === 221); if (!namesShareScope) { - var name = symbolToString(localDeclarationSymbol); - error(ts.getErrorSpanForNode(node), ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + var _name = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, _name, _name); } } } @@ -14635,10 +15115,11 @@ var ts; return node.kind === 128; } function checkParameterInitializer(node) { - if (getRootDeclaration(node).kind === 128) { - var func = ts.getContainingFunction(node); - visit(node.initializer); + if (getRootDeclaration(node).kind !== 128) { + return; } + var func = ts.getContainingFunction(node); + visit(node.initializer); function visit(n) { if (n.kind === 64) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; @@ -14777,33 +15258,153 @@ var ts; checkSourceElement(node.statement); } function checkForOfStatement(node) { - checkGrammarForOfStatement(node); + checkGrammarForInOrForOfStatement(node); + if (node.initializer.kind === 194) { + checkForInOrForOfVariableDeclaration(node); + } + else { + var varExpr = node.initializer; + var iteratedType = checkRightHandSideOfForOf(node.expression); + if (varExpr.kind === 151 || varExpr.kind === 152) { + checkDestructuringAssignment(varExpr, iteratedType || unknownType); + } + else { + var leftType = checkExpression(varExpr); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + if (iteratedType) { + checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); + } + } + } + checkSourceElement(node.statement); } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); if (node.initializer.kind === 194) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); + var variable = node.initializer.declarations[0]; + if (variable && ts.isBindingPattern(variable.name)) { + error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } + checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; - var exprType = checkExpression(varExpr); - if (!allConstituentTypesHaveKind(exprType, 1 | 258)) { + var leftType = checkExpression(varExpr); + if (varExpr.kind === 151 || varExpr.kind === 152) { + error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + } + else if (!allConstituentTypesHaveKind(leftType, 1 | 258)) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); } } - var exprType = checkExpression(node.expression); - if (!allConstituentTypesHaveKind(exprType, 1 | 48128 | 512)) { + var rightType = checkExpression(node.expression); + if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) { error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } checkSourceElement(node.statement); } + function checkForInOrForOfVariableDeclaration(iterationStatement) { + var variableDeclarationList = iterationStatement.initializer; + if (variableDeclarationList.declarations.length >= 1) { + var decl = variableDeclarationList.declarations[0]; + checkVariableDeclaration(decl); + } + } + function checkRightHandSideOfForOf(rhsExpression) { + var expressionType = getTypeOfExpression(rhsExpression); + return languageVersion >= 2 + ? checkIteratedType(expressionType, rhsExpression) + : checkElementTypeOfArrayOrString(expressionType, rhsExpression); + } + function checkIteratedType(iterable, expressionForError) { + ts.Debug.assert(languageVersion >= 2); + var iteratedType = getIteratedType(iterable, expressionForError); + if (expressionForError && iteratedType) { + var completeIterableType = globalIterableType !== emptyObjectType + ? createTypeReference(globalIterableType, [iteratedType]) + : emptyObjectType; + checkTypeAssignableTo(iterable, completeIterableType, expressionForError); + } + return iteratedType; + function getIteratedType(iterable, expressionForError) { + if (allConstituentTypesHaveKind(iterable, 1)) { + return undefined; + } + var iteratorFunction = getTypeOfPropertyOfType(iterable, ts.getPropertyNameForKnownSymbolName("iterator")); + if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, 1)) { + return undefined; + } + var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray; + if (iteratorFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator); + } + return undefined; + } + var iterator = getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iterator, 1)) { + return undefined; + } + var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); + if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, 1)) { + return undefined; + } + var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray; + if (iteratorNextFunctionSignatures.length === 0) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method); + } + return undefined; + } + var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + if (allConstituentTypesHaveKind(iteratorNextResult, 1)) { + return undefined; + } + var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); + if (!iteratorNextValue) { + if (expressionForError) { + error(expressionForError, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); + } + return undefined; + } + return iteratorNextValue; + } + } + function checkElementTypeOfArrayOrString(arrayOrStringType, expressionForError) { + ts.Debug.assert(languageVersion < 2); + var arrayType = removeTypesFromUnionType(arrayOrStringType, 258, true, true); + var hasStringConstituent = arrayOrStringType !== arrayType; + var reportedError = false; + if (hasStringConstituent) { + if (languageVersion < 1) { + error(expressionForError, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + reportedError = true; + } + if (arrayType === emptyObjectType) { + return stringType; + } + } + if (!isArrayLikeType(arrayType)) { + if (!reportedError) { + var diagnostic = hasStringConstituent + ? ts.Diagnostics.Type_0_is_not_an_array_type + : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; + error(expressionForError, diagnostic, typeToString(arrayType)); + } + return hasStringConstituent ? stringType : unknownType; + } + var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType; + if (hasStringConstituent) { + if (arrayElementType.flags & 258) { + return stringType; + } + return getUnionType([arrayElementType, stringType]); + } + return arrayElementType; + } function checkBreakOrContinueStatement(node) { checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } @@ -14852,8 +15453,8 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); - ts.forEach(node.clauses, function (clause) { - if (clause.kind === 214 && !hasDuplicateDefaultClause) { + ts.forEach(node.caseBlock.clauses, function (clause) { + if (clause.kind === 215 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -14865,7 +15466,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 213) { + if (produceDiagnostics && clause.kind === 214) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); if (!isTypeAssignableTo(expressionType, caseType)) { @@ -14879,7 +15480,7 @@ var ts; if (!checkGrammarStatementInAmbientContext(node)) { var current = node.parent; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { break; } if (current.kind === 189 && current.label.text === node.label.text) { @@ -14907,16 +15508,33 @@ var ts; checkBlock(node.tryBlock); var catchClause = node.catchClause; if (catchClause) { - if (catchClause.type) { - var sourceFile = ts.getSourceFileOfNode(node); - var colonStart = ts.skipTrivia(sourceFile.text, catchClause.name.end); - grammarErrorAtPos(sourceFile, colonStart, ":".length, ts.Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation); + if (catchClause.variableDeclaration) { + if (catchClause.variableDeclaration.name.kind !== 64) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); + } + else if (catchClause.variableDeclaration.type) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); + } + else if (catchClause.variableDeclaration.initializer) { + grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); + } + else { + var identifierName = catchClause.variableDeclaration.name.text; + var locals = catchClause.block.locals; + if (locals && ts.hasProperty(locals, identifierName)) { + var localSymbol = locals[identifierName]; + if (localSymbol && (localSymbol.flags & 2) !== 0) { + grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + } + } + checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); + } } - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.name); checkBlock(catchClause.block); } - if (node.finallyBlock) + if (node.finallyBlock) { checkBlock(node.finallyBlock); + } } function checkIndexConstraints(type) { var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1); @@ -14931,8 +15549,8 @@ var ts; }); if (type.flags & 1024 && type.symbol.valueDeclaration.kind === 196) { var classDeclaration = type.symbol.valueDeclaration; - for (var i = 0; i < classDeclaration.members.length; i++) { - var member = classDeclaration.members[i]; + for (var _i = 0, _a = classDeclaration.members, _n = _a.length; _i < _n; _i++) { + var member = _a[_i]; if (!(member.flags & 128) && ts.hasDynamicName(member)) { var propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0); @@ -14959,20 +15577,22 @@ var ts; if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) { return; } - var errorNode; + var _errorNode; if (prop.valueDeclaration.name.kind === 126 || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; + _errorNode = prop.valueDeclaration; } else if (indexDeclaration) { - errorNode = indexDeclaration; + _errorNode = indexDeclaration; } else if (containingType.flags & 2048) { var someBaseClassHasBothPropertyAndIndexer = ts.forEach(containingType.baseTypes, function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; + _errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); + if (_errorNode && !isTypeAssignableTo(propertyType, indexType)) { + var errorMessage = indexKind === 0 + ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 + : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; + error(_errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); } } } @@ -14989,7 +15609,7 @@ var ts; } function checkTypeParameters(typeParameterDeclarations) { if (typeParameterDeclarations) { - for (var i = 0; i < typeParameterDeclarations.length; i++) { + for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { var node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { @@ -15004,10 +15624,12 @@ var ts; } function checkClassDeclaration(node) { checkGrammarClassDeclarationHeritageClauses(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + if (node.name) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); + checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + } checkTypeParameters(node.typeParameters); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -15020,10 +15642,10 @@ var ts; if (type.baseTypes.length) { if (produceDiagnostics) { var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); + checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(node, baseTypeNode.typeName, 107455)) { + checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + if (baseType.symbol !== resolveEntityName(baseTypeNode.typeName, 107455)) { error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -15039,7 +15661,7 @@ var ts; if (t !== unknownType) { var declaredType = (t.flags & 4096) ? t.target : t; if (declaredType.flags & (1024 | 2048)) { - checkTypeAssignableTo(type, t, node.name, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -15059,8 +15681,9 @@ var ts; } function checkKindsOfPropertyMemberOverrides(type, baseType) { var baseProperties = getPropertiesOfObjectType(baseType); - for (var i = 0, len = baseProperties.length; i < len; ++i) { - var base = getTargetSymbol(baseProperties[i]); + for (var _i = 0, _n = baseProperties.length; _i < _n; _i++) { + var baseProperty = baseProperties[_i]; + var base = getTargetSymbol(baseProperty); if (base.flags & 134217728) { continue; } @@ -15077,7 +15700,7 @@ var ts; if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) { continue; } - var errorMessage; + var errorMessage = void 0; if (base.flags & 8192) { if (derived.flags & 98304) { errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; @@ -15135,11 +15758,11 @@ var ts; var seen = {}; ts.forEach(type.declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); var ok = true; - for (var i = 0, len = type.baseTypes.length; i < len; ++i) { - var base = type.baseTypes[i]; + for (var _i = 0, _a = type.baseTypes, _n = _a.length; _i < _n; _i++) { + var base = _a[_i]; var properties = getPropertiesOfObjectType(base); - for (var j = 0, proplen = properties.length; j < proplen; ++j) { - var prop = properties[j]; + for (var _b = 0, _c = properties.length; _b < _c; _b++) { + var prop = properties[_b]; if (!ts.hasProperty(seen, prop.name)) { seen[prop.name] = { prop: prop, containingType: base }; } @@ -15194,8 +15817,8 @@ var ts; checkSourceElement(node.type); } function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128)) { + var _nodeLinks = getNodeLinks(node); + if (!(_nodeLinks.flags & 128)) { var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); var autoValue = 0; @@ -15232,7 +15855,7 @@ var ts; getNodeLinks(member).enumMemberValue = autoValue++; } }); - nodeLinks.flags |= 128; + _nodeLinks.flags |= 128; } function getConstantValueForEnumMemberInitializer(initializer, enumIsConst) { return evalConstant(initializer); @@ -15287,10 +15910,10 @@ var ts; } var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; + var _enumType; var propertyName; if (e.kind === 64) { - enumType = currentType; + _enumType = currentType; propertyName = e.text; } else { @@ -15299,21 +15922,21 @@ var ts; e.argumentExpression.kind !== 8) { return undefined; } - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.argumentExpression.text; } else { - var enumType = getTypeOfNode(e.expression); + _enumType = getTypeOfNode(e.expression); propertyName = e.name.text; } - if (enumType !== currentType) { + if (_enumType !== currentType) { return undefined; } } if (propertyName === undefined) { return undefined; } - var property = getPropertyOfObjectType(enumType, propertyName); + var property = getPropertyOfObjectType(_enumType, propertyName); if (!property || !(property.flags & 8)) { return undefined; } @@ -15373,8 +15996,8 @@ var ts; } function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; if ((declaration.kind === 196 || (declaration.kind === 195 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -15387,21 +16010,15 @@ var ts; if (!ts.isInAmbientContext(node) && node.name.kind === 8) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } - else if (node.name.kind === 64 && node.body.kind === 201) { - var statements = node.body.statements; - for (var i = 0, n = statements.length; i < n; i++) { - var statement = statements[i]; - if (statement.kind === 208) { - grammarErrorOnNode(statement, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); - } - } - } } checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - if (symbol.flags & 512 && symbol.declarations.length > 1 && !ts.isInAmbientContext(node) && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { + if (symbol.flags & 512 + && symbol.declarations.length > 1 + && !ts.isInAmbientContext(node) + && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { var classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (classOrFunc) { if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(classOrFunc)) { @@ -15436,8 +16053,10 @@ var ts; return false; } var inAmbientExternalModule = node.parent.kind === 201 && node.parent.parent.name.kind === 8; - if (node.parent.kind !== 220 && !inAmbientExternalModule) { - error(moduleName, node.kind === 209 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); + if (node.parent.kind !== 221 && !inAmbientExternalModule) { + error(moduleName, node.kind === 210 ? + ts.Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : + ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -15446,15 +16065,17 @@ var ts; } return true; } - function checkImportSymbol(node) { + function checkAliasSymbol(node) { var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); + var target = resolveAlias(symbol); if (target !== unknownSymbol) { var excludedMeanings = (symbol.flags & 107455 ? 107455 : 0) | - (symbol.flags & 793056 ? 793056 : 0) | - (symbol.flags & 1536 ? 1536 : 0); + (symbol.flags & 793056 ? 793056 : 0) | + (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 211 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + var message = node.kind === 212 ? + ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : + ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } } @@ -15462,10 +16083,10 @@ var ts; function checkImportBinding(node) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkImportSymbol(node); + checkAliasSymbol(node); } function checkImportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { @@ -15475,7 +16096,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { checkImportBinding(importClause.namedBindings); } else { @@ -15487,50 +16108,108 @@ var ts; } function checkImportEqualsDeclaration(node) { checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { + if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); - if (target !== unknownSymbol) { - if (target.flags & 107455) { - var moduleName = getFirstIdentifier(node.moduleReference); - if (resolveEntityName(node, moduleName, 107455 | 1536).flags & 1536) { - checkExpressionOrQualifiedName(node.moduleReference); - } - else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } + if (node.flags & 1) { + markExportAsReferenced(node); } - } - else { - if (checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); + if (ts.isInternalModuleImportEqualsDeclaration(node)) { + var target = resolveAlias(getSymbolOfNode(node)); + if (target !== unknownSymbol) { + if (target.flags & 107455) { + var moduleName = getFirstIdentifier(node.moduleReference); + if (!(resolveEntityName(moduleName, 107455 | 1536).flags & 1536)) { + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); + } + } + if (target.flags & 793056) { + checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); + } + } } } } function checkExportDeclaration(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { - ts.forEach(node.exportClause.elements, checkImportSymbol); + ts.forEach(node.exportClause.elements, checkExportSpecifier); } } } + function checkExportSpecifier(node) { + checkAliasSymbol(node); + if (!node.parent.parent.moduleSpecifier) { + markExportAsReferenced(node); + } + } function checkExportAssignment(node) { - if (!checkGrammarModifiers(node) && (node.flags & 243)) { + var container = node.parent.kind === 221 ? node.parent : node.parent.parent; + if (container.kind === 200 && container.name.kind === 64) { + error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + return; + } + if (!checkGrammarModifiers(node) && (node.flags & 499)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - var container = node.parent; - if (container.kind !== 220) { - container = container.parent; + if (node.expression.kind === 64) { + markExportAsReferenced(node); + } + else { + checkExpressionCached(node.expression); + } + checkExternalModuleExports(container); + } + function getModuleStatements(node) { + if (node.kind === 221) { + return node.statements; + } + if (node.kind === 200 && node.body.kind === 201) { + return node.body.statements; + } + return emptyArray; + } + function hasExportedMembers(moduleSymbol) { + var declarations = moduleSymbol.declarations; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var statements = getModuleStatements(current); + for (var _a = 0, _b = statements.length; _a < _b; _a++) { + var node = statements[_a]; + if (node.kind === 210) { + var exportClause = node.exportClause; + if (!exportClause) { + return true; + } + var specifiers = exportClause.elements; + for (var _c = 0, _d = specifiers.length; _c < _d; _c++) { + var specifier = specifiers[_c]; + if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) { + return true; + } + } + } + else if (node.kind !== 209 && node.flags & 1 && !(node.flags & 256)) { + return true; + } + } + } + } + function checkExternalModuleExports(node) { + var moduleSymbol = getSymbolOfNode(node); + var links = getSymbolLinks(moduleSymbol); + if (!links.exportsChecked) { + var defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + if (hasExportedMembers(moduleSymbol)) { + var declaration = getDeclarationOfAliasSymbol(defaultSymbol) || defaultSymbol.valueDeclaration; + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + } + links.exportsChecked = true; } - checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); } function checkSourceElement(node) { if (!node) @@ -15622,13 +16301,13 @@ var ts; return checkEnumDeclaration(node); case 200: return checkModuleDeclaration(node); - case 203: + case 204: return checkImportDeclaration(node); - case 202: + case 203: return checkImportEqualsDeclaration(node); - case 209: + case 210: return checkExportDeclaration(node); - case 208: + case 209: return checkExportAssignment(node); case 176: checkGrammarStatementInAmbientContext(node); @@ -15669,7 +16348,7 @@ var ts; case 150: case 151: case 152: - case 217: + case 218: case 153: case 154: case 155: @@ -15701,18 +16380,20 @@ var ts; case 185: case 186: case 188: - case 213: + case 202: case 214: + case 215: case 189: case 190: case 191: - case 216: + case 217: case 193: case 194: case 196: case 199: - case 219: case 220: + case 209: + case 221: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15731,11 +16412,7 @@ var ts; ts.forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); if (ts.isExternalModule(node)) { - var symbol = getExportAssignmentSymbol(node.symbol); - if (symbol && symbol.flags & 8388608) { - getSymbolLinks(symbol).referenced = true; - markLinkedImportsAsReferenced(ts.getDeclarationOfKind(symbol, 202)); - } + checkExternalModuleExports(node); } if (potentialThisCollisions.length) { ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); @@ -15804,7 +16481,7 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 220: + case 221: if (!ts.isExternalModule(location)) break; case 200: @@ -15824,11 +16501,6 @@ var ts; copySymbol(location.symbol, meaning); } break; - case 216: - if (location.name.text) { - copySymbol(location.symbol, meaning); - } - break; } memberFlags = location.flags; location = location.parent; @@ -15862,11 +16534,11 @@ var ts; return true; } switch (node.kind) { + case 111: + case 118: + case 120: case 112: - case 119: case 121: - case 113: - case 122: return true; case 98: return node.parent.kind !== 164; @@ -15878,21 +16550,21 @@ var ts; } case 125: ts.Debug.assert(node.kind === 64 || node.kind === 125, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); - var parent = node.parent; - if (parent.kind === 142) { + var _parent = node.parent; + if (_parent.kind === 142) { return false; } - if (139 <= parent.kind && parent.kind <= 147) { + if (139 <= _parent.kind && _parent.kind <= 147) { return true; } - switch (parent.kind) { + switch (_parent.kind) { case 127: - return node === parent.constraint; + return node === _parent.constraint; case 130: case 129: case 128: case 193: - return node === parent.type; + return node === _parent.type; case 195: case 160: case 161: @@ -15901,16 +16573,16 @@ var ts; case 131: case 134: case 135: - return node === parent.type; + return node === _parent.type; case 136: case 137: case 138: - return node === parent.type; + return node === _parent.type; case 158: - return node === parent.type; + return node === _parent.type; case 155: case 156: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + return _parent.typeArguments && ts.indexOf(_parent.typeArguments, node) >= 0; case 157: return false; } @@ -15921,11 +16593,11 @@ var ts; while (nodeOnRightSide.parent.kind === 125) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 202) { + if (nodeOnRightSide.parent.kind === 203) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 208) { - return nodeOnRightSide.parent.exportName === nodeOnRightSide && nodeOnRightSide.parent; + if (nodeOnRightSide.parent.kind === 209) { + return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; } @@ -15937,11 +16609,11 @@ var ts; (node.parent.kind === 153 && node.parent.name === node); } function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 208) { - return resolveEntityName(entityName.parent.parent, entityName, 107455 | 793056 | 1536 | 8388608); + if (entityName.parent.kind === 209) { + return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } if (entityName.kind !== 153) { if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15957,7 +16629,7 @@ var ts; } if (entityName.kind === 64) { var meaning = 107455 | 8388608; - return resolveEntityName(entityName, entityName, meaning); + return resolveEntityName(entityName, meaning); } else if (entityName.kind === 153) { var symbol = getNodeLinks(entityName).resolvedSymbol; @@ -15967,17 +16639,17 @@ var ts; return getNodeLinks(entityName).resolvedSymbol; } else if (entityName.kind === 125) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { + var _symbol = getNodeLinks(entityName).resolvedSymbol; + if (!_symbol) { checkQualifiedName(entityName); } return getNodeLinks(entityName).resolvedSymbol; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 139 ? 793056 : 1536; - meaning |= 8388608; - return resolveEntityName(entityName, entityName, meaning); + var _meaning = entityName.parent.kind === 139 ? 793056 : 1536; + _meaning |= 8388608; + return resolveEntityName(entityName, _meaning); } return undefined; } @@ -15985,11 +16657,13 @@ var ts; if (isInsideWithStatementBody(node)) { return undefined; } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationName(node)) { return getSymbolOfNode(node.parent); } if (node.kind === 64 && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 208 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); + return node.parent.kind === 209 + ? getSymbolOfEntityNameOrPropertyAccessExpression(node) + : getSymbolOfPartOfRightHandSideOfImportEquals(node); } switch (node.kind) { case 64: @@ -16000,18 +16674,19 @@ var ts; case 90: var type = checkExpression(node); return type.symbol; - case 114: + case 113: var constructorDeclaration = node.parent; if (constructorDeclaration && constructorDeclaration.kind === 133) { return constructorDeclaration.parent.symbol; } return undefined; case 8: - if (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) { - var importSymbol = getSymbolOfNode(node.parent.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; + var moduleName; + if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && + ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || + ((node.parent.kind === 204 || node.parent.kind === 210) && + node.parent.moduleSpecifier === node)) { + return resolveExternalModuleName(node, node); } case 7: if (node.parent.kind == 154 && node.parent.argumentExpression === node) { @@ -16028,8 +16703,8 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 218) { - return resolveEntityName(location, location.name, 107455); + if (location && location.kind === 219) { + return resolveEntityName(location.name, 107455); } return undefined; } @@ -16048,21 +16723,21 @@ var ts; return getDeclaredTypeOfSymbol(symbol); } if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); + var _symbol = getSymbolInfo(node); + return _symbol && getDeclaredTypeOfSymbol(_symbol); } if (ts.isDeclaration(node)) { - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); + var _symbol_1 = getSymbolOfNode(node); + return getTypeOfSymbol(_symbol_1); } - if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); + if (ts.isDeclarationName(node)) { + var _symbol_2 = getSymbolInfo(node); + return _symbol_2 && getTypeOfSymbol(_symbol_2); } if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); + var _symbol_3 = getSymbolInfo(node); + var declaredType = _symbol_3 && getDeclaredTypeOfSymbol(_symbol_3); + return declaredType !== unknownType ? declaredType : getTypeOfSymbol(_symbol_3); } return unknownType; } @@ -16073,7 +16748,7 @@ var ts; return checkExpression(expr); } function getAugmentedPropertiesOfType(type) { - var type = getApparentType(type); + type = getApparentType(type); var propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) { ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { @@ -16087,9 +16762,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name = symbol.name; + var _name = symbol.name; ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name)); + symbols.push(getPropertyOfType(t, _name)); }); return symbols; } @@ -16102,7 +16777,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 220; + return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 221; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -16132,6 +16807,10 @@ var ts; return generatedNames; function generateNames(node) { switch (node.kind) { + case 195: + case 196: + generateNameForFunctionOrClassDeclaration(node); + break; case 200: generateNameForModuleOrEnum(node); generateNames(node.body); @@ -16139,13 +16818,16 @@ var ts; case 199: generateNameForModuleOrEnum(node); break; - case 203: + case 204: generateNameForImportDeclaration(node); break; - case 209: + case 210: generateNameForExportDeclaration(node); break; - case 220: + case 209: + generateNameForExportAssignment(node); + break; + case 221: case 201: ts.forEach(node.statements, generateNames); break; @@ -16155,40 +16837,31 @@ var ts; return ts.hasProperty(globals, name) || ts.hasProperty(sourceFile.identifiers, name) || ts.hasProperty(generatedNames, name); } function makeUniqueName(baseName) { - if (baseName.charCodeAt(0) !== 95) { - var baseName = "_" + baseName; - if (!isExistingName(baseName)) { - return generatedNames[baseName] = baseName; - } - } - if (baseName.charCodeAt(baseName.length - 1) !== 95) { - baseName += "_"; - } - var i = 1; - while (true) { - name = baseName + i; - if (!isExistingName(name)) { - return generatedNames[name] = name; - } - i++; - } + var _name = ts.generateUniqueName(baseName, isExistingName); + return generatedNames[_name] = _name; } function assignGeneratedName(node, name) { getNodeLinks(node).generatedName = ts.unescapeIdentifier(name); } + function generateNameForFunctionOrClassDeclaration(node) { + if (!node.name) { + assignGeneratedName(node, makeUniqueName("default")); + } + } function generateNameForModuleOrEnum(node) { if (node.name.kind === 64) { - var name = node.name.text; - assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name)); + var _name = node.name.text; + assignGeneratedName(node, isUniqueLocalName(_name, node) ? _name : makeUniqueName(_name)); } } function generateNameForImportOrExportDeclaration(node) { var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 ? ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; + var baseName = expr.kind === 8 ? + ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; assignGeneratedName(node, makeUniqueName(baseName)); } function generateNameForImportDeclaration(node) { - if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 206) { + if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 207) { generateNameForImportOrExportDeclaration(node); } } @@ -16197,6 +16870,11 @@ var ts; generateNameForImportOrExportDeclaration(node); } } + function generateNameForExportAssignment(node) { + if (node.expression.kind !== 64) { + assignGeneratedName(node, makeUniqueName("default")); + } + } } function getGeneratedNameForNode(node) { var links = getNodeLinks(node); @@ -16211,9 +16889,9 @@ var ts; function getLocalNameForImportDeclaration(node) { return getGeneratedNameForNode(node); } - function getImportNameSubstitution(symbol) { - var declaration = getDeclarationOfImportSymbol(symbol); - if (declaration && declaration.kind === 207) { + function getAliasNameSubstitution(symbol) { + var declaration = getDeclarationOfAliasSymbol(symbol); + if (declaration && declaration.kind === 208) { var moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); var propertyName = declaration.propertyName || declaration.name; return moduleName + "." + ts.unescapeIdentifier(propertyName.text); @@ -16243,38 +16921,35 @@ var ts; return getExportNameSubstitution(exportSymbol, node.parent); } if (symbol.flags & 8388608) { - return getImportNameSubstitution(symbol); + return getAliasNameSubstitution(symbol); } } } - function getExportAssignmentName(node) { - var symbol = getExportAssignmentSymbol(getSymbolOfNode(node)); - return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; + function hasExportDefaultValue(node) { + var symbol = getResolvedExportAssignmentSymbol(getSymbolOfNode(node)); + return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol); } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 220 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 221 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } - return isImportResolvedToValue(getSymbolOfNode(node)); + return isAliasResolvedToValue(getSymbolOfNode(node)); } - function isImportResolvedToValue(symbol) { - var target = resolveImport(symbol); + function isAliasResolvedToValue(symbol) { + var target = resolveAlias(symbol); return target !== unknownSymbol && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || s.constEnumOnlyModule; } - function isReferencedImportDeclaration(node) { - if (isImportSymbolDeclaration(node)) { + function isReferencedAliasDeclaration(node) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (getSymbolLinks(symbol).referenced) { return true; } - if (node.kind === 202 && node.flags & 1 && isImportResolvedToValue(symbol)) { - return true; - } } - return ts.forEachChild(node, isReferencedImportDeclaration); + return ts.forEachChild(node, isReferencedAliasDeclaration); } function isImplementationOfOverload(node) { if (ts.nodeIsPresent(node.body)) { @@ -16293,14 +16968,14 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 219) { + if (node.kind === 220) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & 8)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 219) { + if (declaration.kind === 220) { return getEnumMemberValue(declaration); } } @@ -16308,7 +16983,9 @@ var ts; } function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 | 131072)) ? getTypeOfSymbol(symbol) : unknownType; + var type = symbol && !(symbol.flags & (2048 | 131072)) + ? getTypeOfSymbol(symbol) + : unknownType; getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -16316,15 +16993,42 @@ var ts; getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function isUnknownIdentifier(location, name) { + ts.Debug.assert(!ts.nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location"); return !resolveName(location, name, 107455, undefined, undefined) && !ts.hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name); } + function getBlockScopedVariableId(n) { + ts.Debug.assert(!ts.nodeIsSynthesized(n)); + if (n.parent.kind === 153 && + n.parent.name === n) { + return undefined; + } + if (n.parent.kind === 150 && + n.parent.propertyName === n) { + return undefined; + } + var declarationSymbol = (n.parent.kind === 193 && n.parent.name === n) || + n.parent.kind === 150 + ? getSymbolOfNode(n.parent) + : undefined; + var symbol = declarationSymbol || + getNodeLinks(n).resolvedSymbol || + resolveName(n, n.text, 107455 | 8388608, undefined, undefined); + var isLetOrConst = symbol && + (symbol.flags & 2) && + symbol.valueDeclaration.parent.kind !== 217; + if (isLetOrConst) { + getSymbolLinks(symbol); + return symbol.id; + } + return undefined; + } function createResolver() { return { getGeneratedNameForNode: getGeneratedNameForNode, getExpressionNameSubstitution: getExpressionNameSubstitution, - getExportAssignmentName: getExportAssignmentName, - isReferencedImportDeclaration: isReferencedImportDeclaration, + hasExportDefaultValue: hasExportDefaultValue, + isReferencedAliasDeclaration: isReferencedAliasDeclaration, getNodeCheckFlags: getNodeCheckFlags, isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, isDeclarationVisible: isDeclarationVisible, @@ -16334,7 +17038,8 @@ var ts; isSymbolAccessible: isSymbolAccessible, isEntityNameVisible: isEntityNameVisible, getConstantValue: getConstantValue, - isUnknownIdentifier: isUnknownIdentifier + isUnknownIdentifier: isUnknownIdentifier, + getBlockScopedVariableId: getBlockScopedVariableId }; } function initializeTypeChecker() { @@ -16362,6 +17067,7 @@ var ts; globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); globalESSymbolType = getGlobalType("Symbol"); globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); + globalIterableType = getGlobalType("Iterable", 1); } else { globalTemplateStringsArrayType = unknownType; @@ -16387,10 +17093,10 @@ var ts; case 175: case 195: case 198: + case 204: case 203: - case 202: + case 210: case 209: - case 208: case 128: break; default: @@ -16401,17 +17107,17 @@ var ts; } var lastStatic, lastPrivate, lastProtected, lastDeclare; var flags = 0; - for (var i = 0, n = node.modifiers.length; i < n; i++) { - var modifier = node.modifiers[i]; + for (var _i = 0, _a = node.modifiers, _n = _a.length; _i < _n; _i++) { + var modifier = _a[_i]; switch (modifier.kind) { - case 109: case 108: case 107: - var text; - if (modifier.kind === 109) { + case 106: + var text = void 0; + if (modifier.kind === 108) { text = "public"; } - else if (modifier.kind === 108) { + else if (modifier.kind === 107) { text = "protected"; lastProtected = modifier; } @@ -16425,16 +17131,16 @@ var ts; else if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } flags |= ts.modifierToFlag(modifier.kind); break; - case 110: + case 109: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } - else if (node.parent.kind === 201 || node.parent.kind === 220) { + else if (node.parent.kind === 201 || node.parent.kind === 221) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } else if (node.kind === 128) { @@ -16458,7 +17164,7 @@ var ts; } flags |= 1; break; - case 115: + case 114: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } @@ -16487,7 +17193,7 @@ var ts; return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); } } - else if ((node.kind === 203 || node.kind === 202) && flags & 2) { + else if ((node.kind === 204 || node.kind === 203) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); } else if (node.kind === 197 && flags & 2) { @@ -16564,7 +17270,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); } - if (parameter.flags & 243) { + if (parameter.flags & 499) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); } if (parameter.questionToken) { @@ -16576,7 +17282,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 121 && parameter.type.kind !== 119) { + if (parameter.type.kind !== 120 && parameter.type.kind !== 118) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -16584,7 +17290,7 @@ var ts; } } function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 243) { + if (node.flags & 499) { grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); } } @@ -16606,8 +17312,8 @@ var ts; function checkGrammarForOmittedArgument(node, arguments) { if (arguments) { var sourceFile = ts.getSourceFileOfNode(node); - for (var i = 0, n = arguments.length; i < n; i++) { - var arg = arguments[i]; + for (var _i = 0, _n = arguments.length; _i < _n; _i++) { + var arg = arguments[_i]; if (arg.kind === 172) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } @@ -16633,9 +17339,8 @@ var ts; var seenExtendsClause = false; var seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16649,7 +17354,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -16662,9 +17367,8 @@ var ts; function checkGrammarInterfaceDeclaration(node) { var seenExtendsClause = false; if (node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - ts.Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; + for (var _i = 0, _a = node.heritageClauses, _n = _a.length; _i < _n; _i++) { + var heritageClause = _a[_i]; if (heritageClause.token === 78) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); @@ -16672,7 +17376,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 103); + ts.Debug.assert(heritageClause.token === 102); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -16709,19 +17413,19 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var inStrictMode = (node.parserContextFlags & 1) !== 0; - for (var i = 0, n = node.properties.length; i < n; i++) { - var prop = node.properties[i]; - var name = prop.name; + for (var _i = 0, _a = node.properties, _n = _a.length; _i < _n; _i++) { + var prop = _a[_i]; + var _name = prop.name; if (prop.kind === 172 || - name.kind === 126) { - checkGrammarComputedPropertyName(name); + _name.kind === 126) { + checkGrammarComputedPropertyName(_name); continue; } - var currentKind; - if (prop.kind === 217 || prop.kind === 218) { + var currentKind = void 0; + if (prop.kind === 218 || prop.kind === 219) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name.kind === 7) { - checkGrammarNumbericLiteral(name); + if (_name.kind === 7) { + checkGrammarNumbericLiteral(_name); } currentKind = Property; } @@ -16737,26 +17441,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name.text)) { - seen[name.text] = currentKind; + if (!ts.hasProperty(seen, _name.text)) { + seen[_name.text] = currentKind; } else { - var existingKind = seen[name.text]; + var existingKind = seen[_name.text]; if (currentKind === Property && existingKind === Property) { if (inStrictMode) { - grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name.text] = currentKind | existingKind; + seen[_name.text] = currentKind | existingKind; } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + return grammarErrorOnNode(_name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } } @@ -16769,29 +17473,28 @@ var ts; var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + var diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement + : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = variableList.declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); + var _diagnostic = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer + : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return grammarErrorOnNode(firstDeclaration.name, _diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 182 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); + var _diagnostic_1 = forInOrOfStatement.kind === 182 + ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation + : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return grammarErrorOnNode(firstDeclaration, _diagnostic_1); } } } return false; } - function checkGrammarForOfStatement(forOfStatement) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_not_currently_supported); - if (languageVersion < 2) { - return grammarErrorOnFirstToken(forOfStatement, ts.Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - return checkGrammarForInOrForOfStatement(forOfStatement); - } function checkGrammarAccessor(accessor) { var kind = accessor.kind; if (languageVersion < 1) { @@ -16821,7 +17524,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } - else if (parameter.flags & 243) { + else if (parameter.flags & 499) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } else if (parameter.questionToken) { @@ -16886,13 +17589,14 @@ var ts; function checkGrammarBreakOrContinueStatement(node) { var current = node; while (current) { - if (ts.isAnyFunction(current)) { + if (ts.isFunctionLike(current)) { return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { case 189: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 184 && !isIterationStatement(current.statement, true); + var isMisplacedContinueLabel = node.kind === 184 + && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } @@ -16913,12 +17617,16 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + var message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement + : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 185 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); + var _message = node.kind === 185 + ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement + : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return grammarErrorOnNode(node, _message); } } function checkGrammarBindingElement(node) { @@ -16934,16 +17642,17 @@ var ts; return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } function checkGrammarVariableDeclaration(node) { - if (ts.isInAmbientContext(node)) { - if (ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + if (node.parent.parent.kind !== 182 && node.parent.parent.kind !== 183) { + if (ts.isInAmbientContext(node)) { + if (ts.isBindingPattern(node.name)) { + return grammarErrorOnNode(node, ts.Diagnostics.Destructuring_declarations_are_not_allowed_in_ambient_contexts); + } + if (node.initializer) { + var equalsTokenLength = "=".length; + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); + } } - if (node.initializer) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else { - if (!node.initializer) { + else if (!node.initializer) { if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); } @@ -16964,8 +17673,9 @@ var ts; } else { var elements = name.elements; - for (var i = 0; i < elements.length; ++i) { - checkGrammarNameInLetOrConstDeclarations(elements[i].name); + for (var _i = 0, _n = elements.length; _i < _n; _i++) { + var element = elements[_i]; + checkGrammarNameInLetOrConstDeclarations(element.name); } } } @@ -16977,14 +17687,6 @@ var ts; if (!declarationList.declarations.length) { return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - if (languageVersion < 2) { - if (ts.isLet(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - else if (ts.isConst(declarationList)) { - return grammarErrorOnFirstToken(declarationList, ts.Diagnostics.const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - } } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { @@ -17024,13 +17726,13 @@ var ts; return false; } function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 4096) !== 0; + var enumIsConst = (enumDecl.flags & 8192) !== 0; var hasError = false; if (!enumIsConst) { var inConstantEnumMemberSection = true; var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var i = 0, n = enumDecl.members.length; i < n; i++) { - var node = enumDecl.members[i]; + for (var _i = 0, _a = enumDecl.members, _n = _a.length; _i < _n; _i++) { + var node = _a[_i]; if (node.name.kind === 126) { hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); } @@ -17052,18 +17754,11 @@ var ts; function hasParseDiagnostics(sourceFile) { return sourceFile.parseDiagnostics.length > 0; } - function scanToken(scanner, pos) { - scanner.setTextPos(pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return start; - } function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - var start = scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, scanner.getTextPos() - start, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); return true; } } @@ -17076,16 +17771,17 @@ var ts; function grammarErrorOnNode(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getErrorSpanForNode(node); - var start = span.end > span.pos ? ts.skipTrivia(sourceFile.text, span.pos) : span.pos; - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, span.end - start, message, arg0, arg1, arg2)); + diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); return true; } } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, identifier) { - if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { - var name = ts.declarationNameToString(identifier); - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, name); + function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { + if (name && name.kind === 64) { + var identifier = name; + if (contextNode && (contextNode.parserContextFlags & 1) && ts.isEvalOrArgumentsIdentifier(identifier)) { + var nameText = ts.declarationNameToString(identifier); + return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); + } } } function checkGrammarConstructorTypeParameters(node) { @@ -17121,18 +17817,18 @@ var ts; } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { if (node.kind === 197 || + node.kind === 204 || node.kind === 203 || - node.kind === 202 || + node.kind === 210 || node.kind === 209 || - node.kind === 208 || (node.flags & 2)) { return false; } return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var i = 0, n = file.statements.length; i < n; i++) { - var decl = file.statements[i]; + for (var _i = 0, _a = file.statements, _n = _a.length; _i < _n; _i++) { + var decl = _a[_i]; if (ts.isDeclaration(decl) || decl.kind === 175) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; @@ -17149,13 +17845,13 @@ var ts; return getNodeLinks(node).hasReportedStatementInAmbientContext = true; } var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isAnyFunction(node.parent)) { + if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 220) { - var links = getNodeLinks(node.parent); - if (!links.hasReportedStatementInAmbientContext) { - return links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (node.parent.kind === 174 || node.parent.kind === 201 || node.parent.kind === 221) { + var _links = getNodeLinks(node.parent); + if (!_links.hasReportedStatementInAmbientContext) { + return _links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -17163,7 +17859,7 @@ var ts; } } function checkGrammarNumbericLiteral(node) { - if (node.flags & 8192) { + if (node.flags & 16384) { if (node.parserContextFlags & 1) { return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); } @@ -17175,9 +17871,8 @@ var ts; function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { var sourceFile = ts.getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = ts.createScanner(languageVersion, true, sourceFile.text); - scanToken(scanner, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, scanner.getTextPos(), 0, message, arg0, arg1, arg2)); + var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); return true; } } @@ -17306,7 +18001,9 @@ var ts; 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 : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); + var nextLineStart = (currentLine + 1) === lineCount + ? currentSourceFile.text.length + 1 + : ts.getStartPositionOfLine(currentLine + 1, currentSourceFile); if (pos !== comment.pos) { if (firstCommentLineIndent === undefined) { firstCommentLineIndent = calculateIndent(ts.getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); @@ -17384,7 +18081,8 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 134 || member.kind === 135) && (member.flags & 128) === (accessor.flags & 128)) { + if ((member.kind === 134 || member.kind === 135) + && (member.flags & 128) === (accessor.flags & 128)) { var memberName = ts.getPropertyNameForPropertyNameNode(member.name); var accessorName = ts.getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { @@ -17414,11 +18112,12 @@ var ts; } function getOwnEmitOutputFilePath(sourceFile, host, extension) { var compilerOptions = host.getCompilerOptions(); + var emitOutputFilePathWithoutExtension; if (compilerOptions.outDir) { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - var emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; } @@ -17449,7 +18148,7 @@ var ts; var addedGlobalFileReference = false; ts.forEach(root.referencedFiles, function (fileReference) { var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - if (referencedFile && ((referencedFile.flags & 1024) || + if (referencedFile && ((referencedFile.flags & 2048) || shouldEmitToOwnFile(referencedFile, compilerOptions) || !addedGlobalFileReference)) { writeReferencePath(referencedFile); @@ -17500,17 +18199,17 @@ var ts; } } function createAndSetNewTextWriterWithSymbolWriter() { - var writer = createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; + var _writer = createTextWriter(newLine); + _writer.trackSymbol = trackSymbol; + _writer.writeKeyword = _writer.write; + _writer.writeOperator = _writer.write; + _writer.writePunctuation = _writer.write; + _writer.writeSpace = _writer.write; + _writer.writeStringLiteral = _writer.writeLiteral; + _writer.writeParameter = _writer.write; + _writer.writeSymbol = _writer.write; + setWriter(_writer); + return _writer; } function setWriter(newWriter) { writer = newWriter; @@ -17578,18 +18277,20 @@ var ts; } } function emitLines(nodes) { - for (var i = 0, n = nodes.length; i < n; i++) { - emit(nodes[i]); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; + emit(node); } } function emitSeparatedList(nodes, separator, eachNodeEmitFn) { var currentWriterPos = writer.getTextPos(); - for (var i = 0, n = nodes.length; i < n; i++) { + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (currentWriterPos !== writer.getTextPos()) { write(separator); } currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(nodes[i]); + eachNodeEmitFn(node); } } function emitCommaList(nodes, eachNodeEmitFn) { @@ -17608,11 +18309,11 @@ var ts; } function emitType(type) { switch (type.kind) { + case 111: + case 120: + case 118: case 112: case 121: - case 119: - case 113: - case 122: case 98: case 8: return writeTextOfNode(currentSourceFile, type); @@ -17641,7 +18342,7 @@ var ts; ts.Debug.fail("Unknown type annotation: " + type.kind); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 202 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 203 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); function writeEntityName(entityName) { @@ -17702,8 +18403,8 @@ var ts; emitLines(node.statements); } function emitExportAssignment(node) { - write("export = "); - writeTextOfNode(currentSourceFile, node.exportName); + write(node.isExportEquals ? "export = " : "export default "); + writeTextOfNode(currentSourceFile, node.expression); write(";"); writeLine(); } @@ -17919,7 +18620,9 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.parent.parent.kind === 196) { - diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; + diagnosticMessage = isImplementsList ? + ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : + ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; @@ -18012,17 +18715,31 @@ var ts; function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (node.kind === 193) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 130 || node.kind === 129) { if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; } } return diagnosticMessage !== undefined ? { @@ -18062,13 +18779,14 @@ var ts; return; } var accessors = getAllAccessorDeclarations(node.parent.members, node); + var accessorWithTypeAnnotation; if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); writeTextOfNode(currentSourceFile, node.name); if (!(node.flags & 32)) { - var accessorWithTypeAnnotation = node; + accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { var anotherAccessor = node.kind === 134 ? accessors.setAccessor : accessors.getAccessor; @@ -18084,17 +18802,25 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 134 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : undefined; + return accessor.kind === 134 + ? accessor.type + : accessor.parameters.length > 0 + ? accessor.parameters[0].type + : undefined; } } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; if (accessorWithTypeAnnotation.kind === 135) { if (accessorWithTypeAnnotation.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } return { diagnosticMessage: diagnosticMessage, @@ -18104,10 +18830,18 @@ var ts; } else { if (accessorWithTypeAnnotation.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; } return { diagnosticMessage: diagnosticMessage, @@ -18189,28 +18923,48 @@ var ts; var diagnosticMessage; switch (node.kind) { case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 138: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; case 132: case 131: if (node.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } else if (node.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : + ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: ts.Debug.fail("This is unknown kind for signature: " + node.kind); @@ -18249,28 +19003,50 @@ var ts; var diagnosticMessage; switch (node.parent.kind) { case 133: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; break; case 137: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 136: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; case 132: case 131: if (node.parent.flags & 128) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } else if (node.parent.parent.kind === 196) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; case 195: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + symbolAccesibilityResult.accessibility === 2 ? + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : + ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); @@ -18307,22 +19083,26 @@ var ts; return emitClassDeclaration(node); case 198: return emitTypeAliasDeclaration(node); - case 219: + case 220: return emitEnumMemberDeclaration(node); case 199: return emitEnumDeclaration(node); case 200: return emitModuleDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 208: + case 209: return emitExportAssignment(node); - case 220: + case 221: return emitSourceFile(node); } } function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 1024 ? referencedFile.fileName : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; + var declFileName = referencedFile.flags & 2048 + ? referencedFile.fileName + : shouldEmitToOwnFile(referencedFile, compilerOptions) + ? getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") + : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false); referencePathsOutput += "/// " + newLine; } @@ -18373,22 +19153,28 @@ var ts; var writeLine = writer.writeLine; var increaseIndent = writer.increaseIndent; var decreaseIndent = writer.decreaseIndent; + var preserveNewLines = compilerOptions.preserveNewLines || false; var currentSourceFile; + var lastFrame; + var currentScopeNames; + var generatedBlockScopeNames; var extendsEmitted = false; var tempCount = 0; var tempVariables; var tempParameters; var externalImports; var exportSpecifiers; + var exportDefault; var writeEmittedFiles = writeJavaScriptFile; var emitLeadingComments = compilerOptions.removeComments ? function (node) { } : emitLeadingDeclarationComments; var emitTrailingComments = compilerOptions.removeComments ? function (node) { } : emitTrailingDeclarationComments; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfLocalPosition; var detachedCommentsInfo; var emitDetachedComments = compilerOptions.removeComments ? function (node) { } : emitDetachedCommentsAtPosition; - var emitPinnedOrTripleSlashComments = compilerOptions.removeComments ? function (node) { } : emitPinnedOrTripleSlashCommentsOfNode; var writeComment = writeCommentRange; - var emit = emitNode; + var emitNodeWithoutSourceMap = compilerOptions.removeComments ? emitNodeWithoutSourceMapWithoutComments : emitNodeWithoutSourceMapWithComments; + var emit = emitNodeWithoutSourceMap; + var emitWithoutComments = emitNodeWithoutSourceMapWithoutComments; var emitStart = function (node) { }; var emitEnd = function (node) { }; var emitToken = emitTokenText; @@ -18399,18 +19185,72 @@ var ts; initializeEmitterWithSourceMaps(); } if (root) { - emit(root); + emitSourceFile(root); } else { ts.forEach(host.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emit(sourceFile); + emitSourceFile(sourceFile); } }); } writeLine(); writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); return; + function emitSourceFile(sourceFile) { + currentSourceFile = sourceFile; + emit(sourceFile); + } + function enterNameScope() { + var names = currentScopeNames; + currentScopeNames = undefined; + if (names) { + lastFrame = { names: names, previous: lastFrame }; + return true; + } + return false; + } + function exitNameScope(popFrame) { + if (popFrame) { + currentScopeNames = lastFrame.names; + lastFrame = lastFrame.previous; + } + else { + currentScopeNames = undefined; + } + } + function generateUniqueNameForLocation(location, baseName) { + var _name; + if (!isExistingName(location, baseName)) { + _name = baseName; + } + else { + _name = ts.generateUniqueName(baseName, function (n) { return isExistingName(location, n); }); + } + return recordNameInCurrentScope(_name); + } + function recordNameInCurrentScope(name) { + if (!currentScopeNames) { + currentScopeNames = {}; + } + return currentScopeNames[name] = name; + } + function isExistingName(location, name) { + if (!resolver.isUnknownIdentifier(location, name)) { + return true; + } + if (currentScopeNames && ts.hasProperty(currentScopeNames, name)) { + return true; + } + var frame = lastFrame; + while (frame) { + if (ts.hasProperty(frame.names, name)) { + return true; + } + frame = frame.previous; + } + return false; + } function initializeEmitterWithSourceMaps() { var sourceMapDir; var sourceMapSourceIndex = -1; @@ -18535,8 +19375,8 @@ var ts; if (scopeName) { var parentIndex = getSourceMapNameIndex(); if (parentIndex !== -1) { - var name = node.name; - if (!name || name.kind !== 126) { + var _name = node.name; + if (!_name || _name.kind !== 126) { scopeName = "." + scopeName; } scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; @@ -18563,8 +19403,10 @@ var ts; node.kind === 196 || node.kind === 199) { if (node.name) { - var name = node.name; - scopeName = name.kind === 126 ? ts.getTextOfNode(name) : node.name.text; + var _name = node.name; + scopeName = _name.kind === 126 + ? ts.getTextOfNode(_name) + : node.name.text; } recordScopeNameStart(scopeName); } @@ -18642,21 +19484,32 @@ var ts; else { sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); } - function emitNodeWithMap(node) { + function emitNodeWithSourceMap(node) { if (node) { - if (node.kind != 220) { + if (ts.nodeIsSynthesized(node)) { + return emitNodeWithoutSourceMap(node); + } + if (node.kind != 221) { recordEmitNodeStartSpan(node); - emitNode(node); + emitNodeWithoutSourceMap(node); recordEmitNodeEndSpan(node); } else { recordNewSourceFileStart(node); - emitNode(node); + emitNodeWithoutSourceMap(node); } } } + function emitNodeWithSourceMapWithoutComments(node) { + if (node) { + recordEmitNodeStartSpan(node); + emitNodeWithoutSourceMapWithoutComments(node); + recordEmitNodeEndSpan(node); + } + } writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithMap; + emit = emitNodeWithSourceMap; + emitWithoutComments = emitNodeWithSourceMapWithoutComments; emitStart = recordEmitNodeStartSpan; emitEnd = recordEmitNodeEndSpan; emitToken = writeTextWithSpanRecord; @@ -18667,16 +19520,21 @@ var ts; function writeJavaScriptFile(emitOutput, writeByteOrderMark) { writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); } - function createTempVariable(location, forLoopVariable) { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && resolver.isUnknownIdentifier(location, name)) { - break; + function createTempVariable(location, preferredName) { + for (var name = preferredName; !name || isExistingName(location, name); tempCount++) { + var char = 97 + tempCount; + if (char === 105 || char === 110) { + continue; + } + if (tempCount < 26) { + name = "_" + String.fromCharCode(char); + } + else { + name = "_" + (tempCount - 26); } - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + 97) : tempCount - 25); - tempCount++; } - var result = ts.createNode(64); + recordNameInCurrentScope(name); + var result = ts.createSynthesizedNode(64); result.text = name; return result; } @@ -18686,8 +19544,8 @@ var ts; } tempVariables.push(name); } - function createAndRecordTempVariable(location) { - var temp = createTempVariable(location, false); + function createAndRecordTempVariable(location, preferredName) { + var temp = createTempVariable(location, preferredName); recordTempDeclaration(temp); return temp; } @@ -18720,7 +19578,7 @@ var ts; emit(node); } } - function emitParenthesized(node, parenthesized) { + function emitParenthesizedIf(node, parenthesized) { if (parenthesized) { write("("); } @@ -18737,7 +19595,7 @@ var ts; function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { ts.Debug.assert(nodes.length > 0); increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -18747,7 +19605,7 @@ var ts; } for (var i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -18757,12 +19615,11 @@ var ts; } emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes)); if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -18807,37 +19664,109 @@ var ts; emit(nodes[i]); } } - function isBinaryOrOctalIntegerLiteral(text) { - if (text.length <= 0) { - return false; - } - if (text.charCodeAt(1) === 66 || text.charCodeAt(1) === 98 || - text.charCodeAt(1) === 79 || text.charCodeAt(1) === 111) { - return true; + function isBinaryOrOctalIntegerLiteral(node, text) { + if (node.kind === 7 && text.length > 1) { + switch (text.charCodeAt(1)) { + case 98: + case 66: + case 111: + case 79: + return true; + } } return false; } function emitLiteral(node) { - var text = languageVersion < 2 && ts.isTemplateLiteralKind(node.kind) ? getTemplateLiteralAsStringLiteral(node) : node.parent ? ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node) : node.text; + var text = getLiteralText(node); if (compilerOptions.sourceMap && (node.kind === 8 || ts.isTemplateLiteralKind(node.kind))) { writer.writeLiteral(text); } - else if (languageVersion < 2 && node.kind === 7 && isBinaryOrOctalIntegerLiteral(text)) { + else if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) { write(node.text); } else { write(text); } } - function getTemplateLiteralAsStringLiteral(node) { - return '"' + ts.escapeString(node.text) + '"'; + function getLiteralText(node) { + if (languageVersion < 2 && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { + return getQuotedEscapedLiteralText('"', node.text, '"'); + } + if (node.parent) { + return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + } + switch (node.kind) { + case 8: + return getQuotedEscapedLiteralText('"', node.text, '"'); + case 10: + return getQuotedEscapedLiteralText('`', node.text, '`'); + case 11: + return getQuotedEscapedLiteralText('`', node.text, '${'); + case 12: + return getQuotedEscapedLiteralText('}', node.text, '${'); + case 13: + return getQuotedEscapedLiteralText('}', node.text, '`'); + case 7: + return node.text; + } + ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); + } + function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { + return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; + } + function emitDownlevelRawTemplateLiteral(node) { + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var isLast = node.kind === 10 || node.kind === 13; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + text = text.replace(/\r\n?/g, "\n"); + text = ts.escapeString(text); + write('"' + text + '"'); + } + function emitDownlevelTaggedTemplateArray(node, literalEmitter) { + write("["); + if (node.template.kind === 10) { + literalEmitter(node.template); + } + else { + literalEmitter(node.template.head); + ts.forEach(node.template.templateSpans, function (child) { + write(", "); + literalEmitter(child.literal); + }); + } + write("]"); + } + function emitDownlevelTaggedTemplate(node) { + var tempVariable = createAndRecordTempVariable(node); + write("("); + emit(tempVariable); + write(" = "); + emitDownlevelTaggedTemplateArray(node, emit); + write(", "); + emit(tempVariable); + write(".raw = "); + emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); + write(", "); + emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); + write("("); + emit(tempVariable); + if (node.template.kind === 169) { + ts.forEach(node.template.templateSpans, function (templateSpan) { + write(", "); + var needsParens = templateSpan.expression.kind === 167 + && templateSpan.expression.operatorToken.kind === 23; + emitParenthesizedIf(templateSpan.expression, needsParens); + }); + } + write("))"); } function emitTemplateExpression(node) { if (languageVersion >= 2) { ts.forEachChild(node, emit); return; } - var emitOuterParens = ts.isExpression(node.parent) && templateNeedsParens(node, node.parent); + var emitOuterParens = ts.isExpression(node.parent) + && templateNeedsParens(node, node.parent); if (emitOuterParens) { write("("); } @@ -18846,13 +19775,14 @@ var ts; emitLiteral(node.head); headEmitted = true; } - for (var i = 0; i < node.templateSpans.length; i++) { + for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 159 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; + var needsParens = templateSpan.expression.kind !== 159 + && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); } - emitParenthesized(templateSpan.expression, needsParens); + emitParenthesizedIf(templateSpan.expression, needsParens); if (templateSpan.literal.text.length !== 0) { write(" + "); emitLiteral(templateSpan.literal); @@ -18922,16 +19852,16 @@ var ts; } } function isNotExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { + var _parent = node.parent; + switch (_parent.kind) { case 128: case 193: case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 195: @@ -18942,16 +19872,14 @@ var ts; case 197: case 199: case 200: - case 202: - return parent.name === node; + case 203: + return _parent.name === node; case 185: case 184: - case 208: + case 209: return false; case 189: return node.parent.label === node; - case 216: - return node.parent.name === node; } } function emitExpressionIdentifier(node) { @@ -18963,7 +19891,18 @@ var ts; writeTextOfNode(currentSourceFile, node); } } + function getBlockScopedVariableId(node) { + return !ts.nodeIsSynthesized(node) && resolver.getBlockScopedVariableId(node); + } function emitIdentifier(node) { + var variableId = getBlockScopedVariableId(node); + if (variableId !== undefined && generatedBlockScopeNames) { + var text = generatedBlockScopeNames[variableId]; + if (text) { + write(text); + return; + } + } if (!node.parent) { write(node.text); } @@ -19026,7 +19965,7 @@ var ts; write("..."); emit(node.expression); } - function needsParenthesisForPropertyAccess(node) { + function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 64: case 151: @@ -19041,8 +19980,8 @@ var ts; function emitListWithSpread(elements, multiLine, trailingComma) { var pos = 0; var group = 0; - var length = elements.length; - while (pos < length) { + var _length = elements.length; + while (pos < _length) { if (group === 1) { write(".concat("); } @@ -19052,19 +19991,19 @@ var ts; var e = elements[pos]; if (e.kind === 171) { e = e.expression; - emitParenthesized(e, group === 0 && needsParenthesisForPropertyAccess(e)); + emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; } else { var i = pos; - while (i < length && elements[i].kind !== 171) { + while (i < _length && elements[i].kind !== 171) { i++; } write("["); if (multiLine) { increaseIndent(); } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); + emitList(elements, pos, i - pos, multiLine, trailingComma && i === _length); if (multiLine) { decreaseIndent(); } @@ -19091,24 +20030,18 @@ var ts; write("]"); } else { - emitListWithSpread(elements, (node.flags & 256) !== 0, elements.hasTrailingComma); + emitListWithSpread(elements, (node.flags & 512) !== 0, elements.hasTrailingComma); } } - function createSynthesizedNode(kind) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - return node; - } function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { var parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); return emit(parenthesizedObjectLiteral); } function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral, firstComputedPropertyIndex) { var tempVar = createAndRecordTempVariable(originalObjectLiteral); - var initialObjectLiteral = createSynthesizedNode(152); + var initialObjectLiteral = ts.createSynthesizedNode(152); initialObjectLiteral.properties = originalObjectLiteral.properties.slice(0, firstComputedPropertyIndex); - initialObjectLiteral.flags |= 256; + initialObjectLiteral.flags |= 512; var propertyPatches = createBinaryExpression(tempVar, 52, initialObjectLiteral); ts.forEach(originalObjectLiteral.properties, function (property) { var patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); @@ -19116,7 +20049,7 @@ var ts; propertyPatches = createBinaryExpression(propertyPatches, 23, patchedProperty); } }); - propertyPatches = createBinaryExpression(propertyPatches, 23, tempVar); + propertyPatches = createBinaryExpression(propertyPatches, 23, createIdentifier(tempVar.text, true)); var result = createParenthesizedExpression(propertyPatches); return result; } @@ -19127,13 +20060,13 @@ var ts; function tryCreatePatchingPropertyAssignment(objectLiteral, tempVar, property) { var leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); var maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); - return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide); + return maybeRightHandSide && createBinaryExpression(leftHandSide, 52, maybeRightHandSide, true); } function tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property) { switch (property.kind) { - case 217: - return property.initializer; case 218: + return property.initializer; + case 219: return createIdentifier(resolver.getExpressionNameSubstitution(property.name)); case 132: return createFunctionExpression(property.parameters, property.body); @@ -19143,17 +20076,17 @@ var ts; if (firstAccessor !== property) { return undefined; } - var propertyDescriptor = createSynthesizedNode(152); + var propertyDescriptor = ts.createSynthesizedNode(152); var descriptorProperties = []; if (getAccessor) { - var getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); - descriptorProperties.push(getProperty); + var _getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); + descriptorProperties.push(_getProperty); } if (setAccessor) { var setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); descriptorProperties.push(setProperty); } - var trueExpr = createSynthesizedNode(94); + var trueExpr = ts.createSynthesizedNode(94); var enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); descriptorProperties.push(enumerableTrue); var configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); @@ -19166,7 +20099,7 @@ var ts; } } function createParenthesizedExpression(expression) { - var result = createSynthesizedNode(159); + var result = ts.createSynthesizedNode(159); result.expression = expression; return result; } @@ -19180,13 +20113,18 @@ var ts; result.end = -1; return result; } - function createBinaryExpression(left, operator, right) { - var result = createSynthesizedNode(167); - result.operatorToken = createSynthesizedNode(operator); + function createBinaryExpression(left, operator, right, startsOnNewLine) { + var result = ts.createSynthesizedNode(167, startsOnNewLine); + result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } + function createExpressionStatement(expression) { + var result = ts.createSynthesizedNode(177); + result.expression = expression; + return result; + } function createMemberAccessForPropertyName(expression, memberName) { if (memberName.kind === 64) { return createPropertyAccessExpression(expression, memberName); @@ -19202,36 +20140,37 @@ var ts; } } function createPropertyAssignment(name, initializer) { - var result = createSynthesizedNode(217); + var result = ts.createSynthesizedNode(218); result.name = name; result.initializer = initializer; return result; } function createFunctionExpression(parameters, body) { - var result = createSynthesizedNode(160); + var result = ts.createSynthesizedNode(160); result.parameters = parameters; result.body = body; return result; } function createPropertyAccessExpression(expression, name) { - var result = createSynthesizedNode(153); + var result = ts.createSynthesizedNode(153); result.expression = expression; + result.dotToken = ts.createSynthesizedNode(20); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = createSynthesizedNode(154); + var result = ts.createSynthesizedNode(154); result.expression = expression; result.argumentExpression = argumentExpression; return result; } - function createIdentifier(name) { - var result = createSynthesizedNode(64); + function createIdentifier(name, startsOnNewLine) { + var result = ts.createSynthesizedNode(64, startsOnNewLine); result.text = name; return result; } function createCallExpression(invokedExpression, arguments) { - var result = createSynthesizedNode(155); + var result = ts.createSynthesizedNode(155); result.expression = invokedExpression; result.arguments = arguments; return result; @@ -19254,7 +20193,6 @@ var ts; } } write("{"); - var properties = node.properties; if (properties.length) { emitLinePreservingList(node, properties, languageVersion >= 1, true); } @@ -19296,13 +20234,31 @@ var ts; } return false; } + function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { + var realNodesAreOnDifferentLines = preserveNewLines && !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { + increaseIndent(); + writeLine(); + return true; + } + else { + if (valueToWriteWhenNotIndenting) { + write(valueToWriteWhenNotIndenting); + } + return false; + } + } function emitPropertyAccess(node) { if (tryEmitConstantValue(node)) { return; } emit(node.expression); + var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); write("."); + var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); emit(node.name); + decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } function emitQualifiedName(node) { emit(node.left); @@ -19416,26 +20372,33 @@ var ts; } } function emitTaggedTemplateExpression(node) { - emit(node.tag); - write(" "); - emit(node.template); + if (compilerOptions.target >= 2) { + emit(node.tag); + write(" "); + emit(node.template); + } + else { + emitDownlevelTaggedTemplate(node); + } } function emitParenExpression(node) { - if (node.expression.kind === 158) { - var operand = node.expression.expression; - while (operand.kind == 158) { - operand = operand.expression; - } - if (operand.kind !== 165 && - operand.kind !== 164 && - operand.kind !== 163 && - operand.kind !== 162 && - operand.kind !== 166 && - operand.kind !== 156 && - !(operand.kind === 155 && node.parent.kind === 156) && - !(operand.kind === 160 && node.parent.kind === 155)) { - emit(operand); - return; + if (!node.parent || node.parent.kind !== 161) { + if (node.expression.kind === 158) { + var operand = node.expression.expression; + while (operand.kind == 158) { + operand = operand.expression; + } + if (operand.kind !== 165 && + operand.kind !== 164 && + operand.kind !== 163 && + operand.kind !== 162 && + operand.kind !== 166 && + operand.kind !== 156 && + !(operand.kind === 155 && node.parent.kind === 156) && + !(operand.kind === 160 && node.parent.kind === 155)) { + emit(operand); + return; + } } } write("("); @@ -19477,52 +20440,40 @@ var ts; function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 52 && (node.left.kind === 152 || node.left.kind === 151)) { - emitDestructuring(node); + emitDestructuring(node, node.parent.kind === 177); } else { emit(node.left); - if (node.operatorToken.kind !== 23) { - write(" "); - } + var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 ? " " : undefined); write(ts.tokenToString(node.operatorToken.kind)); - var operatorEnd = ts.getLineAndCharacterOfPosition(currentSourceFile, node.operatorToken.end); - var rightStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.right.pos)); - var onDifferentLine = operatorEnd.line !== rightStart.line; - if (onDifferentLine) { - var exprStart = ts.getLineAndCharacterOfPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - var firstCharOfExpr = getFirstNonWhitespaceCharacterIndexOnLine(exprStart.line); - var shouldIndent = rightStart.character > firstCharOfExpr; - if (shouldIndent) { - increaseIndent(); - } - writeLine(); - } - else { - write(" "); - } + var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); emit(node.right); - if (shouldIndent) { - decreaseIndent(); - } + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } } - function getFirstNonWhitespaceCharacterIndexOnLine(line) { - var lineStart = ts.getLineStarts(currentSourceFile)[line]; - var text = currentSourceFile.text; - for (var i = lineStart; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (!ts.isWhiteSpace(text.charCodeAt(i)) || ts.isLineBreak(ch)) { - break; - } - } - return i - lineStart; + function synthesizedNodeStartsOnNewLine(node) { + return ts.nodeIsSynthesized(node) && node.startsOnNewLine; } function emitConditionalExpression(node) { emit(node.condition); - write(" ? "); + var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); + write("?"); + var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); emit(node.whenTrue); - write(" : "); + decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); + var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); + write(":"); + var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); emit(node.whenFalse); + decreaseIndentIf(indentedBeforeColon, indentedAfterColon); + } + function decreaseIndentIf(value1, value2) { + if (value1) { + decreaseIndent(); + } + if (value2) { + decreaseIndent(); + } } function isSingleLineEmptyBlock(node) { if (node && node.kind === 174) { @@ -19531,7 +20482,7 @@ var ts; } } function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(14, node.pos); write(" "); emitToken(15, node.statements.end); @@ -19566,7 +20517,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesized(node.expression, node.expression.kind === 161); + emitParenthesizedIf(node.expression, node.expression.kind === 161); write(";"); } function emitIfStatement(node) { @@ -19607,6 +20558,30 @@ var ts; write(")"); emitEmbeddedStatement(node.statement); } + function emitStartOfVariableDeclarationList(decl, startPos) { + var tokenKind = 97; + if (decl && languageVersion >= 2) { + if (ts.isLet(decl)) { + tokenKind = 104; + } + else if (ts.isConst(decl)) { + tokenKind = 69; + } + } + if (startPos !== undefined) { + emitToken(tokenKind, startPos); + } + else { + switch (tokenKind) { + case 97: + return write("var "); + case 104: + return write("let "); + case 69: + return write("const "); + } + } + } function emitForStatement(node) { var endPos = emitToken(81, node.pos); write(" "); @@ -19614,17 +20589,9 @@ var ts; if (node.initializer && node.initializer.kind === 194) { var variableDeclarationList = node.initializer; var declarations = variableDeclarationList.declarations; - if (declarations[0] && ts.isLet(declarations[0])) { - emitToken(105, endPos); - } - else if (declarations[0] && ts.isConst(declarations[0])) { - emitToken(69, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(declarations[0], endPos); write(" "); - emitCommaList(variableDeclarationList.declarations); + emitCommaList(declarations); } else if (node.initializer) { emit(node.initializer); @@ -19637,6 +20604,9 @@ var ts; emitEmbeddedStatement(node.statement); } function emitForInOrForOfStatement(node) { + if (languageVersion < 2 && node.kind === 183) { + return emitDownLevelForOfStatement(node); + } var endPos = emitToken(81, node.pos); write(" "); endPos = emitToken(16, endPos); @@ -19644,12 +20614,7 @@ var ts; var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { var decl = variableDeclarationList.declarations[0]; - if (ts.isLet(decl)) { - emitToken(105, endPos); - } - else { - emitToken(97, endPos); - } + emitStartOfVariableDeclarationList(decl, endPos); write(" "); emit(decl); } @@ -19667,6 +20632,99 @@ var ts; emitToken(17, node.expression.end); emitEmbeddedStatement(node.statement); } + function emitDownLevelForOfStatement(node) { + var endPos = emitToken(81, node.pos); + write(" "); + endPos = emitToken(16, endPos); + var rhsIsIdentifier = node.expression.kind === 64; + var counter = createTempVariable(node, "_i"); + var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(node); + var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, "_n") : undefined; + emitStart(node.expression); + write("var "); + emitNodeWithoutSourceMap(counter); + write(" = 0"); + emitEnd(node.expression); + if (!rhsIsIdentifier) { + write(", "); + emitStart(node.expression); + emitNodeWithoutSourceMap(rhsReference); + write(" = "); + emitNodeWithoutSourceMap(node.expression); + emitEnd(node.expression); + } + if (cachedLength) { + write(", "); + emitNodeWithoutSourceMap(cachedLength); + write(" = "); + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write(" < "); + if (cachedLength) { + emitNodeWithoutSourceMap(cachedLength); + } + else { + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + emitEnd(node.initializer); + write("; "); + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write("++"); + emitEnd(node.initializer); + emitToken(17, node.expression.end); + write(" {"); + writeLine(); + increaseIndent(); + var rhsIterationValue = createElementAccessExpression(rhsReference, counter); + emitStart(node.initializer); + if (node.initializer.kind === 194) { + write("var "); + var variableDeclarationList = node.initializer; + if (variableDeclarationList.declarations.length > 0) { + var declaration = variableDeclarationList.declarations[0]; + if (ts.isBindingPattern(declaration.name)) { + emitDestructuring(declaration, false, rhsIterationValue); + } + else { + emitNodeWithoutSourceMap(declaration); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + emitNodeWithoutSourceMap(createTempVariable(node)); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + var assignmentExpression = createBinaryExpression(node.initializer, 52, rhsIterationValue, false); + if (node.initializer.kind === 151 || node.initializer.kind === 152) { + emitDestructuring(assignmentExpression, true, undefined, node); + } + else { + emitNodeWithoutSourceMap(assignmentExpression); + } + } + emitEnd(node.initializer); + write(";"); + if (node.statement.kind === 174) { + emitLines(node.statement.statements); + } + else { + writeLine(); + emit(node.statement); + } + writeLine(); + decreaseIndent(); + write("}"); + } function emitBreakOrContinueStatement(node) { emitToken(node.kind === 185 ? 65 : 70, node.pos); emitOptional(" ", node.label); @@ -19690,7 +20748,10 @@ var ts; emit(node.expression); endPos = emitToken(17, node.expression.end); write(" "); - emitToken(14, endPos); + emitCaseBlock(node.caseBlock, endPos); + } + function emitCaseBlock(node, startPos) { + emitToken(14, startPos); increaseIndent(); emitLines(node.clauses); decreaseIndent(); @@ -19710,7 +20771,7 @@ var ts; getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 213) { + if (node.kind === 214) { write("case "); emit(node.expression); write(":"); @@ -19718,7 +20779,7 @@ var ts; else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -19748,8 +20809,8 @@ var ts; var endPos = emitToken(67, node.pos); write(" "); emitToken(16, endPos); - emit(node.name); - emitToken(17, node.name.end); + emit(node.variableDeclaration); + emitToken(17, node.variableDeclaration ? node.variableDeclaration.end : endPos); write(" "); emitBlock(node.block); } @@ -19778,37 +20839,46 @@ var ts; emitContainingModuleName(node); write("."); } - emitNode(node.name); + emitNodeWithoutSourceMap(node.name); emitEnd(node.name); } + function createVoidZero() { + var zero = ts.createSynthesizedNode(7); + zero.text = "0"; + var result = ts.createSynthesizedNode(164); + result.expression = zero; + return result; + } function emitExportMemberAssignments(name) { - if (exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { + if (!exportDefault && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { ts.forEach(exportSpecifiers[name.text], function (specifier) { writeLine(); emitStart(specifier.name); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); emitEnd(specifier.name); write(" = "); - emitNode(name); + emitNodeWithoutSourceMap(name); write(";"); }); } } - function emitDestructuring(root, value) { + function emitDestructuring(root, isAssignmentExpressionStatement, value, lowestNonSynthesizedAncestor) { var emitCount = 0; - var isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; + var _isDeclaration = (root.kind === 193 && !(ts.getCombinedNodeFlags(root) & 1)) || root.kind === 128; if (root.kind === 167) { emitAssignmentExpression(root); } else { + ts.Debug.assert(!isAssignmentExpressionStatement); emitBindingElement(root, value); } function emitAssignment(name, value) { if (emitCount++) { write(", "); } + renameNonTopLevelLetAndConst(name); if (name.parent && (name.parent.kind === 193 || name.parent.kind === 150)) { emitModuleMemberName(name.parent); } @@ -19820,8 +20890,8 @@ var ts; } function ensureIdentifier(expr) { if (expr.kind !== 64) { - var identifier = createTempVariable(root); - if (!isDeclaration) { + var identifier = createTempVariable(lowestNonSynthesizedAncestor || root); + if (!_isDeclaration) { recordTempDeclaration(identifier); } emitAssignment(identifier, expr); @@ -19829,27 +20899,25 @@ var ts; } return expr; } - function createVoidZero() { - var zero = ts.createNode(7); - zero.text = "0"; - var result = ts.createNode(164); - result.expression = zero; - return result; - } function createDefaultValueCheck(value, defaultValue) { value = ensureIdentifier(value); - var equals = ts.createNode(167); + var equals = ts.createSynthesizedNode(167); equals.left = value; - equals.operatorToken = ts.createNode(30); + equals.operatorToken = ts.createSynthesizedNode(30); equals.right = createVoidZero(); - var cond = ts.createNode(168); - cond.condition = equals; - cond.whenTrue = defaultValue; - cond.whenFalse = value; + return createConditionalExpression(equals, defaultValue, value); + } + function createConditionalExpression(condition, whenTrue, whenFalse) { + var cond = ts.createSynthesizedNode(168); + cond.condition = condition; + cond.questionToken = ts.createSynthesizedNode(50); + cond.whenTrue = whenTrue; + cond.colonToken = ts.createSynthesizedNode(51); + cond.whenFalse = whenFalse; return cond; } function createNumericLiteral(value) { - var node = ts.createNode(7); + var node = ts.createSynthesizedNode(7); node.text = "" + value; return node; } @@ -19857,7 +20925,7 @@ var ts; if (expr.kind === 64 || expr.kind === 153 || expr.kind === 154) { return expr; } - var node = ts.createNode(159); + var node = ts.createSynthesizedNode(159); node.expression = expr; return node; } @@ -19865,13 +20933,10 @@ var ts; if (propName.kind !== 64) { return createElementAccess(object, propName); } - var node = ts.createNode(153); - node.expression = parenthesizeForAccess(object); - node.name = propName; - return node; + return createPropertyAccessExpression(parenthesizeForAccess(object), propName); } function createElementAccess(object, index) { - var node = ts.createNode(154); + var node = ts.createSynthesizedNode(154); node.expression = parenthesizeForAccess(object); node.argumentExpression = index; return node; @@ -19881,9 +20946,9 @@ var ts; if (properties.length !== 1) { value = ensureIdentifier(value); } - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; - if (p.kind === 217 || p.kind === 218) { + for (var _i = 0, _n = properties.length; _i < _n; _i++) { + var p = properties[_i]; + if (p.kind === 218 || p.kind === 219) { var propName = (p.name); emitDestructuringAssignment(p.initializer || propName, createPropertyAccess(value, propName)); } @@ -19927,18 +20992,18 @@ var ts; } function emitAssignmentExpression(root) { var target = root.left; - var value = root.right; - if (root.parent.kind === 177) { - emitDestructuringAssignment(target, value); + var _value = root.right; + if (isAssignmentExpressionStatement) { + emitDestructuringAssignment(target, _value); } else { if (root.parent.kind !== 159) { write("("); } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); + _value = ensureIdentifier(_value); + emitDestructuringAssignment(target, _value); write(", "); - emit(value); + emit(_value); if (root.parent.kind !== 159) { write(")"); } @@ -19985,7 +21050,7 @@ var ts; function emitVariableDeclaration(node) { if (ts.isBindingPattern(node.name)) { if (languageVersion < 2) { - emitDestructuring(node); + emitDestructuring(node, false); } else { emit(node.name); @@ -19993,30 +21058,65 @@ var ts; } } else { + renameNonTopLevelLetAndConst(node.name); emitModuleMemberName(node); - emitOptional(" = ", node.initializer); + var initializer = node.initializer; + if (!initializer && languageVersion < 2) { + var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256) && + (getCombinedFlagsForIdentifier(node.name) & 4096); + if (isUninitializedLet && + node.parent.parent.kind !== 182 && + node.parent.parent.kind !== 183) { + initializer = createVoidZero(); + } + } + emitOptional(" = ", initializer); } } function emitExportVariableAssignments(node) { - var name = node.name; - if (name.kind === 64) { - emitExportMemberAssignments(name); + var _name = node.name; + if (_name.kind === 64) { + emitExportMemberAssignments(_name); } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); + else if (ts.isBindingPattern(_name)) { + ts.forEach(_name.elements, emitExportVariableAssignments); } } + function getCombinedFlagsForIdentifier(node) { + if (!node.parent || (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return 0; + } + return ts.getCombinedNodeFlags(node.parent); + } + function renameNonTopLevelLetAndConst(node) { + if (languageVersion >= 2 || + ts.nodeIsSynthesized(node) || + node.kind !== 64 || + (node.parent.kind !== 193 && node.parent.kind !== 150)) { + return; + } + var combinedFlags = getCombinedFlagsForIdentifier(node); + if (((combinedFlags & 12288) === 0) || combinedFlags & 1) { + return; + } + var list = ts.getAncestor(node, 194); + if (list.parent.kind === 175 && list.parent.parent.kind === 221) { + return; + } + var blockScopeContainer = ts.getEnclosingBlockScopeContainer(node); + var _parent = blockScopeContainer.kind === 221 + ? blockScopeContainer + : blockScopeContainer.parent; + var generatedName = generateUniqueNameForLocation(_parent, node.text); + var variableId = resolver.getBlockScopedVariableId(node); + if (!generatedBlockScopeNames) { + generatedBlockScopeNames = []; + } + generatedBlockScopeNames[variableId] = generatedName; + } function emitVariableStatement(node) { if (!(node.flags & 1)) { - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } + emitStartOfVariableDeclarationList(node.declarationList); } emitCommaList(node.declarationList.declarations); write(";"); @@ -20027,12 +21127,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name = createTempVariable(node); + var _name = createTempVariable(node); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name); - emit(name); + tempParameters.push(_name); + emit(_name); } else { emit(node.name); @@ -20053,7 +21153,7 @@ var ts; if (ts.isBindingPattern(p.name)) { writeLine(); write("var "); - emitDestructuring(p, tempParameters[tempIndex]); + emitDestructuring(p, false, tempParameters[tempIndex]); write(";"); tempIndex++; } @@ -20061,14 +21161,14 @@ var ts; writeLine(); emitStart(p); write("if ("); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" === void 0)"); emitEnd(p); write(" { "); emitStart(p); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" = "); - emitNode(p.initializer); + emitNodeWithoutSourceMap(p.initializer); emitEnd(p); write("; }"); } @@ -20079,12 +21179,12 @@ var ts; if (languageVersion < 2 && ts.hasRestParameters(node)) { var restIndex = node.parameters.length - 1; var restParam = node.parameters[restIndex]; - var tempName = createTempVariable(node, true).text; + var tempName = createTempVariable(node, "_i").text; writeLine(); emitLeadingComments(restParam); emitStart(restParam); write("var "); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write(" = [];"); emitEnd(restParam); emitTrailingComments(restParam); @@ -20105,7 +21205,7 @@ var ts; increaseIndent(); writeLine(); emitStart(restParam); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); emitEnd(restParam); decreaseIndent(); @@ -20121,6 +21221,14 @@ var ts; function shouldEmitAsArrowFunction(node) { return node.kind === 161 && languageVersion >= 2; } + function emitDeclarationName(node) { + if (node.name) { + emitNodeWithoutSourceMap(node.name); + } + else { + write(resolver.getGeneratedNameForNode(node)); + } + } function emitFunctionDeclaration(node) { if (ts.nodeIsMissing(node.body)) { return emitPinnedOrTripleSlashComments(node); @@ -20132,10 +21240,10 @@ var ts; write("function "); } if (node.kind === 195 || (node.kind === 160 && node.name)) { - emit(node.name); + emitDeclarationName(node); } emitSignatureAndBody(node); - if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.kind === 195 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } if (node.kind !== 132 && node.kind !== 131) { @@ -20175,6 +21283,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); if (shouldEmitAsArrowFunction(node)) { emitSignatureParametersForArrow(node); write(" =>"); @@ -20191,15 +21300,16 @@ var ts; else { emitExpressionFunctionBody(node, node.body); } - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20215,7 +21325,11 @@ var ts; return; } write(" "); - emit(body); + var current = body; + while (current.kind === 158) { + current = current.expression; + } + emitParenthesizedIf(body, current.kind === 152); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -20226,11 +21340,11 @@ var ts; emitFunctionBodyPreamble(node); var preambleEmitted = writer.getTextPos() !== outPos; decreaseIndent(); - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); - emitNode(body, true); + emitWithoutComments(body); emitEnd(body); write(";"); emitTempDeclarations(false); @@ -20241,7 +21355,7 @@ var ts; writeLine(); emitLeadingComments(node.body); write("return "); - emit(node.body, true); + emitWithoutComments(node.body); write(";"); emitTrailingComments(node.body); emitTempDeclarations(true); @@ -20254,49 +21368,20 @@ var ts; scopeEmitEnd(); } function emitBlockFunctionBody(node, body) { - if (body.statements.length === 0 && !anyParameterHasBindingPatternOrInitializer(node)) { - emitFunctionBodyWithNoStatements(node, body); - } - else { - emitFunctionBodyWithStatements(node, body); - } - } - function anyParameterHasBindingPatternOrInitializer(func) { - return ts.forEach(func.parameters, hasBindingPatternOrInitializer); - } - function hasBindingPatternOrInitializer(parameter) { - return parameter.initializer || ts.isBindingPattern(parameter.name); - } - function emitFunctionBodyWithNoStatements(node, body) { - var singleLine = isSingleLineEmptyBlock(node.body); - write(" {"); - if (singleLine) { - write(" "); - } - else { - increaseIndent(); - writeLine(); - } - emitLeadingCommentsOfPosition(body.statements.end); - if (!singleLine) { - decreaseIndent(); - } - emitToken(15, body.statements.end); - } - function emitFunctionBodyWithStatements(node, body) { write(" {"); scopeEmitStart(node); - var outPos = writer.getTextPos(); + var initialTextPos = writer.getTextPos(); increaseIndent(); emitDetachedComments(body.statements); var startIndex = emitDirectivePrologues(body.statements, true); emitFunctionBodyPreamble(node); decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== outPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var i = 0, n = body.statements.length; i < n; i++) { + var preambleEmitted = writer.getTextPos() !== initialTextPos; + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + for (var _i = 0, _a = body.statements, _n = _a.length; _i < _n; _i++) { + var statement = _a[_i]; write(" "); - emit(body.statements[i]); + emit(statement); } emitTempDeclarations(false); write(" "); @@ -20334,7 +21419,7 @@ var ts; emitStart(param); emitStart(param.name); write("this."); - emitNode(param.name); + emitNodeWithoutSourceMap(param.name); emitEnd(param.name); write(" = "); emit(param.name); @@ -20346,7 +21431,7 @@ var ts; function emitMemberAccessForPropertyName(memberName) { if (memberName.kind === 8 || memberName.kind === 7) { write("["); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); write("]"); } else if (memberName.kind === 126) { @@ -20354,7 +21439,7 @@ var ts; } else { write("."); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); } } function emitMemberAssignments(node, staticFlag) { @@ -20365,7 +21450,7 @@ var ts; emitStart(member); emitStart(member.name); if (staticFlag) { - emitNode(node.name); + emitDeclarationName(node); } else { write("this"); @@ -20390,7 +21475,7 @@ var ts; emitLeadingComments(member); emitStart(member); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20411,7 +21496,7 @@ var ts; emitStart(member); write("Object.defineProperty("); emitStart(member.name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & 128)) { write(".prototype"); } @@ -20456,7 +21541,7 @@ var ts; } function emitClassDeclaration(node) { write("var "); - emit(node.name); + emitDeclarationName(node); write(" = (function ("); var baseTypeNode = ts.getClassBaseTypeNode(node); if (baseTypeNode) { @@ -20469,7 +21554,7 @@ var ts; writeLine(); emitStart(baseTypeNode); write("__extends("); - emit(node.name); + emitDeclarationName(node); write(", _super);"); emitEnd(baseTypeNode); } @@ -20478,11 +21563,10 @@ var ts; emitMemberFunctions(node); emitMemberAssignments(node, 128); writeLine(); - function emitClassReturnStatement() { + emitToken(15, node.members.end, function () { write("return "); - emitNode(node.name); - } - emitToken(15, node.members.end, emitClassReturnStatement); + emitDeclarationName(node); + }); write(";"); decreaseIndent(); writeLine(); @@ -20495,16 +21579,16 @@ var ts; } write(");"); emitEnd(node); - if (node.flags & 1) { + if (node.flags & 1 && !(node.flags & 256)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } - if (languageVersion < 2 && node.parent === currentSourceFile) { + if (languageVersion < 2 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } function emitConstructorOfClass() { @@ -20514,6 +21598,7 @@ var ts; tempCount = 0; tempVariables = undefined; tempParameters = undefined; + var popFrame = enterNameScope(); ts.forEach(node.members, function (member) { if (member.kind === 133 && !member.body) { emitPinnedOrTripleSlashComments(member); @@ -20525,7 +21610,7 @@ var ts; } emitStart(ctor || node); write("function "); - emit(node.name); + emitDeclarationName(node); emitSignatureParameters(ctor); write(" {"); scopeEmitStart(node, "constructor"); @@ -20534,11 +21619,12 @@ var ts; emitDetachedComments(ctor.body.statements); } emitCaptureThisForNodeIfNecessary(node); + var superCall; if (ctor) { emitDefaultValueAssignments(ctor); emitRestParameter(ctor); if (baseTypeNode) { - var superCall = findInitialSuperCall(ctor); + superCall = findInitialSuperCall(ctor); if (superCall) { writeLine(); emit(superCall); @@ -20573,6 +21659,7 @@ var ts; if (ctor) { emitTrailingComments(ctor); } + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; tempParameters = saveTempParameters; @@ -20691,7 +21778,9 @@ var ts; var saveTempVariables = tempVariables; tempCount = 0; tempVariables = undefined; + var popFrame = enterNameScope(); emit(node.body); + exitNameScope(popFrame); tempCount = saveTempCount; tempVariables = saveTempVariables; } @@ -20780,7 +21869,7 @@ var ts; emitImportDeclaration(node); return; } - if (resolver.isReferencedImportDeclaration(node) || + if (resolver.isReferencedAliasDeclaration(node) || (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); @@ -20810,11 +21899,11 @@ var ts; emitStart(specifier); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); write(" = "); write(generatedName); write("."); - emitNode(specifier.propertyName || specifier.name); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); write(";"); emitEnd(specifier); }); @@ -20832,15 +21921,15 @@ var ts; } } function createExternalImportInfo(node) { - if (node.kind === 202) { - if (node.moduleReference.kind === 212) { + if (node.kind === 203) { + if (node.moduleReference.kind === 213) { return { rootNode: node, declarationNode: node }; } } - else if (node.kind === 203) { + else if (node.kind === 204) { var importClause = node.importClause; if (importClause) { if (importClause.name) { @@ -20849,7 +21938,7 @@ var ts; declarationNode: importClause }; } - if (importClause.namedBindings.kind === 205) { + if (importClause.namedBindings.kind === 206) { return { rootNode: node, declarationNode: importClause.namedBindings @@ -20865,7 +21954,7 @@ var ts; rootNode: node }; } - else if (node.kind === 209) { + else if (node.kind === 210) { if (node.moduleSpecifier) { return { rootNode: node @@ -20876,17 +21965,29 @@ var ts; function createExternalModuleInfo(sourceFile) { externalImports = []; exportSpecifiers = {}; + exportDefault = undefined; ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 209 && !node.moduleSpecifier) { + if (node.kind === 210 && !node.moduleSpecifier) { ts.forEach(node.exportClause.elements, function (specifier) { - var name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (specifier.name.text === "default") { + exportDefault = exportDefault || specifier; + } + var _name = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[_name] || (exportSpecifiers[_name] = [])).push(specifier); }); } + else if (node.kind === 209) { + exportDefault = exportDefault || node; + } + else if (node.kind === 195 || node.kind === 196) { + if (node.flags & 1 && node.flags & 256) { + exportDefault = exportDefault || node; + } + } else { var info = createExternalImportInfo(node); if (info) { - if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedImportDeclaration(node)) { + if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedAliasDeclaration(node)) { externalImports.push(info); } } @@ -20895,8 +21996,8 @@ var ts; } function getExternalImportInfo(node) { if (externalImports) { - for (var i = 0; i < externalImports.length; i++) { - var info = externalImports[i]; + for (var _i = 0, _n = externalImports.length; _i < _n; _i++) { + var info = externalImports[_i]; if (info.rootNode === node) { return info; } @@ -20905,7 +22006,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 208) { + if (node.kind === 209) { return node; } }); @@ -20967,18 +22068,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { - writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("return "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); - } + emitExportDefault(node, true); decreaseIndent(); writeLine(); write("});"); @@ -20987,17 +22077,24 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { + emitExportDefault(node, false); + } + function emitExportDefault(sourceFile, emitAsReturn) { + if (exportDefault && resolver.hasExportDefaultValue(sourceFile)) { writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("module.exports = "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); + emitStart(exportDefault); + write(emitAsReturn ? "return " : "module.exports = "); + if (exportDefault.kind === 209) { + emit(exportDefault.expression); + } + else if (exportDefault.kind === 212) { + emit(exportDefault.propertyName); + } + else { + emitDeclarationName(exportDefault); + } write(";"); - emitEnd(exportAssignment); + emitEnd(exportDefault); } } function emitDirectivePrologues(statements, startWithNewLine) { @@ -21014,8 +22111,7 @@ var ts; } return statements.length; } - function emitSourceFile(node) { - currentSourceFile = node; + function emitSourceFileNode(node) { writeLine(); emitDetachedComments(node); var startIndex = emitDirectivePrologues(node.statements, false); @@ -21048,36 +22144,46 @@ var ts; else { externalImports = undefined; exportSpecifiers = undefined; + exportDefault = undefined; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); } emitLeadingComments(node.endOfFileToken); } - function emitNode(node, disableComments) { + function emitNodeWithoutSourceMapWithComments(node) { if (!node) { return; } if (node.flags & 2) { return emitPinnedOrTripleSlashComments(node); } - var emitComments = !disableComments && shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { + var _emitComments = shouldEmitLeadingAndTrailingComments(node); + if (_emitComments) { emitLeadingComments(node); } emitJavaScriptWorker(node); - if (emitComments) { + if (_emitComments) { emitTrailingComments(node); } } + function emitNodeWithoutSourceMapWithoutComments(node) { + if (!node) { + return; + } + if (node.flags & 2) { + return emitPinnedOrTripleSlashComments(node); + } + emitJavaScriptWorker(node); + } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { case 197: case 195: + case 204: case 203: - case 202: case 198: - case 208: + case 209: return false; case 200: return shouldEmitModuleDeclaration(node); @@ -21132,9 +22238,9 @@ var ts; return emitArrayLiteral(node); case 152: return emitObjectLiteral(node); - case 217: - return emitPropertyAssignment(node); case 218: + return emitPropertyAssignment(node); + case 219: return emitShorthandPropertyAssignment(node); case 126: return emitComputedPropertyName(node); @@ -21203,8 +22309,8 @@ var ts; return emitWithStatement(node); case 188: return emitSwitchStatement(node); - case 213: case 214: + case 215: return emitCaseOrDefaultClause(node); case 189: return emitLabelledStatement(node); @@ -21212,7 +22318,7 @@ var ts; return emitThrowStatement(node); case 191: return emitTryStatement(node); - case 216: + case 217: return emitCatchClause(node); case 192: return emitDebuggerStatement(node); @@ -21224,18 +22330,18 @@ var ts; return emitInterfaceDeclaration(node); case 199: return emitEnumDeclaration(node); - case 219: + case 220: return emitEnumMember(node); case 200: return emitModuleDeclaration(node); - case 203: + case 204: return emitImportDeclaration(node); - case 202: + case 203: return emitImportEqualsDeclaration(node); - case 209: + case 210: return emitExportDeclaration(node); - case 220: - return emitSourceFile(node); + case 221: + return emitSourceFileNode(node); } } function hasDetachedComments(pos) { @@ -21253,7 +22359,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 220 || node.pos !== node.parent.pos) { + if (node.parent.kind === 221 || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -21272,7 +22378,7 @@ var ts; } function emitTrailingDeclarationComments(node) { if (node.parent) { - if (node.parent.kind === 220 || node.end !== node.parent.end) { + if (node.parent.kind === 221 || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); } @@ -21322,7 +22428,7 @@ var ts; } } } - function emitPinnedOrTripleSlashCommentsOfNode(node) { + function emitPinnedOrTripleSlashComments(node) { var pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); function isPinnedOrTripleSlashComment(comment) { if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) { @@ -21367,6 +22473,8 @@ var ts; var ts; (function (ts) { ts.emitTime = 0; + ts.ioReadTime = 0; + ts.version = "1.5.0.0"; function createCompilerHost(options) { var currentDirectory; var existingDirectories = {}; @@ -21375,12 +22483,17 @@ var ts; } var unsupportedFileEncodingErrorCode = -2147024809; function getSourceFile(fileName, languageVersion, onError) { + var text; try { - var text = ts.sys.readFile(fileName, options.charset); + var start = new Date().getTime(); + text = ts.sys.readFile(fileName, options.charset); + ts.ioReadTime += new Date().getTime() - start; } catch (e) { if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText : e.message); + onError(e.number === unsupportedFileEncodingErrorCode + ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText + : e.message); } text = ""; } @@ -21513,8 +22626,9 @@ var ts; if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; } + var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); var start = new Date().getTime(); - var emitResult = ts.emitFiles(getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile), getEmitHost(writeFileCallback), sourceFile); + var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); ts.emitTime += new Date().getTime() - start; return emitResult; } @@ -21563,9 +22677,11 @@ var ts; processSourceFile(ts.normalizePath(fileName), isDefaultLib); } function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { + var start; + var _length; if (refEnd !== undefined && refPos !== undefined) { - var start = refPos; - var length = refEnd - refPos; + start = refPos; + _length = refEnd - refPos; } var diagnostic; if (hasExtension(fileName)) { @@ -21590,7 +22706,7 @@ var ts; } if (diagnostic) { if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, start, length, diagnostic, fileName)); + diagnostics.add(ts.createFileDiagnostic(refFile, start, _length, diagnostic, fileName)); } else { diagnostics.add(ts.createCompilerDiagnostic(diagnostic, fileName)); @@ -21631,17 +22747,17 @@ var ts; files.push(file); } } + return file; } - return file; function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName[canonicalName]; - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; + var _file = filesByName[canonicalName]; + if (_file && host.useCaseSensitiveFileNames()) { + var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(_file.fileName, host.getCurrentDirectory()) : _file.fileName; if (canonicalName !== sourceFileName) { diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); } } - return file; + return _file; } } function processReferencedFiles(file, basePath) { @@ -21652,7 +22768,7 @@ var ts; } function processImportedModules(file, basePath) { ts.forEach(file.statements, function (node) { - if (node.kind === 203 || node.kind === 202 || node.kind === 209) { + if (node.kind === 204 || node.kind === 203 || node.kind === 210) { var moduleNameExpr = ts.getExternalModuleName(node); if (moduleNameExpr && moduleNameExpr.kind === 8) { var moduleNameText = moduleNameExpr.text; @@ -21679,10 +22795,10 @@ var ts; var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); var moduleName = nameLiteral.text; if (moduleName) { - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - var tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); + var _searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); + var tsFile = findModuleSourceFile(_searchName + ".ts", nameLiteral); if (!tsFile) { - findModuleSourceFile(searchName + ".d.ts", nameLiteral); + findModuleSourceFile(_searchName + ".d.ts", nameLiteral); } } } @@ -21703,20 +22819,19 @@ var ts; } return; } - var firstExternalModule = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (firstExternalModule && !options.module) { - var externalModuleErrorSpan = ts.getErrorSpanForNode(firstExternalModule.externalModuleIndicator); - var errorStart = ts.skipTrivia(firstExternalModule.text, externalModuleErrorSpan.pos); - var errorLength = externalModuleErrorSpan.end - errorStart; - diagnostics.add(ts.createFileDiagnostic(firstExternalModule, errorStart, errorLength, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); + if (firstExternalModuleSourceFile && !options.module) { + var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); + diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); } if (options.outDir || options.sourceRoot || (options.mapRoot && - (!options.out || firstExternalModule !== undefined))) { + (!options.out || firstExternalModuleSourceFile !== undefined))) { var commonPathComponents; ts.forEach(files, function (sourceFile) { - if (!(sourceFile.flags & 1024) && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { + if (!(sourceFile.flags & 2048) + && !ts.fileExtensionIs(sourceFile.fileName, ".js")) { var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); sourcePathComponents.pop(); if (commonPathComponents) { @@ -21894,6 +23009,18 @@ var ts; description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveNewLines", + type: "boolean", + description: ts.Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, + { + name: "cacheDownlevelForOfLength", + type: "boolean", + description: "Cache length access when downlevel emitting for-of statements", + experimental: true + }, { name: "target", shortName: "t", @@ -22124,24 +23251,24 @@ var ts; switch (n.kind) { case 174: if (!ts.isFunctionBlock(n)) { - var parent = n.parent; + var _parent = n.parent; var openBrace = ts.findChildOfKind(n, 14, sourceFile); var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - if (parent.kind === 179 || - parent.kind === 182 || - parent.kind === 183 || - parent.kind === 181 || - parent.kind === 178 || - parent.kind === 180 || - parent.kind === 187 || - parent.kind === 216) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + if (_parent.kind === 179 || + _parent.kind === 182 || + _parent.kind === 183 || + _parent.kind === 181 || + _parent.kind === 178 || + _parent.kind === 180 || + _parent.kind === 187 || + _parent.kind === 217) { + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(_parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -22161,20 +23288,22 @@ var ts; }); break; } - case 201: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); + case 201: { + var _openBrace = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n.parent, _openBrace, _closeBrace, autoCollapse(n)); break; + } case 196: case 197: case 199: case 152: - case 188: - var openBrace = ts.findChildOfKind(n, 14, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15, sourceFile); - addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); + case 202: { + var _openBrace_1 = ts.findChildOfKind(n, 14, sourceFile); + var _closeBrace_1 = ts.findChildOfKind(n, 15, sourceFile); + addOutliningSpan(n, _openBrace_1, _closeBrace_1, autoCollapse(n)); break; + } case 151: var openBracket = ts.findChildOfKind(n, 18, sourceFile); var closeBracket = ts.findChildOfKind(n, 19, sourceFile); @@ -22201,8 +23330,8 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var declarations = sourceFile.getNamedDeclarations(); - for (var i = 0, n = declarations.length; i < n; i++) { - var declaration = declarations[i]; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; var name = getDeclarationName(declaration); if (name !== undefined) { var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name); @@ -22233,8 +23362,9 @@ var ts; return items; function allMatchesAreCaseSensitive(matches) { ts.Debug.assert(matches.length > 0); - for (var i = 0, n = matches.length; i < n; i++) { - if (!matches[i].isCaseSensitive) { + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + if (!match.isCaseSensitive) { return false; } } @@ -22312,14 +23442,15 @@ var ts; } function bestMatchKind(matches) { ts.Debug.assert(matches.length > 0); - var bestMatchKind = 3; - for (var i = 0, n = matches.length; i < n; i++) { - var kind = matches[i].kind; - if (kind < bestMatchKind) { - bestMatchKind = kind; + var _bestMatchKind = 3; + for (var _i = 0, _n = matches.length; _i < _n; _i++) { + var match = matches[_i]; + var kind = match.kind; + if (kind < _bestMatchKind) { + _bestMatchKind = kind; } } - return bestMatchKind; + return _bestMatchKind; } var baseSensitivity = { sensitivity: "base" }; function compareNavigateToItems(i1, i2) { @@ -22383,6 +23514,27 @@ var ts; case 149: ts.forEach(node.elements, visit); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + childNodes.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + childNodes.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; case 150: case 193: if (ts.isBindingPattern(node.name)) { @@ -22394,7 +23546,11 @@ var ts; case 197: case 200: case 195: + case 203: + case 208: + case 212: childNodes.push(node); + break; } } ts.forEach(nodes, visit); @@ -22424,8 +23580,8 @@ var ts; } function addTopLevelNodes(nodes, topLevelNodes) { nodes = sortNodes(nodes); - for (var i = 0, n = nodes.length; i < n; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; switch (node.kind) { case 196: case 199: @@ -22463,19 +23619,19 @@ var ts; function getItemsWorker(nodes, createItem) { var items = []; var keyToItem = {}; - for (var i = 0, n = nodes.length; i < n; i++) { - var child = nodes[i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + var _item = createItem(child); + if (_item !== undefined) { + if (_item.text.length > 0) { + var key = _item.text + "-" + _item.kind + "-" + _item.indent; var itemWithSameName = keyToItem[key]; if (itemWithSameName) { - merge(itemWithSameName, item); + merge(itemWithSameName, _item); } else { - keyToItem[key] = item; - items.push(item); + keyToItem[key] = _item; + items.push(_item); } } } @@ -22488,10 +23644,10 @@ var ts; if (!target.childItems) { target.childItems = []; } - outer: for (var i = 0, n = source.childItems.length; i < n; i++) { - var sourceChild = source.childItems[i]; - for (var j = 0, m = target.childItems.length; j < m; j++) { - var targetChild = target.childItems[j]; + outer: for (var _i = 0, _a = source.childItems, _n = _a.length; _i < _n; _i++) { + var sourceChild = _a[_i]; + for (var _b = 0, _c = target.childItems, _d = _c.length; _b < _d; _b++) { + var targetChild = _c[_b]; if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { merge(targetChild, sourceChild); continue outer; @@ -22507,7 +23663,7 @@ var ts; if (ts.isBindingPattern(node.name)) { break; } - if ((node.flags & 243) === 0) { + if ((node.flags & 499) === 0) { return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); @@ -22520,7 +23676,7 @@ var ts; return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); case 138: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 219: + case 220: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); case 136: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); @@ -22534,9 +23690,9 @@ var ts; case 193: case 150: var variableDeclarationNode; - var name; + var _name; if (node.kind === 150) { - name = node.name; + _name = node.name; variableDeclarationNode = node; while (variableDeclarationNode && variableDeclarationNode.kind !== 193) { variableDeclarationNode = variableDeclarationNode.parent; @@ -22546,19 +23702,25 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name = node.name; + _name = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(_name), ts.ScriptElementKind.variableElement); } case 133: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); + case 212: + case 208: + case 203: + case 205: + case 206: + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; function createItem(node, name, scriptElementKind) { @@ -22587,7 +23749,7 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 220: + case 221: return createSourceFileItem(node); case 196: return createClassItem(node); @@ -22631,10 +23793,15 @@ var ts; return undefined; } hasGlobalNode = true; - var rootName = ts.isExternalModule(node) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" : ""; + var rootName = ts.isExternalModule(node) + ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" + : ""; return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); } function createClassItem(node) { + if (!node.name) { + return undefined; + } var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { @@ -22644,7 +23811,7 @@ var ts; if (constructor) { nodes.push.apply(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); } - var childItems = getItemsWorker(sortNodes(nodes), createChildItem); + childItems = getItemsWorker(sortNodes(nodes), createChildItem); } return getNavigationBarItem(node.name.text, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -22670,7 +23837,9 @@ var ts; return node; } function getNodeSpan(node) { - return node.kind === 220 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); + return node.kind === 221 + ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) + : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } function getTextOfNode(node) { return ts.getTextOfNodeFromSourceText(sourceFile.text, node); @@ -22760,8 +23929,8 @@ var ts; if (isLowercase) { if (index > 0) { var wordSpans = getWordSpans(candidate); - for (var i = 0, n = wordSpans.length; i < n; i++) { - var span = wordSpans[i]; + for (var _i = 0, _n = wordSpans.length; _i < _n; _i++) { + var span = wordSpans[_i]; if (partStartsWith(candidate, span, chunk.text, true)) { return createPatternMatch(2, punctuationStripped, partStartsWith(candidate, span, chunk.text, false)); } @@ -22813,8 +23982,8 @@ var ts; } var subWordTextChunks = segment.subWordTextChunks; var matches = undefined; - for (var i = 0, n = subWordTextChunks.length; i < n; i++) { - var subWordTextChunk = subWordTextChunks[i]; + for (var _i = 0, _n = subWordTextChunks.length; _i < _n; _i++) { + var subWordTextChunk = subWordTextChunks[_i]; var result = matchTextChunk(candidate, subWordTextChunk, true); if (!result) { return undefined; @@ -22840,10 +24009,10 @@ var ts; } } else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (ch1 !== ch2) { + for (var _i = 0; _i < patternPartLength; _i++) { + var _ch1 = pattern.charCodeAt(patternPartStart + _i); + var _ch2 = candidate.charCodeAt(candidateSpan.start + _i); + if (_ch1 !== _ch2) { return false; } } @@ -23124,7 +24293,9 @@ var ts; function transitionFromLowerToUpper(identifier, word, index) { var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var transition = word ? (currentIsUpper && !lastIsUpper) : currentIsUpper; + var transition = word + ? (currentIsUpper && !lastIsUpper) + : currentIsUpper; return transition; } })(ts || (ts = {})); @@ -23170,20 +24341,22 @@ var ts; invocation: callExpression, argumentsSpan: getApplicableSpanForArguments(list), argumentIndex: 0, - argumentCount: getCommaBasedArgCount(list) + argumentCount: getArgumentCount(list) }; } var listItemInfo = ts.findListItemInfo(node); if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = (listItemInfo.listItemIndex + 1) >> 1; + var _list = listItemInfo.list; + var _isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === _list.pos; + var argumentIndex = getArgumentIndex(_list, node); + var argumentCount = getArgumentCount(_list); + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { - kind: isTypeArgList ? 0 : 1, + kind: _isTypeArgList ? 0 : 1, invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), + argumentsSpan: getApplicableSpanForArguments(_list), argumentIndex: argumentIndex, - argumentCount: getCommaBasedArgCount(list) + argumentCount: argumentCount }; } } @@ -23196,25 +24369,44 @@ var ts; var templateExpression = node.parent; var tagExpression = templateExpression.parent; ts.Debug.assert(templateExpression.kind === 169); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var _argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; + return getArgumentListInfoForTemplate(tagExpression, _argumentIndex); } else if (node.parent.kind === 173 && node.parent.parent.parent.kind === 157) { var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 169); + var _templateExpression = templateSpan.parent; + var _tagExpression = _templateExpression.parent; + ts.Debug.assert(_templateExpression.kind === 169); if (node.kind === 13 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); + var spanIndex = _templateExpression.templateSpans.indexOf(templateSpan); + var _argumentIndex_1 = getArgumentIndexForTemplatePiece(spanIndex, node); + return getArgumentListInfoForTemplate(_tagExpression, _argumentIndex_1); } return undefined; } - function getCommaBasedArgCount(argumentsList) { - return argumentsList.getChildCount() === 0 ? 0 : 1 + ts.countWhere(argumentsList.getChildren(), function (arg) { return arg.kind === 23; }); + function getArgumentIndex(argumentsList, node) { + var argumentIndex = 0; + var listChildren = argumentsList.getChildren(); + for (var _i = 0, _n = listChildren.length; _i < _n; _i++) { + var child = listChildren[_i]; + if (child === node) { + break; + } + if (child.kind !== 23) { + argumentIndex++; + } + } + return argumentIndex; + } + function getArgumentCount(argumentsList) { + var listChildren = argumentsList.getChildren(); + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 23; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 23) { + argumentCount++; + } + return argumentCount; } function getArgumentIndexForTemplatePiece(spanIndex, node) { ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); @@ -23227,7 +24419,10 @@ var ts; return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - var argumentCount = tagExpression.template.kind === 10 ? 1 : tagExpression.template.templateSpans.length + 1; + var argumentCount = tagExpression.template.kind === 10 + ? 1 + : tagExpression.template.templateSpans.length + 1; + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { kind: 2, invocation: tagExpression, @@ -23254,16 +24449,16 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 220; n = n.parent) { + for (var n = node; n.kind !== 221; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } if (n.pos < n.parent.pos || n.end > n.parent.end) { ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); } - var argumentInfo = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo) { - return argumentInfo; + var _argumentInfo = getImmediatelyContainingArgumentInfo(n); + if (_argumentInfo) { + return _argumentInfo; } } return undefined; @@ -23342,6 +24537,7 @@ var ts; if (selectedItemIndex < 0) { selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); } + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); return { items: items, applicableSpan: applicableSpan, @@ -23444,10 +24640,11 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 221 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 222 && c.pos <= node.pos && c.end >= node.end) { return c; } }); + ts.Debug.assert(!syntaxList || ts.contains(syntaxList.getChildren(), node)); return syntaxList; } ts.findContainingList = findContainingList; @@ -23508,10 +24705,10 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; var shouldDiveInChildNode = (child.pos <= previousToken.pos && child.end > previousToken.end) || - (child.pos === previousToken.end); + (child.pos === previousToken.end); if (shouldDiveInChildNode && nodeHasTokens(child)) { return find(child); } @@ -23535,7 +24732,7 @@ var ts; return n; } var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { + for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; if (nodeHasTokens(child)) { if (position <= child.end) { @@ -23549,10 +24746,10 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 220); + ts.Debug.assert(startNode !== undefined || n.kind === 221); if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); + var _candidate = findRightmostChildNodeWithTokens(children, children.length); + return _candidate && findRightmostToken(_candidate); } } function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { @@ -23589,7 +24786,7 @@ var ts; if (node.kind === 139 || node.kind === 155) { return node.typeArguments; } - if (ts.isAnyFunction(node) || node.kind === 196 || node.kind === 197) { + if (ts.isFunctionLike(node) || node.kind === 196 || node.kind === 197) { return node.typeParameters; } return undefined; @@ -23614,7 +24811,8 @@ var ts; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { - return ts.isTemplateLiteralKind(node.kind) && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); + return ts.isTemplateLiteralKind(node.kind) + && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); } ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function compareDataObjects(dst, src) { @@ -23846,21 +25044,21 @@ var ts; var t; var pos = scanner.getStartPos(); while (pos < endPos) { - var t = scanner.getToken(); - if (!ts.isTrivia(t)) { + var _t = scanner.getToken(); + if (!ts.isTrivia(_t)) { break; } scanner.scan(); - var item = { + var _item = { pos: pos, end: scanner.getStartPos(), - kind: t + kind: _t }; pos = scanner.getStartPos(); if (!leadingTrivia) { leadingTrivia = []; } - leadingTrivia.push(item); + leadingTrivia.push(_item); } savedPos = scanner.getStartPos(); } @@ -23895,7 +25093,13 @@ var ts; token: undefined }; } - var expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 : shouldRescanSlashToken(n) ? 2 : shouldRescanTemplateToken(n) ? 3 : 0; + var expectedScanAction = shouldRescanGreaterThanToken(n) + ? 1 + : shouldRescanSlashToken(n) + ? 2 + : shouldRescanTemplateToken(n) + ? 3 + : 0; if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } @@ -23958,8 +25162,8 @@ var ts; } function isOnToken() { var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < endPos && current !== 1 && !ts.isTrivia(current); + var _startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return _startPos < endPos && current !== 1 && !ts.isTrivia(current); } function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -24184,8 +25388,9 @@ var ts; if (this.IsAny()) { return true; } - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { + for (var _i = 0, _a = this.customContextChecks, _n = _a.length; _i < _n; _i++) { + var check = _a[_i]; + if (!check(context)) { return false; } } @@ -24246,7 +25451,7 @@ var ts; this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(34, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([97, 93, 87, 73, 89, 96]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([105, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 69]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(82, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); @@ -24254,13 +25459,13 @@ var ts; this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(89, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([17, 74, 75, 66]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2)); this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([95, 80]), 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 120]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([115, 119]), 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(114, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([117, 118]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 115, 76, 77, 78, 116, 103, 84, 104, 117, 107, 109, 120, 110]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 103])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(113, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116, 117]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([68, 114, 76, 77, 78, 115, 102, 84, 103, 116, 106, 108, 119, 109]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([78, 102])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(8, 14), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(32, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(21, 64), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); @@ -24272,52 +25477,52 @@ var ts; this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.FromTokens([16, 18, 25, 23])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8)); this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14, 15), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8)); this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, - this.NoSpaceAfterQuestionMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.SpaceAfterLetConstInVariableDeclaration, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket - ]; + [ + this.IgnoreBeforeComment, this.IgnoreAfterLineComment, + this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, + this.NoSpaceAfterQuestionMark, + this.NoSpaceBeforeDot, this.NoSpaceAfterDot, + this.NoSpaceAfterUnaryPrefixOperator, + this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, + this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, + this.SpaceAfterPostincrementWhenFollowedByAdd, + this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, + this.SpaceAfterPostdecrementWhenFollowedBySubtract, + this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, + this.NoSpaceAfterCloseBrace, + this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, + this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, + this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, + this.NoSpaceBetweenReturnAndSemicolon, + this.SpaceAfterCertainKeywords, + this.SpaceAfterLetConstInVariableDeclaration, + this.NoSpaceBeforeOpenParenInFuncCall, + this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, + this.SpaceAfterVoidOperator, + this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, + this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, + this.SpaceAfterModuleName, + this.SpaceAfterArrow, + this.NoSpaceAfterEllipsis, + this.NoSpaceAfterOptionalParameters, + this.NoSpaceBetweenEmptyInterfaceBraceBrackets, + this.NoSpaceBeforeOpenAngularBracket, + this.NoSpaceBetweenCloseParenAndAngularBracket, + this.NoSpaceAfterOpenAngularBracket, + this.NoSpaceBeforeCloseAngularBracket, + this.NoSpaceAfterCloseAngularBracket + ]; this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; + [ + this.NoSpaceBeforeSemicolon, + this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, + this.NoSpaceBeforeComma, + this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, + this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, + this.SpaceAfterSemicolon, + this.NoSpaceBeforeOpenParenInFuncDecl, + this.SpaceBetweenStatements, this.SpaceAfterTryFinally + ]; this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2)); this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8)); this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2)); @@ -24341,9 +25546,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name in o) { - if (o[name] === rule) { - return name; + for (var _name in o) { + if (o[_name] === rule) { + return _name; } } throw new Error("Unknown rule"); @@ -24359,10 +25564,10 @@ var ts; case 167: case 168: return true; - case 202: + case 203: case 193: case 128: - case 219: + case 220: case 130: case 129: return context.currentTokenSpan.kind === 52 || context.nextTokenSpan.kind === 52; @@ -24405,7 +25610,7 @@ var ts; } switch (node.kind) { case 174: - case 188: + case 202: case 152: case 201: return true; @@ -24448,7 +25653,7 @@ var ts; case 200: case 199: case 174: - case 216: + case 217: case 201: case 188: return true; @@ -24466,7 +25671,7 @@ var ts; case 191: case 179: case 187: - case 216: + case 217: return true; default: return false; @@ -24587,10 +25792,11 @@ var ts; var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); var bucket = this.map[bucketIndex]; if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) + for (var _i = 0, _a = bucket.Rules(), _n = _a.length; _i < _n; _i++) { + var rule = _a[_i]; + if (rule.Operation.Context.InContext(context)) { return rule; + } } } return null; @@ -24645,13 +25851,19 @@ var ts; RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { var position; if (rule.Operation.Action == 1) { - position = specificTokens ? 0 : RulesPosition.IgnoreRulesAny; + position = specificTokens ? + 0 : + RulesPosition.IgnoreRulesAny; } else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny; + position = specificTokens ? + RulesPosition.ContextRulesSpecific : + RulesPosition.ContextRulesAny; } else { - position = specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; + position = specificTokens ? + RulesPosition.NoContextRulesSpecific : + RulesPosition.NoContextRulesAny; } var state = constructionState[rulesBucketIndex]; if (state === undefined) { @@ -24773,7 +25985,7 @@ var ts; TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([64, 16, 92, 87]); TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([64, 17, 19, 87]); TokenRange.Comments = TokenRange.FromTokens([2, 3]); - TokenRange.TypeNames = TokenRange.FromTokens([64, 119, 121, 113, 122, 98, 112]); + TokenRange.TypeNames = TokenRange.FromTokens([64, 118, 120, 112, 121, 98, 111]); return TokenRange; })(); Shared.TokenRange = TokenRange; @@ -24910,13 +26122,13 @@ var ts; } formatting.formatSelection = formatSelection; function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); - if (!parent) { + var _parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!_parent) { return []; } var span = { - pos: ts.getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), - end: parent.end + pos: ts.getLineStartPositionForPosition(_parent.getStart(sourceFile), sourceFile), + end: _parent.end }; return formatSpan(span, sourceFile, options, rulesProvider, requestKind); } @@ -24944,11 +26156,11 @@ var ts; case 200: var body = parent.body; return body && body.kind === 174 && ts.rangeContainsRange(body.statements, node); - case 220: + case 221: case 174: case 201: return ts.rangeContainsRange(parent.statements, node); - case 216: + case 217: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -24970,7 +26182,9 @@ var ts; if (!errors.length) { return rangeHasNoErrors; } - var sorted = errors.filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }).sort(function (e1, e2) { return e1.start - e2.start; }); + var sorted = errors + .filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }) + .sort(function (e1, e2) { return e1.start - e2.start; }); if (!sorted.length) { return rangeHasNoErrors; } @@ -25051,10 +26265,10 @@ var ts; } } else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { + if (_startLine !== parentStartLine || startPos === column) { return column; } } @@ -25065,9 +26279,9 @@ var ts; if (indentation === -1) { if (isSomeBlock(node.kind)) { if (isSomeBlock(parent.kind) || - parent.kind === 220 || - parent.kind === 213 || - parent.kind === 214) { + parent.kind === 221 || + parent.kind === 214 || + parent.kind === 215) { indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); } else { @@ -25171,19 +26385,19 @@ var ts; return inheritedIndentation; } while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > childStartPos) { + var _tokenInfo = formattingScanner.readTokenInfo(node); + if (_tokenInfo.token.end > childStartPos) { break; } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, node, parentDynamicIndentation); } if (!formattingScanner.isOnToken()) { return inheritedIndentation; } if (ts.isToken(child)) { - var tokenInfo = formattingScanner.readTokenInfo(child); - ts.Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(child); + ts.Debug.assert(_tokenInfo_1.token.end === child.end); + consumeTokenAndAdvanceScanner(_tokenInfo_1, node, parentDynamicIndentation); return inheritedIndentation; } var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); @@ -25195,33 +26409,34 @@ var ts; var listStartToken = getOpenTokenForList(parent, nodes); var listEndToken = getCloseTokenForOpenToken(listStartToken); var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; + var _startLine = parentStartLine; if (listStartToken !== 0) { while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.end > nodes.pos) { + var _tokenInfo = formattingScanner.readTokenInfo(parent); + if (_tokenInfo.token.end > nodes.pos) { break; } - else if (tokenInfo.token.kind === listStartToken) { - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation = computeIndentation(tokenInfo.token, startLine, -1, parent, parentDynamicIndentation, startLine); - listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + else if (_tokenInfo.token.kind === listStartToken) { + _startLine = sourceFile.getLineAndCharacterOfPosition(_tokenInfo.token.pos).line; + var _indentation = computeIndentation(_tokenInfo.token, _startLine, -1, parent, parentDynamicIndentation, _startLine); + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, _indentation.indentation, _indentation.delta); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, listDynamicIndentation); } else { - consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + consumeTokenAndAdvanceScanner(_tokenInfo, parent, parentDynamicIndentation); } } } var inheritedIndentation = -1; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, true); + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var child = nodes[_i]; + inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, _startLine, true); } if (listEndToken !== 0) { if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + var _tokenInfo_1 = formattingScanner.readTokenInfo(parent); + if (_tokenInfo_1.token.kind === listEndToken && ts.rangeContainsRange(parent, _tokenInfo_1.token)) { + consumeTokenAndAdvanceScanner(_tokenInfo_1, parent, listDynamicIndentation); } } } @@ -25258,8 +26473,8 @@ var ts; if (indentToken) { var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { - for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { - var triviaItem = currentTokenInfo.leadingTrivia[i]; + for (var _i = 0, _a = currentTokenInfo.leadingTrivia, _n = _a.length; _i < _n; _i++) { + var triviaItem = _a[_i]; if (!ts.rangeContainsRange(originalRange, triviaItem)) { continue; } @@ -25272,8 +26487,8 @@ var ts; break; case 2: if (indentNextTokenOrTrivia) { - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - insertIndentation(triviaItem.pos, commentIndentation, false); + var _commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, _commentIndentation, false); indentNextTokenOrTrivia = false; } break; @@ -25293,8 +26508,8 @@ var ts; } } function processTrivia(trivia, parent, contextNode, dynamicIndentation) { - for (var i = 0, len = trivia.length; i < len; ++i) { - var triviaItem = trivia[i]; + for (var _i = 0, _n = trivia.length; _i < _n; _i++) { + var triviaItem = trivia[_i]; if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); @@ -25340,8 +26555,8 @@ var ts; } } trimTrailingWhitespaces = - (rule.Operation.Action & (4 | 2)) && - rule.Flag !== 1; + (rule.Operation.Action & (4 | 2)) && + rule.Flag !== 1; } else { trimTrailingWhitespaces = true; @@ -25365,25 +26580,26 @@ var ts; } } function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; + var _startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - if (startLine === endLine) { + var parts; + if (_startLine === endLine) { if (!firstLineIsIndented) { insertIndentation(commentRange.pos, indentation, false); } return; } else { - var parts = []; + parts = []; var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { + for (var line = _startLine; line < endLine; ++line) { var endOfLine = ts.getEndLinePosition(line, sourceFile); parts.push({ pos: startPos, end: endOfLine }); startPos = ts.getStartPositionOfLine(line + 1, sourceFile); } parts.push({ pos: startPos, end: commentRange.end }); } - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); + var startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); if (indentation === nonWhitespaceColumnInFirstPart.column) { return; @@ -25391,19 +26607,21 @@ var ts; var startIndex = 0; if (firstLineIsIndented) { startIndex = 1; - startLine++; + _startLine++; } - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; + var _delta = indentation - nonWhitespaceColumnInFirstPart.column; + for (var i = startIndex, len = parts.length; i < len; ++i, ++_startLine) { + var _startLinePos = ts.getStartPositionOfLine(_startLine, sourceFile); + var nonWhitespaceCharacterAndColumn = i === 0 + ? nonWhitespaceColumnInFirstPart + : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + var newIndentation = nonWhitespaceCharacterAndColumn.column + _delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); + recordReplace(_startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); } else { - recordDelete(startLinePos, nonWhitespaceCharacterAndColumn.character); + recordDelete(_startLinePos, nonWhitespaceCharacterAndColumn.character); } } } @@ -25567,6 +26785,10 @@ var ts; (function (formatting) { var SmartIndenter; (function (SmartIndenter) { + var Value; + (function (Value) { + Value[Value["Unknown"] = -1] = "Unknown"; + })(Value || (Value = {})); function getIndentation(position, sourceFile, options) { if (position > sourceFile.text.length) { return 0; @@ -25576,11 +26798,11 @@ var ts; return 0; } var precedingTokenIsLiteral = precedingToken.kind === 8 || - precedingToken.kind === 9 || - precedingToken.kind === 10 || - precedingToken.kind === 11 || - precedingToken.kind === 12 || - precedingToken.kind === 13; + precedingToken.kind === 9 || + precedingToken.kind === 10 || + precedingToken.kind === 11 || + precedingToken.kind === 12 || + precedingToken.kind === 13; if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { return 0; } @@ -25606,9 +26828,9 @@ var ts; } break; } - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation; + var _actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation; } previous = current; current = current.parent; @@ -25625,9 +26847,9 @@ var ts; } SmartIndenter.getIndentationForNode = getIndentationForNode; function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { - var parent = current.parent; + var _parent = current.parent; var parentStart; - while (parent) { + while (_parent) { var useActualIndentation = true; if (ignoreActualIndentationRange) { var start = current.getStart(sourceFile); @@ -25639,21 +26861,21 @@ var ts; return actualIndentation + indentationDelta; } } - parentStart = getParentStart(parent, current, sourceFile); + parentStart = getParentStart(_parent, current, sourceFile); var parentAndChildShareLine = parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); + childStartsOnTheSameLineWithElseInIfStatement(_parent, current, currentStart.line, sourceFile); if (useActualIndentation) { - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var _actualIndentation = getActualIndentationForNode(current, _parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (_actualIndentation !== -1) { + return _actualIndentation + indentationDelta; } } - if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { + if (shouldIndentChildNode(_parent.kind, current.kind) && !parentAndChildShareLine) { indentationDelta += options.IndentSize; } - current = parent; + current = _parent; currentStart = parentStart; - parent = current.parent; + _parent = current.parent; } return indentationDelta; } @@ -25666,12 +26888,16 @@ var ts; } function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { var commaItemInfo = ts.findListItemInfo(commaToken); - ts.Debug.assert(commaItemInfo && commaItemInfo.listItemIndex > 0); - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + if (commaItemInfo && commaItemInfo.listItemIndex > 0) { + return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); + } + else { + return -1; + } } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 220 || !parentAndChildShareLine); + (parent.kind === 221 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -25726,7 +26952,7 @@ var ts; case 132: case 131: case 136: - case 137: + case 137: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -25736,18 +26962,20 @@ var ts; return node.parent.parameters; } break; + } case 156: - case 155: - var start = node.getStart(sourceFile); + case 155: { + var _start = node.getStart(sourceFile); if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.typeArguments, _start, node.getEnd())) { return node.parent.typeArguments; } if (node.parent.arguments && - ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) { + ts.rangeContainsStartEnd(node.parent.arguments, _start, node.getEnd())) { return node.parent.arguments; } break; + } } } return undefined; @@ -25813,15 +27041,15 @@ var ts; case 201: case 152: case 143: - case 188: + case 202: + case 215: case 214: - case 213: case 159: case 155: case 156: case 175: case 193: - case 208: + case 209: case 186: case 168: return true; @@ -25877,9 +27105,9 @@ var ts; case 152: case 174: case 201: - case 188: + case 202: return nodeEndsWith(n, 15, sourceFile); - case 216: + case 217: return isCompletedNode(n.block, sourceFile); case 159: case 136: @@ -25903,9 +27131,15 @@ var ts; return isCompletedNode(n.expression, sourceFile); case 151: return nodeEndsWith(n, 19, sourceFile); - case 213: case 214: + case 215: return false; + case 181: + return isCompletedNode(n.statement, sourceFile); + case 182: + return isCompletedNode(n.statement, sourceFile); + case 183: + return isCompletedNode(n.statement, sourceFile); case 180: return isCompletedNode(n.statement, sourceFile); case 179: @@ -25998,17 +27232,17 @@ var ts; while (pos < end) { var token = scanner.scan(); var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 512, this)); + nodes.push(createNode(token, pos, textPos, 1024, this)); pos = textPos; } return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(221, nodes.pos, nodes.end, 512, this); + var list = createNode(222, nodes.pos, nodes.end, 1024, this); list._children = []; var pos = nodes.pos; - for (var i = 0, len = nodes.length; i < len; i++) { - var node = nodes[i]; + for (var _i = 0, _n = nodes.length; _i < _n; _i++) { + var node = nodes[_i]; if (pos < node.pos) { pos = this.addSyntheticNodes(list._children, pos, node.pos); } @@ -26022,9 +27256,10 @@ var ts; }; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; + var children; if (this.kind >= 125) { scanner.setText((sourceFile || this.getSourceFile()).text); - var children = []; + children = []; var pos = this.pos; var processNode = function (node) { if (pos < node.pos) { @@ -26065,8 +27300,8 @@ var ts; }; NodeObject.prototype.getFirstToken = function (sourceFile) { var children = this.getChildren(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (child.kind < 125) { return child; } @@ -26188,7 +27423,7 @@ var ts; } function getCleanedJsDocComment(pos, end, sourceFile) { var spacesToRemoveAfterAsterisk; - var docComments = []; + var _docComments = []; var blankLineCount = 0; var isInParamTag = false; while (pos < end) { @@ -26223,14 +27458,14 @@ var ts; } pos = consumeLineBreaks(pos, end, sourceFile); if (docCommentTextOfLine) { - pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); + pushDocCommentLineText(_docComments, docCommentTextOfLine, blankLineCount); blankLineCount = 0; } - else if (!isInParamTag && docComments.length) { + else if (!isInParamTag && _docComments.length) { blankLineCount++; } } - return docComments; + return _docComments; } function getCleanedParamJsDocComment(pos, end, sourceFile) { var paramHelpStringMargin; @@ -26331,8 +27566,8 @@ var ts; } var consumedSpaces = pos - startOfLinePos; if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); - if (ch === 42) { + var _ch = sourceFile.text.charCodeAt(pos); + if (_ch === 42) { pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); } } @@ -26426,7 +27661,9 @@ var ts; case 131: var functionDeclaration = node; if (functionDeclaration.name && functionDeclaration.name.getFullWidth() > 0) { - var lastDeclaration = namedDeclarations.length > 0 ? namedDeclarations[namedDeclarations.length - 1] : undefined; + var lastDeclaration = namedDeclarations.length > 0 ? + namedDeclarations[namedDeclarations.length - 1] : + undefined; if (lastDeclaration && functionDeclaration.symbol === lastDeclaration.symbol) { if (functionDeclaration.body && !lastDeclaration.body) { namedDeclarations[namedDeclarations.length - 1] = functionDeclaration; @@ -26443,7 +27680,12 @@ var ts; case 198: case 199: case 200: - case 202: + case 203: + case 212: + case 208: + case 203: + case 205: + case 206: case 134: case 135: case 143: @@ -26473,11 +27715,32 @@ var ts; ts.forEachChild(node.name, visit); break; } - case 219: + case 220: case 130: case 129: namedDeclarations.push(node); break; + case 210: + if (node.exportClause) { + ts.forEach(node.exportClause.elements, visit); + } + break; + case 204: + var importClause = node.importClause; + if (importClause) { + if (importClause.name) { + namedDeclarations.push(importClause); + } + if (importClause.namedBindings) { + if (importClause.namedBindings.kind === 206) { + namedDeclarations.push(importClause.namedBindings); + } + else { + ts.forEach(importClause.namedBindings.elements, visit); + } + } + } + break; } }); this.namedDeclarations = namedDeclarations; @@ -26630,8 +27893,8 @@ var ts; if (declaration.kind !== 193 && declaration.kind !== 195) { return false; } - for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { - if (parent.kind === 220 || parent.kind === 201) { + for (var _parent = declaration.parent; !ts.isFunctionBlock(_parent); _parent = _parent.parent) { + if (_parent.kind === 221 || _parent.kind === 201) { return false; } } @@ -26672,8 +27935,9 @@ var ts; this.host = host; this.fileNameToEntry = {}; var rootFileNames = host.getScriptFileNames(); - for (var i = 0, n = rootFileNames.length; i < n; i++) { - this.createEntry(rootFileNames[i]); + for (var _i = 0, _n = rootFileNames.length; _i < _n; _i++) { + var fileName = rootFileNames[_i]; + this.createEntry(fileName); } this._compilationSettings = host.getCompilationSettings() || getDefaultCompilerOptions(); } @@ -26732,17 +27996,17 @@ var ts; if (!scriptSnapshot) { throw new Error("Could not find file: '" + fileName + "'."); } - var version = this.host.getScriptVersion(fileName); + var _version = this.host.getScriptVersion(fileName); var sourceFile; if (this.currentFileName !== fileName) { - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, version, true); + sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2, _version, true); } - else if (this.currentFileVersion !== version) { + else if (this.currentFileVersion !== _version) { var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); + sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, _version, editRange); } if (sourceFile) { - this.currentFileVersion = version; + this.currentFileVersion = _version; this.currentFileName = fileName; this.currentFileScriptSnapshot = scriptSnapshot; this.currentSourceFile = sourceFile; @@ -26798,7 +28062,7 @@ var ts; var entry = entries[i]; sourceFiles.push({ name: i, - refCount: entry.refCount, + refCount: entry.languageServiceRefCount, references: entry.owners.slice(0) }); } @@ -26811,34 +28075,40 @@ var ts; return JSON.stringify(bucketInfoArray, null, 2); } function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, true); + } + function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { + return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, false); + } + function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { var bucket = getBucketForCompilationSettings(compilationSettings, true); var entry = ts.lookUp(bucket, fileName); if (!entry) { + ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, false); bucket[fileName] = entry = { sourceFile: sourceFile, - refCount: 0, + languageServiceRefCount: 0, owners: [] }; } - entry.refCount++; - return entry.sourceFile; - } - function updateDocument(sourceFile, fileName, compilationSettings, scriptSnapshot, version, textChangeRange) { - var bucket = getBucketForCompilationSettings(compilationSettings, false); - ts.Debug.assert(bucket !== undefined); - var entry = ts.lookUp(bucket, fileName); - ts.Debug.assert(entry !== undefined); - entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, textChangeRange); + else { + if (entry.sourceFile.version !== version) { + entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); + } + } + if (acquiring) { + entry.languageServiceRefCount++; + } return entry.sourceFile; } function releaseDocument(fileName, compilationSettings) { var bucket = getBucketForCompilationSettings(compilationSettings, false); ts.Debug.assert(bucket !== undefined); var entry = ts.lookUp(bucket, fileName); - entry.refCount--; - ts.Debug.assert(entry.refCount >= 0); - if (entry.refCount === 0) { + entry.languageServiceRefCount--; + ts.Debug.assert(entry.languageServiceRefCount >= 0); + if (entry.languageServiceRefCount === 0) { delete bucket[fileName]; } } @@ -26869,31 +28139,111 @@ var ts; } }); } + function recordModuleName() { + var importPath = scanner.getTokenValue(); + var pos = scanner.getTokenPos(); + importedFiles.push({ + fileName: importPath, + pos: pos, + end: pos + importPath.length + }); + } function processImport() { scanner.setText(sourceText); var token = scanner.scan(); while (token !== 1) { if (token === 84) { token = scanner.scan(); - if (token === 64) { - token = scanner.scan(); - if (token === 52) { + if (token === 8) { + recordModuleName(); + continue; + } + else { + if (token === 64) { token = scanner.scan(); - if (token === 118) { + if (token === 123) { token = scanner.scan(); - if (token === 16) { + if (token === 8) { + recordModuleName(); + continue; + } + } + else if (token === 52) { + token = scanner.scan(); + if (token === 117) { token = scanner.scan(); - if (token === 8) { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); + if (token === 16) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + continue; + } } } } + else if (token === 23) { + token = scanner.scan(); + } + else { + continue; + } + } + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 101) { + token = scanner.scan(); + if (token === 64) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + } + } + } + else if (token === 77) { + token = scanner.scan(); + if (token === 14) { + token = scanner.scan(); + while (token !== 15) { + token = scanner.scan(); + } + if (token === 15) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } + } + } + } + else if (token === 35) { + token = scanner.scan(); + if (token === 123) { + token = scanner.scan(); + if (token === 8) { + recordModuleName(); + } } } } @@ -26961,19 +28311,19 @@ var ts; } function isNameOfFunctionDeclaration(node) { return node.kind === 64 && - ts.isAnyFunction(node.parent) && node.parent.name === node; + ts.isFunctionLike(node.parent) && node.parent.name === node; } function isNameOfPropertyAssignment(node) { return (node.kind === 64 || node.kind === 8 || node.kind === 7) && - (node.parent.kind === 217 || node.parent.kind === 218) && node.parent.name === node; + (node.parent.kind === 218 || node.parent.kind === 219) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 8 || node.kind === 7) { switch (node.parent.kind) { case 130: case 129: - case 217: - case 219: + case 218: + case 220: case 132: case 131: case 134: @@ -27047,7 +28397,7 @@ var ts; return undefined; } switch (node.kind) { - case 220: + case 221: case 132: case 131: case 195: @@ -27071,7 +28421,11 @@ var ts; case 198: return ScriptElementKind.typeElement; case 199: return ScriptElementKind.enumElement; case 193: - return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; + return ts.isConst(node) + ? ScriptElementKind.constElement + : ts.isLet(node) + ? ScriptElementKind.letElement + : ScriptElementKind.variableElement; case 195: return ScriptElementKind.functionElement; case 134: return ScriptElementKind.memberGetAccessorElement; case 135: return ScriptElementKind.memberSetAccessorElement; @@ -27086,8 +28440,14 @@ var ts; case 136: return ScriptElementKind.callSignatureElement; case 133: return ScriptElementKind.constructorImplementationElement; case 127: return ScriptElementKind.typeParameterElement; - case 219: return ScriptElementKind.variableElement; + case 220: return ScriptElementKind.variableElement; case 128: return (node.flags & 112) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 203: + case 208: + case 205: + case 212: + case 206: + return ScriptElementKind.alias; } return ScriptElementKind.unknown; } @@ -27147,8 +28507,9 @@ var ts; }); if (program) { var oldSourceFiles = program.getSourceFiles(); - for (var i = 0, n = oldSourceFiles.length; i < n; i++) { - var fileName = oldSourceFiles[i].fileName; + for (var _i = 0, _n = oldSourceFiles.length; _i < _n; _i++) { + var oldSourceFile = oldSourceFiles[_i]; + var fileName = oldSourceFile.fileName; if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { documentRegistry.releaseDocument(fileName, oldSettings); } @@ -27163,13 +28524,9 @@ var ts; return undefined; } if (!changesInCompilationSettingsAffectSyntax) { - var oldSourceFile = program && program.getSourceFile(fileName); - if (oldSourceFile) { - if (sourceFileUpToDate(oldSourceFile)) { - return oldSourceFile; - } - var textChangeRange = hostFileInformation.scriptSnapshot.getChangeRange(oldSourceFile.scriptSnapshot); - return documentRegistry.updateDocument(oldSourceFile, fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, textChangeRange); + var _oldSourceFile = program && program.getSourceFile(fileName); + if (_oldSourceFile) { + return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); } } return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); @@ -27185,8 +28542,9 @@ var ts; if (program.getSourceFiles().length !== rootFileNames.length) { return false; } - for (var i = 0, n = rootFileNames.length; i < n; i++) { - if (!sourceFileUpToDate(program.getSourceFile(rootFileNames[i]))) { + for (var _a = 0, _b = rootFileNames.length; _a < _b; _a++) { + var _fileName = rootFileNames[_a]; + if (!sourceFileUpToDate(program.getSourceFile(_fileName))) { return false; } } @@ -27204,7 +28562,9 @@ var ts; } function dispose() { if (program) { - ts.forEach(program.getSourceFiles(), function (f) { documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); }); + ts.forEach(program.getSourceFiles(), function (f) { + return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); + }); } } function getSyntacticDiagnostics(fileName) { @@ -27237,8 +28597,8 @@ var ts; displayName = displayName.substring(1, displayName.length - 1); } var isValid = ts.isIdentifierStart(displayName.charCodeAt(0), target); - for (var i = 1, n = displayName.length; isValid && i < n; i++) { - isValid = ts.isIdentifierPart(displayName.charCodeAt(i), target); + for (var _i = 1, n = displayName.length; isValid && _i < n; _i++) { + isValid = ts.isIdentifierPart(displayName.charCodeAt(_i), target); } if (isValid) { return ts.unescapeIdentifier(displayName); @@ -27264,20 +28624,20 @@ var ts; var start = new Date().getTime(); var currentToken = ts.getTokenAtPosition(sourceFile, position); log("getCompletionsAtPosition: Get current token: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var insideComment = isInsideComment(sourceFile, currentToken, position); log("getCompletionsAtPosition: Is inside comment: " + (new Date().getTime() - start)); if (insideComment) { log("Returning an empty list because completion was inside a comment."); return undefined; } - var start = new Date().getTime(); + start = new Date().getTime(); var previousToken = ts.findPrecedingToken(position, sourceFile); log("getCompletionsAtPosition: Get previous token 1: " + (new Date().getTime() - start)); if (previousToken && position <= previousToken.end && previousToken.kind === 64) { - var start = new Date().getTime(); + var _start = new Date().getTime(); previousToken = ts.findPrecedingToken(previousToken.pos, sourceFile); - log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - _start)); } if (previousToken && isCompletionListBlocker(previousToken)) { log("Returning an empty list because completion was requested in an invalid position."); @@ -27305,12 +28665,14 @@ var ts; typeChecker: typeInfoResolver }; log("getCompletionsAtPosition: Syntactic work: " + (new Date().getTime() - syntacticStart)); - var location = ts.getTouchingPropertyName(sourceFile, position); + var _location = ts.getTouchingPropertyName(sourceFile, position); var semanticStart = new Date().getTime(); + var isMemberCompletion; + var isNewIdentifierLocation; if (isRightOfDot) { var symbols = []; - var isMemberCompletion = true; - var isNewIdentifierLocation = false; + isMemberCompletion = true; + isNewIdentifierLocation = false; if (node.kind === 64 || node.kind === 125 || node.kind === 153) { var symbol = typeInfoResolver.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { @@ -27349,12 +28711,23 @@ var ts; getCompletionEntriesFromSymbols(filteredMembers, activeCompletionSession); } } + else if (ts.getAncestor(previousToken, 205)) { + isMemberCompletion = true; + isNewIdentifierLocation = true; + if (showCompletionsInImportsClause(previousToken)) { + var importDeclaration = ts.getAncestor(previousToken, 204); + ts.Debug.assert(importDeclaration !== undefined); + var exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); + var filteredExports = filterModuleExports(exports, importDeclaration); + getCompletionEntriesFromSymbols(filteredExports, activeCompletionSession); + } + } else { isMemberCompletion = false; isNewIdentifierLocation = isNewIdentifierDefinitionLocation(previousToken); var symbolMeanings = 793056 | 107455 | 1536 | 8388608; - var symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); - getCompletionEntriesFromSymbols(symbols, activeCompletionSession); + var _symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); + getCompletionEntriesFromSymbols(_symbols, activeCompletionSession); } } if (!isMemberCompletion) { @@ -27368,9 +28741,9 @@ var ts; entries: activeCompletionSession.entries }; function getCompletionEntriesFromSymbols(symbols, session) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); ts.forEach(symbols, function (symbol) { - var entry = createCompletionEntry(symbol, session.typeChecker, location); + var entry = createCompletionEntry(symbol, session.typeChecker, _location); if (entry) { var id = ts.escapeIdentifier(entry.name); if (!ts.lookUp(session.symbols, id)) { @@ -27379,41 +28752,57 @@ var ts; } } }); - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - _start_1)); } function isCompletionListBlocker(previousToken) { - var start = new Date().getTime(); + var _start_1 = new Date().getTime(); var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || isIdentifierDefinitionLocation(previousToken) || isRightOfIllegalDot(previousToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - _start_1)); return result; } + function showCompletionsInImportsClause(node) { + if (node) { + if (node.kind === 14 || node.kind === 23) { + return node.parent.kind === 207; + } + } + return false; + } function isNewIdentifierDefinitionLocation(previousToken) { if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 23: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 151 || containingNodeKind === 167; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 151 + || containingNodeKind === 167; case 16: - return containingNodeKind === 155 || containingNodeKind === 133 || containingNodeKind === 156 || containingNodeKind === 159; + return containingNodeKind === 155 + || containingNodeKind === 133 + || containingNodeKind === 156 + || containingNodeKind === 159; case 18: return containingNodeKind === 151; - case 117: + case 116: return true; case 20: return containingNodeKind === 200; case 14: return containingNodeKind === 196; case 52: - return containingNodeKind === 193 || containingNodeKind === 167; + return containingNodeKind === 193 + || containingNodeKind === 167; case 11: return containingNodeKind === 169; case 12: return containingNodeKind === 173; - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 130; } switch (previousToken.getText()) { @@ -27426,10 +28815,12 @@ var ts; return false; } function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { - if (previousToken.kind === 8 || previousToken.kind === 9 || ts.isTemplateLiteralKind(previousToken.kind)) { - var start = previousToken.getStart(); + if (previousToken.kind === 8 + || previousToken.kind === 9 + || ts.isTemplateLiteralKind(previousToken.kind)) { + var _start_1 = previousToken.getStart(); var end = previousToken.getEnd(); - if (start < position && position < end) { + if (_start_1 < position && position < end) { return true; } else if (position === end) { @@ -27440,12 +28831,12 @@ var ts; } function getContainingObjectLiteralApplicableForCompletion(previousToken) { if (previousToken) { - var parent = previousToken.parent; + var _parent = previousToken.parent; switch (previousToken.kind) { case 14: case 23: - if (parent && parent.kind === 152) { - return parent; + if (_parent && _parent.kind === 152) { + return _parent; } break; } @@ -27488,7 +28879,7 @@ var ts; case 18: return containingNodeKind === 149; case 16: - return containingNodeKind === 216 || + return containingNodeKind === 217 || isFunction(containingNodeKind); case 14: return containingNodeKind === 199 || @@ -27504,27 +28895,27 @@ var ts; containingNodeKind === 195 || containingNodeKind === 197 || isFunction(containingNodeKind); - case 110: + case 109: return containingNodeKind === 130; case 21: return containingNodeKind === 128 || containingNodeKind === 133 || (previousToken.parent.parent.kind === 149); - case 109: - case 107: case 108: + case 106: + case 107: return containingNodeKind === 128; case 68: case 76: - case 104: + case 103: case 82: case 97: - case 116: - case 120: + case 115: + case 119: case 84: - case 105: + case 104: case 69: - case 111: + case 110: return true; } switch (previousToken.getText()) { @@ -27549,13 +28940,30 @@ var ts; } return false; } + function filterModuleExports(exports, importDeclaration) { + var exisingImports = {}; + if (!importDeclaration.importClause) { + return exports; + } + if (importDeclaration.importClause.namedBindings && + importDeclaration.importClause.namedBindings.kind === 207) { + ts.forEach(importDeclaration.importClause.namedBindings.elements, function (el) { + var _name = el.propertyName || el.name; + exisingImports[_name.text] = true; + }); + } + if (ts.isEmpty(exisingImports)) { + return exports; + } + return ts.filter(exports, function (e) { return !ts.lookUp(exisingImports, e.name); }); + } function filterContextualMembersList(contextualMemberSymbols, existingMembers) { if (!existingMembers || existingMembers.length === 0) { return contextualMemberSymbols; } var existingMemberNames = {}; ts.forEach(existingMembers, function (m) { - if (m.kind !== 217 && m.kind !== 218) { + if (m.kind !== 218 && m.kind !== 219) { return; } if (m.getStart() <= position && position <= m.getEnd()) { @@ -27563,13 +28971,13 @@ var ts; } existingMemberNames[m.name.text] = true; }); - var filteredMembers = []; + var _filteredMembers = []; ts.forEach(contextualMemberSymbols, function (s) { if (!existingMemberNames[s.name]) { - filteredMembers.push(s); + _filteredMembers.push(s); } }); - return filteredMembers; + return _filteredMembers; } } function getCompletionEntryDetails(fileName, position, entryName) { @@ -27580,10 +28988,10 @@ var ts; } var symbol = ts.lookUp(activeCompletionSession.symbols, ts.escapeIdentifier(entryName)); if (symbol) { - var location = ts.getTouchingPropertyName(sourceFile, position); - var completionEntry = createCompletionEntry(symbol, session.typeChecker, location); - ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, location) !== undefined, "Could not find type for symbol"); - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location, session.typeChecker, location, 7); + var _location = ts.getTouchingPropertyName(sourceFile, position); + var completionEntry = createCompletionEntry(symbol, session.typeChecker, _location); + ts.Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, _location) !== undefined, "Could not find type for symbol"); + var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), _location, session.typeChecker, _location, 7); return { name: entryName, kind: displayPartsDocumentationsAndSymbolKind.symbolKind, @@ -27695,7 +29103,9 @@ var ts; return ScriptElementKind.unknown; } function getSymbolModifiers(symbol) { - return symbol && symbol.declarations && symbol.declarations.length > 0 ? ts.getNodeModifiers(symbol.declarations[0]) : ScriptElementKindModifier.none; + return symbol && symbol.declarations && symbol.declarations.length > 0 + ? ts.getNodeModifiers(symbol.declarations[0]) + : ScriptElementKindModifier.none; } function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, typeResolver, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } @@ -27704,11 +29114,13 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); var hasAddedSymbolInfo; + var type; if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 || symbolFlags & 8388608) { if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { symbolKind = ScriptElementKind.memberVariableElement; } - var type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); + var signature; + type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); if (type) { if (location.parent && location.parent.kind === 153) { var right = location.parent.name; @@ -27779,15 +29191,14 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 114 && location.parent.kind === 133)) { - var signature; + (location.kind === 113 && location.parent.kind === 133)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); + var _allSignatures = functionDeclaration.kind === 133 ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeResolver.isImplementationOfOverload(functionDeclaration)) { signature = typeResolver.getSignatureFromDeclaration(functionDeclaration); } else { - signature = allSignatures[0]; + signature = _allSignatures[0]; } if (functionDeclaration.kind === 133) { symbolKind = ScriptElementKind.constructorImplementationElement; @@ -27797,7 +29208,7 @@ var ts; addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 136 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } - addSignatureDisplayParts(signature, allSignatures); + addSignatureDisplayParts(signature, _allSignatures); hasAddedSymbolInfo = true; } } @@ -27810,14 +29221,14 @@ var ts; } if ((symbolFlags & 64) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(104)); + displayParts.push(ts.keywordPart(103)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(123)); + displayParts.push(ts.keywordPart(122)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); displayParts.push(ts.spacePart()); @@ -27837,7 +29248,7 @@ var ts; } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(117)); + displayParts.push(ts.keywordPart(116)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } @@ -27857,7 +29268,7 @@ var ts; } else { var signatureDeclaration = ts.getDeclarationOfKind(symbol, 127).parent; - var signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); + var _signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); if (signatureDeclaration.kind === 137) { displayParts.push(ts.keywordPart(87)); displayParts.push(ts.spacePart()); @@ -27865,13 +29276,13 @@ var ts; else if (signatureDeclaration.kind !== 136 && signatureDeclaration.name) { addFullSymbolName(signatureDeclaration.symbol); } - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, signature, sourceFile, 32)); + displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeResolver, _signature, sourceFile, 32)); } } if (symbolFlags & 8) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 219) { + if (declaration.kind === 220) { var constantValue = typeResolver.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -27887,13 +29298,13 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 202) { + if (declaration.kind === 203) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); displayParts.push(ts.operatorPart(52)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(118)); + displayParts.push(ts.keywordPart(117)); displayParts.push(ts.punctuationPart(16)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8)); displayParts.push(ts.punctuationPart(17)); @@ -27936,8 +29347,8 @@ var ts; symbolFlags & 131072 || symbolFlags & 98304 || symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); - addSignatureDisplayParts(allSignatures[0], allSignatures); + var _allSignatures_1 = type.getCallSignatures(); + addSignatureDisplayParts(_allSignatures_1[0], _allSignatures_1); } } } @@ -27982,10 +29393,10 @@ var ts; documentation = signature.getDocumentationComment(); } function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { + var _typeParameterParts = ts.mapToDisplayParts(function (writer) { typeResolver.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); }); - displayParts.push.apply(displayParts, typeParameterParts); + displayParts.push.apply(displayParts, _typeParameterParts); } } function getQuickInfoAtPosition(fileName, position) { @@ -28056,8 +29467,14 @@ var ts; if (!symbol) { return undefined; } + if (symbol.flags & 8388608) { + var declaration = symbol.declarations[0]; + if (node.kind === 64 && node.parent === declaration) { + symbol = typeInfoResolver.getAliasedSymbol(symbol); + } + } var result = []; - if (node.parent.kind === 218) { + if (node.parent.kind === 219) { var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); var shorthandDeclarations = shorthandSymbol.getDeclarations(); var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver, node); @@ -28091,12 +29508,12 @@ var ts; }; } function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { - var declarations = []; + var _declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { if ((selectConstructors && d.kind === 133) || (!selectConstructors && (d.kind === 195 || d.kind === 132 || d.kind === 131))) { - declarations.push(d); + _declarations.push(d); if (d.body) definition = d; } @@ -28105,14 +29522,14 @@ var ts; result.push(getDefinitionInfo(definition, symbolKind, symbolName, containerName)); return true; } - else if (declarations.length) { - result.push(getDefinitionInfo(declarations[declarations.length - 1], symbolKind, symbolName, containerName)); + else if (_declarations.length) { + result.push(getDefinitionInfo(_declarations[_declarations.length - 1], symbolKind, symbolName, containerName)); return true; } return false; } function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (isNewExpressionTarget(location) || location.kind === 114) { + if (isNewExpressionTarget(location) || location.kind === 113) { if (symbol.flags & 32) { var classDeclaration = symbol.getDeclarations()[0]; ts.Debug.assert(classDeclaration && classDeclaration.kind === 196); @@ -28174,8 +29591,8 @@ var ts; break; case 66: case 72: - if (hasKind(parent(parent(node)), 188)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent); + if (hasKind(parent(parent(parent(node))), 188)) { + return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 65: @@ -28197,13 +29614,13 @@ var ts; return getLoopBreakContinueOccurrences(node.parent); } break; - case 114: + case 113: if (hasKind(node.parent, 133)) { return getConstructorOccurrences(node.parent); } break; - case 116: - case 120: + case 115: + case 119: if (hasKind(node.parent, 134) || hasKind(node.parent, 135)) { return getGetAndSetOccurrences(node.parent); } @@ -28222,8 +29639,8 @@ var ts; while (ifStatement) { var children = ifStatement.getChildren(); pushKeywordIf(keywords, children[0], 83); - for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 75)) { + for (var _i = children.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, children[_i], 75)) { break; } } @@ -28233,10 +29650,10 @@ var ts; ifStatement = ifStatement.elseStatement; } var result = []; - for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 75 && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; + for (var _i_1 = 0; _i_1 < keywords.length; _i_1++) { + if (keywords[_i_1].kind === 75 && _i_1 < keywords.length - 1) { + var elseKeyword = keywords[_i_1]; + var ifKeyword = keywords[_i_1 + 1]; var shouldHighlightNextKeyword = true; for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { @@ -28250,11 +29667,11 @@ var ts; textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), isWriteAccess: false }); - i++; + _i_1++; continue; } } - result.push(getReferenceEntryFromNode(keywords[i])); + result.push(getReferenceEntryFromNode(keywords[_i_1])); } return result; } @@ -28308,7 +29725,7 @@ var ts; aggregate(tryStatement.finallyBlock); } } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -28317,17 +29734,17 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent = child.parent; - if (ts.isFunctionBlock(parent) || parent.kind === 220) { - return parent; + var _parent = child.parent; + if (ts.isFunctionBlock(_parent) || _parent.kind === 221) { + return _parent; } - if (parent.kind === 191) { - var tryStatement = parent; + if (_parent.kind === 191) { + var tryStatement = _parent; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent; + child = _parent; } return undefined; } @@ -28348,8 +29765,8 @@ var ts; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 81, 99, 74)) { if (loopNode.kind === 179) { var loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 99)) { + for (var _i = loopTokens.length - 1; _i >= 0; _i--) { + if (pushKeywordIf(keywords, loopTokens[_i], 99)) { break; } } @@ -28366,7 +29783,7 @@ var ts; function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; pushKeywordIf(keywords, switchStatement.getFirstToken(), 91); - ts.forEach(switchStatement.clauses, function (clause) { + ts.forEach(switchStatement.caseBlock.clauses, function (clause) { pushKeywordIf(keywords, clause.getFirstToken(), 66, 72); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { @@ -28401,7 +29818,7 @@ var ts; if (node.kind === 185 || node.kind === 184) { statementAccumulator.push(node); } - else if (!ts.isAnyFunction(node)) { + else if (!ts.isFunctionLike(node)) { ts.forEachChild(node, aggregate); } } @@ -28412,8 +29829,8 @@ var ts; return actualOwner && actualOwner === owner; } function getBreakOrContinueOwner(statement) { - for (var node = statement.parent; node; node = node.parent) { - switch (node.kind) { + for (var _node = statement.parent; _node; _node = _node.parent) { + switch (_node.kind) { case 188: if (statement.kind === 184) { continue; @@ -28423,12 +29840,12 @@ var ts; case 183: case 180: case 179: - if (!statement.label || isLabeledBy(node, statement.label.text)) { - return node; + if (!statement.label || isLabeledBy(_node, statement.label.text)) { + return _node; } break; default: - if (ts.isAnyFunction(node)) { + if (ts.isFunctionLike(_node)) { return undefined; } break; @@ -28441,7 +29858,7 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 114); + return pushKeywordIf(keywords, token, 113); }); }); return ts.map(keywords, getReferenceEntryFromNode); @@ -28454,7 +29871,7 @@ var ts; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 116, 120); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 115, 119); }); } } } @@ -28472,7 +29889,7 @@ var ts; } } else if (declaration.flags & (1 | 2)) { - if (!(container.kind === 201 || container.kind === 220)) { + if (!(container.kind === 201 || container.kind === 221)) { return undefined; } } @@ -28484,7 +29901,7 @@ var ts; var nodes; switch (container.kind) { case 201: - case 220: + case 221: nodes = container.statements; break; case 133: @@ -28512,17 +29929,17 @@ var ts; return ts.map(keywords, getReferenceEntryFromNode); function getFlagFromModifier(modifier) { switch (modifier) { - case 109: - return 16; - case 107: - return 32; case 108: + return 16; + case 106: + return 32; + case 107: return 64; - case 110: + case 109: return 128; case 77: return 1; - case 115: + case 114: return 2; default: ts.Debug.fail(); @@ -28568,24 +29985,6 @@ var ts; ts.Debug.assert(node.kind === 64 || node.kind === 7 || node.kind === 8); return getReferencesForNode(node, program.getSourceFiles(), false, findInStrings, findInComments); } - function initializeNameTable(sourceFile) { - var nameTable = {}; - walk(sourceFile); - sourceFile.nameTable = nameTable; - function walk(node) { - switch (node.kind) { - case 64: - nameTable[node.text] = node.text; - break; - case 8: - case 7: - nameTable[node.text] = node.text; - break; - default: - ts.forEachChild(node, walk); - } - } - } function getReferencesForNode(node, sourceFiles, searchOnlyInCurrentFile, findInStrings, findInComments) { if (isLabelName(node)) { if (isJumpStatementTarget(node)) { @@ -28612,7 +30011,7 @@ var ts; } var result; var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); - var declaredName = getDeclaredName(symbol); + var declaredName = getDeclaredName(symbol, node); var scope = getSymbolScope(symbol); if (scope) { result = []; @@ -28625,14 +30024,11 @@ var ts; getReferencesInNode(sourceFiles[0], symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } else { - var internedName = getInternedName(symbol, declarations); + var internedName = getInternedName(symbol, node, declarations); ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - ts.Debug.assert(sourceFile.nameTable !== undefined); - if (ts.lookUp(sourceFile.nameTable, internedName)) { + var nameTable = getNameTable(sourceFile); + if (ts.lookUp(nameTable, internedName)) { result = result || []; getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } @@ -28640,56 +30036,78 @@ var ts; } } return result; - function getDeclaredName(symbol) { - var name = typeInfoResolver.symbolToString(symbol); - return stripQuotes(name); + function isImportOrExportSpecifierName(location) { + return location.parent && + (location.parent.kind === 208 || location.parent.kind === 212) && + location.parent.propertyName === location; } - function getInternedName(symbol, declarations) { - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + function isImportOrExportSpecifierImportSymbol(symbol) { + return (symbol.flags & 8388608) && ts.forEach(symbol.declarations, function (declaration) { + return declaration.kind === 208 || declaration.kind === 212; + }); + } + function getDeclaredName(symbol, location) { + var functionExpression = ts.forEach(symbol.declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name; if (functionExpression && functionExpression.name) { - var name = functionExpression.name.text; + _name = functionExpression.name.text; } - else { - var name = symbol.name; + if (isImportOrExportSpecifierName(location)) { + return location.getText(); } - return stripQuotes(name); + _name = typeInfoResolver.symbolToString(symbol); + return stripQuotes(_name); + } + function getInternedName(symbol, location, declarations) { + if (isImportOrExportSpecifierName(location)) { + return location.getText(); + } + var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 160 ? d : undefined; }); + var _name = functionExpression && functionExpression.name + ? functionExpression.name.text + : symbol.name; + return stripQuotes(_name); } function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(length - 1) === 34) { - return name.substring(1, length - 1); + var _length = name.length; + if (_length >= 2 && name.charCodeAt(0) === 34 && name.charCodeAt(_length - 1) === 34) { + return name.substring(1, _length - 1); } ; return name; } function getSymbolScope(symbol) { - if (symbol.getFlags() && (4 | 8192)) { + if (symbol.flags & (4 | 8192)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32) ? d : undefined; }); if (privateDeclaration) { return ts.getAncestor(privateDeclaration, 196); } } - if (symbol.parent || (symbol.getFlags() & 268435456)) { + if (symbol.flags & 8388608) { return undefined; } - var scope = undefined; - var declarations = symbol.getDeclarations(); - if (declarations) { - for (var i = 0, n = declarations.length; i < n; i++) { - var container = getContainerNode(declarations[i]); + if (symbol.parent || (symbol.flags & 268435456)) { + return undefined; + } + var _scope = undefined; + var _declarations = symbol.getDeclarations(); + if (_declarations) { + for (var _i = 0, _n = _declarations.length; _i < _n; _i++) { + var declaration = _declarations[_i]; + var container = getContainerNode(declaration); if (!container) { return undefined; } - if (scope && scope !== container) { + if (_scope && _scope !== container) { return undefined; } - if (container.kind === 220 && !ts.isExternalModule(container)) { + if (container.kind === 221 && !ts.isExternalModule(container)) { return undefined; } - scope = container; + _scope = container; } } - return scope; + return _scope; } function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { var positions = []; @@ -28714,22 +30132,22 @@ var ts; return positions; } function getLabelReferencesInNode(container, targetLabel) { - var result = []; + var _result = []; var sourceFile = container.getSourceFile(); var labelName = targetLabel.text; var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.getWidth() !== labelName.length) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.getWidth() !== labelName.length) { return; } - if (node === targetLabel || - (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - result.push(getReferenceEntryFromNode(node)); + if (_node === targetLabel || + (isJumpStatementTarget(_node) && getTargetLabel(_node, labelName) === targetLabel)) { + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function isValidReferencePosition(node, searchSymbolName) { if (node) { @@ -28827,21 +30245,21 @@ var ts; default: return undefined; } - var result = []; + var _result = []; var sourceFile = searchSpaceNode.getSourceFile(); var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 90) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 90) { return; } - var container = ts.getSuperContainer(node, false); + var container = ts.getSuperContainer(_node, false); if (container && (128 & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { - result.push(getReferenceEntryFromNode(node)); + _result.push(getReferenceEntryFromNode(_node)); } }); - return result; + return _result; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) { var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); @@ -28860,7 +30278,7 @@ var ts; staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; - case 220: + case 221: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } @@ -28870,48 +30288,49 @@ var ts; default: return undefined; } - var result = []; - if (searchSpaceNode.kind === 220) { + var _result = []; + var possiblePositions; + if (searchSpaceNode.kind === 221) { ts.forEach(sourceFiles, function (sourceFile) { - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); - getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); + getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, _result); }); } else { var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, _result); } - return result; + return _result; function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) { ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 92) { + var _node = ts.getTouchingWord(sourceFile, position); + if (!_node || _node.kind !== 92) { return; } - var container = ts.getThisContainer(node, false); + var container = ts.getThisContainer(_node, false); switch (searchSpaceNode.kind) { case 160: case 195: if (searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 132: case 131: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; case 196: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128) === staticFlag) { - result.push(getReferenceEntryFromNode(node)); + result.push(getReferenceEntryFromNode(_node)); } break; - case 220: - if (container.kind === 220 && !ts.isExternalModule(container)) { - result.push(getReferenceEntryFromNode(node)); + case 221: + if (container.kind === 221 && !ts.isExternalModule(container)) { + result.push(getReferenceEntryFromNode(_node)); } break; } @@ -28919,25 +30338,28 @@ var ts; } } function populateSearchSymbolSet(symbol, location) { - var result = [symbol]; + var _result = [symbol]; + if (isImportOrExportSpecifierImportSymbol(symbol)) { + _result.push(typeInfoResolver.getAliasedSymbol(symbol)); + } if (isNameOfPropertyAssignment(location)) { ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { - result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); + _result.push.apply(_result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); if (shorthandValueSymbol) { - result.push(shorthandValueSymbol); + _result.push(shorthandValueSymbol); } } ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { if (rootSymbol !== symbol) { - result.push(rootSymbol); + _result.push(rootSymbol); } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); } }); - return result; + return _result; } function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { if (symbol && symbol.flags & (32 | 64)) { @@ -28969,6 +30391,10 @@ var ts; if (searchSymbols.indexOf(referenceSymbol) >= 0) { return true; } + if (isImportOrExportSpecifierImportSymbol(referenceSymbol) && + searchSymbols.indexOf(typeInfoResolver.getAliasedSymbol(referenceSymbol)) >= 0) { + return true; + } if (isNameOfPropertyAssignment(referenceLocation)) { return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { return ts.forEach(typeInfoResolver.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0; }); @@ -28979,9 +30405,9 @@ var ts; return true; } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - var result = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); - return ts.forEach(result, function (s) { return searchSymbols.indexOf(s) >= 0; }); + var _result = []; + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), _result); + return ts.forEach(_result, function (s) { return searchSymbols.indexOf(s) >= 0; }); } return false; }); @@ -28990,28 +30416,28 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeInfoResolver.getContextualType(objectLiteral); - var name = node.text; + var _name = node.text; if (contextualType) { if (contextualType.flags & 16384) { - var unionProperty = contextualType.getProperty(name); + var unionProperty = contextualType.getProperty(_name); if (unionProperty) { return [unionProperty]; } else { - var result = []; + var _result = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name); - if (symbol) { - result.push(symbol); + var _symbol = t.getProperty(_name); + if (_symbol) { + _result.push(_symbol); } }); - return result; + return _result; } } else { - var symbol = contextualType.getProperty(name); - if (symbol) { - return [symbol]; + var _symbol = contextualType.getProperty(_name); + if (_symbol) { + return [_symbol]; } } } @@ -29020,10 +30446,12 @@ var ts; } function getIntersectingMeaningFromDeclarations(meaning, declarations) { if (declarations) { + var lastIterationMeaning; do { - var lastIterationMeaning = meaning; - for (var i = 0, n = declarations.length; i < n; i++) { - var declarationMeaning = getMeaningFromDeclaration(declarations[i]); + lastIterationMeaning = meaning; + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var declaration = declarations[_i]; + var declarationMeaning = getMeaningFromDeclaration(declaration); if (declarationMeaning & meaning) { meaning |= declarationMeaning; } @@ -29047,16 +30475,16 @@ var ts; }; } function isWriteAccess(node) { - if (node.kind === 64 && ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (node.kind === 64 && ts.isDeclarationName(node)) { return true; } - var parent = node.parent; - if (parent) { - if (parent.kind === 166 || parent.kind === 165) { + var _parent = node.parent; + if (_parent) { + if (_parent.kind === 166 || _parent.kind === 165) { return true; } - else if (parent.kind === 167 && parent.left === node) { - var operator = parent.operatorToken.kind; + else if (_parent.kind === 167 && _parent.left === node) { + var operator = _parent.operatorToken.kind; return 52 <= operator && operator <= 63; } } @@ -29093,9 +30521,9 @@ var ts; case 150: case 130: case 129: - case 217: case 218: case 219: + case 220: case 132: case 131: case 133: @@ -29104,7 +30532,7 @@ var ts; case 195: case 160: case 161: - case 216: + case 217: return 1; case 127: case 197: @@ -29124,11 +30552,17 @@ var ts; else { return 4; } - case 202: + case 207: + case 208: + case 203: + case 204: + case 209: + case 210: return 1 | 2 | 4; - case 220: + case 221: return 4 | 1; } + return 1 | 2 | 4; ts.Debug.fail("Unknown declaration type"); } function isTypeReference(node) { @@ -29157,19 +30591,19 @@ var ts; ts.Debug.assert(node.kind === 64); if (node.parent.kind === 125 && node.parent.right === node && - node.parent.parent.kind === 202) { + node.parent.parent.kind === 203) { return 1 | 2 | 4; } return 4; } function getMeaningFromLocation(node) { - if (node.parent.kind === 208) { + if (node.parent.kind === 209) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { return getMeaningFromRightHandSideOfImportEquals(node); } - else if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + else if (ts.isDeclarationName(node)) { return getMeaningFromDeclaration(node.parent); } else if (isTypeReference(node)) { @@ -29453,8 +30887,8 @@ var ts; function processElement(element) { if (ts.textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { var children = element.getChildren(); - for (var i = 0, n = children.length; i < n; i++) { - var child = children[i]; + for (var _i = 0, _n = children.length; _i < _n; _i++) { + var child = children[_i]; if (ts.isToken(child)) { classifyToken(child); } @@ -29478,8 +30912,8 @@ var ts; if (matchKind) { var parentElement = token.parent; var childNodes = parentElement.getChildren(sourceFile); - for (var i = 0, n = childNodes.length; i < n; i++) { - var current = childNodes[i]; + for (var _i = 0, _n = childNodes.length; _i < _n; _i++) { + var current = childNodes[_i]; if (current.kind === matchKind) { var range1 = ts.createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); var range2 = ts.createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); @@ -29513,7 +30947,7 @@ var ts; var start = new Date().getTime(); var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; @@ -29559,9 +30993,9 @@ var ts; continue; } var descriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; + for (var _i = 0, n = descriptors.length; _i < n; _i++) { + if (matchArray[_i + firstDescriptorCaptureIndex]) { + descriptor = descriptors[_i]; } } ts.Debug.assert(descriptor !== undefined); @@ -29584,12 +31018,12 @@ var ts; var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; + var _preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; + var regExpString = _preamble + messagePortion + endOfLineOrEndOfComment; return new RegExp(regExpString, "gim"); } function isLetterOrDigit(char) { @@ -29609,9 +31043,10 @@ var ts; if (declarations && declarations.length > 0) { var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); if (defaultLibFileName) { - for (var i = 0; i < declarations.length; i++) { - var sourceFile = declarations[i].getSourceFile(); - if (sourceFile && getCanonicalFileName(ts.normalizePath(sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { + for (var _i = 0, _n = declarations.length; _i < _n; _i++) { + var current = declarations[_i]; + var _sourceFile = current.getSourceFile(); + if (_sourceFile && getCanonicalFileName(ts.normalizePath(_sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); } } @@ -29678,8 +31113,43 @@ var ts; }; } ts.createLanguageService = createLanguageService; + function getNameTable(sourceFile) { + if (!sourceFile.nameTable) { + initializeNameTable(sourceFile); + } + return sourceFile.nameTable; + } + ts.getNameTable = getNameTable; + function initializeNameTable(sourceFile) { + var nameTable = {}; + walk(sourceFile); + sourceFile.nameTable = nameTable; + function walk(node) { + switch (node.kind) { + case 64: + nameTable[node.text] = node.text; + break; + case 8: + case 7: + if (ts.isDeclarationName(node) || + node.parent.kind === 213 || + isArgumentOfElementAccessExpression(node)) { + nameTable[node.text] = node.text; + } + break; + default: + ts.forEachChild(node, walk); + } + } + } + function isArgumentOfElementAccessExpression(node) { + return node && + node.parent && + node.parent.kind === 154 && + node.parent.argumentExpression === node; + } function createClassifier() { - var scanner = ts.createScanner(2, false); + var _scanner = ts.createScanner(2, false); var noRegexTable = []; noRegexTable[64] = true; noRegexTable[8] = true; @@ -29696,19 +31166,19 @@ var ts; var templateStack = []; function isAccessibilityModifier(kind) { switch (kind) { - case 109: - case 107: case 108: + case 106: + case 107: return true; } return false; } function canFollow(keyword1, keyword2) { if (isAccessibilityModifier(keyword1)) { - if (keyword2 === 116 || - keyword2 === 120 || - keyword2 === 114 || - keyword2 === 110) { + if (keyword2 === 115 || + keyword2 === 119 || + keyword2 === 113 || + keyword2 === 109) { return true; } return false; @@ -29746,17 +31216,17 @@ var ts; templateStack.push(11); break; } - scanner.setText(text); + _scanner.setText(text); var result = { finalLexState: 0, entries: [] }; var angleBracketStack = 0; do { - token = scanner.scan(); + token = _scanner.scan(); if (!ts.isTrivia(token)) { if ((token === 36 || token === 56) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 9) { + if (_scanner.reScanSlashToken() === 9) { token = 9; } } @@ -29773,11 +31243,11 @@ var ts; else if (token === 25 && angleBracketStack > 0) { angleBracketStack--; } - else if (token === 112 || - token === 121 || - token === 119 || - token === 113 || - token === 122) { + else if (token === 111 || + token === 120 || + token === 118 || + token === 112 || + token === 121) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 64; } @@ -29794,7 +31264,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 11) { - token = scanner.reScanTemplateToken(); + token = _scanner.reScanTemplateToken(); if (token === 13) { templateStack.pop(); } @@ -29814,13 +31284,13 @@ var ts; } while (token !== 1); return result; function processToken() { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); + var start = _scanner.getTokenPos(); + var end = _scanner.getTextPos(); addResult(end - start, classFromKind(token)); if (end >= text.length) { if (token === 8) { - var tokenText = scanner.getTokenText(); - if (scanner.isUnterminated()) { + var tokenText = _scanner.getTokenText(); + if (_scanner.isUnterminated()) { var lastCharIndex = tokenText.length - 1; var numBackslashes = 0; while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92) { @@ -29828,17 +31298,19 @@ var ts; } if (numBackslashes & 1) { var quoteChar = tokenText.charCodeAt(0); - result.finalLexState = quoteChar === 34 ? 3 : 2; + result.finalLexState = quoteChar === 34 + ? 3 + : 2; } } } else if (token === 3) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { result.finalLexState = 1; } } else if (ts.isTemplateLiteralKind(token)) { - if (scanner.isUnterminated()) { + if (_scanner.isUnterminated()) { if (token === 13) { result.finalLexState = 5; } @@ -29970,7 +31442,7 @@ var ts; getNodeConstructor: function (kind) { function Node() { } - var proto = kind === 220 ? new SourceFileObject() : new NodeObject(); + var proto = kind === 221 ? new SourceFileObject() : new NodeObject(); proto.kind = kind; proto.pos = 0; proto.end = 0; @@ -29991,7 +31463,7 @@ var ts; var BreakpointResolver; (function (BreakpointResolver) { function spanInSourceFileAtLocation(sourceFile, position) { - if (sourceFile.flags & 1024) { + if (sourceFile.flags & 2048) { return undefined; } var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); @@ -30061,7 +31533,7 @@ var ts; } case 201: return spanInBlock(node); - case 216: + case 217: return spanInBlock(node.block); case 177: return textSpan(node.expression); @@ -30087,24 +31559,28 @@ var ts; return textSpan(node, ts.findNextToken(node.expression, node)); case 188: return textSpan(node, ts.findNextToken(node.expression, node)); - case 213: case 214: + case 215: return spanInNode(node.statements[0]); case 191: return spanInBlock(node.tryBlock); case 190: return textSpan(node, node.expression); - case 208: - return textSpan(node, node.exportName); - case 202: + case 209: + return textSpan(node, node.expression); + case 203: return textSpan(node, node.moduleReference); + case 204: + return textSpan(node, node.moduleSpecifier); + case 210: + return textSpan(node, node.moduleSpecifier); case 200: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } case 196: case 199: - case 219: + case 220: case 155: case 156: return textSpan(node); @@ -30138,13 +31614,13 @@ var ts; case 80: return spanInNextNode(node); default: - if (node.parent.kind === 217 && node.parent.name === node) { + if (node.parent.kind === 218 && node.parent.name === node) { return spanInNode(node.parent.initializer); } if (node.parent.kind === 158 && node.parent.type === node) { return spanInNode(node.parent.expression); } - if (ts.isAnyFunction(node.parent) && node.parent.type === node) { + if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } return spanInNode(node.parent); @@ -30157,7 +31633,11 @@ var ts; } var isParentVariableStatement = variableDeclaration.parent.parent.kind === 175; var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 181 && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement ? variableDeclaration.parent.parent.declarationList.declarations : isDeclarationOfForStatement ? variableDeclaration.parent.parent.initializer.declarations : undefined; + var declarations = isParentVariableStatement + ? variableDeclaration.parent.parent.declarationList.declarations + : isDeclarationOfForStatement + ? variableDeclaration.parent.parent.initializer.declarations + : undefined; if (variableDeclaration.initializer || (variableDeclaration.flags & 1)) { if (declarations && declarations[0] === variableDeclaration) { if (isParentVariableStatement) { @@ -30259,8 +31739,8 @@ var ts; case 196: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 188: - return spanInNodeIfStartsOnSameLine(node.parent, node.parent.clauses[0]); + case 202: + return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } @@ -30277,12 +31757,12 @@ var ts; if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 216: + case 217: return spanInNode(node.parent.statements[node.parent.statements.length - 1]); ; - case 188: - var switchStatement = node.parent; - var lastClause = switchStatement.clauses[switchStatement.clauses.length - 1]; + case 202: + var caseBlock = node.parent; + var lastClause = caseBlock.clauses[caseBlock.clauses.length - 1]; if (lastClause) { return spanInNode(lastClause.statements[lastClause.statements.length - 1]); } @@ -30317,7 +31797,7 @@ var ts; return spanInNode(node.parent); } function spanInColonToken(node) { - if (ts.isAnyFunction(node.parent) || node.parent.kind === 217) { + if (ts.isFunctionLike(node.parent) || node.parent.kind === 218) { return spanInPreviousNode(node); } return spanInNode(node.parent); diff --git a/bin/typescriptServices_internal.d.ts b/bin/typescriptServices_internal.d.ts index 16616795233..7fba731f25e 100644 --- a/bin/typescriptServices_internal.d.ts +++ b/bin/typescriptServices_internal.d.ts @@ -62,7 +62,7 @@ declare module ts { * index in the array will be the one associated with the produced key. */ function arrayToMap(array: T[], makeKey: (value: T) => string): Map; - var localizedDiagnosticMessages: Map; + let localizedDiagnosticMessages: Map; function getLocaleSpecificMessage(message: string): string; function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: any[]): Diagnostic; function createCompilerDiagnostic(message: DiagnosticMessage, ...args: any[]): Diagnostic; @@ -74,7 +74,7 @@ declare module ts { function deduplicateSortedDiagnostics(diagnostics: Diagnostic[]): Diagnostic[]; function normalizeSlashes(path: string): string; function getRootLength(path: string): number; - var directorySeparator: string; + let directorySeparator: string; function normalizePath(path: string): string; function getDirectoryPath(path: string): string; function isUrl(path: string): boolean; @@ -87,12 +87,6 @@ declare module ts { function combinePaths(path1: string, path2: string): string; function fileExtensionIs(path: string, extension: string): boolean; function removeFileExtension(path: string): string; - /** - * Based heavily on the abstract 'Quote' operation from ECMA-262 (24.3.2.2), - * but augmented for a few select characters. - * Note that this doesn't actually wrap the input in double quotes. - */ - function escapeString(s: string): string; function getDefaultLibFileName(options: CompilerOptions): string; interface ObjectAllocator { getNodeConstructor(kind: SyntaxKind): new () => Node; @@ -100,7 +94,7 @@ declare module ts { getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type; getSignatureConstructor(): new (checker: TypeChecker) => Signature; } - var objectAllocator: ObjectAllocator; + let objectAllocator: ObjectAllocator; const enum AssertionLevel { None = 0, Normal = 1, @@ -143,6 +137,11 @@ declare module ts { diagnosticMessage?: DiagnosticMessage; isNoDefaultLib?: boolean; } + interface SynthesizedNode extends Node { + leadingCommentRanges?: CommentRange[]; + trailingCommentRanges?: CommentRange[]; + startsOnNewLine: boolean; + } function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration; interface StringSymbolWriter extends SymbolWriter { string(): string; @@ -171,10 +170,13 @@ declare module ts { function escapeIdentifier(identifier: string): string; function unescapeIdentifier(identifier: string): string; function makeIdentifierFromModuleName(moduleName: string): string; + function isBlockOrCatchScoped(declaration: Declaration): boolean; + function getEnclosingBlockScopeContainer(node: Node): Node; + function isCatchClauseVariableDeclaration(declaration: Declaration): boolean; function declarationNameToString(name: DeclarationName): string; function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic; function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic; - function getErrorSpanForNode(node: Node): Node; + function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan; function isExternalModule(file: SourceFile): boolean; function isDeclarationFile(file: SourceFile): boolean; function isConstEnumDeclaration(node: Node): boolean; @@ -184,9 +186,9 @@ declare module ts { function isPrologueDirective(node: Node): boolean; function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[]; function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[]; - var fullTripleSlashReferencePathRegEx: RegExp; + let fullTripleSlashReferencePathRegEx: RegExp; function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T; - function isAnyFunction(node: Node): boolean; + function isFunctionLike(node: Node): boolean; function isFunctionBlock(node: Node): boolean; function isObjectLiteralMethod(node: Node): boolean; function getContainingFunction(node: Node): FunctionLikeDeclaration; @@ -209,7 +211,7 @@ declare module ts { function isInAmbientContext(node: Node): boolean; function isDeclaration(node: Node): boolean; function isStatement(n: Node): boolean; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean; + function isDeclarationName(name: Node): boolean; function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode; function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray; function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray; @@ -255,7 +257,7 @@ declare module ts { function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; - var unchangedTextChangeRange: TextChangeRange; + let unchangedTextChangeRange: TextChangeRange; /** * Called to merge all the changes that occurred across several versions of a script snapshot * into a single change. i.e. if a user keeps making successive edits to a script we will @@ -265,6 +267,17 @@ declare module ts { * Vn. */ function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + function nodeStartsNewLexicalEnvironment(n: Node): boolean; + function nodeIsSynthesized(node: Node): boolean; + function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node; + function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string; + /** + * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), + * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) + * Note that this doesn't actually wrap the input in double quotes. + */ + function escapeString(s: string): string; + function escapeNonAsciiCharacters(s: string): string; } declare module ts { var optionDeclarations: CommandLineOption[]; diff --git a/bin/typescript_internal.d.ts b/bin/typescript_internal.d.ts index aaa72fa2254..2d5973e5877 100644 --- a/bin/typescript_internal.d.ts +++ b/bin/typescript_internal.d.ts @@ -62,7 +62,7 @@ declare module "typescript" { * index in the array will be the one associated with the produced key. */ function arrayToMap(array: T[], makeKey: (value: T) => string): Map; - var localizedDiagnosticMessages: Map; + let localizedDiagnosticMessages: Map; function getLocaleSpecificMessage(message: string): string; function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: any[]): Diagnostic; function createCompilerDiagnostic(message: DiagnosticMessage, ...args: any[]): Diagnostic; @@ -74,7 +74,7 @@ declare module "typescript" { function deduplicateSortedDiagnostics(diagnostics: Diagnostic[]): Diagnostic[]; function normalizeSlashes(path: string): string; function getRootLength(path: string): number; - var directorySeparator: string; + let directorySeparator: string; function normalizePath(path: string): string; function getDirectoryPath(path: string): string; function isUrl(path: string): boolean; @@ -87,12 +87,6 @@ declare module "typescript" { function combinePaths(path1: string, path2: string): string; function fileExtensionIs(path: string, extension: string): boolean; function removeFileExtension(path: string): string; - /** - * Based heavily on the abstract 'Quote' operation from ECMA-262 (24.3.2.2), - * but augmented for a few select characters. - * Note that this doesn't actually wrap the input in double quotes. - */ - function escapeString(s: string): string; function getDefaultLibFileName(options: CompilerOptions): string; interface ObjectAllocator { getNodeConstructor(kind: SyntaxKind): new () => Node; @@ -100,7 +94,7 @@ declare module "typescript" { getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type; getSignatureConstructor(): new (checker: TypeChecker) => Signature; } - var objectAllocator: ObjectAllocator; + let objectAllocator: ObjectAllocator; const enum AssertionLevel { None = 0, Normal = 1, @@ -143,6 +137,11 @@ declare module "typescript" { diagnosticMessage?: DiagnosticMessage; isNoDefaultLib?: boolean; } + interface SynthesizedNode extends Node { + leadingCommentRanges?: CommentRange[]; + trailingCommentRanges?: CommentRange[]; + startsOnNewLine: boolean; + } function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration; interface StringSymbolWriter extends SymbolWriter { string(): string; @@ -171,10 +170,13 @@ declare module "typescript" { function escapeIdentifier(identifier: string): string; function unescapeIdentifier(identifier: string): string; function makeIdentifierFromModuleName(moduleName: string): string; + function isBlockOrCatchScoped(declaration: Declaration): boolean; + function getEnclosingBlockScopeContainer(node: Node): Node; + function isCatchClauseVariableDeclaration(declaration: Declaration): boolean; function declarationNameToString(name: DeclarationName): string; function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic; function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic; - function getErrorSpanForNode(node: Node): Node; + function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan; function isExternalModule(file: SourceFile): boolean; function isDeclarationFile(file: SourceFile): boolean; function isConstEnumDeclaration(node: Node): boolean; @@ -184,9 +186,9 @@ declare module "typescript" { function isPrologueDirective(node: Node): boolean; function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[]; function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[]; - var fullTripleSlashReferencePathRegEx: RegExp; + let fullTripleSlashReferencePathRegEx: RegExp; function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T; - function isAnyFunction(node: Node): boolean; + function isFunctionLike(node: Node): boolean; function isFunctionBlock(node: Node): boolean; function isObjectLiteralMethod(node: Node): boolean; function getContainingFunction(node: Node): FunctionLikeDeclaration; @@ -209,7 +211,7 @@ declare module "typescript" { function isInAmbientContext(node: Node): boolean; function isDeclaration(node: Node): boolean; function isStatement(n: Node): boolean; - function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean; + function isDeclarationName(name: Node): boolean; function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode; function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray; function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray; @@ -255,7 +257,7 @@ declare module "typescript" { function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; - var unchangedTextChangeRange: TextChangeRange; + let unchangedTextChangeRange: TextChangeRange; /** * Called to merge all the changes that occurred across several versions of a script snapshot * into a single change. i.e. if a user keeps making successive edits to a script we will @@ -265,6 +267,17 @@ declare module "typescript" { * Vn. */ function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + function nodeStartsNewLexicalEnvironment(n: Node): boolean; + function nodeIsSynthesized(node: Node): boolean; + function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node; + function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string; + /** + * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), + * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) + * Note that this doesn't actually wrap the input in double quotes. + */ + function escapeString(s: string): string; + function escapeNonAsciiCharacters(s: string): string; } declare module "typescript" { var optionDeclarations: CommandLineOption[]; diff --git a/package.json b/package.json index b53916b37b3..c33f2a93ec1 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,9 @@ "mocha": "latest", "chai": "latest", "browserify": "latest", - "istanbul": "latest", - "codeclimate-test-reporter": "latest" + "istanbul": "latest" }, "scripts": { - "test": "jake --trace generate-code-coverage" + "test": "jake runtests" } } diff --git a/scripts/VSDevMode.ps1 b/scripts/VSDevMode.ps1 index df34c9e7787..47694286edc 100644 --- a/scripts/VSDevMode.ps1 +++ b/scripts/VSDevMode.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS Run this PowerShell script to enable dev mode and/or a custom script for the TypeScript language service, e.g. -PS C:\> .\scripts\VSDevMode.ps1 -enableDevMode -tsScript C:\src\TypeScript\built\local\typescriptServices.js +PS C:\> .\scripts\VSDevMode.ps1 -enableDevMode -tsScript C:\src\TypeScript\built\local\ Note: If you get security errors, try running powershell as an Administrator and with the "-executionPolicy remoteSigned" switch @@ -13,7 +13,7 @@ Set to "12" for Dev12 (VS2013) or "14" (the default) for Dev14 (VS2015) Pass this switch to enable attaching a debugger to the language service .PARAMETER tsScript -The path to a custom language service script to use, e.g. "C:\src\TypeScript\built\local\typescriptServices.js" +The path to a directory containing a custom language service script to use (typescriptServices.js), e.g. "C:\src\TypeScript\built\local\" #> Param( [int]$vsVersion = 14, diff --git a/scripts/processDiagnosticMessages.ts b/scripts/processDiagnosticMessages.ts index 0d32c605fdc..b97e4a2ea54 100644 --- a/scripts/processDiagnosticMessages.ts +++ b/scripts/processDiagnosticMessages.ts @@ -65,8 +65,7 @@ function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, nameMap: ' ' + convertPropertyName(nameMap[name]) + ': { code: ' + diagnosticDetails.code + ', category: DiagnosticCategory.' + diagnosticDetails.category + - ', key: "' + name.replace('"', '\\"') + '"' + - (diagnosticDetails.isEarly ? ', isEarly: true' : '') + + ', key: "' + name.replace(/[\"]/g, '\\"') + '"' + ' },\r\n'; } diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f5b23ffb59b..3535aaffb27 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1,7 +1,7 @@ /// module ts { - /* @internal */ export var bindTime = 0; + /* @internal */ export let bindTime = 0; export const enum ModuleInstanceState { NonInstantiated = 0, @@ -25,7 +25,7 @@ module ts { } // 4. other uninstantiated module declarations. else if (node.kind === SyntaxKind.ModuleBlock) { - var state = ModuleInstanceState.NonInstantiated; + let state = ModuleInstanceState.NonInstantiated; forEachChild(node, n => { switch (getModuleInstanceState(n)) { case ModuleInstanceState.NonInstantiated: @@ -52,18 +52,18 @@ module ts { } export function bindSourceFile(file: SourceFile): void { - var start = new Date().getTime(); + let start = new Date().getTime(); bindSourceFileWorker(file); bindTime += new Date().getTime() - start; } function bindSourceFileWorker(file: SourceFile): void { - var parent: Node; - var container: Node; - var blockScopeContainer: Node; - var lastContainer: Node; - var symbolCount = 0; - var Symbol = objectAllocator.getSymbolConstructor(); + let parent: Node; + let container: Node; + let blockScopeContainer: Node; + let lastContainer: Node; + let symbolCount = 0; + let Symbol = objectAllocator.getSymbolConstructor(); if (!file.locals) { file.locals = {}; @@ -103,7 +103,7 @@ module ts { return '"' + (node.name).text + '"'; } if (node.name.kind === SyntaxKind.ComputedPropertyName) { - var nameExpression = (node.name).expression; + let nameExpression = (node.name).expression; Debug.assert(isWellKnownSymbolSyntactically(nameExpression)); return getPropertyNameForKnownSymbolName((nameExpression).name.text); } @@ -120,6 +120,13 @@ module ts { return "__new"; case SyntaxKind.IndexSignature: return "__index"; + case SyntaxKind.ExportDeclaration: + return "__export"; + case SyntaxKind.ExportAssignment: + return "default"; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ClassDeclaration: + return node.flags & NodeFlags.Default ? "default" : undefined; } } @@ -130,9 +137,12 @@ module ts { function declareSymbol(symbols: SymbolTable, parent: Symbol, node: Declaration, includes: SymbolFlags, excludes: SymbolFlags): Symbol { Debug.assert(!hasDynamicName(node)); - var name = getDeclarationName(node); + // The exported symbol for an export default function/class node is always named "default" + let name = node.flags & NodeFlags.Default && parent ? "default" : getDeclarationName(node); + + let symbol: Symbol; if (name !== undefined) { - var symbol = hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); + symbol = hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name)); if (symbol.flags & excludes) { if (node.name) { node.name.parent = node; @@ -140,14 +150,14 @@ module ts { // Report errors every position with duplicate declaration // Report errors on previous encountered declarations - var message = symbol.flags & SymbolFlags.BlockScopedVariable + let message = symbol.flags & SymbolFlags.BlockScopedVariable ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; forEach(symbol.declarations, declaration => { - file.bindDiagnostics.push(createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); + file.bindDiagnostics.push(createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); - file.bindDiagnostics.push(createDiagnosticForNode(node.name, message, getDisplayName(node))); + file.bindDiagnostics.push(createDiagnosticForNode(node.name || node, message, getDisplayName(node))); symbol = createSymbol(0, name); } @@ -163,7 +173,7 @@ module ts { // 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'. - var prototypeSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Prototype, "prototype"); + let prototypeSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Prototype, "prototype"); if (hasProperty(symbol.exports, prototypeSymbol.name)) { if (node.name) { node.name.parent = node; @@ -187,8 +197,8 @@ module ts { } function declareModuleMember(node: Declaration, symbolKind: SymbolFlags, symbolExcludes: SymbolFlags) { - var hasExportModifier = getCombinedNodeFlags(node) & NodeFlags.Export; - if (symbolKind & SymbolFlags.Import) { + let hasExportModifier = getCombinedNodeFlags(node) & NodeFlags.Export; + if (symbolKind & SymbolFlags.Alias) { if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && hasExportModifier)) { declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); } @@ -209,10 +219,10 @@ module ts { // 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 || isAmbientContext(container)) { - var exportKind = (symbolKind & SymbolFlags.Value ? SymbolFlags.ExportValue : 0) | + let exportKind = (symbolKind & SymbolFlags.Value ? SymbolFlags.ExportValue : 0) | (symbolKind & SymbolFlags.Type ? SymbolFlags.ExportType : 0) | (symbolKind & SymbolFlags.Namespace ? SymbolFlags.ExportNamespace : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); + let local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes); node.localSymbol = local; } @@ -229,9 +239,9 @@ module ts { node.locals = {}; } - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; + let saveParent = parent; + let saveContainer = container; + let savedBlockScopeContainer = blockScopeContainer; parent = node; if (symbolKind & SymbolFlags.IsContainer) { container = node; @@ -306,31 +316,25 @@ module ts { bindDeclaration(node, SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes, /*isBlockScopeContainer*/ true); } else { - var state = getModuleInstanceState(node); + let state = getModuleInstanceState(node); if (state === ModuleInstanceState.NonInstantiated) { bindDeclaration(node, SymbolFlags.NamespaceModule, SymbolFlags.NamespaceModuleExcludes, /*isBlockScopeContainer*/ true); } else { bindDeclaration(node, SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes, /*isBlockScopeContainer*/ true); - if (state === ModuleInstanceState.ConstEnumOnly) { - // mark value module as module that contains only enums - node.symbol.constEnumOnlyModule = true; + let currentModuleIsConstEnumOnly = state === ModuleInstanceState.ConstEnumOnly; + if (node.symbol.constEnumOnlyModule === undefined) { + // non-merged case - use the current state + node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; } - else if (node.symbol.constEnumOnlyModule) { - // const only value module was merged with instantiated module - reset flag - node.symbol.constEnumOnlyModule = false; + 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 bindExportDeclaration(node: ExportDeclaration) { - if (!node.exportClause) { - ((container).exportStars || ((container).exportStars = [])).push(node); - } - bindChildren(node, 0, /*isBlockScopeContainer*/ false); - } - function bindFunctionOrConstructorType(node: SignatureDeclaration) { // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } @@ -339,18 +343,18 @@ module ts { // 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(SymbolFlags.Signature, getDeclarationName(node)); + let symbol = createSymbol(SymbolFlags.Signature, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, SymbolFlags.Signature); bindChildren(node, SymbolFlags.Signature, /*isBlockScopeContainer:*/ false); - var typeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral, "__type"); + let typeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral, "__type"); addDeclarationToSymbol(typeLiteralSymbol, node, SymbolFlags.TypeLiteral); typeLiteralSymbol.members = {}; typeLiteralSymbol.members[node.kind === SyntaxKind.FunctionType ? "__call" : "__new"] = symbol } function bindAnonymousDeclaration(node: Declaration, symbolKind: SymbolFlags, name: string, isBlockScopeContainer: boolean) { - var symbol = createSymbol(symbolKind, name); + let symbol = createSymbol(symbolKind, name); addDeclarationToSymbol(symbol, node, symbolKind); bindChildren(node, symbolKind, isBlockScopeContainer); } @@ -484,19 +488,34 @@ module ts { case SyntaxKind.NamespaceImport: case SyntaxKind.ImportSpecifier: case SyntaxKind.ExportSpecifier: - bindDeclaration(node, SymbolFlags.Import, SymbolFlags.ImportExcludes, /*isBlockScopeContainer*/ false); - break; - case SyntaxKind.ExportDeclaration: - bindExportDeclaration(node); + bindDeclaration(node, SymbolFlags.Alias, SymbolFlags.AliasExcludes, /*isBlockScopeContainer*/ false); break; case SyntaxKind.ImportClause: if ((node).name) { - bindDeclaration(node, SymbolFlags.Import, SymbolFlags.ImportExcludes, /*isBlockScopeContainer*/ false); + bindDeclaration(node, SymbolFlags.Alias, SymbolFlags.AliasExcludes, /*isBlockScopeContainer*/ false); } else { bindChildren(node, 0, /*isBlockScopeContainer*/ false); } break; + case SyntaxKind.ExportDeclaration: + if (!(node).exportClause) { + // All export * declarations are collected in an __export symbol + declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.ExportStar, 0); + } + bindChildren(node, 0, /*isBlockScopeContainer*/ false); + break; + case SyntaxKind.ExportAssignment: + if ((node).expression && (node).expression.kind === SyntaxKind.Identifier) { + // An export default clause with an identifier exports all meanings of that identifier + declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Alias, SymbolFlags.AliasExcludes); + } + else { + // An export default clause with an expression exports a value + declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + } + bindChildren(node, 0, /*isBlockScopeContainer*/ false); + break; case SyntaxKind.SourceFile: if (isExternalModule(node)) { bindAnonymousDeclaration(node, SymbolFlags.ValueModule, '"' + removeFileExtension((node).fileName) + '"', /*isBlockScopeContainer*/ true); @@ -508,20 +527,20 @@ module ts { // Otherwise this won't be considered as redeclaration of a block scoped local: // function foo() { // let x; - // var x; + // let x; // } - // 'var x' will be placed into the function locals and 'let x' - into the locals of the block - bindChildren(node, 0, /*isBlockScopeContainer*/ !isAnyFunction(node.parent)); + // 'let x' will be placed into the function locals and 'let x' - into the locals of the block + bindChildren(node, 0, /*isBlockScopeContainer*/ !isFunctionLike(node.parent)); break; case SyntaxKind.CatchClause: case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.ForOfStatement: - case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseBlock: bindChildren(node, 0, /*isBlockScopeContainer*/ true); break; default: - var saveParent = parent; + let saveParent = parent; parent = node; forEachChild(node, bind); parent = saveParent; @@ -542,7 +561,7 @@ module ts { node.parent.kind === SyntaxKind.Constructor && node.parent.parent.kind === SyntaxKind.ClassDeclaration) { - var classDeclaration = node.parent.parent; + let classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 06aa9fce359..4988707d4a3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1,28 +1,31 @@ /// module ts { - var nextSymbolId = 1; - var nextNodeId = 1; - var nextMergeId = 1; + let nextSymbolId = 1; + let nextNodeId = 1; + let nextMergeId = 1; - /* @internal */ export var checkTime = 0; + /* @internal */ export let checkTime = 0; export function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker { - var Symbol = objectAllocator.getSymbolConstructor(); - var Type = objectAllocator.getTypeConstructor(); - var Signature = objectAllocator.getSignatureConstructor(); + let Symbol = objectAllocator.getSymbolConstructor(); + let Type = objectAllocator.getTypeConstructor(); + let Signature = objectAllocator.getSignatureConstructor(); - var typeCount = 0; + let typeCount = 0; - var emptyArray: any[] = []; - var emptySymbols: SymbolTable = {}; + let emptyArray: any[] = []; + let emptySymbols: SymbolTable = {}; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || ScriptTarget.ES3; + let compilerOptions = host.getCompilerOptions(); + let languageVersion = compilerOptions.target || ScriptTarget.ES3; - var emitResolver = createResolver(); + let emitResolver = createResolver(); - var checker: TypeChecker = { + let undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined"); + let argumentsSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "arguments"); + + let checker: TypeChecker = { getNodeCount: () => sum(host.getSourceFiles(), "nodeCount"), getIdentifierCount: () => sum(host.getSourceFiles(), "identifierCount"), getSymbolCount: () => sum(host.getSourceFiles(), "symbolCount"), @@ -54,66 +57,63 @@ module ts { isValidPropertyAccess, getSignatureFromDeclaration, isImplementationOfOverload, - getAliasedSymbol: resolveImport, + getAliasedSymbol: resolveAlias, getEmitResolver, getExportsOfExternalModule, }; - var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined"); - var argumentsSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "arguments"); - var unknownSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "unknown"); - var resolvingSymbol = createSymbol(SymbolFlags.Transient, "__resolving__"); + let unknownSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "unknown"); + let resolvingSymbol = createSymbol(SymbolFlags.Transient, "__resolving__"); - var anyType = createIntrinsicType(TypeFlags.Any, "any"); - var stringType = createIntrinsicType(TypeFlags.String, "string"); - var numberType = createIntrinsicType(TypeFlags.Number, "number"); - var booleanType = createIntrinsicType(TypeFlags.Boolean, "boolean"); - var esSymbolType = createIntrinsicType(TypeFlags.ESSymbol, "symbol"); - var voidType = createIntrinsicType(TypeFlags.Void, "void"); - var undefinedType = createIntrinsicType(TypeFlags.Undefined | TypeFlags.ContainsUndefinedOrNull, "undefined"); - var nullType = createIntrinsicType(TypeFlags.Null | TypeFlags.ContainsUndefinedOrNull, "null"); - var unknownType = createIntrinsicType(TypeFlags.Any, "unknown"); - var resolvingType = createIntrinsicType(TypeFlags.Any, "__resolving__"); + let anyType = createIntrinsicType(TypeFlags.Any, "any"); + let stringType = createIntrinsicType(TypeFlags.String, "string"); + let numberType = createIntrinsicType(TypeFlags.Number, "number"); + let booleanType = createIntrinsicType(TypeFlags.Boolean, "boolean"); + let esSymbolType = createIntrinsicType(TypeFlags.ESSymbol, "symbol"); + let voidType = createIntrinsicType(TypeFlags.Void, "void"); + let undefinedType = createIntrinsicType(TypeFlags.Undefined | TypeFlags.ContainsUndefinedOrNull, "undefined"); + let nullType = createIntrinsicType(TypeFlags.Null | TypeFlags.ContainsUndefinedOrNull, "null"); + let unknownType = createIntrinsicType(TypeFlags.Any, "unknown"); + let resolvingType = createIntrinsicType(TypeFlags.Any, "__resolving__"); - var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var inferenceFailureType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + let emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + let anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + let noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + + let anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, false, false); + let unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, false, false); - var anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, false, false); - var unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, false, false); + let globals: SymbolTable = {}; - var globals: SymbolTable = {}; + let globalArraySymbol: Symbol; + let globalESSymbolConstructorSymbol: Symbol; - var globalArraySymbol: Symbol; - var globalESSymbolConstructorSymbol: Symbol; + let globalObjectType: ObjectType; + let globalFunctionType: ObjectType; + let globalArrayType: ObjectType; + let globalStringType: ObjectType; + let globalNumberType: ObjectType; + let globalBooleanType: ObjectType; + let globalRegExpType: ObjectType; + let globalTemplateStringsArrayType: ObjectType; + let globalESSymbolType: ObjectType; + let globalIterableType: ObjectType; - var globalObjectType: ObjectType; - var globalFunctionType: ObjectType; - var globalArrayType: ObjectType; - var globalStringType: ObjectType; - var globalNumberType: ObjectType; - var globalBooleanType: ObjectType; - var globalRegExpType: ObjectType; - var globalTemplateStringsArrayType: ObjectType; - var globalESSymbolType: ObjectType; - var globalIterableType: ObjectType; + let anyArrayType: Type; - var anyArrayType: Type; + let tupleTypes: Map = {}; + let unionTypes: Map = {}; + let stringLiteralTypes: Map = {}; + let emitExtends = false; - var tupleTypes: Map = {}; - var unionTypes: Map = {}; - var stringLiteralTypes: Map = {}; - var emitExtends = false; + let mergedSymbols: Symbol[] = []; + let symbolLinks: SymbolLinks[] = []; + let nodeLinks: NodeLinks[] = []; + let potentialThisCollisions: Node[] = []; - var mergedSymbols: Symbol[] = []; - var symbolLinks: SymbolLinks[] = []; - var nodeLinks: NodeLinks[] = []; - var potentialThisCollisions: Node[] = []; + let diagnostics = createDiagnosticCollection(); - var diagnostics = createDiagnosticCollection(); - - var primitiveTypeInfo: Map<{ type: Type; flags: TypeFlags }> = { + let primitiveTypeInfo: Map<{ type: Type; flags: TypeFlags }> = { "string": { type: stringType, flags: TypeFlags.StringLike @@ -140,7 +140,7 @@ module ts { } function error(location: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): void { - var diagnostic = location + let diagnostic = location ? createDiagnosticForNode(location, message, arg0, arg1, arg2) : createCompilerDiagnostic(message, arg0, arg1, arg2); diagnostics.add(diagnostic); @@ -151,7 +151,7 @@ module ts { } function getExcludedSymbolFlags(flags: SymbolFlags): SymbolFlags { - var result: SymbolFlags = 0; + let result: SymbolFlags = 0; if (flags & SymbolFlags.BlockScopedVariable) result |= SymbolFlags.BlockScopedVariableExcludes; if (flags & SymbolFlags.FunctionScopedVariable) result |= SymbolFlags.FunctionScopedVariableExcludes; if (flags & SymbolFlags.Property) result |= SymbolFlags.PropertyExcludes; @@ -167,7 +167,7 @@ module ts { if (flags & SymbolFlags.SetAccessor) result |= SymbolFlags.SetAccessorExcludes; if (flags & SymbolFlags.TypeParameter) result |= SymbolFlags.TypeParameterExcludes; if (flags & SymbolFlags.TypeAlias) result |= SymbolFlags.TypeAliasExcludes; - if (flags & SymbolFlags.Import) result |= SymbolFlags.ImportExcludes; + if (flags & SymbolFlags.Alias) result |= SymbolFlags.AliasExcludes; return result; } @@ -177,7 +177,7 @@ module ts { } function cloneSymbol(symbol: Symbol): Symbol { - var result = createSymbol(symbol.flags | SymbolFlags.Merged, symbol.name); + let result = createSymbol(symbol.flags | SymbolFlags.Merged, symbol.name); result.declarations = symbol.declarations.slice(0); result.parent = symbol.parent; if (symbol.valueDeclaration) result.valueDeclaration = symbol.valueDeclaration; @@ -210,7 +210,7 @@ module ts { recordMergedSymbol(target, source); } else { - var message = target.flags & SymbolFlags.BlockScopedVariable || source.flags & SymbolFlags.BlockScopedVariable + let message = target.flags & SymbolFlags.BlockScopedVariable || source.flags & SymbolFlags.BlockScopedVariable ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; forEach(source.declarations, node => { error(node.name ? node.name : node, message, symbolToString(source)); @@ -222,8 +222,8 @@ module ts { } function cloneSymbolTable(symbolTable: SymbolTable): SymbolTable { - var result: SymbolTable = {}; - for (var id in symbolTable) { + let result: SymbolTable = {}; + for (let id in symbolTable) { if (hasProperty(symbolTable, id)) { result[id] = symbolTable[id]; } @@ -232,13 +232,13 @@ module ts { } function mergeSymbolTable(target: SymbolTable, source: SymbolTable) { - for (var id in source) { + for (let id in source) { if (hasProperty(source, id)) { if (!hasProperty(target, id)) { target[id] = source[id]; } else { - var symbol = target[id]; + let symbol = target[id]; if (!(symbol.flags & SymbolFlags.Merged)) { target[id] = symbol = cloneSymbol(symbol); } @@ -248,14 +248,6 @@ module ts { } } - function extendSymbolTable(target: SymbolTable, source: SymbolTable) { - for (var id in source) { - if (!hasProperty(target, id)) { - target[id] = source[id]; - } - } - } - function getSymbolLinks(symbol: Symbol): SymbolLinks { if (symbol.flags & SymbolFlags.Transient) return symbol; if (!symbol.id) symbol.id = nextSymbolId++; @@ -277,16 +269,15 @@ module ts { function getSymbol(symbols: SymbolTable, name: string, meaning: SymbolFlags): Symbol { if (meaning && hasProperty(symbols, name)) { - var symbol = symbols[name]; + let symbol = symbols[name]; Debug.assert((symbol.flags & SymbolFlags.Instantiated) === 0, "Should never get an instantiated symbol here."); if (symbol.flags & meaning) { return symbol; } - if (symbol.flags & SymbolFlags.Import) { - var target = resolveImport(symbol); - // unknown symbol will mean that there were reported error during import resolution - // treat it as positive answer to avoid cascading errors + if (symbol.flags & SymbolFlags.Alias) { + let target = resolveAlias(symbol); + // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors if (target === unknownSymbol || target.flags & meaning) { return symbol; } @@ -298,8 +289,8 @@ module ts { /** Returns true if node1 is defined before node 2**/ function isDefinedBefore(node1: Node, node2: Node): boolean { - var file1 = getSourceFileOfNode(node1); - var file2 = getSourceFileOfNode(node2); + let file1 = getSourceFileOfNode(node1); + let file2 = getSourceFileOfNode(node2); if (file1 === file2) { return node1.pos <= node2.pos; } @@ -308,7 +299,7 @@ module ts { return true; } - var sourceFiles = host.getSourceFiles(); + let sourceFiles = host.getSourceFiles(); return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2); } @@ -316,10 +307,10 @@ module ts { // the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with // the given name can be found. function resolveName(location: Node, name: string, meaning: SymbolFlags, nameNotFoundMessage: DiagnosticMessage, nameArg: string | Identifier): Symbol { - var result: Symbol; - var lastLocation: Node; - var propertyWithInvalidInitializer: Node; - var errorLocation = location; + let result: Symbol; + let lastLocation: Node; + let propertyWithInvalidInitializer: Node; + let errorLocation = location; loop: while (location) { // Locals of a source file are not in scope (because they get merged into the global symbol table) @@ -333,7 +324,7 @@ module ts { if (!isExternalModule(location)) break; case SyntaxKind.ModuleDeclaration: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & SymbolFlags.ModuleMember)) { - if (!(result.flags & SymbolFlags.Import && getDeclarationOfImportSymbol(result).kind === SyntaxKind.ExportSpecifier)) { + if (!(result.flags & SymbolFlags.Alias && getDeclarationOfAliasSymbol(result).kind === SyntaxKind.ExportSpecifier)) { break loop; } result = undefined; @@ -347,13 +338,13 @@ module ts { case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: // TypeScript 1.0 spec (April 2014): 8.4.1 - // Initializer expressions for instance member variables are evaluated in the scope - // of the class constructor body but are not permitted to reference parameters or - // local variables of the constructor. This effectively means that entities from outer scopes - // by the same name as a constructor parameter or local variable are inaccessible + // Initializer expressions for instance member variables are evaluated in the scope + // of the class constructor body but are not permitted to reference parameters or + // local variables of the constructor. This effectively means that entities from outer scopes + // by the same name as a constructor parameter or local variable are inaccessible // in initializer expressions for instance member variables. if (location.parent.kind === SyntaxKind.ClassDeclaration && !(location.flags & NodeFlags.Static)) { - var ctor = findConstructorDeclaration(location.parent); + let ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { if (getSymbol(ctor.locals, name, meaning & SymbolFlags.Value)) { // Remember the property node, it will be used later to report appropriate error @@ -385,7 +376,7 @@ module ts { // } // case SyntaxKind.ComputedPropertyName: - var grandparent = location.parent.parent; + let grandparent = location.parent.parent; if (grandparent.kind === SyntaxKind.ClassDeclaration || grandparent.kind === SyntaxKind.InterfaceDeclaration) { // A reference to this grandparent's type parameters would be an error if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & SymbolFlags.Type)) { @@ -411,7 +402,7 @@ module ts { result = argumentsSymbol; break loop; } - var id = (location).name; + let id = (location).name; if (id && name === id.text) { result = location.symbol; break loop; @@ -438,49 +429,106 @@ module ts { if (propertyWithInvalidInitializer) { // We have a match, but the reference occurred within a property initializer and the identifier also binds // to a local variable in the constructor where the code will be emitted. - var propertyName = (propertyWithInvalidInitializer).name; + let propertyName = (propertyWithInvalidInitializer).name; error(errorLocation, Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); return undefined; } if (result.flags & SymbolFlags.BlockScopedVariable) { - // Block-scoped variables cannot be used before their definition - var declaration = forEach(result.declarations, d => isBlockOrCatchScoped(d) ? d : undefined); - - Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationNameToString(declaration.name)); - } + checkResolvedBlockScopedVariable(result, errorLocation); } } return result; } - function isImportSymbolDeclaration(node: Node): boolean { + function checkResolvedBlockScopedVariable(result: Symbol, errorLocation: Node): void { + Debug.assert((result.flags & SymbolFlags.BlockScopedVariable) !== 0) + // Block-scoped variables cannot be used before their definition + let declaration = forEach(result.declarations, d => isBlockOrCatchScoped(d) ? d : undefined); + + Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); + + // first check if usage is lexically located after the declaration + let isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); + if (!isUsedBeforeDeclaration) { + // lexical check succeeded however code still can be illegal. + // - block scoped variables cannot be used in its initializers + // let x = x; // illegal but usage is lexically after definition + // - in ForIn/ForOf statements variable cannot be contained in expression part + // for (let x in x) + // for (let x of x) + + // climb up to the variable declaration skipping binding patterns + let variableDeclaration = getAncestor(declaration, SyntaxKind.VariableDeclaration); + let container = getEnclosingBlockScopeContainer(variableDeclaration); + + if (variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement || + variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement) { + // variable statement/for statement case, + // use site should not be inside variable declaration (initializer of declaration or binding element) + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement || + variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) { + // ForIn/ForOf case - use site should not be used in expression part + let expression = (variableDeclaration.parent.parent).expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + } + if (isUsedBeforeDeclaration) { + error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationNameToString(declaration.name)); + } + } + + /* Starting from 'initial' node walk up the parent chain until 'stopAt' node is reached. + * If at any point current node is equal to 'parent' node - return true. + * Return false if 'stopAt' node is reached or isFunctionLike(current) === true. + */ + function isSameScopeDescendentOf(initial: Node, parent: Node, stopAt: Node): boolean { + if (!parent) { + return false; + } + for (let current = initial; current && current !== stopAt && !isFunctionLike(current); current = current.parent) { + if (current === parent) { + return true; + } + } + return false; + } + + // An alias symbol is created by one of the following declarations: + // import = ... + // import from ... + // import * as from ... + // import { x as } from ... + // export { x as } from ... + // export default ... + function isAliasSymbolDeclaration(node: Node): boolean { return node.kind === SyntaxKind.ImportEqualsDeclaration || node.kind === SyntaxKind.ImportClause && !!(node).name || node.kind === SyntaxKind.NamespaceImport || node.kind === SyntaxKind.ImportSpecifier || - node.kind === SyntaxKind.ExportSpecifier; + node.kind === SyntaxKind.ExportSpecifier || + node.kind === SyntaxKind.ExportAssignment; } - function getDeclarationOfImportSymbol(symbol: Symbol): Declaration { - return forEach(symbol.declarations, d => isImportSymbolDeclaration(d) ? d : undefined); + function getDeclarationOfAliasSymbol(symbol: Symbol): Declaration { + return forEach(symbol.declarations, d => isAliasSymbolDeclaration(d) ? d : undefined); } function getTargetOfImportEqualsDeclaration(node: ImportEqualsDeclaration): Symbol { if (node.moduleReference.kind === SyntaxKind.ExternalModuleReference) { - var moduleSymbol = resolveExternalModuleName(node, getExternalModuleImportEqualsDeclarationExpression(node)); - var exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); + let moduleSymbol = resolveExternalModuleName(node, getExternalModuleImportEqualsDeclarationExpression(node)); + let exportAssignmentSymbol = moduleSymbol && getResolvedExportAssignmentSymbol(moduleSymbol); return exportAssignmentSymbol || moduleSymbol; } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); } function getTargetOfImportClause(node: ImportClause): Symbol { - var moduleSymbol = resolveExternalModuleName(node, (node.parent).moduleSpecifier); + let moduleSymbol = resolveExternalModuleName(node, (node.parent).moduleSpecifier); if (moduleSymbol) { - var exportAssignmentSymbol = getResolvedExportAssignmentSymbol(moduleSymbol); + let exportAssignmentSymbol = getResolvedExportAssignmentSymbol(moduleSymbol); if (!exportAssignmentSymbol) { error(node.name, Diagnostics.External_module_0_has_no_default_export_or_export_assignment, symbolToString(moduleSymbol)); } @@ -493,16 +541,16 @@ module ts { } function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration, specifier: ImportOrExportSpecifier): Symbol { - var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); + let moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol) { - var name = specifier.propertyName || specifier.name; + let name = specifier.propertyName || specifier.name; if (name.text) { - var symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); + let symbol = getSymbol(getExportsOfSymbol(moduleSymbol), name.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); if (!symbol) { error(name, Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), declarationNameToString(name)); return; } - return symbol.flags & (SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace) ? symbol : resolveImport(symbol); + return symbol.flags & (SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace) ? symbol : resolveAlias(symbol); } } } @@ -514,7 +562,11 @@ module ts { function getTargetOfExportSpecifier(node: ExportSpecifier): Symbol { return (node.parent.parent).moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node, node.propertyName || node.name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); + resolveEntityName(node.propertyName || node.name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); + } + + function getTargetOfExportAssignment(node: ExportAssignment): Symbol { + return node.expression && resolveEntityName(node.expression, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); } function getTargetOfImportDeclaration(node: Declaration): Symbol { @@ -529,16 +581,18 @@ module ts { return getTargetOfImportSpecifier(node); case SyntaxKind.ExportSpecifier: return getTargetOfExportSpecifier(node); + case SyntaxKind.ExportAssignment: + return getTargetOfExportAssignment(node); } } - function resolveImport(symbol: Symbol): Symbol { - Debug.assert((symbol.flags & SymbolFlags.Import) !== 0, "Should only get Imports here."); - var links = getSymbolLinks(symbol); + function resolveAlias(symbol: Symbol): Symbol { + Debug.assert((symbol.flags & SymbolFlags.Alias) !== 0, "Should only get Alias here."); + let links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfImportSymbol(symbol); - var target = getTargetOfImportDeclaration(node); + let node = getDeclarationOfAliasSymbol(symbol); + let target = getTargetOfImportDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; } @@ -552,6 +606,37 @@ module ts { return links.target; } + function markExportAsReferenced(node: ImportEqualsDeclaration | ExportAssignment | ExportSpecifier) { + let symbol = getSymbolOfNode(node); + let target = resolveAlias(symbol); + if (target && target !== unknownSymbol && target.flags & SymbolFlags.Value && !isConstEnumOrConstEnumOnlyModule(target)) { + markAliasSymbolAsReferenced(symbol); + } + } + + // When an alias symbol is referenced, we need to mark the entity it references as referenced and in turn repeat that until + // we reach a non-alias or an exported entity (which is always considered referenced). We do this by checking the target of + // the alias as an expression (which recursively takes us back here if the target references another alias). + function markAliasSymbolAsReferenced(symbol: Symbol) { + let links = getSymbolLinks(symbol); + if (!links.referenced) { + links.referenced = true; + let node = getDeclarationOfAliasSymbol(symbol); + if (node.kind === SyntaxKind.ExportAssignment && (node).expression) { + // export default + checkExpressionCached((node).expression); + } + else if (node.kind === SyntaxKind.ExportSpecifier) { + // export { } or export { as foo } + checkExpressionCached((node).propertyName || (node).name); + } + else if (isInternalModuleImportEqualsDeclaration(node)) { + // import foo = + checkExpressionCached((node).moduleReference); + } + } + } + // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName: EntityName, importDeclaration?: ImportEqualsDeclaration): Symbol { if (!importDeclaration) { @@ -569,13 +654,13 @@ module ts { } // Check for case 1 and 3 in the above example if (entityName.kind === SyntaxKind.Identifier || entityName.parent.kind === SyntaxKind.QualifiedName) { - return resolveEntityName(importDeclaration, entityName, SymbolFlags.Namespace); + return resolveEntityName(entityName, SymbolFlags.Namespace); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier Debug.assert(entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration); - return resolveEntityName(importDeclaration, entityName, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); + return resolveEntityName(entityName, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); } } @@ -583,31 +668,33 @@ module ts { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } - // Resolves a qualified name and any involved import aliases - function resolveEntityName(location: Node, name: EntityName, meaning: SymbolFlags): Symbol { + // Resolves a qualified name and any involved aliases + function resolveEntityName(name: EntityName, meaning: SymbolFlags): Symbol { if (getFullWidth(name) === 0) { return undefined; } + let symbol: Symbol; if (name.kind === SyntaxKind.Identifier) { - var symbol = resolveName(location, (name).text, meaning, Diagnostics.Cannot_find_name_0, name); + symbol = resolveName(name, (name).text, meaning, Diagnostics.Cannot_find_name_0, name); if (!symbol) { - return; + return undefined; } } else if (name.kind === SyntaxKind.QualifiedName) { - var namespace = resolveEntityName(location, (name).left, SymbolFlags.Namespace); - if (!namespace || namespace === unknownSymbol || getFullWidth((name).right) === 0) return; - var symbol = getSymbol(getExportsOfSymbol(namespace), (name).right.text, meaning); + let namespace = resolveEntityName((name).left, SymbolFlags.Namespace); + if (!namespace || namespace === unknownSymbol || getFullWidth((name).right) === 0) { + return undefined; + } + let right = (name).right; + symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { - error(location, Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), - declarationNameToString((name).right)); - return; + error(right, Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), declarationNameToString(right)); + return undefined; } } - Debug.assert((symbol.flags & SymbolFlags.Instantiated) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveImport(symbol); + return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function isExternalModuleNameRelative(moduleName: string): boolean { @@ -621,27 +708,35 @@ module ts { return; } - var moduleReferenceLiteral = moduleReferenceExpression; - var searchPath = getDirectoryPath(getSourceFile(location).fileName); + let moduleReferenceLiteral = moduleReferenceExpression; + let searchPath = getDirectoryPath(getSourceFile(location).fileName); // 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. - var moduleName = escapeIdentifier(moduleReferenceLiteral.text); + let moduleName = escapeIdentifier(moduleReferenceLiteral.text); if (!moduleName) return; - var isRelative = isExternalModuleNameRelative(moduleName); + let isRelative = isExternalModuleNameRelative(moduleName); if (!isRelative) { - var symbol = getSymbol(globals, '"' + moduleName + '"', SymbolFlags.ValueModule); + let symbol = getSymbol(globals, '"' + moduleName + '"', SymbolFlags.ValueModule); if (symbol) { return symbol; } } + + let sourceFile: SourceFile; while (true) { - var fileName = normalizePath(combinePaths(searchPath, moduleName)); - var sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); - if (sourceFile || isRelative) break; - var parentPath = getDirectoryPath(searchPath); - if (parentPath === searchPath) break; + let fileName = normalizePath(combinePaths(searchPath, moduleName)); + sourceFile = host.getSourceFile(fileName + ".ts") || host.getSourceFile(fileName + ".d.ts"); + if (sourceFile || isRelative) { + break; + } + + let parentPath = getDirectoryPath(searchPath); + if (parentPath === searchPath) { + break; + } + searchPath = parentPath; } if (sourceFile) { @@ -654,86 +749,56 @@ module ts { error(moduleReferenceLiteral, Diagnostics.Cannot_find_external_module_0, moduleName); } + function getExportAssignmentSymbol(moduleSymbol: Symbol): Symbol { + return moduleSymbol.exports["default"]; + } + function getResolvedExportAssignmentSymbol(moduleSymbol: Symbol): Symbol { - var symbol = getExportAssignmentSymbol(moduleSymbol); + let symbol = getExportAssignmentSymbol(moduleSymbol); if (symbol) { if (symbol.flags & (SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace)) { return symbol; } - if (symbol.flags & SymbolFlags.Import) { - return resolveImport(symbol); + if (symbol.flags & SymbolFlags.Alias) { + return resolveAlias(symbol); } } } - function getExportAssignmentSymbol(symbol: Symbol): Symbol { - checkTypeOfExportAssignmentSymbol(symbol); - return getSymbolLinks(symbol).exportAssignmentSymbol; - } - - function checkTypeOfExportAssignmentSymbol(containerSymbol: Symbol): void { - var symbolLinks = getSymbolLinks(containerSymbol); - if (!symbolLinks.exportAssignmentChecked) { - var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol); - if (exportInformation.exportAssignments.length) { - if (exportInformation.exportAssignments.length > 1) { - // TypeScript 1.0 spec (April 2014): 11.2.4 - // It is an error for an external module to contain more than one export assignment. - forEach(exportInformation.exportAssignments, node => error(node, Diagnostics.A_module_cannot_have_more_than_one_export_assignment)); - } - var node = exportInformation.exportAssignments[0]; - if (exportInformation.hasExportedMember) { - // TypeScript 1.0 spec (April 2014): 11.2.3 - // If an external module contains an export assignment it is an error - // for the external module to also contain export declarations. - // The two types of exports are mutually exclusive. - error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - if (node.exportName.text) { - var meaning = SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace; - var exportSymbol = resolveName(node, node.exportName.text, meaning, Diagnostics.Cannot_find_name_0, node.exportName); - } - symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol; - } - symbolLinks.exportAssignmentChecked = true; - } - } - - function collectExportInformationForSourceFileOrModule(symbol: Symbol) { - var seenExportedMember = false; - var result: ExportAssignment[] = []; - forEach(symbol.declarations, declaration => { - var block = (declaration.kind === SyntaxKind.SourceFile ? declaration : (declaration).body); - forEach(block.statements, node => { - if (node.kind === SyntaxKind.ExportAssignment) { - result.push(node); - } - else { - seenExportedMember = seenExportedMember || (node.flags & NodeFlags.Export) !== 0; - } - }); - }); - return { - hasExportedMember: seenExportedMember, - exportAssignments: result - }; - } - function getExportsOfSymbol(symbol: Symbol): SymbolTable { return symbol.flags & SymbolFlags.Module ? getExportsOfModule(symbol) : symbol.exports; } function getExportsOfModule(moduleSymbol: Symbol): SymbolTable { - var links = getSymbolLinks(moduleSymbol); + let links = getSymbolLinks(moduleSymbol); return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); } + function extendExportSymbols(target: SymbolTable, source: SymbolTable) { + for (let id in source) { + if (id !== "default" && !hasProperty(target, id)) { + target[id] = source[id]; + } + } + } + function getExportsForModule(moduleSymbol: Symbol): SymbolTable { - var result: SymbolTable; - var visitedSymbols: Symbol[] = []; + if (languageVersion < ScriptTarget.ES6) { + // A default export hides all other exports in CommonJS and AMD modules + let defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + return { + "default": defaultSymbol + }; + } + } + let result: SymbolTable; + let visitedSymbols: Symbol[] = []; visit(moduleSymbol); return result || moduleSymbol.exports; + // The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example, + // module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error. function visit(symbol: Symbol) { if (!contains(visitedSymbols, symbol)) { visitedSymbols.push(symbol); @@ -741,24 +806,21 @@ module ts { if (!result) { result = cloneSymbolTable(moduleSymbol.exports); } - extendSymbolTable(result, symbol.exports); + extendExportSymbols(result, symbol.exports); + } + // All export * declarations are collected in an __export symbol by the binder + let exportStars = symbol.exports["__export"]; + if (exportStars) { + forEach(exportStars.declarations, node => { + visit(resolveExternalModuleName(node, (node).moduleSpecifier)); + }); } - forEach(symbol.declarations, node => { - if (node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.ModuleDeclaration) { - forEach((node).exportStars, exportStar => { - var moduleSymbol = resolveExternalModuleName(exportStar, exportStar.moduleSpecifier); - if (moduleSymbol) { - visit(moduleSymbol); - } - }); - } - }); } } } function getMergedSymbol(symbol: Symbol): Symbol { - var merged: Symbol; + let merged: Symbol; return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol; } @@ -788,18 +850,17 @@ module ts { return true; } - // If it is an import, then it is a value if the symbol it resolves to is a value. - if (symbol.flags & SymbolFlags.Import) { - return (resolveImport(symbol).flags & SymbolFlags.Value) !== 0; + // If it is an alias, then it is a value if the symbol it resolves to is a value. + if (symbol.flags & SymbolFlags.Alias) { + return (resolveAlias(symbol).flags & SymbolFlags.Value) !== 0; } return false; } function findConstructorDeclaration(node: ClassDeclaration): ConstructorDeclaration { - var members = node.members; - for (var i = 0; i < members.length; i++) { - var member = members[i]; + let members = node.members; + for (let member of members) { if (member.kind === SyntaxKind.Constructor && nodeIsPresent((member).body)) { return member; } @@ -807,19 +868,19 @@ module ts { } function createType(flags: TypeFlags): Type { - var result = new Type(checker, flags); + let result = new Type(checker, flags); result.id = typeCount++; return result; } function createIntrinsicType(kind: TypeFlags, intrinsicName: string): IntrinsicType { - var type = createType(kind); + let type = createType(kind); type.intrinsicName = intrinsicName; return type; } function createObjectType(kind: TypeFlags, symbol?: Symbol): ObjectType { - var type = createType(kind); + let type = createType(kind); type.symbol = symbol; return type; } @@ -836,12 +897,12 @@ module ts { } function getNamedMembers(members: SymbolTable): Symbol[] { - var result: Symbol[]; - for (var id in members) { + let result: Symbol[]; + for (let id in members) { if (hasProperty(members, id)) { if (!isReservedMemberName(id)) { if (!result) result = []; - var symbol = members[id]; + let symbol = members[id]; if (symbolIsValue(symbol)) { result.push(symbol); } @@ -867,8 +928,8 @@ module ts { } function forEachSymbolTableInScope(enclosingDeclaration: Node, callback: (symbolTable: SymbolTable) => T): T { - var result: T; - for (var location = enclosingDeclaration; location; location = location.parent) { + let result: T; + for (let location = enclosingDeclaration; location; location = location.parent) { // 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 = callback(location.locals)) { @@ -911,14 +972,14 @@ module ts { } // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too - var accessibleParent = getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning), useOnlyExternalAliasing); + let accessibleParent = getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning), useOnlyExternalAliasing); return !!accessibleParent; } function isAccessible(symbolFromSymbolTable: Symbol, resolvedAliasSymbol?: Symbol) { if (symbol === (resolvedAliasSymbol || symbolFromSymbolTable)) { // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) - // and if symbolfrom symbolTable or alias resolution matches the symbol, + // and if symbolfrom symbolTable or alias resolution matches the symbol, // check the symbol can be qualified, it is only then this symbol is accessible return !forEach(symbolFromSymbolTable.declarations, hasExternalModuleSymbol) && canQualifySymbol(symbolFromSymbolTable, meaning); @@ -932,19 +993,19 @@ module ts { // Check if symbol is any of the alias return forEachValue(symbols, symbolFromSymbolTable => { - if (symbolFromSymbolTable.flags & SymbolFlags.Import) { + if (symbolFromSymbolTable.flags & SymbolFlags.Alias) { if (!useOnlyExternalAliasing || // We can use any type of alias to get the name // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { + let resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); + if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; } // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain // but only if the symbolFromSymbolTable can be qualified - var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; + let accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); } @@ -959,7 +1020,7 @@ module ts { } function needsQualification(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) { - var qualify = false; + let qualify = false; forEachSymbolTableInScope(enclosingDeclaration, symbolTable => { // If symbol of this name is not available in the symbol table we are ok if (!hasProperty(symbolTable, symbol.name)) { @@ -967,14 +1028,14 @@ module ts { return false; } // If the symbol with this name is present it should refer to the symbol - var symbolFromSymbolTable = symbolTable[symbol.name]; + let symbolFromSymbolTable = symbolTable[symbol.name]; if (symbolFromSymbolTable === symbol) { // No need to qualify return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & SymbolFlags.Import) ? resolveImport(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & SymbolFlags.Alias) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -989,13 +1050,13 @@ module ts { function isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult { if (symbol && enclosingDeclaration && !(symbol.flags & SymbolFlags.TypeParameter)) { - var initialSymbol = symbol; - var meaningToLook = meaning; + let initialSymbol = symbol; + let meaningToLook = meaning; while (symbol) { // Symbol is accessible if it by itself is accessible - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaningToLook, /*useOnlyExternalAliasing*/ false); + let accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaningToLook, /*useOnlyExternalAliasing*/ false); if (accessibleSymbolChain) { - var hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0]); + let hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0]); if (!hasAccessibleDeclarations) { return { accessibility: SymbolAccessibility.NotAccessible, @@ -1013,20 +1074,20 @@ module ts { // export class c { // } // } - // var x: typeof m.c + // let 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. + // 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 // It is accessible if the parent m is accessible because then m.c can be accessed through qualification meaningToLook = getQualifiedLeftMeaning(meaning); symbol = getParentOfSymbol(symbol); } - // This could be a symbol that is not exported in the external module + // This could be a symbol that is not exported in the external module // or it could be a symbol from different external module that is not aliased and hence cannot be named - var symbolExternalModule = forEach(initialSymbol.declarations, getExternalModuleContainer); + let symbolExternalModule = forEach(initialSymbol.declarations, getExternalModuleContainer); if (symbolExternalModule) { - var enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); + let enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); if (symbolExternalModule !== enclosingExternalModule) { // name from different external module that is not visible return { @@ -1061,7 +1122,7 @@ module ts { } function hasVisibleDeclarations(symbol: Symbol): SymbolVisibilityResult { - var aliasesToMakeVisible: ImportEqualsDeclaration[]; + let aliasesToMakeVisible: ImportEqualsDeclaration[]; if (forEach(symbol.declarations, declaration => !getIsDeclarationVisible(declaration))) { return undefined; } @@ -1069,7 +1130,7 @@ module ts { function getIsDeclarationVisible(declaration: Declaration) { if (!isDeclarationVisible(declaration)) { - // Mark the unexported alias as visible if its parent is visible + // Mark the unexported alias as visible if its parent is visible // because these kind of aliases can be used to name types in declaration file if (declaration.kind === SyntaxKind.ImportEqualsDeclaration && !(declaration.flags & NodeFlags.Export) && @@ -1096,7 +1157,7 @@ module ts { function isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult { // get symbol of the first identifier of the entityName - var meaning: SymbolFlags; + let meaning: SymbolFlags; if (entityName.parent.kind === SyntaxKind.TypeQuery) { // Typeof value meaning = SymbolFlags.Value | SymbolFlags.ExportValue; @@ -1104,7 +1165,7 @@ module ts { else if (entityName.kind === SyntaxKind.QualifiedName || entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration) { // Left identifier from type reference or TypeAlias - // Entity name of the import declaration + // Entity name of the import declaration meaning = SymbolFlags.Namespace; } else { @@ -1112,8 +1173,8 @@ module ts { meaning = SymbolFlags.Type; } - var firstIdentifier = getFirstIdentifier(entityName); - var symbol = resolveName(enclosingDeclaration, (firstIdentifier).text, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); + let firstIdentifier = getFirstIdentifier(entityName); + let symbol = resolveName(enclosingDeclaration, (firstIdentifier).text, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol)) || { @@ -1136,23 +1197,23 @@ module ts { } function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string { - var writer = getSingleLineStringWriter(); + let writer = getSingleLineStringWriter(); getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning); - var result = writer.string(); + let result = writer.string(); releaseStringWriter(writer); return result; } function typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string { - var writer = getSingleLineStringWriter(); + let writer = getSingleLineStringWriter(); getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - var result = writer.string(); + let result = writer.string(); releaseStringWriter(writer); - var maxLength = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation ? undefined : 100; + let maxLength = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation ? undefined : 100; if (maxLength && result.length >= maxLength) { result = result.substr(0, maxLength - "...".length) + "..."; } @@ -1162,7 +1223,7 @@ module ts { function getTypeAliasForTypeLiteral(type: Type): Symbol { if (type.symbol && type.symbol.flags & SymbolFlags.TypeLiteral) { - var node = type.symbol.declarations[0].parent; + let node = type.symbol.declarations[0].parent; while (node.kind === SyntaxKind.ParenthesizedType) { node = node.parent; } @@ -1174,7 +1235,7 @@ module ts { } // This is for caching the result of getSymbolDisplayBuilder. Do not access directly. - var _displayBuilder: SymbolDisplayBuilder; + let _displayBuilder: SymbolDisplayBuilder; function getSymbolDisplayBuilder(): SymbolDisplayBuilder { /** * Writes only the name of the symbol out to the writer. Uses the original source text @@ -1182,7 +1243,7 @@ module ts { */ function appendSymbolNameOnly(symbol: Symbol, writer: SymbolWriter): void { if (symbol.declarations && symbol.declarations.length > 0) { - var declaration = symbol.declarations[0]; + let declaration = symbol.declarations[0]; if (declaration.name) { writer.writeSymbol(declarationNameToString(declaration.name), symbol); return; @@ -1197,7 +1258,7 @@ module ts { * Meaning needs to be specified if the enclosing declaration is given */ function buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags, typeFlags?: TypeFormatFlags): void { - var parentSymbol: Symbol; + let parentSymbol: Symbol; function appendParentTypeArgumentsAndSymbolName(symbol: Symbol): void { if (parentSymbol) { // Write type arguments of instantiated class/interface here @@ -1216,8 +1277,8 @@ module ts { appendSymbolNameOnly(symbol, writer); } - // Let 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 + // Let 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. // // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree @@ -1226,7 +1287,7 @@ module ts { writer.trackSymbol(symbol, enclosingDeclaration, meaning); function walkSymbol(symbol: Symbol, meaning: SymbolFlags): void { if (symbol) { - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & SymbolFormatFlags.UseOnlyExternalAliasing)); + let accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & SymbolFormatFlags.UseOnlyExternalAliasing)); if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) { @@ -1238,8 +1299,8 @@ module ts { } if (accessibleSymbolChain) { - for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) { - appendParentTypeArgumentsAndSymbolName(accessibleSymbolChain[i]); + for (let accessibleSymbol of accessibleSymbolChain) { + appendParentTypeArgumentsAndSymbolName(accessibleSymbol); } } else { @@ -1261,8 +1322,8 @@ module ts { // Get qualified name if the symbol is not a type parameter // and there is an enclosing declaration or we specifically // asked for it - var isTypeParameter = symbol.flags & SymbolFlags.TypeParameter; - var typeFormatFlag = TypeFormatFlags.UseFullyQualifiedType & typeFlags; + let isTypeParameter = symbol.flags & SymbolFlags.TypeParameter; + let typeFormatFlag = TypeFormatFlags.UseFullyQualifiedType & typeFlags; if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) { walkSymbol(symbol, meaning); return; @@ -1272,7 +1333,7 @@ module ts { } function buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, globalFlags?: TypeFormatFlags, typeStack?: Type[]) { - var globalFlagsToPass = globalFlags & TypeFormatFlags.WriteOwnNameForAnyLike; + let globalFlagsToPass = globalFlags & TypeFormatFlags.WriteOwnNameForAnyLike; return writeType(type, globalFlags); function writeType(type: Type, flags: TypeFormatFlags) { @@ -1313,7 +1374,7 @@ module ts { } function writeTypeList(types: Type[], union: boolean) { - for (var i = 0; i < types.length; i++) { + for (let i = 0; i < types.length; i++) { if (i > 0) { if (union) { writeSpace(writer); @@ -1366,7 +1427,7 @@ module ts { } else if (typeStack && contains(typeStack, type)) { // If type is an anonymous type literal in a type alias declaration, use type alias name - var typeAlias = getTypeAliasForTypeLiteral(type); + let typeAlias = getTypeAliasForTypeLiteral(type); if (typeAlias) { // The specified symbol flags need to be reinterpreted as type flags buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, SymbolFlags.Type, SymbolFormatFlags.None, flags); @@ -1387,9 +1448,9 @@ module ts { function shouldWriteTypeOfFunctionSymbol() { if (type.symbol) { - var isStaticMethodSymbol = !!(type.symbol.flags & SymbolFlags.Method && // typeof static method + let isStaticMethodSymbol = !!(type.symbol.flags & SymbolFlags.Method && // typeof static method ts.forEach(type.symbol.declarations, declaration => declaration.flags & NodeFlags.Static)); - var isNonLocalFunctionSymbol = !!(type.symbol.flags & SymbolFlags.Function) && + let isNonLocalFunctionSymbol = !!(type.symbol.flags & SymbolFlags.Function) && (type.symbol.parent || // is exported function symbol ts.forEach(type.symbol.declarations, declaration => declaration.parent.kind === SyntaxKind.SourceFile || declaration.parent.kind === SyntaxKind.ModuleBlock)); @@ -1410,7 +1471,7 @@ module ts { } function getIndexerParameterName(type: ObjectType, indexKind: IndexKind, fallbackName: string): string { - var declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); + let declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); if (!declaration) { // declaration might not be found if indexer was added from the contextual type. // in this case use fallback name @@ -1421,7 +1482,7 @@ module ts { } function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { writePunctuation(writer, SyntaxKind.OpenBraceToken); @@ -1456,21 +1517,21 @@ module ts { writePunctuation(writer, SyntaxKind.OpenBraceToken); writer.writeLine(); writer.increaseIndent(); - for (var i = 0; i < resolved.callSignatures.length; i++) { - buildSignatureDisplay(resolved.callSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + for (let signature of resolved.callSignatures) { + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } - for (var i = 0; i < resolved.constructSignatures.length; i++) { + for (let signature of resolved.constructSignatures) { writeKeyword(writer, SyntaxKind.NewKeyword); writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[i], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } if (resolved.stringIndexType) { - // [x: string]: + // [x: string]: writePunctuation(writer, SyntaxKind.OpenBracketToken); writer.writeParameter(getIndexerParameterName(resolved, IndexKind.String, /*fallbackName*/"x")); writePunctuation(writer, SyntaxKind.ColonToken); @@ -1484,7 +1545,7 @@ module ts { writer.writeLine(); } if (resolved.numberIndexType) { - // [x: number]: + // [x: number]: writePunctuation(writer, SyntaxKind.OpenBracketToken); writer.writeParameter(getIndexerParameterName(resolved, IndexKind.Number, /*fallbackName*/"x")); writePunctuation(writer, SyntaxKind.ColonToken); @@ -1497,17 +1558,16 @@ module ts { writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } - for (var i = 0; i < resolved.properties.length; i++) { - var p = resolved.properties[i]; - var t = getTypeOfSymbol(p); + for (let p of resolved.properties) { + let t = getTypeOfSymbol(p); if (p.flags & (SymbolFlags.Function | SymbolFlags.Method) && !getPropertiesOfObjectType(t).length) { - var signatures = getSignaturesOfType(t, SignatureKind.Call); - for (var j = 0; j < signatures.length; j++) { + let signatures = getSignaturesOfType(t, SignatureKind.Call); + for (let signature of signatures) { buildSymbolDisplay(p, writer); if (p.flags & SymbolFlags.Optional) { writePunctuation(writer, SyntaxKind.QuestionToken); } - buildSignatureDisplay(signatures[j], writer, enclosingDeclaration, globalFlagsToPass, typeStack); + buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } @@ -1530,7 +1590,7 @@ module ts { } function buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) { - var targetSymbol = getTargetSymbol(symbol); + let targetSymbol = getTargetSymbol(symbol); if (targetSymbol.flags & SymbolFlags.Class || targetSymbol.flags & SymbolFlags.Interface) { buildDisplayForTypeParametersAndDelimiters(getTypeParametersOfClassOrInterface(symbol), writer, enclosingDeclaraiton, flags); } @@ -1538,7 +1598,7 @@ module ts { function buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) { appendSymbolNameOnly(tp.symbol, writer); - var constraint = getConstraintOfTypeParameter(tp); + let constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); writeKeyword(writer, SyntaxKind.ExtendsKeyword); @@ -1564,7 +1624,7 @@ module ts { function buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) { if (typeParameters && typeParameters.length) { writePunctuation(writer, SyntaxKind.LessThanToken); - for (var i = 0; i < typeParameters.length; i++) { + for (let i = 0; i < typeParameters.length; i++) { if (i > 0) { writePunctuation(writer, SyntaxKind.CommaToken); writeSpace(writer); @@ -1578,7 +1638,7 @@ module ts { function buildDisplayForTypeArgumentsAndDelimiters(typeParameters: TypeParameter[], mapper: TypeMapper, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) { if (typeParameters && typeParameters.length) { writePunctuation(writer, SyntaxKind.LessThanToken); - for (var i = 0; i < typeParameters.length; i++) { + for (let i = 0; i < typeParameters.length; i++) { if (i > 0) { writePunctuation(writer, SyntaxKind.CommaToken); writeSpace(writer); @@ -1591,7 +1651,7 @@ module ts { function buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) { writePunctuation(writer, SyntaxKind.OpenParenToken); - for (var i = 0; i < parameters.length; i++) { + for (let i = 0; i < parameters.length; i++) { if (i > 0) { writePunctuation(writer, SyntaxKind.CommaToken); writeSpace(writer); @@ -1660,20 +1720,21 @@ module ts { function isUsedInExportAssignment(node: Node) { // Get source File and see if it is external module and has export assigned symbol - var externalModule = getContainingExternalModule(node); + let externalModule = getContainingExternalModule(node); + let exportAssignmentSymbol: Symbol; + let resolvedExportSymbol: Symbol; if (externalModule) { // This is export assigned symbol node - var externalModuleSymbol = getSymbolOfNode(externalModule); - var exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var resolvedExportSymbol: Symbol; - var symbolOfNode = getSymbolOfNode(node); + let externalModuleSymbol = getSymbolOfNode(externalModule); + exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); + let symbolOfNode = getSymbolOfNode(node); if (isSymbolUsedInExportAssignment(symbolOfNode)) { return true; } - // if symbolOfNode is import declaration, resolve the symbol declaration and check - if (symbolOfNode.flags & SymbolFlags.Import) { - return isSymbolUsedInExportAssignment(resolveImport(symbolOfNode)); + // if symbolOfNode is alias declaration, resolve the symbol declaration and check + if (symbolOfNode.flags & SymbolFlags.Alias) { + return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); } } @@ -1683,9 +1744,9 @@ module ts { return true; } - if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & SymbolFlags.Import)) { - // if export assigned symbol is import declaration, resolve the import - resolvedExportSymbol = resolvedExportSymbol || resolveImport(exportAssignmentSymbol); + if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & SymbolFlags.Alias)) { + // if export assigned symbol is alias declaration, resolve the alias + resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); if (resolvedExportSymbol === symbol) { return true; } @@ -1714,7 +1775,7 @@ module ts { case SyntaxKind.FunctionDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.ImportEqualsDeclaration: - var parent = getDeclarationContainer(node); + let parent = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(getCombinedNodeFlags(node) & NodeFlags.Export) && !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && isInAmbientContext(parent))) { @@ -1750,7 +1811,12 @@ module ts { case SyntaxKind.UnionType: case SyntaxKind.ParenthesizedType: return isDeclarationVisible(node.parent); - + + case SyntaxKind.ImportClause: + case SyntaxKind.NamespaceImport: + case SyntaxKind.ImportSpecifier: + return false; + // Type parameters are always visible case SyntaxKind.TypeParameter: // Source file is always visible @@ -1763,7 +1829,7 @@ module ts { } if (node) { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (links.isVisible === undefined) { links.isVisible = !!determineIfDeclarationIsVisible(); } @@ -1781,30 +1847,30 @@ module ts { function getDeclarationContainer(node: Node): Node { node = getRootDeclaration(node); - // Parent chain: + // Parent chain: // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' return node.kind === SyntaxKind.VariableDeclaration ? node.parent.parent.parent : node.parent; } function getTypeOfPrototypeProperty(prototype: Symbol): Type { // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', + // 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'. - var classType = getDeclaredTypeOfSymbol(prototype.parent); + let classType = getDeclaredTypeOfSymbol(prototype.parent); return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, _ => anyType)) : classType; } // Return the type of the given property in the given type, or undefined if no such property exists function getTypeOfPropertyOfType(type: Type, name: string): Type { - var prop = getPropertyOfType(type, name); + let prop = getPropertyOfType(type, name); return prop ? getTypeOfSymbol(prop) : undefined; } // Return the inferred type for a binding element function getTypeForBindingElement(declaration: BindingElement): Type { - var pattern = declaration.parent; - var parentType = getTypeForVariableLikeDeclaration(pattern.parent); + let pattern = declaration.parent; + let parentType = getTypeForVariableLikeDeclaration(pattern.parent); // If parent has the unknown (error) type, then so does this binding element if (parentType === unknownType) { return unknownType; @@ -1818,12 +1884,14 @@ module ts { } return parentType; } + + let type: Type; if (pattern.kind === SyntaxKind.ObjectBindingPattern) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) - var name = declaration.propertyName || declaration.name; + let name = declaration.propertyName || declaration.name; // 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. - var type = getTypeOfPropertyOfType(parentType, name.text) || + type = getTypeOfPropertyOfType(parentType, name.text) || isNumericLiteralName(name.text) && getIndexTypeOfType(parentType, IndexKind.Number) || getIndexTypeOfType(parentType, IndexKind.String); if (!type) { @@ -1839,16 +1907,21 @@ module ts { } if (!declaration.dotDotDotToken) { // Use specific property type when parent is a tuple or numeric index type when parent is an array - var propName = "" + indexOf(pattern.elements, declaration); - var type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, IndexKind.Number); + let propName = "" + indexOf(pattern.elements, declaration); + type = isTupleLikeType(parentType) ? getTypeOfPropertyOfType(parentType, propName) : getIndexTypeOfType(parentType, IndexKind.Number); if (!type) { - error(declaration, Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + if (isTupleType(parentType)) { + error(declaration, Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), (parentType).elementTypes.length, pattern.elements.length); + } + else { + error(declaration, Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); + } return unknownType; } } else { // Rest element has an array type with the same element type as the parent type - var type = createArrayType(getIndexTypeOfType(parentType, IndexKind.Number)); + type = createArrayType(getIndexTypeOfType(parentType, IndexKind.Number)); } } return type; @@ -1861,7 +1934,11 @@ module ts { return anyType; } if (declaration.parent.parent.kind === SyntaxKind.ForOfStatement) { - return getTypeForVariableDeclarationInForOfStatement(declaration.parent.parent); + // checkRightHandSideOfForOf will return undefined if the for-of expression type was + // missing properties/signatures required to get its iteratedType (like + // [Symbol.iterator] or next). This may be because we accessed properties from anyType, + // or it may have led to an error inside getIteratedType. + return checkRightHandSideOfForOf((declaration.parent.parent).expression) || anyType; } if (isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); @@ -1871,16 +1948,16 @@ module ts { return getTypeFromTypeNode(declaration.type); } if (declaration.kind === SyntaxKind.Parameter) { - var func = declaration.parent; + let func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present if (func.kind === SyntaxKind.SetAccessor && !hasDynamicName(func)) { - var getter = getDeclarationOfKind(declaration.parent.symbol, SyntaxKind.GetAccessor); + let getter = getDeclarationOfKind(declaration.parent.symbol, SyntaxKind.GetAccessor); if (getter) { return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); } } // Use contextual parameter type if one is available - var type = getContextuallyTypedParameterType(declaration); + let type = getContextuallyTypedParameterType(declaration); if (type) { return type; } @@ -1912,11 +1989,11 @@ module ts { // Return the type implied by an object binding pattern function getTypeFromObjectBindingPattern(pattern: BindingPattern): Type { - var members: SymbolTable = {}; + let members: SymbolTable = {}; forEach(pattern.elements, e => { - var flags = SymbolFlags.Property | SymbolFlags.Transient | (e.initializer ? SymbolFlags.Optional : 0); - var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); + let flags = SymbolFlags.Property | SymbolFlags.Transient | (e.initializer ? SymbolFlags.Optional : 0); + let name = e.propertyName || e.name; + let symbol = createSymbol(flags, name.text); symbol.type = getTypeFromBindingElement(e); members[symbol.name] = symbol; }); @@ -1925,8 +2002,8 @@ module ts { // Return the type implied by an array binding pattern function getTypeFromArrayBindingPattern(pattern: BindingPattern): Type { - var hasSpreadElement: boolean = false; - var elementTypes: Type[] = []; + let hasSpreadElement: boolean = false; + let elementTypes: Type[] = []; forEach(pattern.elements, e => { elementTypes.push(e.kind === SyntaxKind.OmittedExpression || e.dotDotDotToken ? anyType : getTypeFromBindingElement(e)); if (e.dotDotDotToken) { @@ -1959,7 +2036,7 @@ module ts { // binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the // tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string. function getWidenedTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration, reportErrors?: boolean): Type { - var type = getTypeForVariableLikeDeclaration(declaration); + let type = getTypeForVariableLikeDeclaration(declaration); if (type) { if (reportErrors) { reportErrorsFromWidening(declaration, type); @@ -1978,7 +2055,7 @@ module ts { type = declaration.dotDotDotToken ? anyArrayType : anyType; // Report implicit any errors unless this is a private property within an ambient declaration if (reportErrors && compilerOptions.noImplicitAny) { - var root = getRootDeclaration(declaration); + let root = getRootDeclaration(declaration); if (!isPrivateWithinAmbient(root) && !(root.kind === SyntaxKind.Parameter && isPrivateWithinAmbient(root.parent))) { reportImplicitAnyError(declaration, type); } @@ -1987,20 +2064,33 @@ module ts { } function getTypeOfVariableOrParameterOrProperty(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.type) { // Handle prototype property if (symbol.flags & SymbolFlags.Prototype) { return links.type = getTypeOfPrototypeProperty(symbol); } // Handle catch clause variables - var declaration = symbol.valueDeclaration; + let declaration = symbol.valueDeclaration; if (declaration.parent.kind === SyntaxKind.CatchClause) { return links.type = anyType; } + // Handle export default expressions + if (declaration.kind === SyntaxKind.ExportAssignment) { + var exportAssignment = declaration; + if (exportAssignment.expression) { + return links.type = checkExpression(exportAssignment.expression); + } + else if (exportAssignment.type) { + return links.type = getTypeFromTypeNode(exportAssignment.type); + } + else { + return links.type = anyType; + } + } // Handle variable, parameter or property links.type = resolvingType; - var type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true); + let type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true); if (links.type === resolvingType) { links.type = type; } @@ -2008,7 +2098,7 @@ module ts { else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var diagnostic = (symbol.valueDeclaration).type ? + let diagnostic = (symbol.valueDeclaration).type ? Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); @@ -2027,7 +2117,7 @@ module ts { return accessor.type && getTypeFromTypeNode(accessor.type); } else { - var setterTypeAnnotation = getSetAccessorTypeAnnotationNode(accessor); + let setterTypeAnnotation = getSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation); } } @@ -2035,7 +2125,7 @@ module ts { } function getTypeOfAccessors(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); checkAndStoreTypeOfAccessors(symbol, links); return links.type; } @@ -2044,19 +2134,19 @@ module ts { links = links || getSymbolLinks(symbol); if (!links.type) { links.type = resolvingType; - var getter = getDeclarationOfKind(symbol, SyntaxKind.GetAccessor); - var setter = getDeclarationOfKind(symbol, SyntaxKind.SetAccessor); + let getter = getDeclarationOfKind(symbol, SyntaxKind.GetAccessor); + let setter = getDeclarationOfKind(symbol, SyntaxKind.SetAccessor); - var type: Type; + let type: Type; // First try to see if the user specified a return type on the get-accessor. - var getterReturnType = getAnnotatedAccessorType(getter); + let getterReturnType = getAnnotatedAccessorType(getter); if (getterReturnType) { type = getterReturnType; } else { // If the user didn't specify a return type, try to use the set-accessor's parameter type. - var setterParameterType = getAnnotatedAccessorType(setter); + let setterParameterType = getAnnotatedAccessorType(setter); if (setterParameterType) { type = setterParameterType; } @@ -2083,14 +2173,14 @@ module ts { else if (links.type === resolvingType) { links.type = anyType; if (compilerOptions.noImplicitAny) { - var getter = getDeclarationOfKind(symbol, SyntaxKind.GetAccessor); + let getter = getDeclarationOfKind(symbol, SyntaxKind.GetAccessor); error(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } } function getTypeOfFuncClassEnumModule(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.type) { links.type = createObjectType(TypeFlags.Anonymous, symbol); } @@ -2098,23 +2188,23 @@ module ts { } function getTypeOfEnumMember(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.type) { links.type = getDeclaredTypeOfEnum(getParentOfSymbol(symbol)); } return links.type; } - function getTypeOfImport(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + function getTypeOfAlias(symbol: Symbol): Type { + let links = getSymbolLinks(symbol); if (!links.type) { - links.type = getTypeOfSymbol(resolveImport(symbol)); + links.type = getTypeOfSymbol(resolveAlias(symbol)); } return links.type; } function getTypeOfInstantiatedSymbol(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.type) { links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper); } @@ -2137,8 +2227,8 @@ module ts { if (symbol.flags & SymbolFlags.Accessor) { return getTypeOfAccessors(symbol); } - if (symbol.flags & SymbolFlags.Import) { - return getTypeOfImport(symbol); + if (symbol.flags & SymbolFlags.Alias) { + return getTypeOfAlias(symbol); } return unknownType; } @@ -2150,7 +2240,7 @@ module ts { function hasBaseType(type: InterfaceType, checkBase: InterfaceType) { return check(type); function check(type: InterfaceType): boolean { - var target = getTargetType(type); + let target = getTargetType(type); return target === checkBase || forEach(target.baseTypes, check); } } @@ -2159,13 +2249,13 @@ module ts { // the same, but even if they're not we still need the complete list to ensure instantiations supply type arguments // for all type parameters. function getTypeParametersOfClassOrInterface(symbol: Symbol): TypeParameter[] { - var result: TypeParameter[]; + let result: TypeParameter[]; forEach(symbol.declarations, node => { if (node.kind === SyntaxKind.InterfaceDeclaration || node.kind === SyntaxKind.ClassDeclaration) { - var declaration = node; + let declaration = node; if (declaration.typeParameters && declaration.typeParameters.length) { forEach(declaration.typeParameters, node => { - var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)); + let tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)); if (!result) { result = [tp]; } @@ -2180,10 +2270,10 @@ module ts { } function getDeclaredTypeOfClass(symbol: Symbol): InterfaceType { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = links.declaredType = createObjectType(TypeFlags.Class, symbol); - var typeParameters = getTypeParametersOfClassOrInterface(symbol); + let type = links.declaredType = createObjectType(TypeFlags.Class, symbol); + let typeParameters = getTypeParametersOfClassOrInterface(symbol); if (typeParameters) { type.flags |= TypeFlags.Reference; type.typeParameters = typeParameters; @@ -2193,10 +2283,10 @@ module ts { (type).typeArguments = type.typeParameters; } type.baseTypes = []; - var declaration = getDeclarationOfKind(symbol, SyntaxKind.ClassDeclaration); - var baseTypeNode = getClassBaseTypeNode(declaration); + let declaration = getDeclarationOfKind(symbol, SyntaxKind.ClassDeclaration); + let baseTypeNode = getClassBaseTypeNode(declaration); if (baseTypeNode) { - var baseType = getTypeFromTypeReferenceNode(baseTypeNode); + let baseType = getTypeFromTypeReferenceNode(baseTypeNode); if (baseType !== unknownType) { if (getTargetType(baseType).flags & TypeFlags.Class) { if (type !== baseType && !hasBaseType(baseType, type)) { @@ -2221,10 +2311,10 @@ module ts { } function getDeclaredTypeOfInterface(symbol: Symbol): InterfaceType { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = links.declaredType = createObjectType(TypeFlags.Interface, symbol); - var typeParameters = getTypeParametersOfClassOrInterface(symbol); + let type = links.declaredType = createObjectType(TypeFlags.Interface, symbol); + let typeParameters = getTypeParametersOfClassOrInterface(symbol); if (typeParameters) { type.flags |= TypeFlags.Reference; type.typeParameters = typeParameters; @@ -2237,7 +2327,7 @@ module ts { forEach(symbol.declarations, declaration => { if (declaration.kind === SyntaxKind.InterfaceDeclaration && getInterfaceBaseTypeNodes(declaration)) { forEach(getInterfaceBaseTypeNodes(declaration), node => { - var baseType = getTypeFromTypeReferenceNode(node); + let baseType = getTypeFromTypeReferenceNode(node); if (baseType !== unknownType) { if (getTargetType(baseType).flags & (TypeFlags.Class | TypeFlags.Interface)) { if (type !== baseType && !hasBaseType(baseType, type)) { @@ -2264,27 +2354,27 @@ module ts { } function getDeclaredTypeOfTypeAlias(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.declaredType) { links.declaredType = resolvingType; - var declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeAliasDeclaration); - var type = getTypeFromTypeNode(declaration.type); + let declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeAliasDeclaration); + let type = getTypeFromTypeNode(declaration.type); if (links.declaredType === resolvingType) { links.declaredType = type; } } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeAliasDeclaration); + let declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeAliasDeclaration); error(declaration.name, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; } function getDeclaredTypeOfEnum(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = createType(TypeFlags.Enum); + let type = createType(TypeFlags.Enum); type.symbol = symbol; links.declaredType = type; } @@ -2292,9 +2382,9 @@ module ts { } function getDeclaredTypeOfTypeParameter(symbol: Symbol): TypeParameter { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = createType(TypeFlags.TypeParameter); + let type = createType(TypeFlags.TypeParameter); type.symbol = symbol; if (!(getDeclarationOfKind(symbol, SyntaxKind.TypeParameter)).constraint) { type.constraint = noConstraintType; @@ -2304,10 +2394,10 @@ module ts { return links.declaredType; } - function getDeclaredTypeOfImport(symbol: Symbol): Type { - var links = getSymbolLinks(symbol); + function getDeclaredTypeOfAlias(symbol: Symbol): Type { + let links = getSymbolLinks(symbol); if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveImport(symbol)); + links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); } return links.declaredType; } @@ -2329,33 +2419,30 @@ module ts { if (symbol.flags & SymbolFlags.TypeParameter) { return getDeclaredTypeOfTypeParameter(symbol); } - if (symbol.flags & SymbolFlags.Import) { - return getDeclaredTypeOfImport(symbol); + if (symbol.flags & SymbolFlags.Alias) { + return getDeclaredTypeOfAlias(symbol); } return unknownType; } function createSymbolTable(symbols: Symbol[]): SymbolTable { - var result: SymbolTable = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + let result: SymbolTable = {}; + for (let symbol of symbols) { result[symbol.name] = symbol; } return result; } function createInstantiatedSymbolTable(symbols: Symbol[], mapper: TypeMapper): SymbolTable { - var result: SymbolTable = {}; - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; + let result: SymbolTable = {}; + for (let symbol of symbols) { result[symbol.name] = instantiateSymbol(symbol, mapper); } return result; } function addInheritedMembers(symbols: SymbolTable, baseSymbols: Symbol[]) { - for (var i = 0; i < baseSymbols.length; i++) { - var s = baseSymbols[i]; + for (let s of baseSymbols) { if (!hasProperty(symbols, s.name)) { symbols[s.name] = s; } @@ -2364,18 +2451,18 @@ module ts { function addInheritedSignatures(signatures: Signature[], baseSignatures: Signature[]) { if (baseSignatures) { - for (var i = 0; i < baseSignatures.length; i++) { - signatures.push(baseSignatures[i]); + for (let signature of baseSignatures) { + signatures.push(signature); } } } function resolveClassOrInterfaceMembers(type: InterfaceType): void { - var members = type.symbol.members; - var callSignatures = type.declaredCallSignatures; - var constructSignatures = type.declaredConstructSignatures; - var stringIndexType = type.declaredStringIndexType; - var numberIndexType = type.declaredNumberIndexType; + let members = type.symbol.members; + let callSignatures = type.declaredCallSignatures; + let constructSignatures = type.declaredConstructSignatures; + let stringIndexType = type.declaredStringIndexType; + let numberIndexType = type.declaredNumberIndexType; if (type.baseTypes.length) { members = createSymbolTable(type.declaredProperties); forEach(type.baseTypes, baseType => { @@ -2390,15 +2477,15 @@ module ts { } function resolveTypeReferenceMembers(type: TypeReference): void { - var target = type.target; - var mapper = createTypeMapper(target.typeParameters, type.typeArguments); - var members = createInstantiatedSymbolTable(target.declaredProperties, mapper); - var callSignatures = instantiateList(target.declaredCallSignatures, mapper, instantiateSignature); - var constructSignatures = instantiateList(target.declaredConstructSignatures, mapper, instantiateSignature); - var stringIndexType = target.declaredStringIndexType ? instantiateType(target.declaredStringIndexType, mapper) : undefined; - var numberIndexType = target.declaredNumberIndexType ? instantiateType(target.declaredNumberIndexType, mapper) : undefined; + let target = type.target; + let mapper = createTypeMapper(target.typeParameters, type.typeArguments); + let members = createInstantiatedSymbolTable(target.declaredProperties, mapper); + let callSignatures = instantiateList(target.declaredCallSignatures, mapper, instantiateSignature); + let constructSignatures = instantiateList(target.declaredConstructSignatures, mapper, instantiateSignature); + let stringIndexType = target.declaredStringIndexType ? instantiateType(target.declaredStringIndexType, mapper) : undefined; + let numberIndexType = target.declaredNumberIndexType ? instantiateType(target.declaredNumberIndexType, mapper) : undefined; forEach(target.baseTypes, baseType => { - var instantiatedBaseType = instantiateType(baseType, mapper); + let instantiatedBaseType = instantiateType(baseType, mapper); addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType)); callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, SignatureKind.Call)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, SignatureKind.Construct)); @@ -2410,7 +2497,7 @@ module ts { function createSignature(declaration: SignatureDeclaration, typeParameters: TypeParameter[], parameters: Symbol[], resolvedReturnType: Type, minArgumentCount: number, hasRestParameter: boolean, hasStringLiterals: boolean): Signature { - var sig = new Signature(checker); + let sig = new Signature(checker); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -2428,10 +2515,10 @@ module ts { function getDefaultConstructSignatures(classType: InterfaceType): Signature[] { if (classType.baseTypes.length) { - var baseType = classType.baseTypes[0]; - var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), SignatureKind.Construct); + let baseType = classType.baseTypes[0]; + let baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), SignatureKind.Construct); return map(baseSignatures, baseSignature => { - var signature = baseType.flags & TypeFlags.Reference ? + let signature = baseType.flags & TypeFlags.Reference ? getSignatureInstantiation(baseSignature, (baseType).typeArguments) : cloneSignature(baseSignature); signature.typeParameters = classType.typeParameters; signature.resolvedReturnType = classType; @@ -2442,9 +2529,9 @@ module ts { } function createTupleTypeMemberSymbols(memberTypes: Type[]): SymbolTable { - var members: SymbolTable = {}; - for (var i = 0; i < memberTypes.length; i++) { - var symbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "" + i); + let members: SymbolTable = {}; + for (let i = 0; i < memberTypes.length; i++) { + let symbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "" + i); symbol.type = memberTypes[i]; members[i] = symbol; } @@ -2452,8 +2539,8 @@ module ts { } function resolveTupleTypeMembers(type: TupleType) { - var arrayType = resolveObjectOrUnionTypeMembers(createArrayType(getUnionType(type.elementTypes))); - var members = createTupleTypeMemberSymbols(type.elementTypes); + let arrayType = resolveObjectOrUnionTypeMembers(createArrayType(getUnionType(type.elementTypes))); + let members = createTupleTypeMemberSymbols(type.elementTypes); addInheritedMembers(members, arrayType.properties); setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType); } @@ -2462,7 +2549,7 @@ module ts { if (s.length !== t.length) { return false; } - for (var i = 0; i < s.length; i++) { + for (let i = 0; i < s.length; i++) { if (!compareSignatures(s[i], t[i], /*compareReturnTypes*/ false, compareTypes)) { return false; } @@ -2474,21 +2561,21 @@ module ts { // and if none of the signatures are generic, return a list of signatures that has substitutes a union of the // return types of the corresponding signatures in each resulting signature. function getUnionSignatures(types: Type[], kind: SignatureKind): Signature[] { - var signatureLists = map(types, t => getSignaturesOfType(t, kind)); - var signatures = signatureLists[0]; - for (var i = 0; i < signatures.length; i++) { - if (signatures[i].typeParameters) { + let signatureLists = map(types, t => getSignaturesOfType(t, kind)); + let signatures = signatureLists[0]; + for (let signature of signatures) { + if (signature.typeParameters) { return emptyArray; } } - for (var i = 1; i < signatureLists.length; i++) { + for (let i = 1; i < signatureLists.length; i++) { if (!signatureListsIdentical(signatures, signatureLists[i])) { return emptyArray; } } - var result = map(signatures, cloneSignature); + let result = map(signatures, cloneSignature); for (var i = 0; i < result.length; i++) { - var s = result[i]; + let s = result[i]; // Clear resolved return type we possibly got from cloneSignature s.resolvedReturnType = undefined; s.unionSignatures = map(signatureLists, signatures => signatures[i]); @@ -2497,9 +2584,9 @@ module ts { } function getUnionIndexType(types: Type[], kind: IndexKind): Type { - var indexTypes: Type[] = []; - for (var i = 0; i < types.length; i++) { - var indexType = getIndexTypeOfType(types[i], kind); + let indexTypes: Type[] = []; + for (let type of types) { + let indexType = getIndexTypeOfType(type, kind); if (!indexType) { return undefined; } @@ -2511,27 +2598,33 @@ module ts { function resolveUnionTypeMembers(type: UnionType) { // The members and properties collections are empty for union types. To get all properties of a union // type use getPropertiesOfType (only the language service uses this). - var callSignatures = getUnionSignatures(type.types, SignatureKind.Call); - var constructSignatures = getUnionSignatures(type.types, SignatureKind.Construct); - var stringIndexType = getUnionIndexType(type.types, IndexKind.String); - var numberIndexType = getUnionIndexType(type.types, IndexKind.Number); + let callSignatures = getUnionSignatures(type.types, SignatureKind.Call); + let constructSignatures = getUnionSignatures(type.types, SignatureKind.Construct); + let stringIndexType = getUnionIndexType(type.types, IndexKind.String); + let numberIndexType = getUnionIndexType(type.types, IndexKind.Number); setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); } function resolveAnonymousTypeMembers(type: ObjectType) { - var symbol = type.symbol; + let symbol = type.symbol; + let members: SymbolTable; + let callSignatures: Signature[]; + let constructSignatures: Signature[]; + let stringIndexType: Type; + let numberIndexType: Type; + if (symbol.flags & SymbolFlags.TypeLiteral) { - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, IndexKind.String); - var numberIndexType = getIndexTypeOfSymbol(symbol, IndexKind.Number); + members = symbol.members; + callSignatures = getSignaturesOfSymbol(members["__call"]); + constructSignatures = getSignaturesOfSymbol(members["__new"]); + stringIndexType = getIndexTypeOfSymbol(symbol, IndexKind.String); + numberIndexType = getIndexTypeOfSymbol(symbol, IndexKind.Number); } else { // Combinations of function, class, enum and module - var members = emptySymbols; - var callSignatures: Signature[] = emptyArray; - var constructSignatures: Signature[] = emptyArray; + members = emptySymbols; + callSignatures = emptyArray; + constructSignatures = emptyArray; if (symbol.flags & SymbolFlags.HasExports) { members = getExportsOfSymbol(symbol); } @@ -2539,7 +2632,7 @@ module ts { callSignatures = getSignaturesOfSymbol(symbol); } if (symbol.flags & SymbolFlags.Class) { - var classType = getDeclaredTypeOfClass(symbol); + let classType = getDeclaredTypeOfClass(symbol); constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); if (!constructSignatures.length) { constructSignatures = getDefaultConstructSignatures(classType); @@ -2549,8 +2642,8 @@ module ts { addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(classType.baseTypes[0].symbol))); } } - var stringIndexType: Type = undefined; - var numberIndexType: Type = (symbol.flags & SymbolFlags.Enum) ? stringType : undefined; + stringIndexType = undefined; + numberIndexType = (symbol.flags & SymbolFlags.Enum) ? stringType : undefined; } setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } @@ -2588,9 +2681,9 @@ module ts { // the symbol for that property. Otherwise return undefined. function getPropertyOfObjectType(type: Type, name: string): Symbol { if (type.flags & TypeFlags.ObjectType) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); if (hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; + let symbol = resolved.members[name]; if (symbolIsValue(symbol)) { return symbol; } @@ -2599,9 +2692,9 @@ module ts { } function getPropertiesOfUnionType(type: UnionType): Symbol[] { - var result: Symbol[] = []; + let result: Symbol[] = []; forEach(getPropertiesOfType(type.types[0]), prop => { - var unionProp = getPropertyOfUnionType(type, prop.name); + let unionProp = getPropertyOfUnionType(type, prop.name); if (unionProp) { result.push(unionProp); } @@ -2644,12 +2737,12 @@ module ts { } function createUnionProperty(unionType: UnionType, name: string): Symbol { - var types = unionType.types; - var props: Symbol[]; - for (var i = 0; i < types.length; i++) { - var type = getApparentType(types[i]); + let types = unionType.types; + let props: Symbol[]; + for (let current of types) { + let type = getApparentType(current); if (type !== unknownType) { - var prop = getPropertyOfType(type, name); + let prop = getPropertyOfType(type, name); if (!prop) { return undefined; } @@ -2661,16 +2754,15 @@ module ts { } } } - var propTypes: Type[] = []; - var declarations: Declaration[] = []; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; + let propTypes: Type[] = []; + let declarations: Declaration[] = []; + for (let prop of props) { if (prop.declarations) { declarations.push.apply(declarations, prop.declarations); } propTypes.push(getTypeOfSymbol(prop)); } - var result = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | SymbolFlags.UnionProperty, name); + let result = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | SymbolFlags.UnionProperty, name); result.unionType = unionType; result.declarations = declarations; result.type = getUnionType(propTypes); @@ -2678,11 +2770,11 @@ module ts { } function getPropertyOfUnionType(type: UnionType, name: string): Symbol { - var properties = type.resolvedProperties || (type.resolvedProperties = {}); + let properties = type.resolvedProperties || (type.resolvedProperties = {}); if (hasProperty(properties, name)) { return properties[name]; } - var property = createUnionProperty(type, name); + let property = createUnionProperty(type, name); if (property) { properties[name] = property; } @@ -2702,15 +2794,15 @@ module ts { return undefined; } } - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); if (hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; + let symbol = resolved.members[name]; if (symbolIsValue(symbol)) { return symbol; } } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); + let symbol = getPropertyOfObjectType(globalFunctionType, name); if (symbol) return symbol; } return getPropertyOfObjectType(globalObjectType, name); @@ -2718,7 +2810,7 @@ module ts { function getSignaturesOfObjectOrUnionType(type: Type, kind: SignatureKind): Signature[] { if (type.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); return kind === SignatureKind.Call ? resolved.callSignatures : resolved.constructSignatures; } return emptyArray; @@ -2732,7 +2824,7 @@ module ts { function getIndexTypeOfObjectOrUnionType(type: Type, kind: IndexKind): Type { if (type.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); return kind === IndexKind.String ? resolved.stringIndexType : resolved.numberIndexType; } } @@ -2746,9 +2838,9 @@ module ts { // Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual // type checking functions). function getTypeParametersFromDeclaration(typeParameterDeclarations: TypeParameterDeclaration[]): TypeParameter[] { - var result: TypeParameter[] = []; + let result: TypeParameter[] = []; forEach(typeParameterDeclarations, node => { - var tp = getDeclaredTypeOfTypeParameter(node.symbol); + let tp = getDeclaredTypeOfTypeParameter(node.symbol); if (!contains(result, tp)) { result.push(tp); } @@ -2761,7 +2853,7 @@ module ts { return emptyArray; } - var module = resolveExternalModuleName(node, node.moduleSpecifier); + let module = resolveExternalModuleName(node, node.moduleSpecifier); if (!module || !module.exports) { return emptyArray; } @@ -2770,16 +2862,16 @@ module ts { } function getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature { - var links = getNodeLinks(declaration); + let links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === SyntaxKind.Constructor ? getDeclaredTypeOfClass((declaration.parent).symbol) : undefined; - var typeParameters = classType ? classType.typeParameters : + let classType = declaration.kind === SyntaxKind.Constructor ? getDeclaredTypeOfClass((declaration.parent).symbol) : undefined; + let typeParameters = classType ? classType.typeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; - var parameters: Symbol[] = []; - var hasStringLiterals = false; - var minArgumentCount = -1; - for (var i = 0, n = declaration.parameters.length; i < n; i++) { - var param = declaration.parameters[i]; + let parameters: Symbol[] = []; + let hasStringLiterals = false; + let minArgumentCount = -1; + for (let i = 0, n = declaration.parameters.length; i < n; i++) { + let param = declaration.parameters[i]; parameters.push(param.symbol); if (param.type && param.type.kind === SyntaxKind.StringLiteral) { hasStringLiterals = true; @@ -2795,7 +2887,7 @@ module ts { minArgumentCount = declaration.parameters.length; } - var returnType: Type; + let returnType: Type; if (classType) { returnType = classType; } @@ -2806,7 +2898,7 @@ module ts { // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. if (declaration.kind === SyntaxKind.GetAccessor && !hasDynamicName(declaration)) { - var setter = getDeclarationOfKind(declaration.symbol, SyntaxKind.SetAccessor); + let setter = getDeclarationOfKind(declaration.symbol, SyntaxKind.SetAccessor); returnType = getAnnotatedAccessorType(setter); } @@ -2823,9 +2915,9 @@ module ts { function getSignaturesOfSymbol(symbol: Symbol): Signature[] { if (!symbol) return emptyArray; - var result: Signature[] = []; - for (var i = 0, len = symbol.declarations.length; i < len; i++) { - var node = symbol.declarations[i]; + let result: Signature[] = []; + for (let i = 0, len = symbol.declarations.length; i < len; i++) { + let node = symbol.declarations[i]; switch (node.kind) { case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: @@ -2844,7 +2936,7 @@ module ts { // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). if (i > 0 && (node).body) { - var previous = symbol.declarations[i - 1]; + let previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { break; } @@ -2858,14 +2950,15 @@ module ts { function getReturnTypeOfSignature(signature: Signature): Type { if (!signature.resolvedReturnType) { signature.resolvedReturnType = resolvingType; + let type: Type; if (signature.target) { - var type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); + type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - var type = getUnionType(map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(map(signature.unionSignatures, getReturnTypeOfSignature)); } else { - var type = getReturnTypeFromBody(signature.declaration); + type = getReturnTypeFromBody(signature.declaration); } if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = type; @@ -2874,7 +2967,7 @@ module ts { else if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = anyType; if (compilerOptions.noImplicitAny) { - var declaration = signature.declaration; + let declaration = signature.declaration; if (declaration.name) { error(declaration.name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(declaration.name)); } @@ -2888,7 +2981,7 @@ module ts { function getRestTypeOfSignature(signature: Signature): Type { if (signature.hasRestParameter) { - var type = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); + let type = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (type.flags & TypeFlags.Reference && (type).target === globalArrayType) { return (type).typeArguments[0]; } @@ -2919,8 +3012,8 @@ module 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) { - var isConstructor = signature.declaration.kind === SyntaxKind.Constructor || signature.declaration.kind === SyntaxKind.ConstructSignature; - var type = createObjectType(TypeFlags.Anonymous | TypeFlags.FromSignature); + let isConstructor = signature.declaration.kind === SyntaxKind.Constructor || signature.declaration.kind === SyntaxKind.ConstructSignature; + let type = createObjectType(TypeFlags.Anonymous | TypeFlags.FromSignature); type.members = emptySymbols; type.properties = emptyArray; type.callSignatures = !isConstructor ? [signature] : emptyArray; @@ -2936,14 +3029,14 @@ module ts { } function getIndexDeclarationOfSymbol(symbol: Symbol, kind: IndexKind): SignatureDeclaration { - var syntaxKind = kind === IndexKind.Number ? SyntaxKind.NumberKeyword : SyntaxKind.StringKeyword; - var indexSymbol = getIndexSymbol(symbol); + let syntaxKind = kind === IndexKind.Number ? SyntaxKind.NumberKeyword : SyntaxKind.StringKeyword; + let indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { - var len = indexSymbol.declarations.length; - for (var i = 0; i < len; i++) { - var node = indexSymbol.declarations[i]; + let len = indexSymbol.declarations.length; + for (let decl of indexSymbol.declarations) { + let node = decl; if (node.parameters.length === 1) { - var parameter = node.parameters[0]; + let parameter = node.parameters[0]; if (parameter && parameter.type && parameter.type.kind === syntaxKind) { return node; } @@ -2955,7 +3048,7 @@ module ts { } function getIndexTypeOfSymbol(symbol: Symbol, kind: IndexKind): Type { - var declaration = getIndexDeclarationOfSymbol(symbol, kind); + let declaration = getIndexDeclarationOfSymbol(symbol, kind); return declaration ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType : undefined; @@ -2964,7 +3057,7 @@ module ts { function getConstraintOfTypeParameter(type: TypeParameter): Type { if (!type.constraint) { if (type.target) { - var targetConstraint = getConstraintOfTypeParameter(type.target); + let targetConstraint = getConstraintOfTypeParameter(type.target); type.constraint = targetConstraint ? instantiateType(targetConstraint, type.mapper) : noConstraintType; } else { @@ -2981,9 +3074,12 @@ module ts { case 2: return types[0].id + "," + types[1].id; default: - var result = ""; - for (var i = 0; i < types.length; i++) { - if (i > 0) result += ","; + let result = ""; + for (let i = 0; i < types.length; i++) { + if (i > 0) { + result += ","; + } + result += types[i].id; } return result; @@ -2994,18 +3090,18 @@ module ts { // It is only necessary to do so if a constituent type might be the undefined type, the null type, or the type // of an object literal (since those types have widening related information we need to track). function getWideningFlagsOfTypes(types: Type[]): TypeFlags { - var result: TypeFlags = 0; - for (var i = 0; i < types.length; i++) { - result |= types[i].flags; + let result: TypeFlags = 0; + for (let type of types) { + result |= type.flags; } return result & TypeFlags.RequiresWidening; } function createTypeReference(target: GenericType, typeArguments: Type[]): TypeReference { - var id = getTypeListId(typeArguments); - var type = target.instantiations[id]; + let id = getTypeListId(typeArguments); + let type = target.instantiations[id]; if (!type) { - var flags = TypeFlags.Reference | getWideningFlagsOfTypes(typeArguments); + let flags = TypeFlags.Reference | getWideningFlagsOfTypes(typeArguments); type = target.instantiations[id] = createObjectType(flags, target.symbol); type.target = target; type.typeArguments = typeArguments; @@ -3014,13 +3110,13 @@ module ts { } function isTypeParameterReferenceIllegalInConstraint(typeReferenceNode: TypeReferenceNode, typeParameterSymbol: Symbol): boolean { - var links = getNodeLinks(typeReferenceNode); + let links = getNodeLinks(typeReferenceNode); if (links.isIllegalTypeReferenceInConstraint !== undefined) { return links.isIllegalTypeReferenceInConstraint; } // bubble up to the declaration - var currentNode: Node = typeReferenceNode; + let currentNode: Node = typeReferenceNode; // forEach === exists while (!forEach(typeParameterSymbol.declarations, d => d.parent === currentNode.parent)) { currentNode = currentNode.parent; @@ -3031,19 +3127,19 @@ module ts { } function checkTypeParameterHasIllegalReferencesInConstraint(typeParameter: TypeParameterDeclaration): void { - var typeParameterSymbol: Symbol; + let typeParameterSymbol: Symbol; function check(n: Node): void { if (n.kind === SyntaxKind.TypeReference && (n).typeName.kind === SyntaxKind.Identifier) { - var links = getNodeLinks(n); + let links = getNodeLinks(n); if (links.isIllegalTypeReferenceInConstraint === undefined) { - var symbol = resolveName(typeParameter, ((n).typeName).text, SymbolFlags.Type, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + let symbol = resolveName(typeParameter, ((n).typeName).text, SymbolFlags.Type, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); if (symbol && (symbol.flags & SymbolFlags.TypeParameter)) { // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list + // Type parameters declared in a particular type parameter list // may not be referenced in constraints in that type parameter list - + // symbol.declaration.parent === typeParameter.parent - // -> typeParameter and symbol.declaration originate from the same type parameter list + // -> typeParameter and symbol.declaration originate from the same type parameter list // -> illegal for all declarations in symbol // forEach === exists links.isIllegalTypeReferenceInConstraint = forEach(symbol.declarations, d => d.parent == typeParameter.parent); @@ -3063,14 +3159,14 @@ module ts { } function getTypeFromTypeReferenceNode(node: TypeReferenceNode): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = resolveEntityName(node, node.typeName, SymbolFlags.Type); + let symbol = resolveEntityName(node.typeName, SymbolFlags.Type); + let type: Type; if (symbol) { - var type: Type; if ((symbol.flags & SymbolFlags.TypeParameter) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list + // Type parameters declared in a particular type parameter list // may not be referenced in constraints in that type parameter list // Implementation: such type references are resolved to 'unknown' type that usually denotes error type = unknownType; @@ -3078,7 +3174,7 @@ module ts { else { type = getDeclaredTypeOfSymbol(symbol); if (type.flags & (TypeFlags.Class | TypeFlags.Interface) && type.flags & TypeFlags.Reference) { - var typeParameters = (type).typeParameters; + let typeParameters = (type).typeParameters; if (node.typeArguments && node.typeArguments.length === typeParameters.length) { type = createTypeReference(type, map(node.typeArguments, getTypeFromTypeNode)); } @@ -3101,12 +3197,12 @@ module ts { } function getTypeFromTypeQueryNode(node: TypeQueryNode): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { // TypeScript 1.0 spec (April 2014): 3.6.3 // The expression is processed as an identifier expression (section 4.3) // or property access expression(section 4.10), - // the widened type(section 3.9) of which becomes the result. + // the widened type(section 3.9) of which becomes the result. links.resolvedType = getWidenedType(checkExpressionOrQualifiedName(node.exprName)); } return links.resolvedType; @@ -3115,9 +3211,8 @@ module ts { function getTypeOfGlobalSymbol(symbol: Symbol, arity: number): ObjectType { function getTypeDeclaration(symbol: Symbol): Declaration { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + let declarations = symbol.declarations; + for (let declaration of declarations) { switch (declaration.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: @@ -3130,7 +3225,7 @@ module ts { if (!symbol) { return emptyObjectType; } - var type = getDeclaredTypeOfSymbol(symbol); + let type = getDeclaredTypeOfSymbol(symbol); if (!(type.flags & TypeFlags.ObjectType)) { error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name); return emptyObjectType; @@ -3166,12 +3261,12 @@ module ts { // globalArrayType will be undefined if we get here during creation of the Array type. This for example happens if // user code augments the Array type with call or construct signatures that have an array type as the return type. // We instead use globalArraySymbol to obtain the (not yet fully constructed) Array type. - var arrayType = globalArrayType || getDeclaredTypeOfSymbol(globalArraySymbol); + let arrayType = globalArrayType || getDeclaredTypeOfSymbol(globalArraySymbol); return arrayType !== emptyObjectType ? createTypeReference(arrayType, [elementType]) : emptyObjectType; } function getTypeFromArrayTypeNode(node: ArrayTypeNode): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType)); } @@ -3179,8 +3274,8 @@ module ts { } function createTupleType(elementTypes: Type[]) { - var id = getTypeListId(elementTypes); - var type = tupleTypes[id]; + let id = getTypeListId(elementTypes); + let type = tupleTypes[id]; if (!type) { type = tupleTypes[id] = createObjectType(TypeFlags.Tuple); type.elementTypes = elementTypes; @@ -3189,7 +3284,7 @@ module ts { } function getTypeFromTupleTypeNode(node: TupleTypeNode): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = createTupleType(map(node.elementTypes, getTypeFromTypeNode)); } @@ -3201,8 +3296,8 @@ module ts { addTypesToSortedSet(sortedSet, (type).types); } else { - var i = 0; - var id = type.id; + let i = 0; + let id = type.id; while (i < sortedSet.length && sortedSet[i].id < id) { i++; } @@ -3213,14 +3308,14 @@ module ts { } function addTypesToSortedSet(sortedTypes: Type[], types: Type[]) { - for (var i = 0, len = types.length; i < len; i++) { - addTypeToSortedSet(sortedTypes, types[i]); + for (let type of types) { + addTypeToSortedSet(sortedTypes, type); } } function isSubtypeOfAny(candidate: Type, types: Type[]): boolean { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { + for (let type of types) { + if (candidate !== type && isTypeSubtypeOf(candidate, type)) { return true; } } @@ -3228,7 +3323,7 @@ module ts { } function removeSubtypes(types: Type[]) { - var i = types.length; + let i = types.length; while (i > 0) { i--; if (isSubtypeOfAny(types[i], types)) { @@ -3238,8 +3333,8 @@ module ts { } function containsAnyType(types: Type[]) { - for (var i = 0; i < types.length; i++) { - if (types[i].flags & TypeFlags.Any) { + for (let type of types) { + if (type.flags & TypeFlags.Any) { return true; } } @@ -3247,7 +3342,7 @@ module ts { } function removeAllButLast(types: Type[], typeToRemove: Type) { - var i = types.length; + let i = types.length; while (i > 0 && types.length > 1) { i--; if (types[i] === typeToRemove) { @@ -3260,7 +3355,7 @@ module ts { if (types.length === 0) { return emptyObjectType; } - var sortedTypes: Type[] = []; + let sortedTypes: Type[] = []; addTypesToSortedSet(sortedTypes, types); if (noSubtypeReduction) { if (containsAnyType(sortedTypes)) { @@ -3275,8 +3370,8 @@ module ts { if (sortedTypes.length === 1) { return sortedTypes[0]; } - var id = getTypeListId(sortedTypes); - var type = unionTypes[id]; + let id = getTypeListId(sortedTypes); + let type = unionTypes[id]; if (!type) { type = unionTypes[id] = createObjectType(TypeFlags.Union | getWideningFlagsOfTypes(sortedTypes)); type.types = sortedTypes; @@ -3285,7 +3380,7 @@ module ts { } function getTypeFromUnionTypeNode(node: UnionTypeNode): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), /*noSubtypeReduction*/ true); } @@ -3293,7 +3388,7 @@ module ts { } function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node: Node): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { // Deferred resolution of members is handled by resolveObjectTypeMembers links.resolvedType = createObjectType(TypeFlags.Anonymous, node.symbol); @@ -3306,13 +3401,13 @@ module ts { return stringLiteralTypes[node.text]; } - var type = stringLiteralTypes[node.text] = createType(TypeFlags.StringLiteral); + let type = stringLiteralTypes[node.text] = createType(TypeFlags.StringLiteral); type.text = getTextOfNode(node); return type; } function getTypeFromStringLiteral(node: LiteralExpression): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = getStringLiteralType(node); } @@ -3355,7 +3450,7 @@ module ts { // Callers should first ensure this by calling isTypeNode case SyntaxKind.Identifier: case SyntaxKind.QualifiedName: - var symbol = getSymbolInfo(node); + let symbol = getSymbolInfo(node); return symbol && getDeclaredTypeOfSymbol(symbol); default: return unknownType; @@ -3364,9 +3459,9 @@ module ts { function instantiateList(items: T[], mapper: TypeMapper, instantiator: (item: T, mapper: TypeMapper) => T): T[] { if (items && items.length) { - var result: T[] = []; - for (var i = 0; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); + let result: T[] = []; + for (let v of items) { + result.push(instantiator(v, mapper)); } return result; } @@ -3387,8 +3482,10 @@ module ts { case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]); } return t => { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) return targets[i]; + for (let i = 0; i < sources.length; i++) { + if (t === sources[i]) { + return targets[i]; + } } return t; }; @@ -3408,8 +3505,10 @@ module ts { case 2: return createBinaryTypeEraser(sources[0], sources[1]); } return t => { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) return anyType; + for (let source of sources) { + if (t === source) { + return anyType; + } } return t; }; @@ -3417,8 +3516,9 @@ module ts { function createInferenceMapper(context: InferenceContext): TypeMapper { return t => { - for (var i = 0; i < context.typeParameters.length; i++) { + for (let i = 0; i < context.typeParameters.length; i++) { if (t === context.typeParameters[i]) { + context.inferences[i].isFixed = true; return getInferredType(context, i); } } @@ -3435,7 +3535,7 @@ module ts { } function instantiateTypeParameter(typeParameter: TypeParameter, mapper: TypeMapper): TypeParameter { - var result = createType(TypeFlags.TypeParameter); + let result = createType(TypeFlags.TypeParameter); result.symbol = typeParameter.symbol; if (typeParameter.constraint) { result.constraint = instantiateType(typeParameter.constraint, mapper); @@ -3448,11 +3548,12 @@ module ts { } function instantiateSignature(signature: Signature, mapper: TypeMapper, eraseTypeParameters?: boolean): Signature { + let freshTypeParameters: TypeParameter[]; if (signature.typeParameters && !eraseTypeParameters) { - var freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); + freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); } - var result = createSignature(signature.declaration, freshTypeParameters, + let result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); @@ -3463,7 +3564,7 @@ module ts { function instantiateSymbol(symbol: Symbol, mapper: TypeMapper): Symbol { if (symbol.flags & SymbolFlags.Instantiated) { - var links = getSymbolLinks(symbol); + let links = getSymbolLinks(symbol); // If symbol being instantiated is itself a instantiation, fetch the original target and combine the // type mappers. This ensures that original type identities are properly preserved and that aliases // always reference a non-aliases. @@ -3471,9 +3572,9 @@ module ts { mapper = combineTypeMappers(links.mapper, mapper); } - // Keep the flags from the symbol we're instantiating. Mark that is instantiated, and + // Keep the flags from the symbol we're instantiating. Mark that is instantiated, and // also transient so that we can just store data on it directly. - var result = createSymbol(SymbolFlags.Instantiated | SymbolFlags.Transient | symbol.flags, symbol.name); + let result = createSymbol(SymbolFlags.Instantiated | SymbolFlags.Transient | symbol.flags, symbol.name); result.declarations = symbol.declarations; result.parent = symbol.parent; result.target = symbol; @@ -3486,13 +3587,13 @@ module ts { } function instantiateAnonymousType(type: ObjectType, mapper: TypeMapper): ObjectType { - var result = createObjectType(TypeFlags.Anonymous, type.symbol); + let result = createObjectType(TypeFlags.Anonymous, type.symbol); result.properties = instantiateList(getPropertiesOfObjectType(type), mapper, instantiateSymbol); result.members = createSymbolTable(result.properties); result.callSignatures = instantiateList(getSignaturesOfType(type, SignatureKind.Call), mapper, instantiateSignature); result.constructSignatures = instantiateList(getSignaturesOfType(type, SignatureKind.Construct), mapper, instantiateSignature); - var stringIndexType = getIndexTypeOfType(type, IndexKind.String); - var numberIndexType = getIndexTypeOfType(type, IndexKind.Number); + let stringIndexType = getIndexTypeOfType(type, IndexKind.String); + let numberIndexType = getIndexTypeOfType(type, IndexKind.Number); if (stringIndexType) result.stringIndexType = instantiateType(stringIndexType, mapper); if (numberIndexType) result.numberIndexType = instantiateType(numberIndexType, mapper); return result; @@ -3556,9 +3657,9 @@ module ts { function getTypeWithoutConstructors(type: Type): Type { if (type.flags & TypeFlags.ObjectType) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); if (resolved.constructSignatures.length) { - var result = createObjectType(TypeFlags.Anonymous, type.symbol); + let result = createObjectType(TypeFlags.Anonymous, type.symbol); result.members = resolved.members; result.properties = resolved.properties; result.callSignatures = resolved.callSignatures; @@ -3571,9 +3672,9 @@ module ts { // TYPE CHECKING - var subtypeRelation: Map = {}; - var assignableRelation: Map = {}; - var identityRelation: Map = {}; + let subtypeRelation: Map = {}; + let assignableRelation: Map = {}; + let identityRelation: Map = {}; function isTypeIdenticalTo(source: Type, target: Type): boolean { return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined); @@ -3600,8 +3701,8 @@ module ts { } function isSignatureAssignableTo(source: Signature, target: Signature): boolean { - var sourceType = getOrCreateTypeFromSignature(source); - var targetType = getOrCreateTypeFromSignature(target); + let sourceType = getOrCreateTypeFromSignature(source); + let targetType = getOrCreateTypeFromSignature(target); return checkTypeRelatedTo(sourceType, targetType, assignableRelation, /*errorNode*/ undefined); } @@ -3613,17 +3714,17 @@ module ts { headMessage?: DiagnosticMessage, containingMessageChain?: DiagnosticMessageChain): boolean { - var errorInfo: DiagnosticMessageChain; - var sourceStack: ObjectType[]; - var targetStack: ObjectType[]; - var maybeStack: Map[]; - var expandingFlags: number; - var depth = 0; - var overflow = false; + let errorInfo: DiagnosticMessageChain; + let sourceStack: ObjectType[]; + let targetStack: ObjectType[]; + let maybeStack: Map[]; + let expandingFlags: number; + let depth = 0; + let overflow = false; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + let result = isRelatedTo(source, target, errorNode !== undefined, headMessage); if (overflow) { error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } @@ -3653,7 +3754,7 @@ module ts { // Ternary.Maybe if they are related with assumptions of other relationships, or // Ternary.False if they are not related. function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage, elaborateErrors = false): Ternary { - var result: Ternary; + let result: Ternary; // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases if (source === target) return Ternary.True; if (relation !== identityRelation) { @@ -3706,7 +3807,7 @@ module ts { } } else { - var saveErrorInfo = errorInfo; + let saveErrorInfo = errorInfo; if (source.flags & TypeFlags.Reference && target.flags & TypeFlags.Reference && (source).target === (target).target) { // We have type references to same target type, see if relationship holds for all type arguments if (result = typesRelatedTo((source).typeArguments, (target).typeArguments, reportErrors)) { @@ -3715,9 +3816,9 @@ module ts { } // Even if relationship doesn't hold for type arguments, it may hold in a structural comparison // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; + let reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; // identity relation does not use apparent type - var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); + let sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); if (sourceOrApparentType.flags & TypeFlags.ObjectType && target.flags & TypeFlags.ObjectType && (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors, elaborateErrors))) { errorInfo = saveErrorInfo; @@ -3726,8 +3827,8 @@ module ts { } if (reportErrors) { headMessage = headMessage || Diagnostics.Type_0_is_not_assignable_to_type_1; - var sourceType = typeToString(source); - var targetType = typeToString(target); + let sourceType = typeToString(source); + let targetType = typeToString(target); if (sourceType === targetType) { sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); targetType = typeToString(target, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); @@ -3738,10 +3839,10 @@ module ts { } function unionTypeRelatedToUnionType(source: UnionType, target: UnionType): Ternary { - var result = Ternary.True; - var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = typeRelatedToUnionType(sourceTypes[i], target, false); + let result = Ternary.True; + let sourceTypes = source.types; + for (let sourceType of sourceTypes) { + let related = typeRelatedToUnionType(sourceType, target, false); if (!related) { return Ternary.False; } @@ -3751,9 +3852,9 @@ module ts { } function typeRelatedToUnionType(source: Type, target: UnionType, reportErrors: boolean): Ternary { - var targetTypes = target.types; - for (var i = 0, len = targetTypes.length; i < len; i++) { - var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); + let targetTypes = target.types; + for (let i = 0, len = targetTypes.length; i < len; i++) { + let related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); if (related) { return related; } @@ -3762,10 +3863,10 @@ module ts { } function unionTypeRelatedToType(source: UnionType, target: Type, reportErrors: boolean): Ternary { - var result = Ternary.True; - var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors); + let result = Ternary.True; + let sourceTypes = source.types; + for (let sourceType of sourceTypes) { + let related = isRelatedTo(sourceType, target, reportErrors); if (!related) { return Ternary.False; } @@ -3775,9 +3876,9 @@ module ts { } function typesRelatedTo(sources: Type[], targets: Type[], reportErrors: boolean): Ternary { - var result = Ternary.True; - for (var i = 0, len = sources.length; i < len; i++) { - var related = isRelatedTo(sources[i], targets[i], reportErrors); + let result = Ternary.True; + for (let i = 0, len = sources.length; i < len; i++) { + let related = isRelatedTo(sources[i], targets[i], reportErrors); if (!related) { return Ternary.False; } @@ -3802,7 +3903,7 @@ module ts { } else { while (true) { - var constraint = getConstraintOfTypeParameter(source); + let constraint = getConstraintOfTypeParameter(source); if (constraint === target) return Ternary.True; if (!(constraint && constraint.flags & TypeFlags.TypeParameter)) break; source = constraint; @@ -3820,9 +3921,9 @@ module ts { if (overflow) { return Ternary.False; } - var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; - var related = relation[id]; - //var related: RelationComparisonResult = undefined; // relation[id]; + let id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; + let related = relation[id]; + //let related: RelationComparisonResult = undefined; // 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 @@ -3831,7 +3932,7 @@ module ts { } } if (depth > 0) { - for (var i = 0; i < depth; i++) { + for (let i = 0; i < depth; i++) { // If source and target are already being compared, consider them related with assumptions if (maybeStack[i][id]) { return Ternary.Maybe; @@ -3853,14 +3954,15 @@ module ts { maybeStack[depth] = {}; maybeStack[depth][id] = RelationComparisonResult.Succeeded; depth++; - var saveExpandingFlags = expandingFlags; + let saveExpandingFlags = expandingFlags; if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack)) expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; + let result: Ternary; if (expandingFlags === 3) { - var result = Ternary.Maybe; + result = Ternary.Maybe; } else { - var result = propertiesRelatedTo(source, target, reportErrors); + result = propertiesRelatedTo(source, target, reportErrors); if (result) { result &= signaturesRelatedTo(source, target, SignatureKind.Call, reportErrors); if (result) { @@ -3877,9 +3979,9 @@ module ts { expandingFlags = saveExpandingFlags; depth--; if (result) { - var maybeCache = maybeStack[depth]; + let maybeCache = maybeStack[depth]; // If result is definitely true, copy assumptions to global cache, else copy to next level up - var destinationCache = (result === Ternary.True || depth === 0) ? relation : maybeStack[depth - 1]; + let destinationCache = (result === Ternary.True || depth === 0) ? relation : maybeStack[depth - 1]; copyMap(maybeCache, destinationCache); } else { @@ -3897,10 +3999,10 @@ module ts { // some level beyond that. function isDeeplyNestedGeneric(type: ObjectType, stack: ObjectType[]): boolean { if (type.flags & TypeFlags.Reference && depth >= 10) { - var target = (type).target; - var count = 0; - for (var i = 0; i < depth; i++) { - var t = stack[i]; + let target = (type).target; + let count = 0; + for (let i = 0; i < depth; i++) { + let t = stack[i]; if (t.flags & TypeFlags.Reference && (t).target === target) { count++; if (count >= 10) return true; @@ -3914,12 +4016,11 @@ module ts { if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } - var result = Ternary.True; - var properties = getPropertiesOfObjectType(target); - var requireOptionalProperties = relation === subtypeRelation && !(source.flags & TypeFlags.ObjectLiteral); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; - var sourceProp = getPropertyOfType(source, targetProp.name); + let result = Ternary.True; + let properties = getPropertiesOfObjectType(target); + let requireOptionalProperties = relation === subtypeRelation && !(source.flags & TypeFlags.ObjectLiteral); + for (let targetProp of properties) { + let sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp !== targetProp) { if (!sourceProp) { if (!(targetProp.flags & SymbolFlags.Optional) || requireOptionalProperties) { @@ -3930,8 +4031,8 @@ module ts { } } else if (!(targetProp.flags & SymbolFlags.Prototype)) { - var sourceFlags = getDeclarationFlagsFromSymbol(sourceProp); - var targetFlags = getDeclarationFlagsFromSymbol(targetProp); + let sourceFlags = getDeclarationFlagsFromSymbol(sourceProp); + let targetFlags = getDeclarationFlagsFromSymbol(targetProp); if (sourceFlags & NodeFlags.Private || targetFlags & NodeFlags.Private) { if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { if (reportErrors) { @@ -3948,9 +4049,9 @@ module ts { } } else if (targetFlags & NodeFlags.Protected) { - var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & SymbolFlags.Class; - var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined; - var targetClass = getDeclaredTypeOfSymbol(targetProp.parent); + let sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & SymbolFlags.Class; + let sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined; + let targetClass = getDeclaredTypeOfSymbol(targetProp.parent); if (!sourceClass || !hasBaseType(sourceClass, targetClass)) { if (reportErrors) { reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, @@ -3966,7 +4067,7 @@ module ts { } return Ternary.False; } - var related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); + let related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); if (!related) { if (reportErrors) { reportError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); @@ -3979,7 +4080,7 @@ module ts { // S is a subtype of a type T, and T is a supertype of S if ... // S' and T are object types and, for each member M in T.. // M is a property and S' contains a property N where - // if M is a required property, N is also a required property + // if M is a required property, N is also a required property // (M - property in T) // (N - property in S) if (reportErrors) { @@ -3995,19 +4096,18 @@ module ts { } function propertiesIdenticalTo(source: ObjectType, target: ObjectType): Ternary { - var sourceProperties = getPropertiesOfObjectType(source); - var targetProperties = getPropertiesOfObjectType(target); + let sourceProperties = getPropertiesOfObjectType(source); + let targetProperties = getPropertiesOfObjectType(target); if (sourceProperties.length !== targetProperties.length) { return Ternary.False; } - var result = Ternary.True; - for (var i = 0, len = sourceProperties.length; i < len; ++i) { - var sourceProp = sourceProperties[i]; - var targetProp = getPropertyOfObjectType(target, sourceProp.name); + let result = Ternary.True; + for (let sourceProp of sourceProperties) { + let targetProp = getPropertyOfObjectType(target, sourceProp.name); if (!targetProp) { return Ternary.False; } - var related = compareProperties(sourceProp, targetProp, isRelatedTo); + let related = compareProperties(sourceProp, targetProp, isRelatedTo); if (!related) { return Ternary.False; } @@ -4023,18 +4123,16 @@ module ts { if (target === anyFunctionType || source === anyFunctionType) { return Ternary.True; } - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var result = Ternary.True; - var saveErrorInfo = errorInfo; - outer: for (var i = 0; i < targetSignatures.length; i++) { - var t = targetSignatures[i]; + let sourceSignatures = getSignaturesOfType(source, kind); + let targetSignatures = getSignaturesOfType(target, kind); + let result = Ternary.True; + let saveErrorInfo = errorInfo; + outer: for (let t of targetSignatures) { if (!t.hasStringLiterals || target.flags & TypeFlags.FromSignature) { - var localErrors = reportErrors; - for (var j = 0; j < sourceSignatures.length; j++) { - var s = sourceSignatures[j]; + let localErrors = reportErrors; + for (let s of sourceSignatures) { if (!s.hasStringLiterals || source.flags & TypeFlags.FromSignature) { - var related = signatureRelatedTo(s, t, localErrors); + let related = signatureRelatedTo(s, t, localErrors); if (related) { result &= related; errorInfo = saveErrorInfo; @@ -4057,9 +4155,9 @@ module ts { if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { return Ternary.False; } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount: number; + let sourceMax = source.parameters.length; + let targetMax = target.parameters.length; + let checkCount: number; if (source.hasRestParameter && target.hasRestParameter) { checkCount = sourceMax > targetMax ? sourceMax : targetMax; sourceMax--; @@ -4080,12 +4178,12 @@ module ts { // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N source = getErasedSignature(source); target = getErasedSignature(target); - var result = Ternary.True; - for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); + let result = Ternary.True; + for (let i = 0; i < checkCount; i++) { + let s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + let t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + let saveErrorInfo = errorInfo; + let related = isRelatedTo(s, t, reportErrors); if (!related) { related = isRelatedTo(t, s, false); if (!related) { @@ -4100,21 +4198,21 @@ module ts { } result &= related; } - var t = getReturnTypeOfSignature(target); + let t = getReturnTypeOfSignature(target); if (t === voidType) return result; - var s = getReturnTypeOfSignature(source); + let s = getReturnTypeOfSignature(source); return result & isRelatedTo(s, t, reportErrors); } function signaturesIdenticalTo(source: ObjectType, target: ObjectType, kind: SignatureKind): Ternary { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); + let sourceSignatures = getSignaturesOfType(source, kind); + let targetSignatures = getSignaturesOfType(target, kind); if (sourceSignatures.length !== targetSignatures.length) { return Ternary.False; } - var result = Ternary.True; - for (var i = 0, len = sourceSignatures.length; i < len; ++i) { - var related = compareSignatures(sourceSignatures[i], targetSignatures[i], /*compareReturnTypes*/ true, isRelatedTo); + let result = Ternary.True; + for (let i = 0, len = sourceSignatures.length; i < len; ++i) { + let related = compareSignatures(sourceSignatures[i], targetSignatures[i], /*compareReturnTypes*/ true, isRelatedTo); if (!related) { return Ternary.False; } @@ -4127,16 +4225,16 @@ module ts { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.String, source, target); } - var targetType = getIndexTypeOfType(target, IndexKind.String); + let targetType = getIndexTypeOfType(target, IndexKind.String); if (targetType) { - var sourceType = getIndexTypeOfType(source, IndexKind.String); + let sourceType = getIndexTypeOfType(source, IndexKind.String); if (!sourceType) { if (reportErrors) { reportError(Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); } return Ternary.False; } - var related = isRelatedTo(sourceType, targetType, reportErrors); + let related = isRelatedTo(sourceType, targetType, reportErrors); if (!related) { if (reportErrors) { reportError(Diagnostics.Index_signatures_are_incompatible); @@ -4152,22 +4250,23 @@ module ts { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.Number, source, target); } - var targetType = getIndexTypeOfType(target, IndexKind.Number); + let targetType = getIndexTypeOfType(target, IndexKind.Number); if (targetType) { - var sourceStringType = getIndexTypeOfType(source, IndexKind.String); - var sourceNumberType = getIndexTypeOfType(source, IndexKind.Number); + let sourceStringType = getIndexTypeOfType(source, IndexKind.String); + let sourceNumberType = getIndexTypeOfType(source, IndexKind.Number); if (!(sourceStringType || sourceNumberType)) { if (reportErrors) { reportError(Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); } return Ternary.False; } + 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 - var related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { - var related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); } if (!related) { if (reportErrors) { @@ -4181,8 +4280,8 @@ module ts { } function indexTypesIdenticalTo(indexKind: IndexKind, source: ObjectType, target: ObjectType): Ternary { - var targetType = getIndexTypeOfType(target, indexKind); - var sourceType = getIndexTypeOfType(source, indexKind); + let targetType = getIndexTypeOfType(target, indexKind); + let sourceType = getIndexTypeOfType(source, indexKind); if (!sourceType && !targetType) { return Ternary.True; } @@ -4204,8 +4303,8 @@ module ts { if (sourceProp === targetProp) { return Ternary.True; } - var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (NodeFlags.Private | NodeFlags.Protected); - var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (NodeFlags.Private | NodeFlags.Protected); + let sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (NodeFlags.Private | NodeFlags.Protected); + let targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (NodeFlags.Private | NodeFlags.Protected); if (sourcePropAccessibility !== targetPropAccessibility) { return Ternary.False; } @@ -4231,13 +4330,13 @@ module ts { source.hasRestParameter !== target.hasRestParameter) { return Ternary.False; } - var result = Ternary.True; + let result = Ternary.True; if (source.typeParameters && target.typeParameters) { if (source.typeParameters.length !== target.typeParameters.length) { return Ternary.False; } - for (var i = 0, len = source.typeParameters.length; i < len; ++i) { - var related = compareTypes(source.typeParameters[i], target.typeParameters[i]); + for (let i = 0, len = source.typeParameters.length; i < len; ++i) { + let related = compareTypes(source.typeParameters[i], target.typeParameters[i]); if (!related) { return Ternary.False; } @@ -4251,10 +4350,10 @@ module ts { // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N source = getErasedSignature(source); target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); + for (let i = 0, len = source.parameters.length; i < len; i++) { + let s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); + let t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); + let related = compareTypes(s, t); if (!related) { return Ternary.False; } @@ -4267,8 +4366,8 @@ module ts { } function isSupertypeOfEach(candidate: Type, types: Type[]): boolean { - for (var i = 0, len = types.length; i < len; i++) { - if (candidate !== types[i] && !isTypeSubtypeOf(types[i], candidate)) return false; + for (let type of types) { + if (candidate !== type && !isTypeSubtypeOf(type, candidate)) return false; } return true; } @@ -4278,14 +4377,17 @@ module ts { } function reportNoCommonSupertypeError(types: Type[], errorLocation: Node, errorMessageChainHead: DiagnosticMessageChain): void { - var bestSupertype: Type; - var bestSupertypeDownfallType: Type; // The type that caused bestSupertype not to be the common supertype - var bestSupertypeScore = 0; + // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate + // to not be the common supertype. So if it weren't for this one downfallType (and possibly others), + // the type in question could have been the common supertype. + let bestSupertype: Type; + let bestSupertypeDownfallType: Type; + let bestSupertypeScore = 0; - for (var i = 0; i < types.length; i++) { - var score = 0; - var downfallType: Type = undefined; - for (var j = 0; j < types.length; j++) { + for (let i = 0; i < types.length; i++) { + let score = 0; + let downfallType: Type = undefined; + for (let j = 0; j < types.length; j++) { if (isTypeSubtypeOf(types[j], types[i])) { score++; } @@ -4294,6 +4396,8 @@ module ts { } } + Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType"); + if (score > bestSupertypeScore) { bestSupertype = types[i]; bestSupertypeDownfallType = downfallType; @@ -4326,14 +4430,22 @@ module ts { return !!getPropertyOfType(type, "0"); } + /** + * Check if a Type was written as a tuple type literal. + * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + */ + function isTupleType(type: Type) : boolean { + return (type.flags & TypeFlags.Tuple) && !!(type).elementTypes; + } + function getWidenedTypeOfObjectLiteral(type: Type): Type { - var properties = getPropertiesOfObjectType(type); - var members: SymbolTable = {}; + let properties = getPropertiesOfObjectType(type); + let members: SymbolTable = {}; forEach(properties, p => { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); + let propType = getTypeOfSymbol(p); + let widenedType = getWidenedType(propType); if (propType !== widenedType) { - var symbol = createSymbol(p.flags | SymbolFlags.Transient, p.name); + let symbol = createSymbol(p.flags | SymbolFlags.Transient, p.name); symbol.declarations = p.declarations; symbol.parent = p.parent; symbol.type = widenedType; @@ -4343,8 +4455,8 @@ module ts { } members[p.name] = p; }); - var stringIndexType = getIndexTypeOfType(type, IndexKind.String); - var numberIndexType = getIndexTypeOfType(type, IndexKind.Number); + let stringIndexType = getIndexTypeOfType(type, IndexKind.String); + let numberIndexType = getIndexTypeOfType(type, IndexKind.Number); if (stringIndexType) stringIndexType = getWidenedType(stringIndexType); if (numberIndexType) numberIndexType = getWidenedType(numberIndexType); return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); @@ -4370,7 +4482,7 @@ module ts { function reportWideningErrorsInType(type: Type): boolean { if (type.flags & TypeFlags.Union) { - var errorReported = false; + let errorReported = false; forEach((type).types, t => { if (reportWideningErrorsInType(t)) { errorReported = true; @@ -4382,9 +4494,9 @@ module ts { return reportWideningErrorsInType((type).typeArguments[0]); } if (type.flags & TypeFlags.ObjectLiteral) { - var errorReported = false; + let errorReported = false; forEach(getPropertiesOfObjectType(type), p => { - var t = getTypeOfSymbol(p); + let t = getTypeOfSymbol(p); if (t.flags & TypeFlags.ContainsUndefinedOrNull) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); @@ -4398,14 +4510,15 @@ module ts { } function reportImplicitAnyError(declaration: Declaration, type: Type) { - var typeAsString = typeToString(getWidenedType(type)); + let typeAsString = typeToString(getWidenedType(type)); + let diagnostic: DiagnosticMessage; switch (declaration.kind) { case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: - var diagnostic = Diagnostics.Member_0_implicitly_has_an_1_type; + diagnostic = Diagnostics.Member_0_implicitly_has_an_1_type; break; case SyntaxKind.Parameter: - var diagnostic = (declaration).dotDotDotToken ? + diagnostic = (declaration).dotDotDotToken ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Parameter_0_implicitly_has_an_1_type; break; @@ -4420,10 +4533,10 @@ module ts { error(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; } - var diagnostic = Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; + diagnostic = Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; default: - var diagnostic = Diagnostics.Variable_0_implicitly_has_an_1_type; + diagnostic = Diagnostics.Variable_0_implicitly_has_an_1_type; } error(declaration, diagnostic, declarationNameToString(declaration.name), typeAsString); } @@ -4438,9 +4551,9 @@ module ts { } function forEachMatchingParameterType(source: Signature, target: Signature, callback: (s: Type, t: Type) => void) { - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var count: number; + let sourceMax = source.parameters.length; + let targetMax = target.parameters.length; + let count: number; if (source.hasRestParameter && target.hasRestParameter) { count = sourceMax > targetMax ? sourceMax : targetMax; sourceMax--; @@ -4457,48 +4570,51 @@ module ts { else { count = sourceMax < targetMax ? sourceMax : targetMax; } - for (var i = 0; i < count; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); + for (let i = 0; i < count; i++) { + let s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); + let t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); callback(s, t); } } function createInferenceContext(typeParameters: TypeParameter[], inferUnionTypes: boolean): InferenceContext { - var inferences: TypeInferences[] = []; - for (var i = 0; i < typeParameters.length; i++) { - inferences.push({ primary: undefined, secondary: undefined }); + let inferences: TypeInferences[] = []; + for (let unused of typeParameters) { + inferences.push({ primary: undefined, secondary: undefined, isFixed: false }); } return { - typeParameters: typeParameters, - inferUnionTypes: inferUnionTypes, - inferenceCount: 0, - inferences: inferences, + typeParameters, + inferUnionTypes, + inferences, inferredTypes: new Array(typeParameters.length), }; } function inferTypes(context: InferenceContext, source: Type, target: Type) { - var sourceStack: Type[]; - var targetStack: Type[]; - var depth = 0; - var inferiority = 0; + let sourceStack: Type[]; + let targetStack: Type[]; + let depth = 0; + let inferiority = 0; inferFromTypes(source, target); function isInProcess(source: Type, target: Type) { - for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) return true; + for (let i = 0; i < depth; i++) { + if (source === sourceStack[i] && target === targetStack[i]) { + return true; + } } return false; } function isWithinDepthLimit(type: Type, stack: Type[]) { if (depth >= 5) { - var target = (type).target; - var count = 0; - for (var i = 0; i < depth; i++) { - var t = stack[i]; - if (t.flags & TypeFlags.Reference && (t).target === target) count++; + let target = (type).target; + let count = 0; + for (let i = 0; i < depth; i++) { + let t = stack[i]; + if (t.flags & TypeFlags.Reference && (t).target === target) { + count++; + } } return count < 5; } @@ -4511,33 +4627,42 @@ module ts { } if (target.flags & TypeFlags.TypeParameter) { // If target is a type parameter, make an inference - var typeParameters = context.typeParameters; - for (var i = 0; i < typeParameters.length; i++) { + let typeParameters = context.typeParameters; + for (let i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { - var inferences = context.inferences[i]; - var candidates = inferiority ? - inferences.secondary || (inferences.secondary = []) : - inferences.primary || (inferences.primary = []); - if (!contains(candidates, source)) candidates.push(source); - break; + let inferences = context.inferences[i]; + if (!inferences.isFixed) { + // Any inferences that are made to a type parameter in a union type are inferior + // to inferences made to a flat (non-union) type. This is because if we infer to + // T | string[], we really don't know if we should be inferring to T or not (because + // the correct constituent on the target side could be string[]). Therefore, we put + // such inferior inferences into a secondary bucket, and only use them if the primary + // bucket is empty. + let candidates = inferiority ? + inferences.secondary || (inferences.secondary = []) : + inferences.primary || (inferences.primary = []); + if (!contains(candidates, source)) { + candidates.push(source); + } + } + return; } } } else if (source.flags & TypeFlags.Reference && target.flags & TypeFlags.Reference && (source).target === (target).target) { // If source and target are references to the same generic type, infer from type arguments - var sourceTypes = (source).typeArguments; - var targetTypes = (target).typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { + let sourceTypes = (source).typeArguments; + let targetTypes = (target).typeArguments; + for (let i = 0; i < sourceTypes.length; i++) { inferFromTypes(sourceTypes[i], targetTypes[i]); } } else if (target.flags & TypeFlags.Union) { - var targetTypes = (target).types; - var typeParameterCount = 0; - var typeParameter: TypeParameter; + let targetTypes = (target).types; + let typeParameterCount = 0; + let typeParameter: TypeParameter; // First infer to each type in union that isn't a type parameter - for (var i = 0; i < targetTypes.length; i++) { - var t = targetTypes[i]; + for (let t of targetTypes) { if (t.flags & TypeFlags.TypeParameter && contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; @@ -4555,9 +4680,9 @@ module ts { } else if (source.flags & TypeFlags.Union) { // Source is a union type, infer from each consituent type - var sourceTypes = (source).types; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], target); + let sourceTypes = (source).types; + for (let sourceType of sourceTypes) { + inferFromTypes(sourceType, target); } } else if (source.flags & TypeFlags.ObjectType && (target.flags & (TypeFlags.Reference | TypeFlags.Tuple) || @@ -4583,10 +4708,9 @@ module ts { } function inferFromProperties(source: Type, target: Type) { - var properties = getPropertiesOfObjectType(target); - for (var i = 0; i < properties.length; i++) { - var targetProp = properties[i]; - var sourceProp = getPropertyOfObjectType(source, targetProp.name); + let properties = getPropertiesOfObjectType(target); + for (let targetProp of properties) { + let sourceProp = getPropertyOfObjectType(source, targetProp.name); if (sourceProp) { inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } @@ -4594,12 +4718,12 @@ module ts { } function inferFromSignatures(source: Type, target: Type, kind: SignatureKind) { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var sourceLen = sourceSignatures.length; - var targetLen = targetSignatures.length; - var len = sourceLen < targetLen ? sourceLen : targetLen; - for (var i = 0; i < len; i++) { + let sourceSignatures = getSignaturesOfType(source, kind); + let targetSignatures = getSignaturesOfType(target, kind); + let sourceLen = sourceSignatures.length; + let targetLen = targetSignatures.length; + let len = sourceLen < targetLen ? sourceLen : targetLen; + for (let i = 0; i < len; i++) { inferFromSignature(getErasedSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); } } @@ -4610,9 +4734,9 @@ module ts { } function inferFromIndexTypes(source: Type, target: Type, sourceKind: IndexKind, targetKind: IndexKind) { - var targetIndexType = getIndexTypeOfType(target, targetKind); + let targetIndexType = getIndexTypeOfType(target, targetKind); if (targetIndexType) { - var sourceIndexType = getIndexTypeOfType(source, sourceKind); + let sourceIndexType = getIndexTypeOfType(source, sourceKind); if (sourceIndexType) { inferFromTypes(sourceIndexType, targetIndexType); } @@ -4621,34 +4745,48 @@ module ts { } function getInferenceCandidates(context: InferenceContext, index: number): Type[] { - var inferences = context.inferences[index]; + let inferences = context.inferences[index]; return inferences.primary || inferences.secondary || emptyArray; } function getInferredType(context: InferenceContext, index: number): Type { - var inferredType = context.inferredTypes[index]; + let inferredType = context.inferredTypes[index]; + let inferenceSucceeded: boolean; if (!inferredType) { - var inferences = getInferenceCandidates(context, index); + let inferences = getInferenceCandidates(context, index); if (inferences.length) { - // Infer widened union or supertype, or the undefined type for no common supertype - var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); - inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : inferenceFailureType; + // Infer widened union or supertype, or the unknown type for no common supertype + let unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); + inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType; + inferenceSucceeded = !!unionOrSuperType; } else { - // Infer the empty object type when no inferences were made + // Infer the empty object type when no inferences were made. It is important to remember that + // in this case, inference still succeeds, meaning there is no error for not having inference + // candidates. An inference error only occurs when there are *conflicting* candidates, i.e. + // candidates with no common supertype. inferredType = emptyObjectType; + inferenceSucceeded = true; } - if (inferredType !== inferenceFailureType) { - var constraint = getConstraintOfTypeParameter(context.typeParameters[index]); + + // Only do the constraint check if inference succeeded (to prevent cascading errors) + if (inferenceSucceeded) { + let constraint = getConstraintOfTypeParameter(context.typeParameters[index]); inferredType = constraint && !isTypeAssignableTo(inferredType, constraint) ? constraint : inferredType; } + else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) { + // If inference failed, it is necessary to record the index of the failed type parameter (the one we are on). + // It might be that inference has already failed on a later type parameter on a previous call to inferTypeArguments. + // So if this failure is on preceding type parameter, this type parameter is the new failure index. + context.failedTypeParameterIndex = index; + } context.inferredTypes[index] = inferredType; } return inferredType; } function getInferredTypes(context: InferenceContext): Type[] { - for (var i = 0; i < context.inferredTypes.length; i++) { + for (let i = 0; i < context.inferredTypes.length; i++) { getInferredType(context, i); } @@ -4662,7 +4800,7 @@ module ts { // EXPRESSION TYPE CHECKING function getResolvedSymbol(node: Identifier): Symbol { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedSymbol) { links.resolvedSymbol = (getFullWidth(node) > 0 && resolveName(node, node.text, SymbolFlags.Value | SymbolFlags.ExportValue, Diagnostics.Cannot_find_name_0, node)) || unknownSymbol; } @@ -4690,17 +4828,22 @@ module ts { // 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): Type { + function removeTypesFromUnionType(type: Type, typeKind: TypeFlags, isOfTypeKind: boolean, allowEmptyUnionResult: boolean): Type { if (type.flags & TypeFlags.Union) { - var types = (type).types; + let 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 - var narrowedType = getUnionType(filter(types, t => !(t.flags & typeKind) === isOfTypeKind)); - if (narrowedType !== emptyObjectType) { + let 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; } @@ -4710,9 +4853,9 @@ module ts { // Check if a given variable is assigned within a given syntax node function isVariableAssignedWithin(symbol: Symbol, node: Node): boolean { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (links.assignmentChecks) { - var cachedResult = links.assignmentChecks[symbol.id]; + let cachedResult = links.assignmentChecks[symbol.id]; if (cachedResult !== undefined) { return cachedResult; } @@ -4724,7 +4867,7 @@ module ts { function isAssignedInBinaryExpression(node: BinaryExpression) { if (node.operatorToken.kind >= SyntaxKind.FirstAssignment && node.operatorToken.kind <= SyntaxKind.LastAssignment) { - var n = node.left; + let n = node.left; while (n.kind === SyntaxKind.ParenthesizedExpression) { n = (n).expression; } @@ -4793,8 +4936,8 @@ module ts { function resolveLocation(node: Node) { // Resolve location from top down towards node if it is a context sensitive expression // That helps in making sure not assigning types as any when resolved out of order - var containerNodes: Node[] = []; - for (var parent = node.parent; parent; parent = parent.parent) { + let containerNodes: Node[] = []; + for (let parent = node.parent; parent; parent = parent.parent) { if ((isExpression(parent) || isObjectLiteralMethod(node)) && isContextSensitive(parent)) { containerNodes.unshift(parent); @@ -4816,9 +4959,9 @@ module ts { function getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type { resolveLocation(node); - // Get the narrowed type of symbol at given location instead of just getting + // Get the narrowed type of symbol at given location instead of just getting // the type of the symbol. - // eg. + // eg. // function foo(a: string | number) { // if (typeof a === "string") { // a/**/ @@ -4833,13 +4976,13 @@ module ts { // Get the narrowed type of a given symbol at a given location function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) { - var type = getTypeOfSymbol(symbol); + let type = getTypeOfSymbol(symbol); // Only narrow when symbol is variable of type any or an object, union, or type parameter type if (node && symbol.flags & SymbolFlags.Variable && type.flags & (TypeFlags.Any | TypeFlags.ObjectType | TypeFlags.Union | TypeFlags.TypeParameter)) { loop: while (node.parent) { - var child = node; + let child = node; node = node.parent; - var narrowedType = type; + let narrowedType = type; switch (node.kind) { case SyntaxKind.IfStatement: // In a branch of an if statement, narrow based on controlling expression @@ -4891,19 +5034,20 @@ module ts { if (expr.left.kind !== SyntaxKind.TypeOfExpression || expr.right.kind !== SyntaxKind.StringLiteral) { return type; } - var left = expr.left; - var right = expr.right; + let left = expr.left; + let right = expr.right; if (left.expression.kind !== SyntaxKind.Identifier || getResolvedSymbol(left.expression) !== symbol) { return type; } - var typeInfo = primitiveTypeInfo[right.text]; + let 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); + 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)) { @@ -4911,12 +5055,12 @@ module ts { } // 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); + return removeTypesFromUnionType(type, /*typeKind*/ typeInfo.flags, /*isOfTypeKind*/ false, /*allowEmptyUnionResult*/ false); } 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); + return removeTypesFromUnionType(type, /*typeKind*/ typeInfo.flags, /*isOfTypeKind*/ true, /*allowEmptyUnionResult*/ false); } // Otherwise we don't have enough information to do anything. return type; @@ -4959,16 +5103,16 @@ module ts { return type; } // Check that right operand is a function type with a prototype property - var rightType = checkExpression(expr.right); + let rightType = checkExpression(expr.right); if (!isTypeSubtypeOf(rightType, globalFunctionType)) { return type; } // Target type is type of prototype property - var prototypeProperty = getPropertyOfType(rightType, "prototype"); + let prototypeProperty = getPropertyOfType(rightType, "prototype"); if (!prototypeProperty) { return type; } - var targetType = getTypeOfSymbol(prototypeProperty); + let targetType = getTypeOfSymbol(prototypeProperty); // Narrow to target type if it is a subtype of current type if (isTypeSubtypeOf(targetType, type)) { return targetType; @@ -4987,7 +5131,7 @@ module ts { case SyntaxKind.ParenthesizedExpression: return narrowType(type, (expr).expression, assumeTrue); case SyntaxKind.BinaryExpression: - var operator = (expr).operatorToken.kind; + let operator = (expr).operatorToken.kind; if (operator === SyntaxKind.EqualsEqualsEqualsToken || operator === SyntaxKind.ExclamationEqualsEqualsToken) { return narrowTypeByEquality(type, expr, assumeTrue); } @@ -5011,24 +5155,8 @@ module ts { } } - /*Transitively mark all linked imports as referenced*/ - function markLinkedImportsAsReferenced(node: ImportEqualsDeclaration): void { - if (node) { - var nodeLinks = getNodeLinks(node); - while (nodeLinks.importOnRightSide) { - var rightSide = nodeLinks.importOnRightSide; - nodeLinks.importOnRightSide = undefined; - - getSymbolLinks(rightSide).referenced = true; - Debug.assert((rightSide.flags & SymbolFlags.Import) !== 0); - - nodeLinks = getNodeLinks(getDeclarationOfKind(rightSide, SyntaxKind.ImportEqualsDeclaration)) - } - } - } - function checkIdentifier(node: Identifier): Type { - var symbol = getResolvedSymbol(node); + let symbol = getResolvedSymbol(node); // As noted in ECMAScript 6 language spec, arrow functions never have an arguments objects. // Although in down-level emit of arrow function, we emit it using function expression which means that @@ -5040,44 +5168,8 @@ module ts { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression); } - if (symbol.flags & SymbolFlags.Import) { - - //var symbolLinks = getSymbolLinks(symbol); - //if (!symbolLinks.referenced) { - // if (!isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol))) { - // symbolLinks.referenced = true; - // } - //} - - // TODO: AndersH: This needs to be simplified. In an import of the form "import x = a.b.c;" we only need - // to resolve "a" and mark it as referenced. If "b" and/or "c" are aliases, we would be able to access them - // unless they're exported, and in that case they're already implicitly referenced. - - var symbolLinks = getSymbolLinks(symbol); - if (!symbolLinks.referenced) { - var importOrExportAssignment = getLeftSideOfImportEqualsOrExportAssignment(node); - - // decision about whether import is referenced can be made now if - // - import that are used anywhere except right side of import declarations - // - imports that are used on the right side of exported import declarations - // for other cases defer decision until the check of left side - if (!importOrExportAssignment || - (importOrExportAssignment.flags & NodeFlags.Export) || - (importOrExportAssignment.kind === SyntaxKind.ExportAssignment)) { - // Mark the import as referenced so that we emit it in the final .js file. - // exception: identifiers that appear in type queries, const enums, modules that contain only const enums - symbolLinks.referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); - } - else { - var nodeLinks = getNodeLinks(importOrExportAssignment); - Debug.assert(!nodeLinks.importOnRightSide); - nodeLinks.importOnRightSide = symbol; - } - } - - if (symbolLinks.referenced) { - markLinkedImportsAsReferenced(getDeclarationOfKind(symbol, SyntaxKind.ImportEqualsDeclaration)); - } + if (symbol.flags & SymbolFlags.Alias && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); } checkCollisionWithCapturedSuperVariable(node, node); @@ -5088,9 +5180,9 @@ module ts { } function isInsideFunction(node: Node, threshold: Node): boolean { - var current = node; + let current = node; while (current && current !== threshold) { - if (isAnyFunction(current)) { + if (isFunctionLike(current)) { return true; } current = current.parent; @@ -5112,7 +5204,7 @@ module ts { // nesting structure: // (variable declaration or binding element) -> variable declaration list -> container - var container: Node = symbol.valueDeclaration; + let container: Node = symbol.valueDeclaration; while (container.kind !== SyntaxKind.VariableDeclarationList) { container = container.parent; } @@ -5122,10 +5214,10 @@ module ts { // if parent is variable statement - get its parent container = container.parent; } - - var inFunction = isInsideFunction(node.parent, container); - var current = container; + let inFunction = isInsideFunction(node.parent, container); + + let current = container; while (current && !nodeStartsNewLexicalEnvironment(current)) { if (isIterationStatement(current, /*lookInLabeledStatements*/ false)) { if (inFunction) { @@ -5140,7 +5232,7 @@ module ts { } function captureLexicalThis(node: Node, container: Node): void { - var classNode = container.parent && container.parent.kind === SyntaxKind.ClassDeclaration ? container.parent : undefined; + let classNode = container.parent && container.parent.kind === SyntaxKind.ClassDeclaration ? container.parent : undefined; getNodeLinks(node).flags |= NodeCheckFlags.LexicalThis; if (container.kind === SyntaxKind.PropertyDeclaration || container.kind === SyntaxKind.Constructor) { getNodeLinks(classNode).flags |= NodeCheckFlags.CaptureThis; @@ -5153,8 +5245,8 @@ module ts { function checkThisExpression(node: Node): Type { // Stop at the first arrow function so that we can // tell whether 'this' needs to be captured. - var container = getThisContainer(node, /* includeArrowFunctions */ true); - var needToCaptureLexicalThis = false; + let container = getThisContainer(node, /* includeArrowFunctions */ true); + let needToCaptureLexicalThis = false; // Now skip arrow functions to get the "real" owner of 'this'. if (container.kind === SyntaxKind.ArrowFunction) { @@ -5195,16 +5287,16 @@ module ts { captureLexicalThis(node, container); } - var classNode = container.parent && container.parent.kind === SyntaxKind.ClassDeclaration ? container.parent : undefined; + let classNode = container.parent && container.parent.kind === SyntaxKind.ClassDeclaration ? container.parent : undefined; if (classNode) { - var symbol = getSymbolOfNode(classNode); + let symbol = getSymbolOfNode(classNode); return container.flags & NodeFlags.Static ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol); } return anyType; } function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean { - for (var n = node; n && n !== constructorDecl; n = n.parent) { + for (let n = node; n && n !== constructorDecl; n = n.parent) { if (n.kind === SyntaxKind.Parameter) { return true; } @@ -5213,11 +5305,11 @@ module ts { } function checkSuperExpression(node: Node): Type { - var isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; - var enclosingClass = getAncestor(node, SyntaxKind.ClassDeclaration); - var baseClass: Type; + let isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; + let enclosingClass = getAncestor(node, SyntaxKind.ClassDeclaration); + let baseClass: Type; if (enclosingClass && getClassBaseTypeNode(enclosingClass)) { - var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); + let classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); baseClass = classType.baseTypes.length && classType.baseTypes[0]; } @@ -5226,10 +5318,11 @@ module ts { return unknownType; } - var container = getSuperContainer(node, /*includeFunctions*/ true); + let container = getSuperContainer(node, /*includeFunctions*/ true); if (container) { - var canUseSuperExpression = false; + let canUseSuperExpression = false; + let needToCaptureLexicalThis: boolean; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes @@ -5242,7 +5335,7 @@ module ts { // - In a static member function or static member accessor // super property access might appear in arrow functions with arbitrary deep nesting - var needToCaptureLexicalThis = false; + needToCaptureLexicalThis = false; while (container && container.kind === SyntaxKind.ArrowFunction) { container = getSuperContainer(container, /*includeFunctions*/ true); needToCaptureLexicalThis = true; @@ -5271,7 +5364,7 @@ module ts { } if (canUseSuperExpression) { - var returnType: Type; + let returnType: Type; if ((container.flags & NodeFlags.Static) || isCallExpression) { getNodeLinks(node).flags |= NodeCheckFlags.SuperStatic; @@ -5315,14 +5408,14 @@ module ts { // Return contextual type of parameter or undefined if no contextual type is available function getContextuallyTypedParameterType(parameter: ParameterDeclaration): Type { if (isFunctionExpressionOrArrowFunction(parameter.parent)) { - var func = parameter.parent; + let func = parameter.parent; if (isContextSensitive(func)) { - var contextualSignature = getContextualSignature(func); + let contextualSignature = getContextualSignature(func); if (contextualSignature) { - var funcHasRestParameters = hasRestParameters(func); - var len = func.parameters.length - (funcHasRestParameters ? 1 : 0); - var indexOfParameter = indexOf(func.parameters, parameter); + let funcHasRestParameters = hasRestParameters(func); + let len = func.parameters.length - (funcHasRestParameters ? 1 : 0); + let indexOfParameter = indexOf(func.parameters, parameter); if (indexOfParameter < len) { return getTypeAtPosition(contextualSignature, indexOfParameter); } @@ -5344,13 +5437,13 @@ module ts { // of the parameter. Otherwise, in a variable or parameter declaration with a binding pattern name, the contextual // type of an initializer expression is the type implied by the binding pattern. function getContextualTypeForInitializerExpression(node: Expression): Type { - var declaration = node.parent; + let declaration = node.parent; if (node === declaration.initializer) { if (declaration.type) { return getTypeFromTypeNode(declaration.type); } if (declaration.kind === SyntaxKind.Parameter) { - var type = getContextuallyTypedParameterType(declaration); + let type = getContextuallyTypedParameterType(declaration); if (type) { return type; } @@ -5363,7 +5456,7 @@ module ts { } function getContextualTypeForReturnExpression(node: Expression): Type { - var func = getContainingFunction(node); + let func = getContainingFunction(node); if (func) { // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed @@ -5372,7 +5465,7 @@ module ts { } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature // and that call signature is non-generic, return statements are contextually typed by the return type of the signature - var signature = getContextualSignatureForFunctionLikeDeclaration(func); + let signature = getContextualSignatureForFunctionLikeDeclaration(func); if (signature) { return getReturnTypeOfSignature(signature); } @@ -5382,10 +5475,10 @@ module ts { // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. function getContextualTypeForArgument(callTarget: CallLikeExpression, arg: Expression): Type { - var args = getEffectiveCallArguments(callTarget); - var argIndex = indexOf(args, arg); + let args = getEffectiveCallArguments(callTarget); + let argIndex = indexOf(args, arg); if (argIndex >= 0) { - var signature = getResolvedSignature(callTarget); + let signature = getResolvedSignature(callTarget); return getTypeAtPosition(signature, argIndex); } return undefined; @@ -5400,8 +5493,8 @@ module ts { } function getContextualTypeForBinaryOperand(node: Expression): Type { - var binaryExpression = node.parent; - var operator = binaryExpression.operatorToken.kind; + let binaryExpression = node.parent; + let 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) { @@ -5411,7 +5504,7 @@ module ts { else if (operator === SyntaxKind.BarBarToken) { // When an || expression has a contextual type, the operands are contextually typed by that type. When an || // expression has no contextual type, the right operand is contextually typed by the type of the left operand. - var type = getContextualType(binaryExpression); + let type = getContextualType(binaryExpression); if (!type && node === binaryExpression.right) { type = checkExpression(binaryExpression.left); } @@ -5427,11 +5520,11 @@ module ts { if (!(type.flags & TypeFlags.Union)) { return mapper(type); } - var types = (type).types; - var mappedType: Type; - var mappedTypes: Type[]; - for (var i = 0; i < types.length; i++) { - var t = mapper(types[i]); + let types = (type).types; + let mappedType: Type; + let mappedTypes: Type[]; + for (let current of types) { + let t = mapper(current); if (t) { if (!mappedType) { mappedType = t; @@ -5449,7 +5542,7 @@ module ts { function getTypeOfPropertyOfContextualType(type: Type, name: string) { return applyToContextualType(type, t => { - var prop = getPropertyOfObjectType(t, name); + let prop = getPropertyOfObjectType(t, name); return prop ? getTypeOfSymbol(prop) : undefined; }); } @@ -5482,15 +5575,15 @@ module ts { } function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElement) { - var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); + let objectLiteral = element.parent; + let type = getContextualType(objectLiteral); if (type) { if (!hasDynamicName(element)) { // For a (non-symbol) computed property, there is no reason to look up the name // in the type. It will just be "__computed", which does not appear in any // SymbolTable. - var symbolName = getSymbolOfNode(element).name; - var propertyType = getTypeOfPropertyOfContextualType(type, symbolName); + let symbolName = getSymbolOfNode(element).name; + let propertyType = getTypeOfPropertyOfContextualType(type, symbolName); if (propertyType) { return propertyType; } @@ -5508,10 +5601,10 @@ module ts { // it is the type of the numeric index signature in T. Otherwise, in ES6 and higher, the contextual type is the iterated // type of T. function getContextualTypeForElementExpression(node: Expression): Type { - var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); + let arrayLiteral = node.parent; + let type = getContextualType(arrayLiteral); if (type) { - var index = indexOf(arrayLiteral.elements, node); + let index = indexOf(arrayLiteral.elements, node); return getTypeOfPropertyOfContextualType(type, "" + index) || getIndexTypeOfContextualType(type, IndexKind.Number) || (languageVersion >= ScriptTarget.ES6 ? checkIteratedType(type, /*expressionForError*/ undefined) : undefined); @@ -5521,7 +5614,7 @@ module ts { // In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type. function getContextualTypeForConditionalOperand(node: Expression): Type { - var conditional = node.parent; + let conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } @@ -5535,7 +5628,7 @@ module ts { if (node.contextualType) { return node.contextualType; } - var parent = node.parent; + let parent = node.parent; switch (parent.kind) { case SyntaxKind.VariableDeclaration: case SyntaxKind.Parameter: @@ -5571,9 +5664,9 @@ module ts { // If the given type is an object or union type, if that type has a single signature, and if // that signature is non-generic, return the signature. Otherwise return undefined. function getNonGenericSignature(type: Type): Signature { - var signatures = getSignaturesOfObjectOrUnionType(type, SignatureKind.Call); + let signatures = getSignaturesOfObjectOrUnionType(type, SignatureKind.Call); if (signatures.length === 1) { - var signature = signatures[0]; + let signature = signatures[0]; if (!signature.typeParameters) { return signature; } @@ -5591,12 +5684,12 @@ module ts { // Return the contextual signature for a given expression node. A contextual type provides a // contextual signature if it has a single call signature and if that call signature is non-generic. - // If the contextual type is a union type, get the signature from each type possible and if they are - // all identical ignoring their return type, the result is same signature but with return type as + // If the contextual type is a union type, get the signature from each type possible and if they are + // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node: FunctionExpression | MethodDeclaration): Signature { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); - var type = isObjectLiteralMethod(node) + let type = isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getContextualType(node); if (!type) { @@ -5605,17 +5698,17 @@ module ts { if (!(type.flags & TypeFlags.Union)) { return getNonGenericSignature(type); } - var signatureList: Signature[]; - var types = (type).types; - for (var i = 0; i < types.length; i++) { + let signatureList: Signature[]; + let types = (type).types; + for (let current of types) { // The signature set of all constituent type with call signatures should match // So number of signatures allowed is either 0 or 1 if (signatureList && - getSignaturesOfObjectOrUnionType(types[i], SignatureKind.Call).length > 1) { + getSignaturesOfObjectOrUnionType(current, SignatureKind.Call).length > 1) { return undefined; } - var signature = getNonGenericSignature(types[i]); + let signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { // This signature will contribute to contextual union signature @@ -5633,7 +5726,7 @@ module ts { } // Result is union of signatures collected (return type is union of return types of this signature set) - var result: Signature; + let result: Signature; if (signatureList) { result = cloneSignature(signatureList[0]); // Clear resolved return type we possibly got from cloneSignature @@ -5653,7 +5746,7 @@ module ts { // assignment in an object literal that is an assignment target, or if it is parented by an array literal that is // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. function isAssignmentTarget(node: Node): boolean { - var parent = node.parent; + let parent = node.parent; if (parent.kind === SyntaxKind.BinaryExpression && (parent).operatorToken.kind === SyntaxKind.EqualsToken && (parent).left === node) { return true; } @@ -5667,7 +5760,7 @@ module ts { } function checkSpreadElementExpression(node: SpreadElementExpression, contextualMapper?: TypeMapper): Type { - var type = checkExpressionCached(node.expression, contextualMapper); + let type = checkExpressionCached(node.expression, contextualMapper); if (!isArrayLikeType(type)) { error(node.expression, Diagnostics.Type_0_is_not_an_array_type, typeToString(type)); return unknownType; @@ -5676,14 +5769,14 @@ module ts { } function checkArrayLiteral(node: ArrayLiteralExpression, contextualMapper?: TypeMapper): Type { - var elements = node.elements; + let elements = node.elements; if (!elements.length) { return createArrayType(undefinedType); } - var hasSpreadElement: boolean = false; - var elementTypes: Type[] = []; + let hasSpreadElement: boolean = false; + let elementTypes: Type[] = []; forEach(elements, e => { - var type = checkExpression(e, contextualMapper); + let type = checkExpression(e, contextualMapper); if (e.kind === SyntaxKind.SpreadElementExpression) { elementTypes.push(getIndexTypeOfType(type, IndexKind.Number) || anyType); hasSpreadElement = true; @@ -5693,7 +5786,7 @@ module ts { } }); if (!hasSpreadElement) { - var contextualType = getContextualType(node); + let contextualType = getContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType) || isAssignmentTarget(node)) { return createTupleType(elementTypes); } @@ -5737,7 +5830,7 @@ module ts { } function checkComputedPropertyName(node: ComputedPropertyName): Type { - var links = getNodeLinks(node.expression); + let links = getNodeLinks(node.expression); if (!links.resolvedType) { links.resolvedType = checkExpression(node.expression); @@ -5758,31 +5851,31 @@ module ts { // Grammar checking checkGrammarObjectLiteralExpression(node); - var propertiesTable: SymbolTable = {}; - var propertiesArray: Symbol[] = []; - var contextualType = getContextualType(node); - var typeFlags: TypeFlags; + let propertiesTable: SymbolTable = {}; + let propertiesArray: Symbol[] = []; + let contextualType = getContextualType(node); + let typeFlags: TypeFlags; - for (var i = 0; i < node.properties.length; i++) { - var memberDecl = node.properties[i]; - var member = memberDecl.symbol; + for (let memberDecl of node.properties) { + let member = memberDecl.symbol; if (memberDecl.kind === SyntaxKind.PropertyAssignment || memberDecl.kind === SyntaxKind.ShorthandPropertyAssignment || isObjectLiteralMethod(memberDecl)) { + let type: Type; if (memberDecl.kind === SyntaxKind.PropertyAssignment) { - var type = checkPropertyAssignment(memberDecl, contextualMapper); + type = checkPropertyAssignment(memberDecl, contextualMapper); } else if (memberDecl.kind === SyntaxKind.MethodDeclaration) { - var type = checkObjectLiteralMethod(memberDecl, contextualMapper); + type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { Debug.assert(memberDecl.kind === SyntaxKind.ShorthandPropertyAssignment); - var type = memberDecl.name.kind === SyntaxKind.ComputedPropertyName + type = memberDecl.name.kind === SyntaxKind.ComputedPropertyName ? unknownType : checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; - var prop = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | member.flags, member.name); + let prop = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | member.flags, member.name); prop.declarations = member.declarations; prop.parent = member.parent; if (member.valueDeclaration) { @@ -5795,9 +5888,9 @@ module ts { } else { // TypeScript 1.0 spec (April 2014) - // A get accessor declaration is processed in the same manner as + // A get accessor declaration is processed in the same manner as // an ordinary function declaration(section 6.1) with no parameters. - // A set accessor declaration is processed in the same manner + // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. Debug.assert(memberDecl.kind === SyntaxKind.GetAccessor || memberDecl.kind === SyntaxKind.SetAccessor); checkAccessorDeclaration(memberDecl); @@ -5809,29 +5902,29 @@ module ts { propertiesArray.push(member); } - var stringIndexType = getIndexType(IndexKind.String); - var numberIndexType = getIndexType(IndexKind.Number); - var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); + let stringIndexType = getIndexType(IndexKind.String); + let numberIndexType = getIndexType(IndexKind.Number); + let result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | (typeFlags & TypeFlags.ContainsUndefinedOrNull); return result; function getIndexType(kind: IndexKind) { if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) { - var propTypes: Type[] = []; - for (var i = 0; i < propertiesArray.length; i++) { - var propertyDecl = node.properties[i]; + let propTypes: Type[] = []; + for (let i = 0; i < propertiesArray.length; i++) { + let propertyDecl = node.properties[i]; if (kind === IndexKind.String || isNumericName(propertyDecl.name)) { // Do not call getSymbolOfNode(propertyDecl), as that will get the // original symbol for the node. We actually want to get the symbol // created by checkObjectLiteral, since that will be appropriately // contextually typed and resolved. - var type = getTypeOfSymbol(propertiesArray[i]); + let type = getTypeOfSymbol(propertiesArray[i]); if (!contains(propTypes, type)) { propTypes.push(type); } } } - var result = propTypes.length ? getUnionType(propTypes) : undefinedType; + let result = propTypes.length ? getUnionType(propTypes) : undefinedType; typeFlags |= result.flags; return result; } @@ -5850,16 +5943,16 @@ module ts { } function checkClassPropertyAccess(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, type: Type, prop: Symbol) { - var flags = getDeclarationFlagsFromSymbol(prop); + let flags = getDeclarationFlagsFromSymbol(prop); // Public properties are always accessible if (!(flags & (NodeFlags.Private | NodeFlags.Protected))) { return; } // Property is known to be private or protected at this point // Get the declaring and enclosing class instance types - var enclosingClassDeclaration = getAncestor(node, SyntaxKind.ClassDeclaration); - var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; - var declaringClass = getDeclaredTypeOfSymbol(prop.parent); + let enclosingClassDeclaration = getAncestor(node, SyntaxKind.ClassDeclaration); + let enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; + let declaringClass = getDeclaredTypeOfSymbol(prop.parent); // Private property is accessible if declaring and enclosing class are the same if (flags & NodeFlags.Private) { if (declaringClass !== enclosingClass) { @@ -5896,15 +5989,15 @@ module ts { } function checkPropertyAccessExpressionOrQualifiedName(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, right: Identifier) { - var type = checkExpressionOrQualifiedName(left); + let type = checkExpressionOrQualifiedName(left); if (type === unknownType) return type; if (type !== anyType) { - var apparentType = getApparentType(getWidenedType(type)); + let apparentType = getApparentType(getWidenedType(type)); if (apparentType === unknownType) { // handle cases when type is Type parameter with invalid constraint return unknownType; } - var prop = getPropertyOfType(apparentType, right.text); + let prop = getPropertyOfType(apparentType, right.text); if (!prop) { if (right.text) { error(right, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(right), typeToString(type)); @@ -5914,11 +6007,11 @@ module ts { getNodeLinks(node).resolvedSymbol = prop; if (prop.parent && prop.parent.flags & SymbolFlags.Class) { // TS 1.0 spec (April 2014): 4.8.2 - // - In a constructor, instance member function, instance member accessor, or - // instance member variable initializer where this references a derived class instance, + // - In a constructor, instance member function, instance member accessor, or + // instance member variable initializer where this references a derived class instance, // a super property access is permitted and must specify a public instance member function of the base class. - // - In a static member function or static member accessor - // where this references the constructor function object of a derived class, + // - In a static member function or static member accessor + // where this references the constructor function object of a derived class, // a super property access is permitted and must specify a public static member function of the base class. if (left.kind === SyntaxKind.SuperKeyword && getDeclarationKindFromSymbol(prop) !== SyntaxKind.MethodDeclaration) { error(right, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -5933,19 +6026,19 @@ module ts { } function isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean { - var left = node.kind === SyntaxKind.PropertyAccessExpression + let left = node.kind === SyntaxKind.PropertyAccessExpression ? (node).expression : (node).left; - var type = checkExpressionOrQualifiedName(left); + let type = checkExpressionOrQualifiedName(left); if (type !== unknownType && type !== anyType) { - var prop = getPropertyOfType(getWidenedType(type), propertyName); + let prop = getPropertyOfType(getWidenedType(type), propertyName); if (prop && prop.parent && prop.parent.flags & SymbolFlags.Class) { if (left.kind === SyntaxKind.SuperKeyword && getDeclarationKindFromSymbol(prop) !== SyntaxKind.MethodDeclaration) { return false; } else { - var modificationCount = diagnostics.getModificationCount(); + let modificationCount = diagnostics.getModificationCount(); checkClassPropertyAccess(node, left, type, prop); return diagnostics.getModificationCount() === modificationCount; } @@ -5957,28 +6050,28 @@ module ts { function checkIndexedAccess(node: ElementAccessExpression): Type { // Grammar checking if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); + let sourceFile = getSourceFile(node); if (node.parent.kind === SyntaxKind.NewExpression && (node.parent).expression === node) { - var start = skipTrivia(sourceFile.text, node.expression.end); - var end = node.end; + let start = skipTrivia(sourceFile.text, node.expression.end); + let end = node.end; grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); } else { - var start = node.end - "]".length; - var end = node.end; + let start = node.end - "]".length; + let end = node.end; grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Expression_expected); } } // Obtain base constraint such that we can bail out if the constraint is an unknown type - var objectType = getApparentType(checkExpression(node.expression)); - var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; + let objectType = getApparentType(checkExpression(node.expression)); + let indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; if (objectType === unknownType) { return unknownType; } - var isConstEnum = isConstEnumObjectType(objectType); + let isConstEnum = isConstEnumObjectType(objectType); if (isConstEnum && (!node.argumentExpression || node.argumentExpression.kind !== SyntaxKind.StringLiteral)) { error(node.argumentExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); @@ -5986,19 +6079,19 @@ module ts { } // TypeScript 1.0 spec (April 2014): 4.10 Property Access - // - If IndexExpr is a string literal or a numeric literal and ObjExpr's apparent type has a property with the name + // - If IndexExpr is a string literal or a numeric literal and ObjExpr's apparent type has a property with the name // given by that literal(converted to its string representation in the case of a numeric literal), the property access is of the type of that property. - // - Otherwise, if ObjExpr's apparent type has a numeric index signature and IndexExpr is of type Any, the Number primitive type, or an enum type, + // - Otherwise, if ObjExpr's apparent type has a numeric index signature and IndexExpr is of type Any, the Number primitive type, or an enum type, // the property access is of the type of that index signature. - // - Otherwise, if ObjExpr's apparent type has a string index signature and IndexExpr is of type Any, the String or Number primitive type, or an enum type, + // - Otherwise, if ObjExpr's apparent type has a string index signature and IndexExpr is of type Any, the String or Number primitive type, or an enum type, // the property access is of the type of that index signature. // - Otherwise, if IndexExpr is of type Any, the String or Number primitive type, or an enum type, the property access is of type Any. // See if we can index as a property. if (node.argumentExpression) { - var name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + let name = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); if (name !== undefined) { - var prop = getPropertyOfType(objectType, name); + let prop = getPropertyOfType(objectType, name); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); @@ -6015,14 +6108,14 @@ module ts { // Try to use a number indexer. if (allConstituentTypesHaveKind(indexType, TypeFlags.Any | TypeFlags.NumberLike)) { - var numberIndexType = getIndexTypeOfType(objectType, IndexKind.Number); + let numberIndexType = getIndexTypeOfType(objectType, IndexKind.Number); if (numberIndexType) { return numberIndexType; } } // Try to use string indexing. - var stringIndexType = getIndexTypeOfType(objectType, IndexKind.String); + let stringIndexType = getIndexTypeOfType(objectType, IndexKind.String); if (stringIndexType) { return stringIndexType; } @@ -6052,7 +6145,7 @@ module ts { return (indexArgumentExpression).text; } if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, /*reportError*/ false)) { - var rightHandSideName = ((indexArgumentExpression).name).text; + let rightHandSideName = ((indexArgumentExpression).name).text; return getPropertyNameForKnownSymbolName(rightHandSideName); } @@ -6086,13 +6179,13 @@ module ts { // The name is Symbol., so make sure Symbol actually resolves to the // global Symbol object - var leftHandSide = (expression).expression; - var leftHandSideSymbol = getResolvedSymbol(leftHandSide); + let leftHandSide = (expression).expression; + let leftHandSideSymbol = getResolvedSymbol(leftHandSide); if (!leftHandSideSymbol) { return false; } - var globalESSymbol = getGlobalESSymbolConstructorSymbol(); + let globalESSymbol = getGlobalESSymbolConstructorSymbol(); if (!globalESSymbol) { // Already errored when we tried to look up the symbol return false; @@ -6131,20 +6224,19 @@ module ts { // so order how inherited signatures are processed is still preserved. // interface A { (x: string): void } // interface B extends A { (x: 'foo'): string } - // var b: B; + // let b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] function reorderCandidates(signatures: Signature[], result: Signature[]): void { - var lastParent: Node; - var lastSymbol: Symbol; - var cutoffIndex: number = 0; - var index: number; - var specializedIndex: number = -1; - var spliceIndex: number; + let lastParent: Node; + let lastSymbol: Symbol; + let cutoffIndex: number = 0; + let index: number; + let specializedIndex: number = -1; + let spliceIndex: number; Debug.assert(!result.length); - for (var i = 0; i < signatures.length; i++) { - var signature = signatures[i]; - var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent = signature.declaration && signature.declaration.parent; + for (let signature of signatures) { + let symbol = signature.declaration && getSymbolOfNode(signature.declaration); + let parent = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { if (lastParent && parent === lastParent) { index++; @@ -6181,7 +6273,7 @@ module ts { } function getSpreadArgumentIndex(args: Expression[]): number { - for (var i = 0; i < args.length; i++) { + for (let i = 0; i < args.length; i++) { if (args[i].kind === SyntaxKind.SpreadElementExpression) { return i; } @@ -6190,12 +6282,12 @@ module ts { } function hasCorrectArity(node: CallLikeExpression, args: Expression[], signature: Signature) { - var adjustedArgCount: number; // Apparent number of arguments we will have in this call - var typeArguments: NodeArray; // Type arguments (undefined if none) - var callIsIncomplete: boolean; // In incomplete call we want to be lenient when we have too few arguments + let adjustedArgCount: number; // Apparent number of arguments we will have in this call + let typeArguments: NodeArray; // Type arguments (undefined if none) + let callIsIncomplete: boolean; // In incomplete call we want to be lenient when we have too few arguments if (node.kind === SyntaxKind.TaggedTemplateExpression) { - var tagExpression = node; + let tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length @@ -6205,8 +6297,8 @@ module ts { if (tagExpression.template.kind === SyntaxKind.TemplateExpression) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. - var templateExpression = tagExpression.template; - var lastSpan = lastOrUndefined(templateExpression.templateSpans); + let templateExpression = tagExpression.template; + let lastSpan = lastOrUndefined(templateExpression.templateSpans); Debug.assert(lastSpan !== undefined); // we should always have at least one span. callIsIncomplete = getFullWidth(lastSpan.literal) === 0 || !!lastSpan.literal.isUnterminated; } @@ -6214,20 +6306,20 @@ module ts { // If the template didn't end in a backtick, or its beginning occurred right prior to EOF, // then this might actually turn out to be a TemplateHead in the future; // so we consider the call to be incomplete. - var templateLiteral = tagExpression.template; + let templateLiteral = tagExpression.template; Debug.assert(templateLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral); callIsIncomplete = !!templateLiteral.isUnterminated; } } else { - var callExpression = node; + let callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' Debug.assert(callExpression.kind === SyntaxKind.NewExpression); return signature.minArgumentCount === 0; } - + // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; @@ -6239,7 +6331,7 @@ module ts { // If the user supplied type arguments, but the number of type arguments does not match // the declared number of type parameters, the call has an incorrect arity. - var hasRightNumberOfTypeArgs = !typeArguments || + let hasRightNumberOfTypeArgs = !typeArguments || (signature.typeParameters && typeArguments.length === signature.typeParameters.length); if (!hasRightNumberOfTypeArgs) { return false; @@ -6247,7 +6339,7 @@ module ts { // If spread arguments are present, check that they correspond to a rest parameter. If so, no // further checking is necessary. - var spreadArgIndex = getSpreadArgumentIndex(args); + let spreadArgIndex = getSpreadArgumentIndex(args); if (spreadArgIndex >= 0) { return signature.hasRestParameter && spreadArgIndex >= signature.parameters.length - 1; } @@ -6258,14 +6350,14 @@ module ts { } // If the call is incomplete, we should skip the lower bound check. - var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; + let hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; return callIsIncomplete || hasEnoughArguments; } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. function getSingleCallSignature(type: Type): Signature { if (type.flags & TypeFlags.ObjectType) { - var resolved = resolveObjectOrUnionTypeMembers(type); + let resolved = resolveObjectOrUnionTypeMembers(type); if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) { return resolved.callSignatures[0]; @@ -6276,7 +6368,7 @@ module ts { // Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec) function instantiateSignatureInContextOf(signature: Signature, contextualSignature: Signature, contextualMapper: TypeMapper): Signature { - var context = createInferenceContext(signature.typeParameters, /*inferUnionTypes*/ true); + let context = createInferenceContext(signature.typeParameters, /*inferUnionTypes*/ true); forEachMatchingParameterType(contextualSignature, signature, (source, target) => { // Type parameters from outer context referenced by source type are fixed by instantiation of the source type inferTypes(context, instantiateType(source, contextualMapper), target); @@ -6284,25 +6376,47 @@ module ts { return getSignatureInstantiation(signature, getInferredTypes(context)); } - function inferTypeArguments(signature: Signature, args: Expression[], excludeArgument: boolean[]): InferenceContext { - var typeParameters = signature.typeParameters; - var context = createInferenceContext(typeParameters, /*inferUnionTypes*/ false); - var inferenceMapper = createInferenceMapper(context); + function inferTypeArguments(signature: Signature, args: Expression[], excludeArgument: boolean[], context: InferenceContext): void { + let typeParameters = signature.typeParameters; + let inferenceMapper = createInferenceMapper(context); + + // Clear out all the inference results from the last time inferTypeArguments was called on this context + for (let i = 0; i < typeParameters.length; i++) { + // As an optimization, we don't have to clear (and later recompute) inferred types + // for type parameters that have already been fixed on the previous call to inferTypeArguments. + // It would be just as correct to reset all of them. But then we'd be repeating the same work + // for the type parameters that were fixed, namely the work done by getInferredType. + if (!context.inferences[i].isFixed) { + context.inferredTypes[i] = undefined; + } + } + + // On this call to inferTypeArguments, we may get more inferences for certain type parameters that were not + // fixed last time. This means that a type parameter that failed inference last time may succeed this time, + // or vice versa. Therefore, the failedTypeParameterIndex is useless if it points to an unfixed type parameter, + // because it may change. So here we reset it. However, getInferredType will not revisit any type parameters + // that were previously fixed. So if a fixed type parameter failed previously, it will fail again because + // it will contain the exact same set of inferences. So if we reset the index from a fixed type parameter, + // we will lose information that we won't recover this time around. + if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) { + context.failedTypeParameterIndex = undefined; + } // We perform two passes over the arguments. In the first pass we infer from all arguments, but use // wildcards for all context sensitive function expressions. - for (var i = 0; i < args.length; i++) { - var arg = args[i]; + for (let i = 0; i < args.length; i++) { + let arg = args[i]; if (arg.kind !== SyntaxKind.OmittedExpression) { - var paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); + let paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); + let argType: Type; if (i === 0 && args[i].parent.kind === SyntaxKind.TaggedTemplateExpression) { - var argType = globalTemplateStringsArrayType; + argType = globalTemplateStringsArrayType; } else { // For context sensitive arguments we pass the identityMapper, which is a signal to treat all // context sensitive function expressions as wildcards - var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - var argType = checkExpressionWithContextualType(arg, paramType, mapper); + let mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; + argType = checkExpressionWithContextualType(arg, paramType, mapper); } inferTypes(context, argType, paramType); } @@ -6312,40 +6426,29 @@ module ts { // time treating function expressions normally (which may cause previously inferred type arguments to be fixed // as we construct types for contextually typed parameters) if (excludeArgument) { - for (var i = 0; i < args.length; i++) { + for (let i = 0; i < args.length; i++) { // No need to check for omitted args and template expressions, their exlusion value is always undefined if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); + let arg = args[i]; + let paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); } } } - var inferredTypes = getInferredTypes(context); - // Inference has failed if the inferenceFailureType type is in list of inferences - context.failedTypeParameterIndex = indexOf(inferredTypes, inferenceFailureType); - - // Wipe out the inferenceFailureType from the array so that error recovery can work properly - for (var i = 0; i < inferredTypes.length; i++) { - if (inferredTypes[i] === inferenceFailureType) { - inferredTypes[i] = unknownType; - } - } - - return context; + getInferredTypes(context); } function checkTypeArguments(signature: Signature, typeArguments: TypeNode[], typeArgumentResultTypes: Type[], reportErrors: boolean): boolean { - var typeParameters = signature.typeParameters; - var typeArgumentsAreAssignable = true; - for (var i = 0; i < typeParameters.length; i++) { - var typeArgNode = typeArguments[i]; - var typeArgument = getTypeFromTypeNode(typeArgNode); + let typeParameters = signature.typeParameters; + let typeArgumentsAreAssignable = true; + for (let i = 0; i < typeParameters.length; i++) { + let typeArgNode = typeArguments[i]; + let typeArgument = getTypeFromTypeNode(typeArgNode); // Do not push on this array! It has a preallocated length typeArgumentResultTypes[i] = typeArgument; if (typeArgumentsAreAssignable /* so far */) { - var constraint = getConstraintOfTypeParameter(typeParameters[i]); + let constraint = getConstraintOfTypeParameter(typeParameters[i]); if (constraint) { typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); @@ -6356,14 +6459,14 @@ module ts { } function checkApplicableSignature(node: CallLikeExpression, args: Expression[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: boolean) { - for (var i = 0; i < args.length; i++) { - var arg = args[i]; + for (let i = 0; i < args.length; i++) { + let arg = args[i]; if (arg.kind !== SyntaxKind.OmittedExpression) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) - var paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); + let paramType = getTypeAtPosition(signature, arg.kind === SyntaxKind.SpreadElementExpression ? -1 : i); // A tagged template expression provides a special first argument, and string literals get string literal types // unless we're reporting errors - var argType = i === 0 && node.kind === SyntaxKind.TaggedTemplateExpression ? globalTemplateStringsArrayType : + let argType = i === 0 && node.kind === SyntaxKind.TaggedTemplateExpression ? globalTemplateStringsArrayType : arg.kind === SyntaxKind.StringLiteral && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); // Use argument expression as error location when reporting errors @@ -6384,9 +6487,9 @@ module ts { * expressions, where the first element of the list is the template for error reporting purposes. */ function getEffectiveCallArguments(node: CallLikeExpression): Expression[] { - var args: Expression[]; + let args: Expression[]; if (node.kind === SyntaxKind.TaggedTemplateExpression) { - var template = (node).template; + let template = (node).template; args = [template]; if (template.kind === SyntaxKind.TemplateExpression) { @@ -6414,8 +6517,8 @@ module ts { */ function getEffectiveTypeArguments(callExpression: CallExpression): TypeNode[] { if (callExpression.expression.kind === SyntaxKind.SuperKeyword) { - var containingClass = getAncestor(callExpression, SyntaxKind.ClassDeclaration); - var baseClassTypeNode = containingClass && getClassBaseTypeNode(containingClass); + let containingClass = getAncestor(callExpression, SyntaxKind.ClassDeclaration); + let baseClassTypeNode = containingClass && getClassBaseTypeNode(containingClass); return baseClassTypeNode && baseClassTypeNode.typeArguments; } else { @@ -6425,9 +6528,9 @@ module ts { } function resolveCall(node: CallLikeExpression, signatures: Signature[], candidatesOutArray: Signature[]): Signature { - var isTaggedTemplate = node.kind === SyntaxKind.TaggedTemplateExpression; + let isTaggedTemplate = node.kind === SyntaxKind.TaggedTemplateExpression; - var typeArguments: TypeNode[]; + let typeArguments: TypeNode[]; if (!isTaggedTemplate) { typeArguments = getEffectiveTypeArguments(node); @@ -6438,7 +6541,7 @@ module ts { } } - var candidates = candidatesOutArray || []; + let candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly reorderCandidates(signatures, candidates); if (!candidates.length) { @@ -6446,8 +6549,8 @@ module ts { return resolveErrorCall(node); } - var args = getEffectiveCallArguments(node); - + let args = getEffectiveCallArguments(node); + // The following applies to any value of 'excludeArgument[i]': // - true: the argument at 'i' is susceptible to a one-time permanent contextual typing. // - undefined: the argument at 'i' is *not* susceptible to permanent contextual typing. @@ -6459,8 +6562,8 @@ module ts { // // For a tagged template, then the first argument be 'undefined' if necessary // because it represents a TemplateStringsArray. - var excludeArgument: boolean[]; - for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { + let excludeArgument: boolean[]; + for (let i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { if (isContextSensitive(args[i])) { if (!excludeArgument) { excludeArgument = new Array(args.length); @@ -6490,10 +6593,10 @@ module ts { // function foo() {} // foo(0, true); // - var candidateForArgumentError: Signature; - var candidateForTypeArgumentError: Signature; - var resultOfFailedInference: InferenceContext; - var result: Signature; + let candidateForArgumentError: Signature; + let candidateForTypeArgumentError: Signature; + let resultOfFailedInference: InferenceContext; + let result: Signature; // Section 4.12.1: // if the candidate list contains one or more signatures for which the type of each argument @@ -6537,10 +6640,10 @@ module ts { } else { Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); - var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; - var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); + let failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; + let inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); - var diagnosticChainHead = chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError + let diagnosticChainHead = chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); @@ -6557,9 +6660,9 @@ module ts { // declare function f(a: { xa: number; xb: number; }); // f({ | if (!produceDiagnostics) { - for (var i = 0, n = candidates.length; i < n; i++) { - if (hasCorrectArity(node, args, candidates[i])) { - return candidates[i]; + for (let candidate of candidates) { + if (hasCorrectArity(node, args, candidate)) { + return candidate; } } } @@ -6567,27 +6670,29 @@ module ts { return resolveErrorCall(node); function chooseOverload(candidates: Signature[], relation: Map) { - for (var i = 0; i < candidates.length; i++) { - if (!hasCorrectArity(node, args, candidates[i])) { + for (let originalCandidate of candidates) { + if (!hasCorrectArity(node, args, originalCandidate)) { continue; } - - var originalCandidate = candidates[i]; - var inferenceResult: InferenceContext; + + let candidate: Signature; + let typeArgumentsAreValid: boolean; + let inferenceContext = originalCandidate.typeParameters + ? createInferenceContext(originalCandidate.typeParameters, /*inferUnionTypes*/ false) + : undefined; while (true) { - var candidate = originalCandidate; + candidate = originalCandidate; if (candidate.typeParameters) { - var typeArgumentTypes: Type[]; - var typeArgumentsAreValid: boolean; + let typeArgumentTypes: Type[]; if (typeArguments) { typeArgumentTypes = new Array(candidate.typeParameters.length); typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false) } else { - inferenceResult = inferTypeArguments(candidate, args, excludeArgument); - typeArgumentsAreValid = inferenceResult.failedTypeParameterIndex < 0; - typeArgumentTypes = inferenceResult.inferredTypes; + inferTypeArguments(candidate, args, excludeArgument, inferenceContext); + typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined; + typeArgumentTypes = inferenceContext.inferredTypes; } if (!typeArgumentsAreValid) { break; @@ -6597,7 +6702,7 @@ module ts { if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) { break; } - var index = excludeArgument ? indexOf(excludeArgument, true) : -1; + let index = excludeArgument ? indexOf(excludeArgument, true) : -1; if (index < 0) { return candidate; } @@ -6610,14 +6715,14 @@ module ts { // report an error based on the arguments. If there was an issue with type // arguments, then we can only report an error based on the type arguments. if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; + let instantiatedCandidate = candidate; if (typeArgumentsAreValid) { candidateForArgumentError = instantiatedCandidate; } else { candidateForTypeArgumentError = originalCandidate; if (!typeArguments) { - resultOfFailedInference = inferenceResult; + resultOfFailedInference = inferenceContext; } } } @@ -6634,15 +6739,15 @@ module ts { function resolveCallExpression(node: CallExpression, candidatesOutArray: Signature[]): Signature { if (node.expression.kind === SyntaxKind.SuperKeyword) { - var superType = checkSuperExpression(node.expression); + let superType = checkSuperExpression(node.expression); if (superType !== unknownType) { return resolveCall(node, getSignaturesOfType(superType, SignatureKind.Construct), candidatesOutArray); } return resolveUntypedCall(node); } - var funcType = checkExpression(node.expression); - var apparentType = getApparentType(funcType); + let funcType = checkExpression(node.expression); + let apparentType = getApparentType(funcType); if (apparentType === unknownType) { // Another error has already been reported @@ -6653,9 +6758,9 @@ module ts { // but we are not including call signatures that may have been added to the Object or // Function interface, since they have none by default. This is a bit of a leap of faith // that the user will not add any. - var callSignatures = getSignaturesOfType(apparentType, SignatureKind.Call); + let callSignatures = getSignaturesOfType(apparentType, SignatureKind.Call); - var constructSignatures = getSignaturesOfType(apparentType, SignatureKind.Construct); + let constructSignatures = getSignaturesOfType(apparentType, SignatureKind.Construct); // TS 1.0 spec: 4.12 // If FuncExpr is of type Any, or of an object type that has no call or construct signatures // but is a subtype of the Function interface, the call is an untyped function call. In an @@ -6686,13 +6791,13 @@ module ts { function resolveNewExpression(node: NewExpression, candidatesOutArray: Signature[]): Signature { if (node.arguments && languageVersion < ScriptTarget.ES6) { - var spreadIndex = getSpreadArgumentIndex(node.arguments); + let spreadIndex = getSpreadArgumentIndex(node.arguments); if (spreadIndex >= 0) { error(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_6_and_higher); } } - var expressionType = checkExpression(node.expression); + let expressionType = checkExpression(node.expression); // TS 1.0 spec: 4.11 // If ConstructExpr is of type Any, Args can be any argument // list and the result of the operation is of type Any. @@ -6718,7 +6823,7 @@ module ts { // but we are not including construct signatures that may have been added to the Object or // Function interface, since they have none by default. This is a bit of a leap of faith // that the user will not add any. - var constructSignatures = getSignaturesOfType(expressionType, SignatureKind.Construct); + let constructSignatures = getSignaturesOfType(expressionType, SignatureKind.Construct); if (constructSignatures.length) { return resolveCall(node, constructSignatures, candidatesOutArray); } @@ -6727,9 +6832,9 @@ module ts { // one or more call signatures, the expression is processed as a function call. A compile-time // error occurs if the result of the function call is not Void. The type of the result of the // operation is Any. - var callSignatures = getSignaturesOfType(expressionType, SignatureKind.Call); + let callSignatures = getSignaturesOfType(expressionType, SignatureKind.Call); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray); + let signature = resolveCall(node, callSignatures, candidatesOutArray); if (getReturnTypeOfSignature(signature) !== voidType) { error(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); } @@ -6741,15 +6846,15 @@ module ts { } function resolveTaggedTemplateExpression(node: TaggedTemplateExpression, candidatesOutArray: Signature[]): Signature { - var tagType = checkExpression(node.tag); - var apparentType = getApparentType(tagType); + let tagType = checkExpression(node.tag); + let apparentType = getApparentType(tagType); if (apparentType === unknownType) { // Another error has already been reported return resolveErrorCall(node); } - var callSignatures = getSignaturesOfType(apparentType, SignatureKind.Call); + let callSignatures = getSignaturesOfType(apparentType, SignatureKind.Call); if (tagType === anyType || (!callSignatures.length && !(tagType.flags & TypeFlags.Union) && isTypeAssignableTo(tagType, globalFunctionType))) { return resolveUntypedCall(node); @@ -6766,7 +6871,7 @@ module ts { // candidatesOutArray is passed by signature help in the language service, and collectCandidates // must fill it up with the appropriate candidate signatures function getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature { - var links = getNodeLinks(node); + let links = getNodeLinks(node); // If getResolvedSignature has already been called, we will have cached the resolvedSignature. // However, it is possible that either candidatesOutArray was not passed in the first time, // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work @@ -6794,12 +6899,12 @@ module ts { // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); - var signature = getResolvedSignature(node); + let signature = getResolvedSignature(node); if (node.expression.kind === SyntaxKind.SuperKeyword) { return voidType; } if (node.kind === SyntaxKind.NewExpression) { - var declaration = signature.declaration; + let declaration = signature.declaration; if (declaration && declaration.kind !== SyntaxKind.Constructor && declaration.kind !== SyntaxKind.ConstructSignature && @@ -6820,10 +6925,10 @@ module ts { } function checkTypeAssertion(node: TypeAssertion): Type { - var exprType = checkExpression(node.expression); - var targetType = getTypeFromTypeNode(node.type); + let exprType = checkExpression(node.expression); + let targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); + let widenedType = getWidenedType(exprType); if (!(isTypeAssignableTo(targetType, widenedType))) { checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } @@ -6843,36 +6948,37 @@ module ts { } function assignContextualParameterTypes(signature: Signature, context: Signature, mapper: TypeMapper) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); - for (var i = 0; i < len; i++) { - var parameter = signature.parameters[i]; - var links = getSymbolLinks(parameter); + let len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + for (let i = 0; i < len; i++) { + let parameter = signature.parameters[i]; + let links = getSymbolLinks(parameter); links.type = instantiateType(getTypeAtPosition(context, i), mapper); } if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = signature.parameters[signature.parameters.length - 1]; - var links = getSymbolLinks(parameter); + let parameter = signature.parameters[signature.parameters.length - 1]; + let links = getSymbolLinks(parameter); links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper); } } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { - var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); + let contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); if (!func.body) { return unknownType; } + let type: Type; if (func.body.kind !== SyntaxKind.Block) { - var type = checkExpressionCached(func.body, contextualMapper); + type = checkExpressionCached(func.body, contextualMapper); } else { // Aggregate the types of expressions within all the return statements. - var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); + let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { return voidType; } // When return statements are contextually typed we allow the return type to be a union type. Otherwise we require the // return expressions to have a best common supertype. - var type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { error(func, Diagnostics.No_best_common_type_exists_among_return_expressions); return unknownType; @@ -6886,12 +6992,12 @@ module ts { /// Returns a set of types relating to every return expression relating to a function block. function checkAndAggregateReturnExpressionTypes(body: Block, contextualMapper?: TypeMapper): Type[] { - var aggregatedTypes: Type[] = []; + let aggregatedTypes: Type[] = []; forEachReturnStatement(body, returnStatement => { - var expr = returnStatement.expression; + let expr = returnStatement.expression; if (expr) { - var type = checkExpressionCached(expr, contextualMapper); + let type = checkExpressionCached(expr, contextualMapper); if (!contains(aggregatedTypes, type)) { aggregatedTypes.push(type); } @@ -6930,7 +7036,7 @@ module ts { return; } - var bodyBlock = func.body; + let bodyBlock = func.body; // Ensure the body has at least one return expression. if (bodyContainsAReturnStatement(bodyBlock)) { @@ -6952,7 +7058,7 @@ module ts { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); // Grammar checking - var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); + let hasGrammarError = checkGrammarFunctionLikeDeclaration(node); if (!hasGrammarError && node.kind === SyntaxKind.FunctionExpression) { checkGrammarFunctionName(node.name) || checkGrammarForGenerator(node); } @@ -6961,24 +7067,24 @@ module ts { if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } - var links = getNodeLinks(node); - var type = getTypeOfSymbol(node.symbol); + let links = getNodeLinks(node); + let type = getTypeOfSymbol(node.symbol); // Check if function expression is contextually typed and assign parameter types if so if (!(links.flags & NodeCheckFlags.ContextChecked)) { - var contextualSignature = getContextualSignature(node); + let contextualSignature = getContextualSignature(node); // If a type check is started at a function expression that is an argument of a function call, obtaining the // contextual type may recursively get back to here during overload resolution of the call. If so, we will have // already assigned contextual types. if (!(links.flags & NodeCheckFlags.ContextChecked)) { links.flags |= NodeCheckFlags.ContextChecked; if (contextualSignature) { - var signature = getSignaturesOfType(type, SignatureKind.Call)[0]; + let signature = getSignaturesOfType(type, SignatureKind.Call)[0]; if (isContextSensitive(node)) { assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper); } if (!node.type) { signature.resolvedReturnType = resolvingType; - var returnType = getReturnTypeFromBody(node, contextualMapper); + let returnType = getReturnTypeFromBody(node, contextualMapper); if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = returnType; } @@ -7007,7 +7113,7 @@ module ts { checkSourceElement(node.body); } else { - var exprType = checkExpression(node.body); + let exprType = checkExpression(node.body); if (node.type) { checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, /*headMessage*/ undefined); } @@ -7026,7 +7132,7 @@ module ts { function checkReferenceExpression(n: Node, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { function findSymbol(n: Node): Symbol { - var symbol = getNodeLinks(n).resolvedSymbol; + let symbol = getNodeLinks(n).resolvedSymbol; // Because we got the symbol from the resolvedSymbol property, it might be of kind // SymbolFlags.ExportValue. In this case it is necessary to get the actual export // symbol, which will have the correct flags set on it. @@ -7035,24 +7141,26 @@ module ts { function isReferenceOrErrorExpression(n: Node): boolean { // TypeScript 1.0 spec (April 2014): - // Expressions are classified as values or references. + // Expressions are classified as values or references. // References are the subset of expressions that are permitted as the target of an assignment. - // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), + // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), // and property accesses(section 4.10). // All other expression constructs described in this chapter are classified as values. switch (n.kind) { - case SyntaxKind.Identifier: - var symbol = findSymbol(n); + case SyntaxKind.Identifier: { + let symbol = findSymbol(n); // TypeScript 1.0 spec (April 2014): 4.3 - // An identifier expression that references a variable or parameter is classified as a reference. + // An identifier expression that references a variable or parameter is classified as a reference. // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & SymbolFlags.Variable) !== 0; - case SyntaxKind.PropertyAccessExpression: - var symbol = findSymbol(n); + } + case SyntaxKind.PropertyAccessExpression: { + let symbol = findSymbol(n); // TypeScript 1.0 spec (April 2014): 4.10 // A property access expression is always classified as a reference. // NOTE (not in spec): assignment to enum members should not be allowed return !symbol || symbol === unknownSymbol || (symbol.flags & ~SymbolFlags.EnumMember) !== 0; + } case SyntaxKind.ElementAccessExpression: // old compiler doesn't check indexed assess return true; @@ -7066,19 +7174,21 @@ module ts { function isConstVariableReference(n: Node): boolean { switch (n.kind) { case SyntaxKind.Identifier: - case SyntaxKind.PropertyAccessExpression: - var symbol = findSymbol(n); + case SyntaxKind.PropertyAccessExpression: { + let symbol = findSymbol(n); return symbol && (symbol.flags & SymbolFlags.Variable) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; - case SyntaxKind.ElementAccessExpression: - var index = (n).argumentExpression; - var symbol = findSymbol((n).expression); + } + case SyntaxKind.ElementAccessExpression: { + let index = (n).argumentExpression; + let symbol = findSymbol((n).expression); if (symbol && index && index.kind === SyntaxKind.StringLiteral) { - var name = (index).text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name); + let name = (index).text; + let prop = getPropertyOfType(getTypeOfSymbol(symbol), name); return prop && (prop.flags & SymbolFlags.Variable) !== 0 && (getDeclarationFlagsFromSymbol(prop) & NodeFlags.Const) !== 0; } return false; + } case SyntaxKind.ParenthesizedExpression: return isConstVariableReference((n).expression); default: @@ -7105,17 +7215,17 @@ module ts { grammarErrorOnNode(node.expression, Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode); } - var operandType = checkExpression(node.expression); + let operandType = checkExpression(node.expression); return booleanType; } function checkTypeOfExpression(node: TypeOfExpression): Type { - var operandType = checkExpression(node.expression); + let operandType = checkExpression(node.expression); return stringType; } function checkVoidExpression(node: VoidExpression): Type { - var operandType = checkExpression(node.expression); + let operandType = checkExpression(node.expression); return undefinedType; } @@ -7128,7 +7238,7 @@ module ts { checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); } - var operandType = checkExpression(node.operand); + let operandType = checkExpression(node.operand); switch (node.operator) { case SyntaxKind.PlusToken: case SyntaxKind.MinusToken: @@ -7141,7 +7251,7 @@ module ts { return booleanType; case SyntaxKind.PlusPlusToken: case SyntaxKind.MinusMinusToken: - var ok = checkArithmeticOperandType(node.operand, operandType, Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); + let ok = checkArithmeticOperandType(node.operand, operandType, Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors checkReferenceExpression(node.operand, @@ -7160,8 +7270,8 @@ module ts { // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); - var operandType = checkExpression(node.operand); - var ok = checkArithmeticOperandType(node.operand, operandType, Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); + let operandType = checkExpression(node.operand); + let ok = checkArithmeticOperandType(node.operand, operandType, Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors checkReferenceExpression(node.operand, @@ -7178,9 +7288,9 @@ module ts { return true; } if (type.flags & TypeFlags.Union) { - var types = (type).types; - for (var i = 0; i < types.length; i++) { - if (types[i].flags & kind) { + let types = (type).types; + for (let current of types) { + if (current.flags & kind) { return true; } } @@ -7195,9 +7305,9 @@ module ts { return true; } if (type.flags & TypeFlags.Union) { - var types = (type).types; - for (var i = 0; i < types.length; i++) { - if (!(types[i].flags & kind)) { + let types = (type).types; + for (let current of types) { + if (!(current.flags & kind)) { return false; } } @@ -7217,7 +7327,7 @@ module ts { function checkInstanceOfExpression(node: BinaryExpression, leftType: Type, rightType: Type): Type { // TypeScript 1.0 spec (April 2014): 4.15.4 // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, - // and the right operand to be of type Any or a subtype of the 'Function' interface type. + // and the right operand to be of type Any or a subtype of the 'Function' interface type. // The result is always of the Boolean primitive type. // NOTE: do not raise error if leftType is unknown as related error was already reported if (allConstituentTypesHaveKind(leftType, TypeFlags.Primitive)) { @@ -7245,13 +7355,12 @@ module ts { } function checkObjectLiteralAssignment(node: ObjectLiteralExpression, sourceType: Type, contextualMapper?: TypeMapper): Type { - var properties = node.properties; - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; + let properties = node.properties; + for (let p of properties) { if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { // TODO(andersh): Computed property support - var name = (p).name; - var type = sourceType.flags & TypeFlags.Any ? sourceType : + let name = (p).name; + let type = sourceType.flags & TypeFlags.Any ? sourceType : getTypeOfPropertyOfType(sourceType, name.text) || isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, IndexKind.Number) || getIndexTypeOfType(sourceType, IndexKind.String); @@ -7275,20 +7384,25 @@ module ts { error(node, Diagnostics.Type_0_is_not_an_array_type, typeToString(sourceType)); return sourceType; } - var elements = node.elements; - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; + let elements = node.elements; + for (let i = 0; i < elements.length; i++) { + let e = elements[i]; if (e.kind !== SyntaxKind.OmittedExpression) { if (e.kind !== SyntaxKind.SpreadElementExpression) { - var propName = "" + i; - var type = sourceType.flags & TypeFlags.Any ? sourceType : + let propName = "" + i; + let type = sourceType.flags & TypeFlags.Any ? sourceType : isTupleLikeType(sourceType) ? getTypeOfPropertyOfType(sourceType, propName) : getIndexTypeOfType(sourceType, IndexKind.Number); if (type) { checkDestructuringAssignment(e, type, contextualMapper); } else { - error(e, Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + if (isTupleType(sourceType)) { + error(e, Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), (sourceType).elementTypes.length, elements.length); + } + else { + error(e, Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } } } else { @@ -7319,7 +7433,7 @@ module ts { } function checkReferenceAssignment(target: Expression, sourceType: Type, contextualMapper?: TypeMapper): Type { - var targetType = checkExpression(target, contextualMapper); + let targetType = checkExpression(target, contextualMapper); if (checkReferenceExpression(target, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) { checkTypeAssignableTo(sourceType, targetType, target, /*headMessage*/ undefined); } @@ -7334,12 +7448,12 @@ module ts { checkGrammarEvalOrArgumentsInStrictMode(node, node.left); } - var operator = node.operatorToken.kind; + let operator = node.operatorToken.kind; if (operator === SyntaxKind.EqualsToken && (node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) { return checkDestructuringAssignment(node.left, checkExpression(node.right, contextualMapper), contextualMapper); } - var leftType = checkExpression(node.left, contextualMapper); - var rightType = checkExpression(node.right, contextualMapper); + let leftType = checkExpression(node.left, contextualMapper); + let rightType = checkExpression(node.right, contextualMapper); switch (operator) { case SyntaxKind.AsteriskToken: case SyntaxKind.AsteriskEqualsToken: @@ -7363,15 +7477,15 @@ module ts { case SyntaxKind.AmpersandEqualsToken: // TypeScript 1.0 spec (April 2014): 4.15.1 // These operators require their operands to be of type Any, the Number primitive type, - // or an enum type. Operands of an enum type are treated + // or an enum type. Operands of an enum type are treated // as having the primitive type Number. If one operand is the null or undefined value, // it is treated as having the type of the other operand. // The result is always of the Number primitive type. if (leftType.flags & (TypeFlags.Undefined | TypeFlags.Null)) leftType = rightType; if (rightType.flags & (TypeFlags.Undefined | TypeFlags.Null)) rightType = leftType; - var suggestedOperator: SyntaxKind; - // if a user tries to apply a bitwise operator to 2 boolean operands + let suggestedOperator: SyntaxKind; + // if a user tries to apply a bitwise operator to 2 boolean operands // try and return them a helpful suggestion if ((leftType.flags & TypeFlags.Boolean) && (rightType.flags & TypeFlags.Boolean) && @@ -7379,9 +7493,9 @@ module ts { error(node, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(node.operatorToken.kind), tokenToString(suggestedOperator)); } else { - // otherwise just check each operand separately and report errors as normal - var leftOk = checkArithmeticOperandType(node.left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - var rightOk = checkArithmeticOperandType(node.right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); + // otherwise just check each operand separately and report errors as normal + let leftOk = checkArithmeticOperandType(node.left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); + let rightOk = checkArithmeticOperandType(node.right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); if (leftOk && rightOk) { checkAssignmentOperator(numberType); } @@ -7398,7 +7512,7 @@ module ts { if (leftType.flags & (TypeFlags.Undefined | TypeFlags.Null)) leftType = rightType; if (rightType.flags & (TypeFlags.Undefined | TypeFlags.Null)) rightType = leftType; - var resultType: Type; + let resultType: Type; if (allConstituentTypesHaveKind(leftType, TypeFlags.NumberLike) && allConstituentTypesHaveKind(rightType, TypeFlags.NumberLike)) { // Operands of an enum type are treated as having the primitive type Number. // If both operands are of the Number primitive type, the result is of the Number primitive type. @@ -7463,7 +7577,7 @@ module ts { // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator: SyntaxKind): boolean { - var offendingSymbolOperand = + let offendingSymbolOperand = someConstituentTypeHasKind(leftType, TypeFlags.ESSymbol) ? node.left : someConstituentTypeHasKind(rightType, TypeFlags.ESSymbol) ? node.right : undefined; @@ -7497,9 +7611,9 @@ module ts { // An assignment of the form // VarExpr = ValueExpr // requires VarExpr to be classified as a reference - // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) + // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) // and the type of the non - compound operation to be assignable to the type of VarExpr. - var ok = checkReferenceExpression(node.left, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + let ok = checkReferenceExpression(node.left, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); // Use default messages if (ok) { // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported @@ -7525,8 +7639,8 @@ module ts { function checkConditionalExpression(node: ConditionalExpression, contextualMapper?: TypeMapper): Type { checkExpression(node.condition); - var type1 = checkExpression(node.whenTrue, contextualMapper); - var type2 = checkExpression(node.whenFalse, contextualMapper); + let type1 = checkExpression(node.whenTrue, contextualMapper); + let type2 = checkExpression(node.whenFalse, contextualMapper); return getUnionType([type1, type2]); } @@ -7544,15 +7658,15 @@ module ts { } function checkExpressionWithContextualType(node: Expression, contextualType: Type, contextualMapper?: TypeMapper): Type { - var saveContextualType = node.contextualType; + let saveContextualType = node.contextualType; node.contextualType = contextualType; - var result = checkExpression(node, contextualMapper); + let result = checkExpression(node, contextualMapper); node.contextualType = saveContextualType; return result; } function checkExpressionCached(node: Expression, contextualMapper?: TypeMapper): Type { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = checkExpression(node, contextualMapper); } @@ -7581,17 +7695,17 @@ module ts { checkComputedPropertyName(node.name); } - var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); + let uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); } function instantiateTypeWithSingleGenericCallSignature(node: Expression | MethodDeclaration, type: Type, contextualMapper?: TypeMapper) { if (contextualMapper && contextualMapper !== identityMapper) { - var signature = getSingleCallSignature(type); + let signature = getSingleCallSignature(type); if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); + let contextualType = getContextualType(node); if (contextualType) { - var contextualSignature = getSingleCallSignature(contextualType); + let contextualSignature = getSingleCallSignature(contextualType); if (contextualSignature && !contextualSignature.typeParameters) { return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); } @@ -7614,21 +7728,21 @@ module ts { // have the wildcard function type; this form of type check is used during overload resolution to exclude // contextually typed function and arrow expressions in the initial phase. function checkExpressionOrQualifiedName(node: Expression | QualifiedName, contextualMapper?: TypeMapper): Type { - var type: Type; + let type: Type; if (node.kind == SyntaxKind.QualifiedName) { type = checkQualifiedName(node); } else { - var uninstantiatedType = checkExpressionWorker(node, contextualMapper); + let uninstantiatedType = checkExpressionWorker(node, contextualMapper); type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); } if (isConstEnumObjectType(type)) { // enum object type for const enums are only permitted in: - // - 'left' in property access + // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = + let ok = (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent).expression === node) || (node.parent.kind === SyntaxKind.ElementAccessExpression && (node.parent).expression === node) || ((node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName) && isInRightSideOfImportOrExportAssignment(node)); @@ -7741,7 +7855,7 @@ module ts { checkGrammarModifiers(node) || checkGrammarEvalOrArgumentsInStrictMode(node, node.name); checkVariableLikeDeclaration(node); - var func = getContainingFunction(node); + let func = getContainingFunction(node); if (node.flags & NodeFlags.AccessibilityModifier) { func = getContainingFunction(node); if (!(func.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) { @@ -7797,7 +7911,7 @@ module ts { function checkTypeForDuplicateIndexSignatures(node: Node) { if (node.kind === SyntaxKind.InterfaceDeclaration) { - var nodeSymbol = getSymbolOfNode(node); + let nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { @@ -7808,12 +7922,12 @@ module ts { // TypeScript 1.0 spec (April 2014) // 3.7.4: An object type can contain at most one string index signature and one numeric index signature. // 8.5: A class declaration can have at most one string index member declaration and one numeric index member declaration - var indexSymbol = getIndexSymbol(getSymbolOfNode(node)); + let indexSymbol = getIndexSymbol(getSymbolOfNode(node)); if (indexSymbol) { - var seenNumericIndexer = false; - var seenStringIndexer = false; - for (var i = 0, len = indexSymbol.declarations.length; i < len; ++i) { - var declaration = indexSymbol.declarations[i]; + let seenNumericIndexer = false; + let seenStringIndexer = false; + for (let decl of indexSymbol.declarations) { + let declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { case SyntaxKind.StringKeyword: @@ -7861,8 +7975,8 @@ module ts { checkSourceElement(node.body); - var symbol = getSymbolOfNode(node); - var firstDeclaration = getDeclarationOfKind(symbol, node.kind); + let symbol = getSymbolOfNode(node); + let firstDeclaration = getDeclarationOfKind(symbol, node.kind); // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(symbol); @@ -7910,21 +8024,21 @@ module ts { } // TS 1.0 spec (April 2014): 8.3.2 - // Constructors of classes with no extends clause may not contain super calls, whereas + // Constructors of classes with no extends clause may not contain super calls, whereas // constructors of derived classes must contain at least one super call somewhere in their function body. if (getClassBaseTypeNode(node.parent)) { if (containsSuperCall(node.body)) { // The first statement in the body of a constructor must be a super call if both of the following are true: // - The containing class is a derived class. - // - The constructor declares parameter properties + // - The constructor declares parameter properties // or the containing class declares instance member variables with initializers. - var superCallShouldBeFirst = + let superCallShouldBeFirst = forEach((node.parent).members, isInstancePropertyWithInitializer) || forEach(node.parameters, p => p.flags & (NodeFlags.Public | NodeFlags.Private | NodeFlags.Protected)); if (superCallShouldBeFirst) { - var statements = (node.body).statements; + let statements = (node.body).statements; if (!statements.length || statements[0].kind !== SyntaxKind.ExpressionStatement || !isSuperCallExpression((statements[0]).expression)) { error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); } @@ -7954,15 +8068,15 @@ module ts { if (!hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === SyntaxKind.GetAccessor ? SyntaxKind.SetAccessor : SyntaxKind.GetAccessor; - var otherAccessor = getDeclarationOfKind(node.symbol, otherKind); + let otherKind = node.kind === SyntaxKind.GetAccessor ? SyntaxKind.SetAccessor : SyntaxKind.GetAccessor; + let otherAccessor = getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if (((node.flags & NodeFlags.AccessibilityModifier) !== (otherAccessor.flags & NodeFlags.AccessibilityModifier))) { error(node.name, Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility); } - var currentAccessorType = getAnnotatedAccessorType(node); - var otherAccessorType = getAnnotatedAccessorType(otherAccessor); + let currentAccessorType = getAnnotatedAccessorType(node); + let otherAccessorType = getAnnotatedAccessorType(otherAccessor); // TypeScript 1.0 spec (April 2014): 4.5 // If both accessors include type annotations, the specified types must be identical. if (currentAccessorType && otherAccessorType) { @@ -7983,15 +8097,15 @@ module ts { // Grammar checking checkGrammarTypeArguments(node, node.typeArguments); - var type = getTypeFromTypeReferenceNode(node); + let type = getTypeFromTypeReferenceNode(node); if (type !== unknownType && node.typeArguments) { // Do type argument local checks only if referenced type is successfully resolved - var len = node.typeArguments.length; - for (var i = 0; i < len; i++) { + let len = node.typeArguments.length; + for (let i = 0; i < len; i++) { checkSourceElement(node.typeArguments[i]); - var constraint = getConstraintOfTypeParameter((type).target.typeParameters[i]); + let constraint = getConstraintOfTypeParameter((type).target.typeParameters[i]); if (produceDiagnostics && constraint) { - var typeArgument = (type).typeArguments[i]; + let typeArgument = (type).typeArguments[i]; checkTypeAssignableTo(typeArgument, constraint, node, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); } } @@ -8005,7 +8119,7 @@ module ts { function checkTypeLiteral(node: TypeLiteralNode) { forEach(node.members, checkSourceElement); if (produceDiagnostics) { - var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); + let type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); checkIndexConstraints(type); checkTypeForDuplicateIndexSignatures(node); } @@ -8017,7 +8131,7 @@ module ts { function checkTupleType(node: TupleTypeNode) { // Grammar checking - var hasErrorFromDisallowedTrailingComma = checkGrammarForDisallowedTrailingComma(node.elementTypes); + let hasErrorFromDisallowedTrailingComma = checkGrammarForDisallowedTrailingComma(node.elementTypes); if (!hasErrorFromDisallowedTrailingComma && node.elementTypes.length === 0) { grammarErrorOnNode(node, Diagnostics.A_tuple_type_element_list_cannot_be_empty); } @@ -8037,7 +8151,7 @@ module ts { if (!produceDiagnostics) { return; } - var signature = getSignatureFromDeclaration(signatureDeclarationNode); + let signature = getSignatureFromDeclaration(signatureDeclarationNode); if (!signature.hasStringLiterals) { return; } @@ -8052,22 +8166,21 @@ module ts { // TypeScript 1.0 spec (April 2014): 3.7.2.4 // Every specialized call or construct signature in an object type must be assignable // to at least one non-specialized call or construct signature in the same object type - var signaturesToCheck: Signature[]; + let signaturesToCheck: Signature[]; // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. // Use declaring type to obtain full list of signatures. if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === SyntaxKind.InterfaceDeclaration) { Debug.assert(signatureDeclarationNode.kind === SyntaxKind.CallSignature || signatureDeclarationNode.kind === SyntaxKind.ConstructSignature); - var signatureKind = signatureDeclarationNode.kind === SyntaxKind.CallSignature ? SignatureKind.Call : SignatureKind.Construct; - var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); - var containingType = getDeclaredTypeOfSymbol(containingSymbol); + let signatureKind = signatureDeclarationNode.kind === SyntaxKind.CallSignature ? SignatureKind.Call : SignatureKind.Construct; + let containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); + let containingType = getDeclaredTypeOfSymbol(containingSymbol); signaturesToCheck = getSignaturesOfType(containingType, signatureKind); } else { signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); } - for (var i = 0; i < signaturesToCheck.length; i++) { - var otherSignature = signaturesToCheck[i]; + for (let otherSignature of signaturesToCheck) { if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { return; } @@ -8077,7 +8190,7 @@ module ts { } function getEffectiveDeclarationFlags(n: Node, flagsToCheck: NodeFlags) { - var flags = getCombinedNodeFlags(n); + let flags = getCombinedNodeFlags(n); if (n.parent.kind !== SyntaxKind.InterfaceDeclaration && isInAmbientContext(n)) { if (!(flags & NodeFlags.Ambient)) { // It is nested in an ambient context, which means it is automatically exported @@ -8100,19 +8213,19 @@ module ts { // The caveat is that if some overloads are defined in lib.d.ts, we don't want to // report the errors on those. To achieve this, we will say that the implementation is // the canonical signature only if it is in the same container as the first overload - var implementationSharesContainerWithFirstOverload = implementation !== undefined && implementation.parent === overloads[0].parent; + let implementationSharesContainerWithFirstOverload = implementation !== undefined && implementation.parent === overloads[0].parent; return implementationSharesContainerWithFirstOverload ? implementation : overloads[0]; } function checkFlagAgreementBetweenOverloads(overloads: Declaration[], implementation: FunctionLikeDeclaration, flagsToCheck: NodeFlags, someOverloadFlags: NodeFlags, allOverloadFlags: NodeFlags): void { // Error if some overloads have a flag that is not shared by all overloads. To find the // deviations, we XOR someOverloadFlags with allOverloadFlags - var someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; + let someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; if (someButNotAllOverloadFlags !== 0) { - var canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck); + let canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck); forEach(overloads, o => { - var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags; + let deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags; if (deviation & NodeFlags.Export) { error(o.name, Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported); } @@ -8128,9 +8241,9 @@ module ts { function checkQuestionTokenAgreementBetweenOverloads(overloads: Declaration[], implementation: FunctionLikeDeclaration, someHaveQuestionToken: boolean, allHaveQuestionToken: boolean): void { if (someHaveQuestionToken !== allHaveQuestionToken) { - var canonicalHasQuestionToken = hasQuestionToken(getCanonicalOverload(overloads, implementation)); + let canonicalHasQuestionToken = hasQuestionToken(getCanonicalOverload(overloads, implementation)); forEach(overloads, o => { - var deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; + let deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; if (deviation) { error(o.name, Diagnostics.Overload_signatures_must_all_be_optional_or_required); } @@ -8138,26 +8251,26 @@ module ts { } } - var flagsToCheck: NodeFlags = NodeFlags.Export | NodeFlags.Ambient | NodeFlags.Private | NodeFlags.Protected; - var someNodeFlags: NodeFlags = 0; - var allNodeFlags = flagsToCheck; - var someHaveQuestionToken = false; - var allHaveQuestionToken = true; - var hasOverloads = false; - var bodyDeclaration: FunctionLikeDeclaration; - var lastSeenNonAmbientDeclaration: FunctionLikeDeclaration; - var previousDeclaration: FunctionLikeDeclaration; + let flagsToCheck: NodeFlags = NodeFlags.Export | NodeFlags.Ambient | NodeFlags.Private | NodeFlags.Protected; + let someNodeFlags: NodeFlags = 0; + let allNodeFlags = flagsToCheck; + let someHaveQuestionToken = false; + let allHaveQuestionToken = true; + let hasOverloads = false; + let bodyDeclaration: FunctionLikeDeclaration; + let lastSeenNonAmbientDeclaration: FunctionLikeDeclaration; + let previousDeclaration: FunctionLikeDeclaration; - var declarations = symbol.declarations; - var isConstructor = (symbol.flags & SymbolFlags.Constructor) !== 0; + let declarations = symbol.declarations; + let isConstructor = (symbol.flags & SymbolFlags.Constructor) !== 0; function reportImplementationExpectedError(node: FunctionLikeDeclaration): void { if (node.name && getFullWidth(node.name) === 0) { return; } - var seen = false; - var subsequentNode = forEachChild(node.parent, c => { + let seen = false; + let subsequentNode = forEachChild(node.parent, c => { if (seen) { return c; } @@ -8167,13 +8280,13 @@ module ts { }); if (subsequentNode) { if (subsequentNode.kind === node.kind) { - var errorNode: Node = (subsequentNode).name || subsequentNode; + let 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)); - var diagnostic = node.flags & NodeFlags.Static ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; + let diagnostic = node.flags & NodeFlags.Static ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode, diagnostic); return; } @@ -8183,7 +8296,7 @@ module ts { } } } - var errorNode: Node = node.name || node; + let errorNode: Node = node.name || node; if (isConstructor) { error(errorNode, Diagnostics.Constructor_implementation_is_missing); } @@ -8194,13 +8307,13 @@ module ts { // when checking exported function declarations across modules check only duplicate implementations // names and consistency of modifiers are verified when we check local symbol - var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & SymbolFlags.Module; - var duplicateFunctionDeclaration = false; - var multipleConstructorImplementation = false; - for (var i = 0; i < declarations.length; i++) { - var node = declarations[i]; - var inAmbientContext = isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === SyntaxKind.InterfaceDeclaration || node.parent.kind === SyntaxKind.TypeLiteral || inAmbientContext; + let isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & SymbolFlags.Module; + let duplicateFunctionDeclaration = false; + let multipleConstructorImplementation = false; + for (let current of declarations) { + let node = current; + let inAmbientContext = isInAmbientContext(node); + let inAmbientContextOrInterface = node.parent.kind === SyntaxKind.InterfaceDeclaration || node.parent.kind === SyntaxKind.TypeLiteral || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -8213,7 +8326,7 @@ module ts { } if (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature || node.kind === SyntaxKind.Constructor) { - var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); + let currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; someHaveQuestionToken = someHaveQuestionToken || hasQuestionToken(node); @@ -8269,14 +8382,14 @@ module ts { checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken); if (bodyDeclaration) { - var signatures = getSignaturesOfSymbol(symbol); - var bodySignature = getSignatureFromDeclaration(bodyDeclaration); + let signatures = getSignaturesOfSymbol(symbol); + let bodySignature = getSignatureFromDeclaration(bodyDeclaration); // If the implementation signature has string literals, we will have reported an error in // checkSpecializedSignatureDeclaration if (!bodySignature.hasStringLiterals) { // TypeScript 1.0 spec (April 2014): 6.1 - // If a function declaration includes overloads, the overloads determine the call - // signatures of the type given to the function object + // If a function declaration includes overloads, the overloads determine the call + // signatures of the type given to the function object // and the function implementation signature must be assignable to that type // // TypeScript 1.0 spec (April 2014): 3.8.4 @@ -8288,9 +8401,9 @@ module ts { // function g(x: string, y: string) { } // // The implementation is completely unrelated to the specialized signature, yet we do not check this. - for (var i = 0, len = signatures.length; i < len; ++i) { - if (!signatures[i].hasStringLiterals && !isSignatureAssignableTo(bodySignature, signatures[i])) { - error(signatures[i].declaration, Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + for (let signature of signatures) { + if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { + error(signature.declaration, Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); break; } } @@ -8304,13 +8417,11 @@ module ts { return; } - var symbol: Symbol; - // Exports should be checked only if enclosing module contains both exported and non exported declarations. // In case if all declarations are non-exported check is unnecessary. // if localSymbol is defined on node then node itself is exported - check is required - var symbol = node.localSymbol; + let symbol = node.localSymbol; if (!symbol) { // local symbol is undefined => this declaration is non-exported. // however symbol might contain other declarations that are exported @@ -8326,12 +8437,12 @@ module ts { return; } - // we use SymbolFlags.ExportValue, SymbolFlags.ExportType and SymbolFlags.ExportNamespace + // we use SymbolFlags.ExportValue, SymbolFlags.ExportType and SymbolFlags.ExportNamespace // to denote disjoint declarationSpaces (without making new enum type). - var exportedDeclarationSpaces: SymbolFlags = 0; - var nonExportedDeclarationSpaces: SymbolFlags = 0; + let exportedDeclarationSpaces: SymbolFlags = 0; + let nonExportedDeclarationSpaces: SymbolFlags = 0; forEach(symbol.declarations, d => { - var declarationSpaces = getDeclarationSpaces(d); + let declarationSpaces = getDeclarationSpaces(d); if (getEffectiveDeclarationFlags(d, NodeFlags.Export)) { exportedDeclarationSpaces |= declarationSpaces; } @@ -8340,7 +8451,7 @@ module ts { } }); - var commonDeclarationSpace = exportedDeclarationSpaces & nonExportedDeclarationSpaces; + let commonDeclarationSpace = exportedDeclarationSpaces & nonExportedDeclarationSpaces; if (commonDeclarationSpace) { // declaration spaces for exported and non-exported declarations intersect @@ -8363,8 +8474,8 @@ module ts { case SyntaxKind.EnumDeclaration: return SymbolFlags.ExportType | SymbolFlags.ExportValue; case SyntaxKind.ImportEqualsDeclaration: - var result: SymbolFlags = 0; - var target = resolveImport(getSymbolOfNode(d)); + let result: SymbolFlags = 0; + let target = resolveAlias(getSymbolOfNode(d)); forEach(target.declarations, d => { result |= getDeclarationSpaces(d); }); return result; default: @@ -8392,7 +8503,7 @@ module ts { // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === SyntaxKind.ComputedPropertyName) { + if (node.name && node.name.kind === SyntaxKind.ComputedPropertyName) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -8402,10 +8513,10 @@ module ts { // first we want to check the local symbol that contain this declaration // - if node.localSymbol !== undefined - this is current declaration is exported and localSymbol points to the local symbol // - if node.localSymbol === undefined - this node is non-exported so we can just pick the result of getSymbolOfNode - var symbol = getSymbolOfNode(node); - var localSymbol = node.localSymbol || symbol; + let symbol = getSymbolOfNode(node); + let localSymbol = node.localSymbol || symbol; - var firstDeclaration = getDeclarationOfKind(localSymbol, node.kind); + let firstDeclaration = getDeclarationOfKind(localSymbol, node.kind); // Only type check the symbol once if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -8477,7 +8588,7 @@ module ts { return false; } - var root = getRootDeclaration(node); + let root = getRootDeclaration(node); if (root.kind === SyntaxKind.Parameter && nodeIsMissing((root.parent).body)) { // just an overload - no codegen impact return false; @@ -8494,10 +8605,10 @@ module ts { // this function will run after checking the source file so 'CaptureThis' is correct for all nodes function checkIfThisIsCapturedInEnclosingScope(node: Node): void { - var current = node; + let current = node; while (current) { if (getNodeCheckFlags(current) & NodeCheckFlags.CaptureThis) { - var isDeclaration = node.kind !== SyntaxKind.Identifier; + let isDeclaration = node.kind !== SyntaxKind.Identifier; if (isDeclaration) { error((node).name, Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -8516,14 +8627,14 @@ module ts { } // bubble up and find containing type - var enclosingClass = getAncestor(node, SyntaxKind.ClassDeclaration); + let enclosingClass = getAncestor(node, SyntaxKind.ClassDeclaration); // if containing type was not found or it is ambient - exit (no codegen) if (!enclosingClass || isInAmbientContext(enclosingClass)) { return; } if (getClassBaseTypeNode(enclosingClass)) { - var isDeclaration = node.kind !== SyntaxKind.Identifier; + let isDeclaration = node.kind !== SyntaxKind.Identifier; if (isDeclaration) { error(node, Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -8544,7 +8655,7 @@ module ts { } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent - var parent = getDeclarationContainer(node); + let parent = getDeclarationContainer(node); if (parent.kind === SyntaxKind.SourceFile && isExternalModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, @@ -8554,11 +8665,11 @@ module ts { function checkVarDeclaredNamesNotShadowed(node: VariableDeclaration | BindingElement) { // - ScriptBody : StatementList - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList + // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList // also occurs in the VarDeclaredNames of StatementList. // - Block : { StatementList } - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList + // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList // also occurs in the VarDeclaredNames of StatementList. // Variable declarations are hoisted to the top of their function scope. They can shadow @@ -8567,46 +8678,58 @@ module 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 var declarations will not + // Only consider declarations with initializers, uninitialized let declarations will not // step on a let/const variable. - // Do not consider let and const declarations, as duplicate block-scoped declarations + // Do not consider let and const declarations, as duplicate block-scoped declarations // are handled by the binder. - // We are only looking for var declarations that step on let\const declarations from a + // We are only looking for let 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 - // var x = 0; // symbol for this declaration will be 'symbol' + // let x = 0; // symbol for this declaration will be 'symbol' // } - if (node.initializer && (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === 0) { - var symbol = getSymbolOfNode(node); - if (symbol.flags & SymbolFlags.FunctionScopedVariable) { - var localDeclarationSymbol = resolveName(node, (node.name).text, SymbolFlags.Variable, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); - if (localDeclarationSymbol && - localDeclarationSymbol !== symbol && - localDeclarationSymbol.flags & SymbolFlags.BlockScopedVariable) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & NodeFlags.BlockScoped) { - var varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, SyntaxKind.VariableDeclarationList); - var container = - varDeclList.parent.kind === SyntaxKind.VariableStatement && - varDeclList.parent.parent; - - // names of block-scoped and function scoped variables can collide only - // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) - var namesShareScope = - container && - (container.kind === SyntaxKind.Block && isAnyFunction(container.parent) || - (container.kind === SyntaxKind.ModuleBlock && container.kind === SyntaxKind.ModuleDeclaration) || - container.kind === SyntaxKind.SourceFile); + // skip block-scoped variables and parameters + if ((getCombinedNodeFlags(node) & NodeFlags.BlockScoped) !== 0 || isParameterDeclaration(node)) { + return; + } - // here we know that function scoped variable is shadowed by block scoped one - // if they are defined in the same scope - binder has already reported redeclaration error - // otherwise if variable has an initializer - show error that initialization will fail - // since LHS will be block scoped name instead of function scoped - if (!namesShareScope) { - var name = symbolToString(localDeclarationSymbol); - error(getErrorSpanForNode(node), Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); - } + // skip variable declarations that don't have initializers + // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern + // so we'll always treat binding elements as initialized + if (node.kind === SyntaxKind.VariableDeclaration && !node.initializer) { + return; + } + + var symbol = getSymbolOfNode(node); + if (symbol.flags & SymbolFlags.FunctionScopedVariable) { + let localDeclarationSymbol = resolveName(node, (node.name).text, SymbolFlags.Variable, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); + if (localDeclarationSymbol && + localDeclarationSymbol !== symbol && + localDeclarationSymbol.flags & SymbolFlags.BlockScopedVariable) { + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & NodeFlags.BlockScoped) { + let varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, SyntaxKind.VariableDeclarationList); + let container = + varDeclList.parent.kind === SyntaxKind.VariableStatement && varDeclList.parent.parent + ? varDeclList.parent.parent + : undefined; + + // names of block-scoped and function scoped variables can collide only + // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) + let namesShareScope = + container && + (container.kind === SyntaxKind.Block && isFunctionLike(container.parent) || + container.kind === SyntaxKind.ModuleBlock || + container.kind === SyntaxKind.ModuleDeclaration || + container.kind === SyntaxKind.SourceFile); + + // here we know that function scoped variable is shadowed by block scoped one + // if they are defined in the same scope - binder has already reported redeclaration error + // otherwise if variable has an initializer - show error that initialization will fail + // since LHS will be block scoped name instead of function scoped + if (!namesShareScope) { + let name = symbolToString(localDeclarationSymbol); + error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); } } } @@ -8622,14 +8745,17 @@ module ts { // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node: VariableLikeDeclaration): void { - if (getRootDeclaration(node).kind === SyntaxKind.Parameter) { - var func = getContainingFunction(node); - visit(node.initializer); + if (getRootDeclaration(node).kind !== SyntaxKind.Parameter) { + return; } + + let func = getContainingFunction(node); + visit(node.initializer); + function visit(n: Node) { if (n.kind === SyntaxKind.Identifier) { - var referencedSymbol = getNodeLinks(n).resolvedSymbol; - // check FunctionLikeDeclaration.locals (stores parameters\function local variable) + let referencedSymbol = getNodeLinks(n).resolvedSymbol; + // check FunctionLikeDeclaration.locals (stores parameters\function local variable) // if it contains entry with a specified name and if this entry matches the resolved symbol if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, SymbolFlags.Value) === referencedSymbol) { if (referencedSymbol.valueDeclaration.kind === SyntaxKind.Parameter) { @@ -8682,8 +8808,8 @@ module ts { } return; } - var symbol = getSymbolOfNode(node); - var type = getTypeOfVariableOrParameterOrProperty(symbol); + let symbol = getSymbolOfNode(node); + let type = getTypeOfVariableOrParameterOrProperty(symbol); if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer if (node.initializer) { @@ -8694,7 +8820,7 @@ module ts { else { // Node is a secondary declaration, check that type is identical to primary declaration and check that // initializer is consistent with type associated with the node - var declarationType = getWidenedTypeForVariableLikeDeclaration(node); + let declarationType = getWidenedTypeForVariableLikeDeclaration(node); if (type !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(type, declarationType)) { error(node.name, Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, declarationNameToString(node.name), typeToString(type), typeToString(declarationType)); } @@ -8774,7 +8900,7 @@ module ts { } function checkWhileStatement(node: WhileStatement) { - // Grammar checking + // Grammar checking checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); @@ -8804,26 +8930,20 @@ module ts { } function checkForOfStatement(node: ForOfStatement): void { - if (languageVersion < ScriptTarget.ES6) { - grammarErrorOnFirstToken(node, Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher); - return; - } - checkGrammarForInOrForOfStatement(node) // Check the LHS and RHS // If the LHS is a declaration, just check it as a variable declaration, which will in turn check the RHS - // via getTypeForVariableDeclarationInForOfStatement. + // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { checkForInOrForOfVariableDeclaration(node); } else { - var varExpr = node.initializer; - var rightType = checkExpression(node.expression); - var iteratedType = checkIteratedType(rightType, node.expression); - + let varExpr = node.initializer; + let iteratedType = checkRightHandSideOfForOf(node.expression); + // There may be a destructuring assignment on the left side if (varExpr.kind === SyntaxKind.ArrayLiteralExpression || varExpr.kind === SyntaxKind.ObjectLiteralExpression) { // iteratedType may be undefined. In this case, we still want to check the structure of @@ -8832,10 +8952,10 @@ module ts { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { - var leftType = checkExpression(varExpr); + let leftType = checkExpression(varExpr); checkReferenceExpression(varExpr, /*invalidReferenceMessage*/ Diagnostics.Invalid_left_hand_side_in_for_of_statement, /*constantVariableMessage*/ Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); - + // iteratedType will be undefined if the rightType was missing properties/signatures // required to get its iteratedType (like [Symbol.iterator] or next). This may be // because we accessed properties from anyType, or it may have led to an error inside @@ -8850,20 +8970,20 @@ module ts { } function checkForInStatement(node: ForInStatement) { - // Grammar checking + // Grammar checking checkGrammarForInOrForOfStatement(node); // TypeScript 1.0 spec (April 2014): 5.4 // In a 'for-in' statement of the form - // for (var VarDecl in Expr) Statement + // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, - // and Expr must be an expression of type Any, an object type, or a type parameter type. + // and Expr must be an expression of type Any, an object type, or a type parameter type. if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { - var variable = (node.initializer).declarations[0]; + let variable = (node.initializer).declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - + checkForInOrForOfVariableDeclaration(node); } else { @@ -8871,8 +8991,8 @@ module ts { // for (Var in Expr) Statement // Var must be an expression classified as a reference of type Any or the String primitive type, // and Expr must be an expression of type Any, an object type, or a type parameter type. - var varExpr = node.initializer; - var leftType = checkExpression(varExpr); + let varExpr = node.initializer; + let leftType = checkExpression(varExpr); if (varExpr.kind === SyntaxKind.ArrayLiteralExpression || varExpr.kind === SyntaxKind.ObjectLiteralExpression) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } @@ -8885,7 +9005,7 @@ module ts { } } - var rightType = checkExpression(node.expression); + let rightType = checkExpression(node.expression); // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved // in this case error about missing name is already reported - do not report extra one if (!allConstituentTypesHaveKind(rightType, TypeFlags.Any | TypeFlags.ObjectType | TypeFlags.TypeParameter)) { @@ -8896,26 +9016,19 @@ module ts { } function checkForInOrForOfVariableDeclaration(iterationStatement: ForInStatement | ForOfStatement): void { - var variableDeclarationList = iterationStatement.initializer; + let variableDeclarationList = iterationStatement.initializer; // checkGrammarForInOrForOfStatement will check that there is exactly one declaration. if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; + let decl = variableDeclarationList.declarations[0]; checkVariableDeclaration(decl); } } - function getTypeForVariableDeclarationInForOfStatement(forOfStatement: ForOfStatement): Type { - // Temporarily return 'any' below ES6 - if (languageVersion < ScriptTarget.ES6) { - return anyType; - } - - // iteratedType will be undefined if the for-of expression type was missing properties/signatures - // required to get its iteratedType (like [Symbol.iterator] or next). This may be - // because we accessed properties from anyType, or it may have led to an error inside - // getIteratedType. - var expressionType = getTypeOfExpression(forOfStatement.expression); - return checkIteratedType(expressionType, forOfStatement.expression) || anyType; + function checkRightHandSideOfForOf(rhsExpression: Expression): Type { + let expressionType = getTypeOfExpression(rhsExpression); + return languageVersion >= ScriptTarget.ES6 + ? checkIteratedType(expressionType, rhsExpression) + : checkElementTypeOfArrayOrString(expressionType, rhsExpression); } /** @@ -8923,18 +9036,18 @@ module ts { */ function checkIteratedType(iterable: Type, expressionForError: Expression): Type { Debug.assert(languageVersion >= ScriptTarget.ES6); - var iteratedType = getIteratedType(iterable, expressionForError); + let iteratedType = getIteratedType(iterable, expressionForError); // Now even though we have extracted the iteratedType, we will have to validate that the type // passed in is actually an Iterable. if (expressionForError && iteratedType) { - var completeIterableType = globalIterableType !== emptyObjectType + let completeIterableType = globalIterableType !== emptyObjectType ? createTypeReference(globalIterableType, [iteratedType]) : emptyObjectType; checkTypeAssignableTo(iterable, completeIterableType, expressionForError); } return iteratedType; - + function getIteratedType(iterable: Type, expressionForError: Expression) { // We want to treat type as an iterable, and get the type it is an iterable of. The iterable // must have the following structure (annotated with the names of the variables below): @@ -8961,17 +9074,17 @@ module ts { // caller requested it. Then the caller can decide what to do in the case where there is no iterated // type. This is different from returning anyType, because that would signify that we have matched the // whole pattern and that T (above) is 'any'. - + if (allConstituentTypesHaveKind(iterable, TypeFlags.Any)) { return undefined; } - var iteratorFunction = getTypeOfPropertyOfType(iterable, getPropertyNameForKnownSymbolName("iterator")); + let iteratorFunction = getTypeOfPropertyOfType(iterable, getPropertyNameForKnownSymbolName("iterator")); if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, TypeFlags.Any)) { return undefined; } - var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, SignatureKind.Call) : emptyArray; + let iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, SignatureKind.Call) : emptyArray; if (iteratorFunctionSignatures.length === 0) { if (expressionForError) { error(expressionForError, Diagnostics.The_right_hand_side_of_a_for_of_statement_must_have_a_Symbol_iterator_method_that_returns_an_iterator); @@ -8979,17 +9092,17 @@ module ts { return undefined; } - var iterator = getUnionType(map(iteratorFunctionSignatures, getReturnTypeOfSignature)); + let iterator = getUnionType(map(iteratorFunctionSignatures, getReturnTypeOfSignature)); if (allConstituentTypesHaveKind(iterator, TypeFlags.Any)) { return undefined; } - var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); + let iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next"); if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, TypeFlags.Any)) { return undefined; } - var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, SignatureKind.Call) : emptyArray; + let iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, SignatureKind.Call) : emptyArray; if (iteratorNextFunctionSignatures.length === 0) { if (expressionForError) { error(expressionForError, Diagnostics.The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method); @@ -8997,23 +9110,89 @@ module ts { return undefined; } - var iteratorNextResult = getUnionType(map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + let iteratorNextResult = getUnionType(map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); if (allConstituentTypesHaveKind(iteratorNextResult, TypeFlags.Any)) { return undefined; } - var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); + let iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); if (!iteratorNextValue) { if (expressionForError) { error(expressionForError, Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); } return undefined; } - + return iteratorNextValue; } } + /** + * This function does the following steps: + * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents. + * 2. Take the element types of the array constituents. + * 3. Return the union of the element types, and string if there was a string constitutent. + * + * For example: + * string -> string + * number[] -> number + * string[] | number[] -> string | number + * string | number[] -> string | number + * string | string[] | number[] -> string | number + * + * It also errors if: + * 1. Some constituent is neither a string nor an array. + * 2. Some constituent is a string and target is less than ES5 (because in ES3 string is not indexable). + */ + function checkElementTypeOfArrayOrString(arrayOrStringType: Type, expressionForError: Expression): Type { + Debug.assert(languageVersion < ScriptTarget.ES6); + + // 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. + let arrayType = removeTypesFromUnionType(arrayOrStringType, TypeFlags.StringLike, /*isTypeOfKind*/ true, /*allowEmptyUnionResult*/ true); + let hasStringConstituent = arrayOrStringType !== arrayType; + + let reportedError = false; + if (hasStringConstituent) { + if (languageVersion < ScriptTarget.ES5) { + error(expressionForError, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + reportedError = true; + } + + // Now that we've removed all the StringLike types, if no constituents remain, then the entire + // arrayOrStringType was a string. + if (arrayType === emptyObjectType) { + return stringType; + } + } + + if (!isArrayLikeType(arrayType)) { + if (!reportedError) { + // Which error we report depends on whether there was a string constituent. For example, + // if the input type is number | string, we want to say that number is not an array type. + // But if the input was just number, we want to say that number is not an array type + // or a string type. + let diagnostic = hasStringConstituent + ? Diagnostics.Type_0_is_not_an_array_type + : Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; + error(expressionForError, diagnostic, typeToString(arrayType)); + } + return hasStringConstituent ? stringType : unknownType; + } + + let arrayElementType = getIndexTypeOfType(arrayType, IndexKind.Number) || unknownType; + if (hasStringConstituent) { + // This is just an optimization for the case where arrayOrStringType is string | string[] + if (arrayElementType.flags & TypeFlags.StringLike) { + return stringType; + } + + return getUnionType([arrayElementType, stringType]); + } + + return arrayElementType; + } + function checkBreakOrContinueStatement(node: BreakOrContinueStatement) { // Grammar checking checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); @@ -9028,17 +9207,17 @@ module ts { function checkReturnStatement(node: ReturnStatement) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - var functionBlock = getContainingFunction(node); + let functionBlock = getContainingFunction(node); if (!functionBlock) { grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); } } if (node.expression) { - var func = getContainingFunction(node); + let func = getContainingFunction(node); if (func) { - var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func)); - var exprType = checkExpressionCached(node.expression); + let returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func)); + let exprType = checkExpressionCached(node.expression); if (func.kind === SyntaxKind.SetAccessor) { error(node.expression, Diagnostics.Setters_cannot_return_a_value); } @@ -9072,30 +9251,30 @@ module ts { // Grammar checking checkGrammarStatementInAmbientContext(node); - var firstDefaultClause: CaseOrDefaultClause; - var hasDuplicateDefaultClause = false; + let firstDefaultClause: CaseOrDefaultClause; + let hasDuplicateDefaultClause = false; - var expressionType = checkExpression(node.expression); - forEach(node.clauses, clause => { + let expressionType = checkExpression(node.expression); + 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) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } else { - var sourceFile = getSourceFileOfNode(node); - var start = skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; + let sourceFile = getSourceFileOfNode(node); + let start = skipTrivia(sourceFile.text, clause.pos); + let end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } if (produceDiagnostics && clause.kind === SyntaxKind.CaseClause) { - var caseClause = clause; + let caseClause = clause; // 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); + let caseType = checkExpression(caseClause.expression); 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); @@ -9108,13 +9287,13 @@ module ts { function checkLabeledStatement(node: LabeledStatement) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - var current = node.parent; + let current = node.parent; while (current) { - if (isAnyFunction(current)) { + if (isFunctionLike(current)) { break; } if (current.kind === SyntaxKind.LabeledStatement && (current).label.text === node.label.text) { - var sourceFile = getSourceFileOfNode(node); + let sourceFile = getSourceFileOfNode(node); grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; } @@ -9144,7 +9323,7 @@ module ts { checkGrammarStatementInAmbientContext(node); checkBlock(node.tryBlock); - var catchClause = node.catchClause; + let catchClause = node.catchClause; if (catchClause) { // Grammar checking if (catchClause.variableDeclaration) { @@ -9158,6 +9337,15 @@ module ts { grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer); } else { + let identifierName = (catchClause.variableDeclaration.name).text; + let locals = catchClause.block.locals; + if (locals && hasProperty(locals, identifierName)) { + let localSymbol = locals[identifierName] + if (localSymbol && (localSymbol.flags & SymbolFlags.BlockScopedVariable) !== 0) { + grammarErrorOnNode(localSymbol.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + } + } + // 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 checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); @@ -9173,46 +9361,45 @@ module ts { } function checkIndexConstraints(type: Type) { - var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, IndexKind.Number); - var declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, IndexKind.String); + let declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, IndexKind.Number); + let declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, IndexKind.String); - var stringIndexType = getIndexTypeOfType(type, IndexKind.String); - var numberIndexType = getIndexTypeOfType(type, IndexKind.Number); + let stringIndexType = getIndexTypeOfType(type, IndexKind.String); + let numberIndexType = getIndexTypeOfType(type, IndexKind.Number); if (stringIndexType || numberIndexType) { forEach(getPropertiesOfObjectType(type), prop => { - var propType = getTypeOfSymbol(prop); + let propType = getTypeOfSymbol(prop); checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, IndexKind.String); checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, IndexKind.Number); }); if (type.flags & TypeFlags.Class && type.symbol.valueDeclaration.kind === SyntaxKind.ClassDeclaration) { - var classDeclaration = type.symbol.valueDeclaration; - for (var i = 0; i < classDeclaration.members.length; i++) { - var member = classDeclaration.members[i]; + let classDeclaration = type.symbol.valueDeclaration; + for (let member of classDeclaration.members) { // Only process instance properties with computed names here. // Static properties cannot be in conflict with indexers, // and properties with literal names were already checked. if (!(member.flags & NodeFlags.Static) && hasDynamicName(member)) { - var propType = getTypeOfSymbol(member.symbol); + let propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, IndexKind.String); - checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, IndexKind.Number); + checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, IndexKind.Number); } } } } - var errorNode: Node; + let errorNode: Node; if (stringIndexType && numberIndexType) { errorNode = declaredNumberIndexer || declaredStringIndexer; // condition 'errorNode === undefined' may appear if types does not declare nor string neither number indexer if (!errorNode && (type.flags & TypeFlags.Interface)) { - var someBaseTypeHasBothIndexers = forEach((type).baseTypes, base => getIndexTypeOfType(base, IndexKind.String) && getIndexTypeOfType(base, IndexKind.Number)); + let someBaseTypeHasBothIndexers = forEach((type).baseTypes, base => getIndexTypeOfType(base, IndexKind.String) && getIndexTypeOfType(base, IndexKind.Number)); errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0]; } } - if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) { + if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) { error(errorNode, Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1, typeToString(numberIndexType), typeToString(stringIndexType)); } @@ -9236,7 +9423,7 @@ module ts { // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class - var errorNode: Node; + let errorNode: Node; if (prop.valueDeclaration.name.kind === SyntaxKind.ComputedPropertyName || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } @@ -9247,12 +9434,12 @@ module ts { // for interfaces property and indexer might be inherited from different bases // check if any base class already has both property and indexer. // check should be performed only if 'type' is the first type that brings property\indexer together - var someBaseClassHasBothPropertyAndIndexer = forEach((containingType).baseTypes, base => getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind)); + let someBaseClassHasBothPropertyAndIndexer = forEach((containingType).baseTypes, base => getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind)); errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; } if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = + let errorMessage = indexKind === IndexKind.String ? Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 : Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; @@ -9278,12 +9465,12 @@ module ts { // Check each type parameter and check that list has no duplicate type parameter declarations function checkTypeParameters(typeParameterDeclarations: TypeParameterDeclaration[]) { if (typeParameterDeclarations) { - for (var i = 0; i < typeParameterDeclarations.length; i++) { - var node = typeParameterDeclarations[i]; + for (let i = 0, n = typeParameterDeclarations.length; i < n; i++) { + let node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { - for (var j = 0; j < i; j++) { + for (let j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { error(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); } @@ -9297,47 +9484,49 @@ module ts { // Grammar checking checkGrammarClassDeclarationHeritageClauses(node); - checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0); + if (node.name) { + checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0); + checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + } checkTypeParameters(node.typeParameters); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var type = getDeclaredTypeOfSymbol(symbol); - var staticType = getTypeOfSymbol(symbol); - var baseTypeNode = getClassBaseTypeNode(node); + let symbol = getSymbolOfNode(node); + let type = getDeclaredTypeOfSymbol(symbol); + let staticType = getTypeOfSymbol(symbol); + let baseTypeNode = getClassBaseTypeNode(node); if (baseTypeNode) { emitExtends = emitExtends || !isInAmbientContext(node); checkTypeReference(baseTypeNode); } if (type.baseTypes.length) { if (produceDiagnostics) { - var baseType = type.baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Class_0_incorrectly_extends_base_class_1); - var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name, + let baseType = type.baseTypes[0]; + checkTypeAssignableTo(type, baseType, node.name || node, Diagnostics.Class_0_incorrectly_extends_base_class_1); + let staticBaseType = getTypeOfSymbol(baseType.symbol); + checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(node, baseTypeNode.typeName, SymbolFlags.Value)) { + if (baseType.symbol !== resolveEntityName(baseTypeNode.typeName, SymbolFlags.Value)) { error(baseTypeNode, Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); } checkKindsOfPropertyMemberOverrides(type, baseType); } - + // Check that base type can be evaluated as expression checkExpressionOrQualifiedName(baseTypeNode.typeName); } - var implementedTypeNodes = getClassImplementedTypeNodes(node); + let implementedTypeNodes = getClassImplementedTypeNodes(node); if (implementedTypeNodes) { forEach(implementedTypeNodes, typeRefNode => { checkTypeReference(typeRefNode); if (produceDiagnostics) { - var t = getTypeFromTypeReferenceNode(typeRefNode); + let t = getTypeFromTypeReferenceNode(typeRefNode); if (t !== unknownType) { - var declaredType = (t.flags & TypeFlags.Reference) ? (t).target : t; + let declaredType = (t.flags & TypeFlags.Reference) ? (t).target : t; if (declaredType.flags & (TypeFlags.Class | TypeFlags.Interface)) { - checkTypeAssignableTo(type, t, node.name, Diagnostics.Class_0_incorrectly_implements_interface_1); + checkTypeAssignableTo(type, t, node.name || node, Diagnostics.Class_0_incorrectly_implements_interface_1); } else { error(typeRefNode, Diagnostics.A_class_may_only_implement_another_class_or_interface); @@ -9367,28 +9556,28 @@ module ts { // Inheritance means that a derived class implicitly contains all non - overridden members of the base class. // Both public and private property members are inherited, but only public property members can be overridden. // A property member in a derived class is said to override a property member in a base class - // when the derived class property member has the same name and kind(instance or static) + // when the derived class property member has the same name and kind(instance or static) // as the base class property member. // The type of an overriding property member must be assignable(section 3.8.4) // to the type of the overridden property member, or otherwise a compile - time error occurs. // Base class instance member functions can be overridden by derived class instance member functions, // but not by other kinds of members. - // Base class instance member variables and accessors can be overridden by + // Base class instance member variables and accessors can be overridden by // derived class instance member variables and accessors, but not by other kinds of members. // NOTE: assignability is checked in checkClassDeclaration - var baseProperties = getPropertiesOfObjectType(baseType); - for (var i = 0, len = baseProperties.length; i < len; ++i) { - var base = getTargetSymbol(baseProperties[i]); + let baseProperties = getPropertiesOfObjectType(baseType); + for (let baseProperty of baseProperties) { + let base = getTargetSymbol(baseProperty); if (base.flags & SymbolFlags.Prototype) { continue; } - var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name)); + let derived = getTargetSymbol(getPropertyOfObjectType(type, base.name)); if (derived) { - var baseDeclarationFlags = getDeclarationFlagsFromSymbol(base); - var derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived); + let baseDeclarationFlags = getDeclarationFlagsFromSymbol(base); + let derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived); if ((baseDeclarationFlags & NodeFlags.Private) || (derivedDeclarationFlags & NodeFlags.Private)) { // either base or derived property is private - not override, skip it continue; @@ -9404,7 +9593,7 @@ module ts { continue; } - var errorMessage: DiagnosticMessage; + let errorMessage: DiagnosticMessage; if (base.flags & SymbolFlags.Method) { if (derived.flags & SymbolFlags.Accessor) { errorMessage = Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; @@ -9443,9 +9632,9 @@ module ts { // TypeScript 1.0 spec (April 2014): // When a generic interface has multiple declarations, all declarations must have identical type parameter // lists, i.e. identical type parameter names with identical constraints in identical order. - for (var i = 0, len = list1.length; i < len; i++) { - var tp1 = list1[i]; - var tp2 = list2[i]; + for (let i = 0, len = list1.length; i < len; i++) { + let tp1 = list1[i]; + let tp2 = list2[i]; if (tp1.name.text !== tp2.name.text) { return false; } @@ -9467,28 +9656,26 @@ module ts { return true; } - var seen: Map<{ prop: Symbol; containingType: Type }> = {}; + let seen: Map<{ prop: Symbol; containingType: Type }> = {}; forEach(type.declaredProperties, p => { seen[p.name] = { prop: p, containingType: type }; }); - var ok = true; + let ok = true; - for (var i = 0, len = type.baseTypes.length; i < len; ++i) { - var base = type.baseTypes[i]; - var properties = getPropertiesOfObjectType(base); - for (var j = 0, proplen = properties.length; j < proplen; ++j) { - var prop = properties[j]; + for (let base of type.baseTypes) { + let properties = getPropertiesOfObjectType(base); + for (let prop of properties) { if (!hasProperty(seen, prop.name)) { seen[prop.name] = { prop: prop, containingType: base }; } else { - var existing = seen[prop.name]; - var isInheritedProperty = existing.containingType !== type; + let existing = seen[prop.name]; + let isInheritedProperty = existing.containingType !== type; if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) { ok = false; - var typeName1 = typeToString(existing.containingType); - var typeName2 = typeToString(base); + let typeName1 = typeToString(existing.containingType); + let typeName2 = typeToString(base); - var errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); + let errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); diagnostics.add(createDiagnosticForNodeFromMessageChain(typeNode, errorInfo)); } @@ -9508,8 +9695,8 @@ module ts { checkTypeNameIsReserved(node.name, Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = getDeclarationOfKind(symbol, SyntaxKind.InterfaceDeclaration); + let symbol = getSymbolOfNode(node); + let firstInterfaceDecl = getDeclarationOfKind(symbol, SyntaxKind.InterfaceDeclaration); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -9518,7 +9705,7 @@ module ts { // Only check this symbol once if (node === firstInterfaceDecl) { - var type = getDeclaredTypeOfSymbol(symbol); + let type = getDeclaredTypeOfSymbol(symbol); // run subsequent checks only if first set succeeded if (checkInheritedPropertiesAreIdentical(type, node.name)) { forEach(type.baseTypes, baseType => { @@ -9539,26 +9726,26 @@ module ts { function checkTypeAliasDeclaration(node: TypeAliasDeclaration) { // Grammar checking checkGrammarModifiers(node); - + checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkSourceElement(node.type); } function computeEnumMemberValues(node: EnumDeclaration) { - var nodeLinks = getNodeLinks(node); + let nodeLinks = getNodeLinks(node); if (!(nodeLinks.flags & NodeCheckFlags.EnumValuesComputed)) { - var enumSymbol = getSymbolOfNode(node); - var enumType = getDeclaredTypeOfSymbol(enumSymbol); - var autoValue = 0; - var ambient = isInAmbientContext(node); - var enumIsConst = isConst(node); + let enumSymbol = getSymbolOfNode(node); + let enumType = getDeclaredTypeOfSymbol(enumSymbol); + let autoValue = 0; + let ambient = isInAmbientContext(node); + let enumIsConst = isConst(node); forEach(node.members, member => { if (member.name.kind !== SyntaxKind.ComputedPropertyName && isNumericLiteralName((member.name).text)) { error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); } - var initializer = member.initializer; + let initializer = member.initializer; if (initializer) { autoValue = getConstantValueForEnumMemberInitializer(initializer); if (autoValue === undefined) { @@ -9567,7 +9754,7 @@ module ts { } else if (!ambient) { // Only here do we need to check that the initializer is assignable to the enum type. - // If it is a constant value (not undefined), it is syntactically constrained to be a number. + // If it is a constant value (not undefined), it is syntactically constrained to be a number. // Also, we do not need to check this for ambients because there is already // a syntax error if it is not a constant. checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*headMessage*/ undefined); @@ -9601,7 +9788,7 @@ module ts { function evalConstant(e: Node): number { switch (e.kind) { case SyntaxKind.PrefixUnaryExpression: - var value = evalConstant((e).operand); + let value = evalConstant((e).operand); if (value === undefined) { return undefined; } @@ -9612,11 +9799,11 @@ module ts { } return undefined; case SyntaxKind.BinaryExpression: - var left = evalConstant((e).left); + let left = evalConstant((e).left); if (left === undefined) { return undefined; } - var right = evalConstant((e).right); + let right = evalConstant((e).right); if (right === undefined) { return undefined; } @@ -9641,10 +9828,10 @@ module ts { case SyntaxKind.Identifier: case SyntaxKind.ElementAccessExpression: case SyntaxKind.PropertyAccessExpression: - var member = initializer.parent; - var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType: Type; - var propertyName: string; + let member = initializer.parent; + let currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); + let enumType: Type; + let propertyName: string; if (e.kind === SyntaxKind.Identifier) { // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work. @@ -9653,7 +9840,7 @@ module ts { propertyName = (e).text; } else { - var expression: Expression; + let expression: Expression; if (e.kind === SyntaxKind.ElementAccessExpression) { if ((e).argumentExpression === undefined || (e).argumentExpression.kind !== SyntaxKind.StringLiteral) { @@ -9681,7 +9868,7 @@ module ts { } } - var enumType = checkExpression(expression); + enumType = checkExpression(expression); // allow references to constant members of other enums if (!(enumType.symbol && (enumType.symbol.flags & SymbolFlags.Enum))) { return undefined; @@ -9692,12 +9879,12 @@ module ts { return undefined; } - var property = getPropertyOfObjectType(enumType, propertyName); + let property = getPropertyOfObjectType(enumType, propertyName); if (!property || !(property.flags & SymbolFlags.EnumMember)) { return undefined; } - var propertyDecl = property.valueDeclaration; + let propertyDecl = property.valueDeclaration; // self references are illegal if (member === propertyDecl) { return undefined; @@ -9735,11 +9922,11 @@ module ts { // for the first member. // // Only perform this check once per symbol - var enumSymbol = getSymbolOfNode(node); - var firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind); + let enumSymbol = getSymbolOfNode(node); + let firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind); if (node === firstDeclaration) { if (enumSymbol.declarations.length > 1) { - var enumIsConst = isConst(node); + let enumIsConst = isConst(node); // check that const is placed\omitted on all enum declarations forEach(enumSymbol.declarations, decl => { if (isConstEnumDeclaration(decl) !== enumIsConst) { @@ -9748,19 +9935,19 @@ module ts { }); } - var seenEnumMissingInitialInitializer = false; + let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, declaration => { // return true if we hit a violation of the rule, false otherwise if (declaration.kind !== SyntaxKind.EnumDeclaration) { return false; } - var enumDeclaration = declaration; + let enumDeclaration = declaration; if (!enumDeclaration.members.length) { return false; } - var firstEnumMember = enumDeclaration.members[0]; + let firstEnumMember = enumDeclaration.members[0]; if (!firstEnumMember.initializer) { if (seenEnumMissingInitialInitializer) { error(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); @@ -9774,9 +9961,8 @@ module ts { } function getFirstNonAmbientClassOrFunctionDeclaration(symbol: Symbol): Declaration { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + let declarations = symbol.declarations; + for (let declaration of declarations) { if ((declaration.kind === SyntaxKind.ClassDeclaration || (declaration.kind === SyntaxKind.FunctionDeclaration && nodeIsPresent((declaration).body))) && !isInAmbientContext(declaration)) { return declaration; } @@ -9791,32 +9977,19 @@ module ts { if (!isInAmbientContext(node) && node.name.kind === SyntaxKind.StringLiteral) { grammarErrorOnNode(node.name, Diagnostics.Only_ambient_modules_can_use_quoted_names); } - else if (node.name.kind === SyntaxKind.Identifier && node.body.kind === SyntaxKind.ModuleBlock) { - var statements = (node.body).statements; - for (var i = 0, n = statements.length; i < n; i++) { - var statement = statements[i]; - - // TODO: AndersH: No reason to do a separate pass over the statements for this check, we should - // just fold it into checkExportAssignment. - if (statement.kind === SyntaxKind.ExportAssignment) { - // Export assignments are not allowed in an internal module - grammarErrorOnNode(statement, Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); - } - } - } } checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); + let symbol = getSymbolOfNode(node); // The following checks only apply on a non-ambient instantiated module declaration. if (symbol.flags & SymbolFlags.ValueModule && symbol.declarations.length > 1 && !isInAmbientContext(node) && isInstantiatedModule(node, compilerOptions.preserveConstEnums)) { - var classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); + let classOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (classOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(classOrFunc)) { error(node.name, Diagnostics.A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); @@ -9848,12 +10021,12 @@ module ts { } function checkExternalImportOrExportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration): boolean { - var moduleName = getExternalModuleName(node); + let moduleName = getExternalModuleName(node); if (getFullWidth(moduleName) !== 0 && moduleName.kind !== SyntaxKind.StringLiteral) { error(moduleName, Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; + let inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) { error(moduleName, node.kind === SyntaxKind.ExportDeclaration ? Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : @@ -9862,7 +10035,7 @@ module ts { } if (inAmbientExternalModule && isExternalModuleNameRelative((moduleName).text)) { // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference // other external modules only through top - level external module names. // Relative external module names are not permitted. error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name); @@ -9871,16 +10044,16 @@ module ts { return true; } - function checkImportSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) { - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); + function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) { + let symbol = getSymbolOfNode(node); + let target = resolveAlias(symbol); if (target !== unknownSymbol) { - var excludedMeanings = + let excludedMeanings = (symbol.flags & SymbolFlags.Value ? SymbolFlags.Value : 0) | (symbol.flags & SymbolFlags.Type ? SymbolFlags.Type : 0) | (symbol.flags & SymbolFlags.Namespace ? SymbolFlags.Namespace : 0); if (target.flags & excludedMeanings) { - var message = node.kind === SyntaxKind.ExportSpecifier ? + let message = node.kind === SyntaxKind.ExportSpecifier ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -9891,7 +10064,7 @@ module ts { function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkImportSymbol(node); + checkAliasSymbol(node); } function checkImportDeclaration(node: ImportDeclaration) { @@ -9899,7 +10072,7 @@ module ts { grammarErrorOnFirstToken(node, Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { - var importClause = node.importClause; + let importClause = node.importClause; if (importClause) { if (importClause.name) { checkImportBinding(importClause); @@ -9918,30 +10091,31 @@ module ts { function checkImportEqualsDeclaration(node: ImportEqualsDeclaration) { checkGrammarModifiers(node); - if (isInternalModuleImportEqualsDeclaration(node)) { + if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - var symbol = getSymbolOfNode(node); - var target = resolveImport(symbol); - if (target !== unknownSymbol) { - if (target.flags & SymbolFlags.Value) { - // Target is a value symbol, check that it is not hidden by a local declaration with the same name and - // ensure it can be evaluated as an expression - var moduleName = getFirstIdentifier(node.moduleReference); - if (resolveEntityName(node, moduleName, SymbolFlags.Value | SymbolFlags.Namespace).flags & SymbolFlags.Namespace) { - checkExpressionOrQualifiedName(node.moduleReference); + if (node.flags & NodeFlags.Export) { + markExportAsReferenced(node); + } + if (isInternalModuleImportEqualsDeclaration(node)) { + let target = resolveAlias(getSymbolOfNode(node)); + if (target !== unknownSymbol) { + if (target.flags & SymbolFlags.Value) { + // Target is a value symbol, check that it is not hidden by a local declaration with the same name + let moduleName = getFirstIdentifier(node.moduleReference); + if (!(resolveEntityName(moduleName, SymbolFlags.Value | SymbolFlags.Namespace).flags & SymbolFlags.Namespace)) { + error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); + } } - else { - error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); + if (target.flags & SymbolFlags.Type) { + checkTypeNameIsReserved(node.name, Diagnostics.Import_name_cannot_be_0); } } - if (target.flags & SymbolFlags.Type) { - checkTypeNameIsReserved(node.name, Diagnostics.Import_name_cannot_be_0); - } } - } - else { - if (checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); + else { + if (languageVersion >= ScriptTarget.ES6) { + // Import equals declaration is deprecated in es6 or above + grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead); + } } } } @@ -9952,23 +10126,98 @@ module ts { } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { - forEach(node.exportClause.elements, checkImportSymbol); + forEach(node.exportClause.elements, checkExportSpecifier); } } } + function checkExportSpecifier(node: ExportSpecifier) { + checkAliasSymbol(node); + if (!(node.parent.parent).moduleSpecifier) { + markExportAsReferenced(node); + } + } + function checkExportAssignment(node: ExportAssignment) { + let container = node.parent.kind === SyntaxKind.SourceFile ? node.parent : node.parent.parent; + if (container.kind === SyntaxKind.ModuleDeclaration && (container).name.kind === SyntaxKind.Identifier) { + error(node, Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + return; + } // Grammar checking if (!checkGrammarModifiers(node) && (node.flags & NodeFlags.Modifier)) { grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers); } + if (node.expression) { + if (node.expression.kind === SyntaxKind.Identifier) { + markExportAsReferenced(node); + } + else { + checkExpressionCached(node.expression); + } + } + if (node.type) { + checkSourceElement(node.type); + if (!isInAmbientContext(node)) { + grammarErrorOnFirstToken(node.type, Diagnostics.A_type_annotation_on_an_export_statement_is_only_allowed_in_an_ambient_external_module_declaration); + } + } - var container = node.parent; - if (container.kind !== SyntaxKind.SourceFile) { - // In a module, the immediate parent will be a block, so climb up one more parent - container = container.parent; + checkExternalModuleExports(container); + + if (node.isExportEquals && languageVersion >= ScriptTarget.ES6) { + // export assignment is deprecated in es6 or above + grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead); + } + } + + function getModuleStatements(node: Declaration): ModuleElement[] { + if (node.kind === SyntaxKind.SourceFile) { + return (node).statements; + } + if (node.kind === SyntaxKind.ModuleDeclaration && (node).body.kind === SyntaxKind.ModuleBlock) { + return ((node).body).statements; + } + return emptyArray; + } + + function hasExportedMembers(moduleSymbol: Symbol) { + let declarations = moduleSymbol.declarations; + for (let current of declarations) { + let statements = getModuleStatements(current); + for (let node of statements) { + if (node.kind === SyntaxKind.ExportDeclaration) { + let exportClause = (node).exportClause; + if (!exportClause) { + return true; + } + let specifiers = exportClause.elements; + for (let specifier of specifiers) { + if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) { + return true; + } + } + } + else if (node.kind !== SyntaxKind.ExportAssignment && node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) { + return true; + } + } + } + } + + function checkExternalModuleExports(node: SourceFile | ModuleDeclaration) { + let moduleSymbol = getSymbolOfNode(node); + let links = getSymbolLinks(moduleSymbol); + if (!links.exportsChecked) { + let defaultSymbol = getExportAssignmentSymbol(moduleSymbol); + if (defaultSymbol) { + if (languageVersion < ScriptTarget.ES6 && hasExportedMembers(moduleSymbol)) { + let declaration = getDeclarationOfAliasSymbol(defaultSymbol) || defaultSymbol.valueDeclaration; + error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + } + links.exportsChecked = true; } - checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); } function checkSourceElement(node: Node): void { @@ -10079,8 +10328,8 @@ module ts { // Function expression bodies are checked after all statements in the enclosing body. This is to ensure // constructs like the following are permitted: - // var foo = function () { - // var s = foo(); + // let foo = function () { + // let s = foo(); // return "hello"; // } // Here, performing a full type check of the body of the function expression whilst in the process of @@ -10149,6 +10398,7 @@ module ts { case SyntaxKind.BreakStatement: case SyntaxKind.ReturnStatement: case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseBlock: case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: case SyntaxKind.LabeledStatement: @@ -10160,6 +10410,7 @@ module ts { case SyntaxKind.ClassDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.EnumMember: + case SyntaxKind.ExportAssignment: case SyntaxKind.SourceFile: forEachChild(node, checkFunctionExpressionBodies); break; @@ -10167,14 +10418,14 @@ module ts { } function checkSourceFile(node: SourceFile) { - var start = new Date().getTime(); + let start = new Date().getTime(); checkSourceFileWorker(node); checkTime += new Date().getTime() - start; } // Fully type check a source file and collect the relevant diagnostics. function checkSourceFileWorker(node: SourceFile) { - var links = getNodeLinks(node); + let links = getNodeLinks(node); if (!(links.flags & NodeCheckFlags.TypeChecked)) { // Grammar checking checkGrammarSourceFile(node); @@ -10186,13 +10437,7 @@ module ts { checkFunctionExpressionBodies(node); if (isExternalModule(node)) { - var symbol = getExportAssignmentSymbol(node.symbol); - if (symbol && symbol.flags & SymbolFlags.Import) { - // Mark the import as referenced so that we emit it in the final .js file. - getSymbolLinks(symbol).referenced = true; - // mark any import declarations that depend upon this import as referenced - markLinkedImportsAsReferenced(getDeclarationOfKind(symbol, SyntaxKind.ImportEqualsDeclaration)) - } + checkExternalModuleExports(node); } if (potentialThisCollisions.length) { @@ -10245,11 +10490,11 @@ module ts { } function getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[] { - var symbols: SymbolTable = {}; - var memberFlags: NodeFlags = 0; + let symbols: SymbolTable = {}; + let memberFlags: NodeFlags = 0; function copySymbol(symbol: Symbol, meaning: SymbolFlags) { if (symbol.flags & meaning) { - var id = symbol.name; + let id = symbol.name; if (!isReservedMemberName(id) && !hasProperty(symbols, id)) { symbols[id] = symbol; } @@ -10257,7 +10502,7 @@ module ts { } function copySymbols(source: SymbolTable, meaning: SymbolFlags) { if (meaning) { - for (var id in source) { + for (let id in source) { if (hasProperty(source, id)) { copySymbol(source[id], meaning); } @@ -10321,7 +10566,7 @@ module ts { // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName: EntityName): boolean { - var node: Node = entityName; + let node: Node = entityName; while (node.parent && node.parent.kind === SyntaxKind.QualifiedName) node = node.parent; return node.parent && node.parent.kind === SyntaxKind.TypeReference; } @@ -10356,13 +10601,13 @@ module ts { // At this point, node is either a qualified name or an identifier Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); - var parent = node.parent; + let parent = node.parent; if (parent.kind === SyntaxKind.TypeQuery) { return false; } // Do not recursively call isTypeNode on the parent. In the example: // - // var a: A.B.C; + // let a: A.B.C; // // Calling isTypeNode would consider the qualified name A.B a type node. Only C or // A.B.C is a type node. @@ -10414,7 +10659,7 @@ module ts { } if (nodeOnRightSide.parent.kind === SyntaxKind.ExportAssignment) { - return (nodeOnRightSide.parent).exportName === nodeOnRightSide && nodeOnRightSide.parent; + return (nodeOnRightSide.parent).expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -10435,8 +10680,8 @@ module ts { } if (entityName.parent.kind === SyntaxKind.ExportAssignment) { - return resolveEntityName(/*location*/ entityName.parent.parent, entityName, - /*all meanings*/ SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Import); + return resolveEntityName(entityName, + /*all meanings*/ SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); } if (entityName.kind !== SyntaxKind.PropertyAccessExpression) { @@ -10457,20 +10702,20 @@ module ts { } if (entityName.kind === SyntaxKind.Identifier) { - // Include Import in the meaning, this ensures that we do not follow aliases to where they point and instead + // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead // return the alias symbol. - var meaning: SymbolFlags = SymbolFlags.Value | SymbolFlags.Import; - return resolveEntityName(entityName, entityName, meaning); + let meaning: SymbolFlags = SymbolFlags.Value | SymbolFlags.Alias; + return resolveEntityName(entityName, meaning); } else if (entityName.kind === SyntaxKind.PropertyAccessExpression) { - var symbol = getNodeLinks(entityName).resolvedSymbol; + let symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } else if (entityName.kind === SyntaxKind.QualifiedName) { - var symbol = getNodeLinks(entityName).resolvedSymbol; + let symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); } @@ -10478,11 +10723,11 @@ module ts { } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace; - // Include Import in the meaning, this ensures that we do not follow aliases to where they point and instead + let meaning = entityName.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace; + // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead // return the alias symbol. - meaning |= SymbolFlags.Import; - return resolveEntityName(entityName, entityName, meaning); + meaning |= SymbolFlags.Alias; + return resolveEntityName(entityName, meaning); } // Do we want to return undefined here? @@ -10514,12 +10759,12 @@ module ts { case SyntaxKind.ThisKeyword: case SyntaxKind.SuperKeyword: - var type = checkExpression(node); + let type = checkExpression(node); return type.symbol; case SyntaxKind.ConstructorKeyword: // constructor keyword for an overload, should take us to the definition if it exist - var constructorDeclaration = node.parent; + let constructorDeclaration = node.parent; if (constructorDeclaration && constructorDeclaration.kind === SyntaxKind.Constructor) { return (constructorDeclaration.parent).symbol; } @@ -10527,7 +10772,7 @@ module ts { case SyntaxKind.StringLiteral: // External module name in an import declaration - var moduleName: Expression; + let moduleName: Expression; if ((isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || ((node.parent.kind === SyntaxKind.ImportDeclaration || node.parent.kind === SyntaxKind.ExportDeclaration) && @@ -10539,9 +10784,9 @@ module ts { case SyntaxKind.NumericLiteral: // index access if (node.parent.kind == SyntaxKind.ElementAccessExpression && (node.parent).argumentExpression === node) { - var objectType = checkExpression((node.parent).expression); + let objectType = checkExpression((node.parent).expression); if (objectType === unknownType) return undefined; - var apparentType = getApparentType(objectType); + let apparentType = getApparentType(objectType); if (apparentType === unknownType) return undefined; return getPropertyOfType(apparentType, (node).text); } @@ -10555,7 +10800,7 @@ module ts { // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. if (location && location.kind === SyntaxKind.ShorthandPropertyAssignment) { - return resolveEntityName(location, (location).name, SymbolFlags.Value); + return resolveEntityName((location).name, SymbolFlags.Value); } return undefined; } @@ -10576,29 +10821,29 @@ module ts { if (isTypeDeclaration(node)) { // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); + let symbol = getSymbolOfNode(node); return getDeclaredTypeOfSymbol(symbol); } if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); + let symbol = getSymbolInfo(node); return symbol && getDeclaredTypeOfSymbol(symbol); } if (isDeclaration(node)) { // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); + let symbol = getSymbolOfNode(node); return getTypeOfSymbol(symbol); } if (isDeclarationName(node)) { - var symbol = getSymbolInfo(node); + let symbol = getSymbolInfo(node); return symbol && getTypeOfSymbol(symbol); } if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); + let symbol = getSymbolInfo(node); + let declaredType = symbol && getDeclaredTypeOfSymbol(symbol); return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); } @@ -10615,8 +10860,8 @@ module ts { // Return the list of properties of the given type, augmented with properties from Function // if the type has call or construct signatures function getAugmentedPropertiesOfType(type: Type): Symbol[] { - var type = getApparentType(type); - var propsByName = createSymbolTable(getPropertiesOfType(type)); + type = getApparentType(type); + let propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, SignatureKind.Call).length || getSignaturesOfType(type, SignatureKind.Construct).length) { forEach(getPropertiesOfType(globalFunctionType), p => { if (!hasProperty(propsByName, p.name)) { @@ -10629,15 +10874,15 @@ module ts { function getRootSymbols(symbol: Symbol): Symbol[] { if (symbol.flags & SymbolFlags.UnionProperty) { - var symbols: Symbol[] = []; - var name = symbol.name; + let symbols: Symbol[] = []; + let name = symbol.name; forEach(getSymbolLinks(symbol).unionType.types, t => { symbols.push(getPropertyOfType(t, name)); }); return symbols; } else if (symbol.flags & SymbolFlags.Transient) { - var target = getSymbolLinks(symbol).target; + let target = getSymbolLinks(symbol).target; if (target) { return [target]; } @@ -10660,10 +10905,10 @@ module ts { } function isUniqueLocalName(name: string, container: Node): boolean { - for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) { + for (let node = container; isNodeDescendentOf(node, container); node = node.nextContainer) { if (node.locals && hasProperty(node.locals, name)) { - // We conservatively include import symbols to cover cases where they're emitted as locals - if (node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Import)) { + // We conservatively include alias symbols to cover cases where they're emitted as locals + if (node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias)) { return false; } } @@ -10672,8 +10917,8 @@ module ts { } function getGeneratedNamesForSourceFile(sourceFile: SourceFile): Map { - var links = getNodeLinks(sourceFile); - var generatedNames = links.generatedNames; + let links = getNodeLinks(sourceFile); + let generatedNames = links.generatedNames; if (!generatedNames) { generatedNames = links.generatedNames = {}; generateNames(sourceFile); @@ -10682,6 +10927,10 @@ module ts { function generateNames(node: Node) { switch (node.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ClassDeclaration: + generateNameForFunctionOrClassDeclaration(node); + break; case SyntaxKind.ModuleDeclaration: generateNameForModuleOrEnum(node); generateNames((node).body); @@ -10695,6 +10944,9 @@ module ts { case SyntaxKind.ExportDeclaration: generateNameForExportDeclaration(node); break; + case SyntaxKind.ExportAssignment: + generateNameForExportAssignment(node); + break; case SyntaxKind.SourceFile: case SyntaxKind.ModuleBlock: forEach((node).statements, generateNames); @@ -10707,7 +10959,7 @@ module ts { } function makeUniqueName(baseName: string): string { - var name = generateUniqueName(baseName, isExistingName); + let name = generateUniqueName(baseName, isExistingName); return generatedNames[name] = name; } @@ -10715,17 +10967,23 @@ module ts { getNodeLinks(node).generatedName = unescapeIdentifier(name); } + function generateNameForFunctionOrClassDeclaration(node: Declaration) { + if (!node.name) { + assignGeneratedName(node, makeUniqueName("default")); + } + } + function generateNameForModuleOrEnum(node: ModuleDeclaration | EnumDeclaration) { if (node.name.kind === SyntaxKind.Identifier) { - var name = node.name.text; + let name = node.name.text; // Use module/enum name itself if it is unique, otherwise make a unique variation assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name)); } } function generateNameForImportOrExportDeclaration(node: ImportDeclaration | ExportDeclaration) { - var expr = getExternalModuleName(node); - var baseName = expr.kind === SyntaxKind.StringLiteral ? + let expr = getExternalModuleName(node); + let baseName = expr.kind === SyntaxKind.StringLiteral ? escapeIdentifier(makeIdentifierFromModuleName((expr).text)) : "module"; assignGeneratedName(node, makeUniqueName(baseName)); } @@ -10741,10 +10999,16 @@ module ts { generateNameForImportOrExportDeclaration(node); } } + + function generateNameForExportAssignment(node: ExportAssignment) { + if (node.expression && node.expression.kind !== SyntaxKind.Identifier) { + assignGeneratedName(node, makeUniqueName("default")); + } + } } - function getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration) { - var links = getNodeLinks(node); + function getGeneratedNameForNode(node: Node) { + let links = getNodeLinks(node); if (!links.generatedName) { getGeneratedNamesForSourceFile(getSourceFile(node)); } @@ -10759,21 +11023,29 @@ module ts { return getGeneratedNameForNode(node); } - function getImportNameSubstitution(symbol: Symbol): string { - var declaration = getDeclarationOfImportSymbol(symbol); + function getAliasNameSubstitution(symbol: Symbol): string { + let declaration = getDeclarationOfAliasSymbol(symbol); if (declaration && declaration.kind === SyntaxKind.ImportSpecifier) { - var moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); - var propertyName = (declaration).propertyName || (declaration).name; + let moduleName = getGeneratedNameForNode(declaration.parent.parent.parent); + let propertyName = (declaration).propertyName || (declaration).name; return moduleName + "." + unescapeIdentifier(propertyName.text); } } function getExportNameSubstitution(symbol: Symbol, location: Node): string { if (isExternalModuleSymbol(symbol.parent)) { - return "exports." + unescapeIdentifier(symbol.name); + var symbolName = unescapeIdentifier(symbol.name); + // If this is es6 or higher, just use the name of the export + // no need to qualify it. + if (languageVersion >= ScriptTarget.ES6) { + return symbolName; + } + else { + return "exports." + symbolName; + } } - var node = location; - var containerSymbol = getParentOfSymbol(symbol); + let node = location; + let containerSymbol = getParentOfSymbol(symbol); while (node) { if ((node.kind === SyntaxKind.ModuleDeclaration || node.kind === SyntaxKind.EnumDeclaration) && getSymbolOfNode(node) === containerSymbol) { return getGeneratedNameForNode(node) + "." + unescapeIdentifier(symbol.name); @@ -10783,7 +11055,7 @@ module ts { } function getExpressionNameSubstitution(node: Identifier): string { - var symbol = getNodeLinks(node).resolvedSymbol; + let symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { // Whan an identifier resolves to a parented symbol, it references an exported entity from // another declaration of the same internal module. @@ -10793,20 +11065,20 @@ module ts { // If we reference an exported entity within the same module declaration, then whether // we prefix depends on the kind of entity. SymbolFlags.ExportHasLocal encompasses all the // kinds that we do NOT prefix. - var exportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); + let exportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); if (symbol !== exportSymbol && !(exportSymbol.flags & SymbolFlags.ExportHasLocal)) { return getExportNameSubstitution(exportSymbol, node.parent); } // Named imports from ES6 import declarations are rewritten - if (symbol.flags & SymbolFlags.Import) { - return getImportNameSubstitution(symbol); + if (symbol.flags & SymbolFlags.Alias && languageVersion < ScriptTarget.ES6) { + return getAliasNameSubstitution(symbol); } } } - function getExportAssignmentName(node: SourceFile): string { - var symbol = getExportAssignmentSymbol(getSymbolOfNode(node)); - return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol): undefined; + function hasExportDefaultValue(node: SourceFile): boolean { + let symbol = getResolvedExportAssignmentSymbol(getSymbolOfNode(node)); + return symbol && symbol !== unknownSymbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol); } function isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean { @@ -10814,11 +11086,11 @@ module ts { // parent is not source file or it is not reference to internal module return false; } - return isImportResolvedToValue(getSymbolOfNode(node)); + return isAliasResolvedToValue(getSymbolOfNode(node)); } - function isImportResolvedToValue(symbol: Symbol): boolean { - var target = resolveImport(symbol); + function isAliasResolvedToValue(symbol: Symbol): boolean { + let target = resolveAlias(symbol); // const enums and modules that contain only const enums are not considered values from the emit perespective return target !== unknownSymbol && target.flags & SymbolFlags.Value && !isConstEnumOrConstEnumOnlyModule(target); } @@ -10827,25 +11099,19 @@ module ts { return isConstEnumSymbol(s) || s.constEnumOnlyModule; } - function isReferencedImportDeclaration(node: Node): boolean { - if (isImportSymbolDeclaration(node)) { - var symbol = getSymbolOfNode(node); + function isReferencedAliasDeclaration(node: Node): boolean { + if (isAliasSymbolDeclaration(node)) { + let symbol = getSymbolOfNode(node); if (getSymbolLinks(symbol).referenced) { return true; } - // logic below will answer 'true' for exported import declaration in a nested module that itself is not exported. - // As a consequence this might cause emitting extra. - if (node.kind === SyntaxKind.ImportEqualsDeclaration && node.flags & NodeFlags.Export && isImportResolvedToValue(symbol)) { - return true; - } } - return forEachChild(node, isReferencedImportDeclaration); } function isImplementationOfOverload(node: FunctionLikeDeclaration) { if (nodeIsPresent(node.body)) { - var symbol = getSymbolOfNode(node); - var signaturesOfSymbol = getSignaturesOfSymbol(symbol); + let symbol = getSymbolOfNode(node); + let signaturesOfSymbol = getSignaturesOfSymbol(symbol); // If this function body corresponds to function with multiple signature, it is implementation of overload // e.g.: function foo(a: string): string; // function foo(a: number): number; @@ -10877,7 +11143,7 @@ module ts { return getEnumMemberValue(node); } - var symbol = getNodeLinks(node).resolvedSymbol; + let symbol = getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & SymbolFlags.EnumMember)) { // inline property\index accesses only for const enums if (isConstEnumDeclaration(symbol.valueDeclaration.parent)) { @@ -10890,8 +11156,8 @@ module ts { function writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { // Get type of the symbol if this is the valid symbol otherwise get type at location - var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) + let symbol = getSymbolOfNode(declaration); + let type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) ? getTypeOfSymbol(symbol) : unknownType; @@ -10899,11 +11165,12 @@ module ts { } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { - var signature = getSignatureFromDeclaration(signatureDeclaration); + let signature = getSignatureFromDeclaration(signatureDeclaration); getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function isUnknownIdentifier(location: Node, name: string): boolean { + Debug.assert(!nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location"); return !resolveName(location, name, SymbolFlags.Value, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined) && !hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name); } @@ -10911,30 +11178,15 @@ module ts { function getBlockScopedVariableId(n: Identifier): number { Debug.assert(!nodeIsSynthesized(n)); - // ignore name parts of property access expressions - if (n.parent.kind === SyntaxKind.PropertyAccessExpression && - (n.parent).name === n) { - return undefined; - } + let isVariableDeclarationOrBindingElement = + n.parent.kind === SyntaxKind.BindingElement || (n.parent.kind === SyntaxKind.VariableDeclaration && (n.parent).name === n); - // ignore property names in object binding patterns - if (n.parent.kind === SyntaxKind.BindingElement && - (n.parent).propertyName === n) { - return undefined; - } - - // for names in variable declarations and binding elements try to short circuit and fetch symbol from the node - var declarationSymbol: Symbol = - (n.parent.kind === SyntaxKind.VariableDeclaration && (n.parent).name === n) || - n.parent.kind === SyntaxKind.BindingElement - ? getSymbolOfNode(n.parent) - : undefined; - - var symbol = declarationSymbol || + let symbol = + (isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) || getNodeLinks(n).resolvedSymbol || - resolveName(n, n.text, SymbolFlags.BlockScopedVariable | SymbolFlags.Import, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined); - - var isLetOrConst = + resolveName(n, n.text, SymbolFlags.Value | SymbolFlags.Alias, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined); + + let isLetOrConst = symbol && (symbol.flags & SymbolFlags.BlockScopedVariable) && symbol.valueDeclaration.parent.kind !== SyntaxKind.CatchClause; @@ -10952,8 +11204,8 @@ module ts { return { getGeneratedNameForNode, getExpressionNameSubstitution, - getExportAssignmentName, - isReferencedImportDeclaration, + hasExportDefaultValue, + isReferencedAliasDeclaration, getNodeCheckFlags, isTopLevelValueImportEqualsWithEntityName, isDeclarationVisible, @@ -11050,16 +11302,14 @@ module ts { return; } - var lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node; - var flags = 0; - for (var i = 0, n = node.modifiers.length; i < n; i++) { - var modifier = node.modifiers[i]; - + let lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node; + let flags = 0; + for (let modifier of node.modifiers) { switch (modifier.kind) { case SyntaxKind.PublicKeyword: case SyntaxKind.ProtectedKeyword: case SyntaxKind.PrivateKeyword: - var text: string; + let text: string; if (modifier.kind === SyntaxKind.PublicKeyword) { text = "public"; } @@ -11157,23 +11407,22 @@ module ts { function checkGrammarForDisallowedTrailingComma(list: NodeArray): boolean { if (list && list.hasTrailingComma) { - var start = list.end - ",".length; - var end = list.end; - var sourceFile = getSourceFileOfNode(list[0]); + let start = list.end - ",".length; + let end = list.end; + let sourceFile = getSourceFileOfNode(list[0]); return grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Trailing_comma_not_allowed); } } - function checkGrammarTypeParameterList(node: FunctionLikeDeclaration, typeParameters: NodeArray): boolean { + function checkGrammarTypeParameterList(node: FunctionLikeDeclaration, typeParameters: NodeArray, file: SourceFile): boolean { if (checkGrammarForDisallowedTrailingComma(typeParameters)) { return true; } if (typeParameters && typeParameters.length === 0) { - var start = typeParameters.pos - "<".length; - var sourceFile = getSourceFileOfNode(node); - var end = skipTrivia(sourceFile.text, typeParameters.end) + ">".length; - return grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Type_parameter_list_cannot_be_empty); + let start = typeParameters.pos - "<".length; + let end = skipTrivia(file.text, typeParameters.end) + ">".length; + return grammarErrorAtPos(file, start, end - start, Diagnostics.Type_parameter_list_cannot_be_empty); } } @@ -11182,11 +11431,11 @@ module ts { return true; } - var seenOptionalParameter = false; - var parameterCount = parameters.length; + let seenOptionalParameter = false; + let parameterCount = parameters.length; - for (var i = 0; i < parameterCount; i++) { - var parameter = parameters[i]; + for (let i = 0; i < parameterCount; i++) { + let parameter = parameters[i]; if (parameter.dotDotDotToken) { if (i !== (parameterCount - 1)) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); @@ -11217,11 +11466,25 @@ module ts { function checkGrammarFunctionLikeDeclaration(node: FunctionLikeDeclaration): boolean { // Prevent cascading error by short-circuit - return checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters) || checkGrammarParameterList(node.parameters); + let file = getSourceFileOfNode(node); + return checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters, file) || + checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); + } + + function checkGrammarArrowFunction(node: FunctionLikeDeclaration, file: SourceFile): boolean { + if (node.kind === SyntaxKind.ArrowFunction) { + let arrowFunction = node; + let startLine = getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; + let endLine = getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; + if (startLine !== endLine) { + return grammarErrorOnNode(arrowFunction.equalsGreaterThanToken, Diagnostics.Line_terminator_not_permitted_before_arrow); + } + } + return false; } function checkGrammarIndexSignatureParameters(node: SignatureDeclaration): boolean { - var parameter = node.parameters[0]; + let parameter = node.parameters[0]; if (node.parameters.length !== 1) { if (parameter) { return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_must_have_exactly_one_parameter); @@ -11266,9 +11529,9 @@ module ts { function checkGrammarForAtLeastOneTypeArgument(node: Node, typeArguments: NodeArray): boolean { if (typeArguments && typeArguments.length === 0) { - var sourceFile = getSourceFileOfNode(node); - var start = typeArguments.pos - "<".length; - var end = skipTrivia(sourceFile.text, typeArguments.end) + ">".length; + let sourceFile = getSourceFileOfNode(node); + let start = typeArguments.pos - "<".length; + let end = skipTrivia(sourceFile.text, typeArguments.end) + ">".length; return grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Type_argument_list_cannot_be_empty); } } @@ -11280,9 +11543,8 @@ module ts { function checkGrammarForOmittedArgument(node: CallExpression, arguments: NodeArray): boolean { if (arguments) { - var sourceFile = getSourceFileOfNode(node); - for (var i = 0, n = arguments.length; i < n; i++) { - var arg = arguments[i]; + let sourceFile = getSourceFileOfNode(node); + for (let arg of arguments) { if (arg.kind === SyntaxKind.OmittedExpression) { return grammarErrorAtPos(sourceFile, arg.pos, 0, Diagnostics.Argument_expression_expected); } @@ -11296,26 +11558,23 @@ module ts { } function checkGrammarHeritageClause(node: HeritageClause): boolean { - var types = node.types; + let types = node.types; if (checkGrammarForDisallowedTrailingComma(types)) { return true; } if (types && types.length === 0) { - var listType = tokenToString(node.token); - var sourceFile = getSourceFileOfNode(node); + let listType = tokenToString(node.token); + let sourceFile = getSourceFileOfNode(node); return grammarErrorAtPos(sourceFile, types.pos, 0, Diagnostics._0_list_cannot_be_empty, listType) } } function checkGrammarClassDeclarationHeritageClauses(node: ClassDeclaration) { - var seenExtendsClause = false; - var seenImplementsClause = false; + let seenExtendsClause = false; + let seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; - + for (let heritageClause of node.heritageClauses) { if (heritageClause.token === SyntaxKind.ExtendsKeyword) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen) @@ -11347,13 +11606,10 @@ module ts { } function checkGrammarInterfaceDeclaration(node: InterfaceDeclaration) { - var seenExtendsClause = false; + let seenExtendsClause = false; if (node.heritageClauses) { - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; - + for (let heritageClause of node.heritageClauses) { if (heritageClause.token === SyntaxKind.ExtendsKeyword) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); @@ -11380,7 +11636,7 @@ module ts { return false; } - var computedPropertyName = node; + let computedPropertyName = node; if (computedPropertyName.expression.kind === SyntaxKind.BinaryExpression && (computedPropertyName.expression).operatorToken.kind === SyntaxKind.CommaToken) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } @@ -11404,17 +11660,16 @@ module ts { } function checkGrammarObjectLiteralExpression(node: ObjectLiteralExpression) { - var seen: Map = {}; - var Property = 1; - var GetAccessor = 2; - var SetAccesor = 4; - var GetOrSetAccessor = GetAccessor | SetAccesor; - var inStrictMode = (node.parserContextFlags & ParserContextFlags.StrictMode) !== 0; + let seen: Map = {}; + let Property = 1; + let GetAccessor = 2; + let SetAccesor = 4; + let GetOrSetAccessor = GetAccessor | SetAccesor; + let inStrictMode = (node.parserContextFlags & ParserContextFlags.StrictMode) !== 0; - for (var i = 0, n = node.properties.length; i < n; i++) { - var prop = node.properties[i]; - var name = prop.name; - if (prop.kind === SyntaxKind.OmittedExpression || + for (let prop of node.properties) { + let name = prop.name; + if (prop.kind === SyntaxKind.OmittedExpression || name.kind === SyntaxKind.ComputedPropertyName) { // If the name is not a ComputedPropertyName, the grammar checking will skip it checkGrammarComputedPropertyName(name); @@ -11429,7 +11684,7 @@ module ts { // 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: number; + let currentKind: number; if (prop.kind === SyntaxKind.PropertyAssignment || prop.kind === SyntaxKind.ShorthandPropertyAssignment) { // Grammar checking for computedPropertName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop,(prop).questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); @@ -11455,7 +11710,7 @@ module ts { seen[(name).text] = currentKind; } else { - var existingKind = seen[(name).text]; + let existingKind = seen[(name).text]; if (currentKind === Property && existingKind === Property) { if (inStrictMode) { grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); @@ -11482,23 +11737,23 @@ module ts { } if (forInOrOfStatement.initializer.kind === SyntaxKind.VariableDeclarationList) { - var variableList = forInOrOfStatement.initializer; + let variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement + let diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } - var firstDeclaration = variableList.declarations[0]; + let firstDeclaration = variableList.declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement + let diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement + let diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -11510,7 +11765,7 @@ module ts { } function checkGrammarAccessor(accessor: MethodDeclaration): boolean { - var kind = accessor.kind; + let kind = accessor.kind; if (languageVersion < ScriptTarget.ES5) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -11534,7 +11789,7 @@ module ts { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } else { - var parameter = accessor.parameters[0]; + let parameter = accessor.parameters[0]; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -11613,9 +11868,9 @@ module ts { } function checkGrammarBreakOrContinueStatement(node: BreakOrContinueStatement): boolean { - var current: Node = node; + let current: Node = node; while (current) { - if (isAnyFunction(current)) { + if (isFunctionLike(current)) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } @@ -11624,7 +11879,7 @@ module ts { if (node.label && (current).label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === SyntaxKind.ContinueStatement + let isMisplacedContinueLabel = node.kind === SyntaxKind.ContinueStatement && !isIterationStatement((current).statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { @@ -11652,14 +11907,14 @@ module ts { } if (node.label) { - var message = node.kind === SyntaxKind.BreakStatement + let message = node.kind === SyntaxKind.BreakStatement ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message) } else { - var message = node.kind === SyntaxKind.BreakStatement + let message = node.kind === SyntaxKind.BreakStatement ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message) @@ -11668,7 +11923,7 @@ module ts { function checkGrammarBindingElement(node: BindingElement) { if (node.dotDotDotToken) { - var elements = (node.parent).elements; + let elements = (node.parent).elements; if (node !== elements[elements.length - 1]) { return grammarErrorOnNode(node, Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } @@ -11677,8 +11932,8 @@ module ts { return grammarErrorAtPos(getSourceFileOfNode(node), node.initializer.pos - 1, 1, Diagnostics.A_rest_element_cannot_have_an_initializer); } } - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments + // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code + // and its Identifier is eval or arguments return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } @@ -11690,7 +11945,7 @@ module ts { } if (node.initializer) { // Error on equals token which immediate precedes the initializer - var equalsTokenLength = "=".length; + let equalsTokenLength = "=".length; return grammarErrorAtPos(getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } @@ -11705,15 +11960,15 @@ module ts { } } - var checkLetConstNames = languageVersion >= ScriptTarget.ES6 && (isLet(node) || isConst(node)); + let checkLetConstNames = languageVersion >= ScriptTarget.ES6 && (isLet(node) || isConst(node)); // 1. LexicalDeclaration : LetOrConst BindingList ; // It is a Syntax Error if the BoundNames of BindingList contains "let". // 2. ForDeclaration: ForDeclaration : LetOrConst ForBinding // It is a Syntax Error if the BoundNames of ForDeclaration contains "let". - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments + // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code + // and its Identifier is eval or arguments return (checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name)) || checkGrammarEvalOrArgumentsInStrictMode(node, node.name); } @@ -11725,15 +11980,15 @@ module ts { } } else { - var elements = (name).elements; - for (var i = 0; i < elements.length; ++i) { - checkGrammarNameInLetOrConstDeclarations(elements[i].name); + let elements = (name).elements; + for (let element of elements) { + checkGrammarNameInLetOrConstDeclarations(element.name); } } } function checkGrammarVariableDeclarationList(declarationList: VariableDeclarationList): boolean { - var declarations = declarationList.declarations; + let declarations = declarationList.declarations; if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) { return true; } @@ -11773,7 +12028,7 @@ module ts { function isIntegerLiteral(expression: Expression): boolean { if (expression.kind === SyntaxKind.PrefixUnaryExpression) { - var unaryExpression = expression; + let unaryExpression = expression; if (unaryExpression.operator === SyntaxKind.PlusToken || unaryExpression.operator === SyntaxKind.MinusToken) { expression = unaryExpression.operand; } @@ -11791,17 +12046,16 @@ module ts { } function checkGrammarEnumDeclaration(enumDecl: EnumDeclaration): boolean { - var enumIsConst = (enumDecl.flags & NodeFlags.Const) !== 0; + let enumIsConst = (enumDecl.flags & NodeFlags.Const) !== 0; - var hasError = false; + let hasError = false; // skip checks below for const enums - they allow arbitrary initializers as long as they can be evaluated to constant expressions. // since all values are known in compile time - it is not necessary to check that constant enum section precedes computed enum members. if (!enumIsConst) { - var inConstantEnumMemberSection = true; - var inAmbientContext = isInAmbientContext(enumDecl); - for (var i = 0, n = enumDecl.members.length; i < n; i++) { - var node = enumDecl.members[i]; + let inConstantEnumMemberSection = true; + let inAmbientContext = isInAmbientContext(enumDecl); + for (let node of enumDecl.members) { // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. @@ -11829,19 +12083,11 @@ module ts { return sourceFile.parseDiagnostics.length > 0; } - function scanToken(scanner: Scanner, pos: number) { - scanner.setTextPos(pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return start; - } - function grammarErrorOnFirstToken(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): boolean { - var sourceFile = getSourceFileOfNode(node); + let sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceFile.text); - var start = scanToken(scanner, node.pos); - diagnostics.add(createFileDiagnostic(sourceFile, start, scanner.getTextPos() - start, message, arg0, arg1, arg2)); + let span = getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); return true; } } @@ -11854,20 +12100,18 @@ module ts { } function grammarErrorOnNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): boolean { - var sourceFile = getSourceFileOfNode(node); + let sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var span = getErrorSpanForNode(node); - var start = span.end > span.pos ? skipTrivia(sourceFile.text, span.pos) : span.pos; - diagnostics.add(createFileDiagnostic(sourceFile, start, span.end - start, message, arg0, arg1, arg2)); + diagnostics.add(createDiagnosticForNode(node, message, arg0, arg1, arg2)); return true; } } function checkGrammarEvalOrArgumentsInStrictMode(contextNode: Node, name: Node): boolean { if (name && name.kind === SyntaxKind.Identifier) { - var identifier = name; + let identifier = name; if (contextNode && (contextNode.parserContextFlags & ParserContextFlags.StrictMode) && isEvalOrArgumentsIdentifier(identifier)) { - var nameText = declarationNameToString(identifier); + let nameText = declarationNameToString(identifier); return grammarErrorOnNode(identifier, Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); } } @@ -11933,8 +12177,7 @@ module ts { } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file: SourceFile): boolean { - for (var i = 0, n = file.statements.length; i < n; i++) { - var decl = file.statements[i]; + for (let decl of file.statements) { if (isDeclaration(decl) || decl.kind === SyntaxKind.VariableStatement) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; @@ -11955,18 +12198,18 @@ module ts { } // Find containing block which is either Block, ModuleBlock, SourceFile - var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && isAnyFunction(node.parent)) { + let links = getNodeLinks(node); + if (!links.hasReportedStatementInAmbientContext && isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts) } - + // We are either parented by another statement, or some sort of block. // If we're in a block, we only want to really report an error once // to prevent noisyness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // if (node.parent.kind === SyntaxKind.Block || node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) { - var links = getNodeLinks(node.parent); + let links = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links.hasReportedStatementInAmbientContext) { return links.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -11993,11 +12236,10 @@ module ts { } function grammarErrorAfterFirstToken(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): boolean { - var sourceFile = getSourceFileOfNode(node); + let sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - var scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceFile.text); - scanToken(scanner, node.pos); - diagnostics.add(createFileDiagnostic(sourceFile, scanner.getTextPos(), 0, message, arg0, arg1, arg2)); + let span = getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add(createFileDiagnostic(sourceFile, textSpanEnd(span), /*length*/ 0, message, arg0, arg1, arg2)); return true; } } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4ba2da757e5..269f23492e2 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -140,6 +140,18 @@ module ts { description: Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveNewLines", + type: "boolean", + description: Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, + { + name: "cacheDownlevelForOfLength", + type: "boolean", + description: "Cache length access when downlevel emitting for-of statements", + experimental: true, + }, { name: "target", shortName: "t", diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 2518b95d37e..27fc152f534 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -25,8 +25,8 @@ module ts { export function forEach(array: T[], callback: (element: T, index: number) => U): U { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - var result = callback(array[i], i); + for (let i = 0, len = array.length; i < len; i++) { + let result = callback(array[i], i); if (result) { return result; } @@ -37,8 +37,8 @@ module ts { export function contains(array: T[], value: T): boolean { if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { + for (let v of array) { + if (v === value) { return true; } } @@ -48,7 +48,7 @@ module ts { export function indexOf(array: T[], value: T): number { if (array) { - for (var i = 0, len = array.length; i < len; i++) { + for (let i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } @@ -58,10 +58,10 @@ module ts { } export function countWhere(array: T[], predicate: (x: T) => boolean): number { - var count = 0; + let count = 0; if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (predicate(array[i])) { + for (let v of array) { + if (predicate(v)) { count++; } } @@ -69,11 +69,11 @@ module ts { return count; } - export function filter(array: T[], f: (x: T) => boolean): T[] { + export function filter(array: T[], f: (x: T) => boolean): T[]{ + let result: T[]; if (array) { - var result: T[] = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; + result = []; + for (let item of array) { if (f(item)) { result.push(item); } @@ -82,11 +82,12 @@ module ts { return result; } - export function map(array: T[], f: (x: T) => U): U[] { + export function map(array: T[], f: (x: T) => U): U[]{ + let result: U[]; if (array) { - var result: U[] = []; - for (var i = 0, len = array.length; i < len; i++) { - result.push(f(array[i])); + result = []; + for (let v of array) { + result.push(f(v)); } } return result; @@ -99,28 +100,30 @@ module ts { return array1.concat(array2); } - export function deduplicate(array: T[]): T[] { + export function deduplicate(array: T[]): T[]{ + let result: T[]; if (array) { - var result: T[] = []; - for (var i = 0, len = array.length; i < len; i++) { - var item = array[i]; - if (!contains(result, item)) result.push(item); + result = []; + for (let item of array) { + if (!contains(result, item)) { + result.push(item); + } } } return result; } export function sum(array: any[], prop: string): number { - var result = 0; - for (var i = 0; i < array.length; i++) { - result += array[i][prop]; + let result = 0; + for (let v of array) { + result += v[prop]; } return result; } export function addRange(to: T[], from: T[]): void { - for (var i = 0, n = from.length; i < n; i++) { - to.push(from[i]); + for (let v of from) { + to.push(v); } } @@ -136,12 +139,12 @@ module ts { } export function binarySearch(array: number[], value: number): number { - var low = 0; - var high = array.length - 1; + let low = 0; + let high = array.length - 1; while (low <= high) { - var middle = low + ((high - low) >> 1); - var midValue = array[middle]; + let middle = low + ((high - low) >> 1); + let midValue = array[middle]; if (midValue === value) { return middle; @@ -157,7 +160,7 @@ module ts { return ~low; } - var hasOwnProperty = Object.prototype.hasOwnProperty; + let hasOwnProperty = Object.prototype.hasOwnProperty; export function hasProperty(map: Map, key: string): boolean { return hasOwnProperty.call(map, key); @@ -168,7 +171,7 @@ module ts { } export function isEmpty(map: Map) { - for (var id in map) { + for (let id in map) { if (hasProperty(map, id)) { return false; } @@ -177,19 +180,19 @@ module ts { } export function clone(object: T): T { - var result: any = {}; - for (var id in object) { + let result: any = {}; + for (let id in object) { result[id] = (object)[id]; } return result; } export function extend(first: Map, second: Map): Map { - var result: Map = {}; - for (var id in first) { + let result: Map = {}; + for (let id in first) { result[id] = first[id]; } - for (var id in second) { + for (let id in second) { if (!hasProperty(result, id)) { result[id] = second[id]; } @@ -198,16 +201,16 @@ module ts { } export function forEachValue(map: Map, callback: (value: T) => U): U { - var result: U; - for (var id in map) { + let result: U; + for (let id in map) { if (result = callback(map[id])) break; } return result; } export function forEachKey(map: Map, callback: (key: string) => U): U { - var result: U; - for (var id in map) { + let result: U; + for (let id in map) { if (result = callback(id)) break; } return result; @@ -218,9 +221,9 @@ module ts { } export function mapToArray(map: Map): T[] { - var result: T[] = []; + let result: T[] = []; - for (var id in map) { + for (let id in map) { result.push(map[id]); } @@ -228,7 +231,7 @@ module ts { } export function copyMap(source: Map, target: Map): void { - for (var p in source) { + for (let p in source) { target[p] = source[p]; } } @@ -244,7 +247,7 @@ module ts { * index in the array will be the one associated with the produced key. */ export function arrayToMap(array: T[], makeKey: (value: T) => string): Map { - var result: Map = {}; + let result: Map = {}; forEach(array, value => { result[makeKey(value)] = value; @@ -259,7 +262,7 @@ module ts { return text.replace(/{(\d+)}/g, (match, index?) => args[+index + baseIndex]); } - export var localizedDiagnosticMessages: Map = undefined; + export let localizedDiagnosticMessages: Map = undefined; export function getLocaleSpecificMessage(message: string) { return localizedDiagnosticMessages && localizedDiagnosticMessages[message] @@ -269,10 +272,14 @@ module ts { export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: any[]): Diagnostic; export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): Diagnostic { + let end = start + length; + Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); + Debug.assert(start <= file.text.length, `start must be within the bounds of the file. ${ start } > ${ file.text.length }`); + Debug.assert(end <= file.text.length, `end must be the bounds of the file. ${ end } > ${ file.text.length }`); - var text = getLocaleSpecificMessage(message.key); + let text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -291,7 +298,7 @@ module ts { export function createCompilerDiagnostic(message: DiagnosticMessage, ...args: any[]): Diagnostic; export function createCompilerDiagnostic(message: DiagnosticMessage): Diagnostic { - var text = getLocaleSpecificMessage(message.key); + let text = getLocaleSpecificMessage(message.key); if (arguments.length > 1) { text = formatStringFromArgs(text, arguments, 1); @@ -310,7 +317,7 @@ module ts { export function chainDiagnosticMessages(details: DiagnosticMessageChain, message: DiagnosticMessage, ...args: any[]): DiagnosticMessageChain; export function chainDiagnosticMessages(details: DiagnosticMessageChain, message: DiagnosticMessage): DiagnosticMessageChain { - var text = getLocaleSpecificMessage(message.key); + let text = getLocaleSpecificMessage(message.key); if (arguments.length > 2) { text = formatStringFromArgs(text, arguments, 2); @@ -354,10 +361,10 @@ module ts { function compareMessageText(text1: string | DiagnosticMessageChain, text2: string | DiagnosticMessageChain): Comparison { while (text1 && text2) { // We still have both chains. - var string1 = typeof text1 === "string" ? text1 : text1.messageText; - var string2 = typeof text2 === "string" ? text2 : text2.messageText; + let string1 = typeof text1 === "string" ? text1 : text1.messageText; + let string2 = typeof text2 === "string" ? text2 : text2.messageText; - var res = compareValues(string1, string2); + let res = compareValues(string1, string2); if (res) { return res; } @@ -384,11 +391,11 @@ module ts { return diagnostics; } - var newDiagnostics = [diagnostics[0]]; - var previousDiagnostic = diagnostics[0]; - for (var i = 1; i < diagnostics.length; i++) { - var currentDiagnostic = diagnostics[i]; - var isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === Comparison.EqualTo; + let newDiagnostics = [diagnostics[0]]; + let previousDiagnostic = diagnostics[0]; + for (let i = 1; i < diagnostics.length; i++) { + let currentDiagnostic = diagnostics[i]; + let isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === Comparison.EqualTo; if (!isDupe) { newDiagnostics.push(currentDiagnostic); previousDiagnostic = currentDiagnostic; @@ -406,9 +413,9 @@ module ts { export function getRootLength(path: string): number { if (path.charCodeAt(0) === CharacterCodes.slash) { if (path.charCodeAt(1) !== CharacterCodes.slash) return 1; - var p1 = path.indexOf("/", 2); + let p1 = path.indexOf("/", 2); if (p1 < 0) return 2; - var p2 = path.indexOf("/", p1 + 1); + let p2 = path.indexOf("/", p1 + 1); if (p2 < 0) return p1 + 1; return p2 + 1; } @@ -419,18 +426,21 @@ module ts { return 0; } - export var directorySeparator = "/"; + export let directorySeparator = "/"; function getNormalizedParts(normalizedSlashedPath: string, rootLength: number) { - var parts = normalizedSlashedPath.substr(rootLength).split(directorySeparator); - var normalized: string[] = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; + let parts = normalizedSlashedPath.substr(rootLength).split(directorySeparator); + let normalized: string[] = []; + for (let part of parts) { if (part !== ".") { if (part === ".." && normalized.length > 0 && normalized[normalized.length - 1] !== "..") { normalized.pop(); } else { - normalized.push(part); + // A part may be an empty string (which is 'falsy') if the path had consecutive slashes, + // e.g. "path//file.ts". Drop these before re-joining the parts. + if(part) { + normalized.push(part); + } } } } @@ -439,9 +449,9 @@ module ts { } export function normalizePath(path: string): string { - var path = normalizeSlashes(path); - var rootLength = getRootLength(path); - var normalized = getNormalizedParts(path, rootLength); + path = normalizeSlashes(path); + let rootLength = getRootLength(path); + let normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(directorySeparator); } @@ -458,13 +468,13 @@ module ts { } function normalizedPathComponents(path: string, rootLength: number) { - var normalizedParts = getNormalizedParts(path, rootLength); + let normalizedParts = getNormalizedParts(path, rootLength); return [path.substr(0, rootLength)].concat(normalizedParts); } export function getNormalizedPathComponents(path: string, currentDirectory: string) { - var path = normalizeSlashes(path); - var rootLength = getRootLength(path); + path = normalizeSlashes(path); + let rootLength = getRootLength(path); if (rootLength == 0) { // If the path is not rooted it is relative to current directory path = combinePaths(normalizeSlashes(currentDirectory), path); @@ -489,9 +499,9 @@ module ts { // In this example the root is: http://www.website.com/ // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] - var urlLength = url.length; + let urlLength = url.length; // Initial root length is http:// part - var rootLength = url.indexOf("://") + "://".length; + let rootLength = url.indexOf("://") + "://".length; while (rootLength < urlLength) { // Consume all immediate slashes in the protocol // eg.initial rootlength is just file:// but it needs to consume another "/" in file:/// @@ -510,7 +520,7 @@ module ts { } // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://) - var indexOfNextSlash = url.indexOf(directorySeparator, rootLength); + let indexOfNextSlash = url.indexOf(directorySeparator, rootLength); if (indexOfNextSlash !== -1) { // Found the "/" after the website.com so the root is length of http://www.website.com/ // and get components afetr the root normally like any other folder components @@ -536,8 +546,8 @@ module ts { } export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: (fileName: string) => string, isAbsolutePathAnUrl: boolean) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); + let pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); + let directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] @@ -553,8 +563,8 @@ module ts { // Get the relative path if (joinStartIndex) { - var relativePath = ""; - var relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length); + let relativePath = ""; + let relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length); for (; joinStartIndex < directoryComponents.length; joinStartIndex++) { if (directoryComponents[joinStartIndex] !== "") { relativePath = relativePath + ".." + directorySeparator; @@ -565,7 +575,7 @@ module ts { } // Cant find the relative path, get the absolute path - var absolutePath = getNormalizedPathFromPathComponents(pathComponents); + let absolutePath = getNormalizedPathFromPathComponents(pathComponents); if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) { absolutePath = "file:///" + absolutePath; } @@ -574,7 +584,7 @@ module ts { } export function getBaseFileName(path: string) { - var i = path.lastIndexOf(directorySeparator); + let i = path.lastIndexOf(directorySeparator); return i < 0 ? path : path.substring(i + 1); } @@ -587,16 +597,15 @@ module ts { } export function fileExtensionIs(path: string, extension: string): boolean { - var pathLen = path.length; - var extLen = extension.length; + let pathLen = path.length; + let extLen = extension.length; return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; } - var supportedExtensions = [".d.ts", ".ts", ".js"]; + let supportedExtensions = [".d.ts", ".ts", ".js"]; export function removeFileExtension(path: string): string { - for (var i = 0; i < supportedExtensions.length; i++) { - var ext = supportedExtensions[i]; + for (let ext of supportedExtensions) { if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); @@ -606,9 +615,9 @@ module ts { return path; } - var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap: Map = { + let backslashOrDoubleQuote = /[\"\\]/g; + let escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + let escapedCharsMap: Map = { "\0": "\\0", "\t": "\\t", "\v": "\\v", @@ -647,7 +656,7 @@ module ts { function Signature(checker: TypeChecker) { } - export var objectAllocator: ObjectAllocator = { + export let objectAllocator: ObjectAllocator = { getNodeConstructor: kind => { function Node() { } @@ -673,7 +682,7 @@ module ts { } export module Debug { - var currentAssertionLevel = AssertionLevel.None; + let currentAssertionLevel = AssertionLevel.None; export function shouldAssert(level: AssertionLevel): boolean { return currentAssertionLevel >= level; @@ -681,7 +690,7 @@ module ts { export function assert(expression: boolean, message?: string, verboseDebugInfo?: () => string): void { if (!expression) { - var verboseDebugString = ""; + let verboseDebugString = ""; if (verboseDebugInfo) { verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo(); } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 477fd5d46af..dd26ef281c4 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -157,6 +157,11 @@ module ts { Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, Unterminated_Unicode_escape_sequence: { code: 1199, category: DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." }, + Line_terminator_not_permitted_before_arrow: { code: 1200, category: DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." }, + A_type_annotation_on_an_export_statement_is_only_allowed_in_an_ambient_external_module_declaration: { code: 1201, category: DiagnosticCategory.Error, key: "A type annotation on an export statement is only allowed in an ambient external module declaration." }, + Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." }, + Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." }, + Cannot_compile_external_modules_into_amd_or_commonjs_when_targeting_es6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile external modules into amd or commonjs when targeting es6 or higher." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, @@ -327,7 +332,6 @@ module ts { Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: DiagnosticCategory.Error, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: DiagnosticCategory.Error, key: "Export declaration conflicts with exported declaration of '{0}'" }, The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, @@ -337,6 +341,10 @@ module ts { The_iterator_returned_by_the_right_hand_side_of_a_for_of_statement_must_have_a_next_method: { code: 2489, category: DiagnosticCategory.Error, key: "The iterator returned by the right-hand side of a 'for...of' statement must have a 'next()' method." }, The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: DiagnosticCategory.Error, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, + Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" }, + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, + Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -462,6 +470,7 @@ module ts { File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index da153903b8c..e1767fe8de0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -617,8 +617,29 @@ }, "Unterminated Unicode escape sequence.": { "category": "Error", - "code": 1199 + "code": 1199 }, + "Line terminator not permitted before arrow.": { + "category": "Error", + "code": 1200 + }, + "A type annotation on an export statement is only allowed in an ambient external module declaration.": { + "category": "Error", + "code": 1201 + }, + "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead.": { + "category": "Error", + "code": 1202 + }, + "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead.": { + "category": "Error", + "code": 1203 + }, + "Cannot compile external modules into amd or commonjs when targeting es6 or higher.": { + "category": "Error", + "code": 1204 + }, + "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 @@ -1299,10 +1320,6 @@ "category": "Error", "code": 2481 }, - "'for...of' statements are only available when targeting ECMAScript 6 or higher.": { - "category": "Error", - "code": 2482 - }, "The left-hand side of a 'for...of' statement cannot use a type annotation.": { "category": "Error", "code": 2483 @@ -1339,6 +1356,22 @@ "category": "Error", "code": 2491 }, + "Cannot redeclare identifier '{0}' in catch clause": { + "category": "Error", + "code": 2492 + }, + "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'.": { + "category": "Error", + "code": 2493 + }, + "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.": { + "category": "Error", + "code": 2494 + }, + "Type '{0}' is not an array type or a string type.": { + "category": "Error", + "code": 2461 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -1840,6 +1873,10 @@ "category": "Message", "code": 6056 }, + "Preserve new-lines when emitting code.": { + "category": "Message", + "code": 6057 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 347ce57034e..9e06ed1101f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -54,7 +54,7 @@ module ts { referencePathsOutput: string; } - var indentStrings: string[] = ["", " "]; + let indentStrings: string[] = ["", " "]; export function getIndentString(level: number) { if (indentStrings[level] === undefined) { indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; @@ -81,11 +81,11 @@ module ts { } function createTextWriter(newLine: String): EmitTextWriter { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; + let output = ""; + let indent = 0; + let lineStart = true; + let lineCount = 0; + let linePos = 0; function write(s: string) { if (s && s.length) { @@ -109,7 +109,7 @@ module ts { function writeLiteral(s: string) { if (s && s.length) { write(s); - var lineStartsOfS = computeLineStarts(s); + let lineStartsOfS = computeLineStarts(s); if (lineStartsOfS.length > 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; @@ -160,7 +160,7 @@ module ts { function emitComments(currentSourceFile: SourceFile, writer: EmitTextWriter, comments: CommentRange[], trailingSeparator: boolean, newLine: string, writeComment: (currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string) => void) { - var emitLeadingSpace = !trailingSeparator; + let emitLeadingSpace = !trailingSeparator; forEach(comments, comment => { if (emitLeadingSpace) { writer.write(" "); @@ -182,11 +182,11 @@ module ts { function writeCommentRange(currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string){ if (currentSourceFile.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk) { - var firstCommentLineAndCharacter = getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = getLineStarts(currentSourceFile).length; - var firstCommentLineIndent: number; - for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { - var nextLineStart = (currentLine + 1) === lineCount + let firstCommentLineAndCharacter = getLineAndCharacterOfPosition(currentSourceFile, comment.pos); + let lineCount = getLineStarts(currentSourceFile).length; + let firstCommentLineIndent: number; + for (let pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { + let nextLineStart = (currentLine + 1) === lineCount ? currentSourceFile.text.length + 1 : getStartPositionOfLine(currentLine + 1, currentSourceFile); @@ -197,7 +197,7 @@ module ts { } // These are number of spaces writer is going to write at current indent - var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); + let currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); // Number of spaces we want to be writing // eg: Assume writer indent @@ -213,10 +213,10 @@ module ts { // More right indented comment */ --4 = 8 - 4 + 11 // class c { } // } - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); + let spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); if (spacesToEmit > 0) { - var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); - var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); + let numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); + let indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); // Write indent size string ( in eg 1: = "", 2: "" , 3: string with 8 spaces 4: string with 12 spaces writer.rawWrite(indentSizeSpaceString); @@ -245,8 +245,8 @@ module ts { } function writeTrimmedCurrentLine(pos: number, nextLineStart: number) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ''); + let end = Math.min(comment.end, nextLineStart - 1); + let currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ''); if (currentLineText) { // trimmed forward and ending spaces text writer.write(currentLineText); @@ -261,7 +261,7 @@ module ts { } function calculateIndent(pos: number, end: number) { - var currentLineIndent = 0; + let currentLineIndent = 0; for (; pos < end && isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { if (currentSourceFile.text.charCodeAt(pos) === CharacterCodes.tab) { // Tabs = TabSize = indent size and go to next tabStop @@ -286,9 +286,9 @@ module ts { } function getAllAccessorDeclarations(declarations: NodeArray, accessor: AccessorDeclaration) { - var firstAccessor: AccessorDeclaration; - var getAccessor: AccessorDeclaration; - var setAccessor: AccessorDeclaration; + let firstAccessor: AccessorDeclaration; + let getAccessor: AccessorDeclaration; + let setAccessor: AccessorDeclaration; if (hasDynamicName(accessor)) { firstAccessor = accessor; if (accessor.kind === SyntaxKind.GetAccessor) { @@ -305,8 +305,8 @@ module ts { forEach(declarations, (member: Declaration) => { if ((member.kind === SyntaxKind.GetAccessor || member.kind === SyntaxKind.SetAccessor) && (member.flags & NodeFlags.Static) === (accessor.flags & NodeFlags.Static)) { - var memberName = getPropertyNameForPropertyNameNode(member.name); - var accessorName = getPropertyNameForPropertyNameNode(accessor.name); + let memberName = getPropertyNameForPropertyNameNode(member.name); + let accessorName = getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { if (!firstAccessor) { firstAccessor = member; @@ -331,18 +331,19 @@ module ts { } function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string) { - var sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); + let sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); return combinePaths(newDirPath, sourceFilePath); } function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string){ - var compilerOptions = host.getCompilerOptions(); + let compilerOptions = host.getCompilerOptions(); + let emitOutputFilePathWithoutExtension: string; if (compilerOptions.outDir) { - var emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); + emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); } else { - var emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName); + emitOutputFilePathWithoutExtension = removeFileExtension(sourceFile.fileName); } return emitOutputFilePathWithoutExtension + extension; @@ -355,37 +356,37 @@ module ts { } function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], jsFilePath: string, root?: SourceFile): DeclarationEmit { - var newLine = host.getNewLine(); - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || ScriptTarget.ES3; + let newLine = host.getNewLine(); + let compilerOptions = host.getCompilerOptions(); + let languageVersion = compilerOptions.target || ScriptTarget.ES3; - var write: (s: string) => void; - var writeLine: () => void; - var increaseIndent: () => void; - var decreaseIndent: () => void; - var writeTextOfNode: (sourceFile: SourceFile, node: Node) => void; + let write: (s: string) => void; + let writeLine: () => void; + let increaseIndent: () => void; + let decreaseIndent: () => void; + let writeTextOfNode: (sourceFile: SourceFile, node: Node) => void; - var writer = createAndSetNewTextWriterWithSymbolWriter(); + let writer = createAndSetNewTextWriterWithSymbolWriter(); - var enclosingDeclaration: Node; - var currentSourceFile: SourceFile; - var reportedDeclarationError = false; - var emitJsDocComments = compilerOptions.removeComments ? function (declaration: Node) { } : writeJsDocComments; - var emit = compilerOptions.stripInternal ? stripInternal : emitNode; + let enclosingDeclaration: Node; + let currentSourceFile: SourceFile; + let reportedDeclarationError = false; + let emitJsDocComments = compilerOptions.removeComments ? function (declaration: Node) { } : writeJsDocComments; + let emit = compilerOptions.stripInternal ? stripInternal : emitNode; - var aliasDeclarationEmitInfo: AliasDeclarationEmitInfo[] = []; + let aliasDeclarationEmitInfo: AliasDeclarationEmitInfo[] = []; // Contains the reference paths that needs to go in the declaration file. // Collecting this separately because reference paths need to be first thing in the declaration file // and we could be collecting these paths from multiple files into single one with --out option - var referencePathsOutput = ""; + let referencePathsOutput = ""; if (root) { // Emitting just a single file, so emit references in this file only if (!compilerOptions.noResolve) { - var addedGlobalFileReference = false; + let addedGlobalFileReference = false; forEach(root.referencedFiles, fileReference => { - var referencedFile = tryResolveScriptReference(host, root, fileReference); + let 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 @@ -404,13 +405,13 @@ module ts { } else { // Emit references corresponding to this file - var emittedReferencedFiles: SourceFile[] = []; + let emittedReferencedFiles: SourceFile[] = []; forEach(host.getSourceFiles(), sourceFile => { if (!isExternalModuleOrDeclarationFile(sourceFile)) { // Check what references need to be added if (!compilerOptions.noResolve) { forEach(sourceFile.referencedFiles, fileReference => { - var referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); + let referencedFile = tryResolveScriptReference(host, sourceFile, fileReference); // If the reference file is a declaration file or an external module, emit that reference if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) && @@ -435,14 +436,14 @@ module ts { } function hasInternalAnnotation(range: CommentRange) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); + let text = currentSourceFile.text; + let comment = text.substring(range.pos, range.end); return comment.indexOf("@internal") >= 0; } function stripInternal(node: Node) { if (node) { - var leadingCommentRanges = getLeadingCommentRanges(currentSourceFile.text, node.pos); + let leadingCommentRanges = getLeadingCommentRanges(currentSourceFile.text, node.pos); if (forEach(leadingCommentRanges, hasInternalAnnotation)) { return; } @@ -452,7 +453,7 @@ module ts { } function createAndSetNewTextWriterWithSymbolWriter(): EmitTextWriterWithSymbolWriter { - var writer = createTextWriter(newLine); + let writer = createTextWriter(newLine); writer.trackSymbol = trackSymbol; writer.writeKeyword = writer.write; writer.writeOperator = writer.write; @@ -475,9 +476,9 @@ module ts { } function writeAsychronousImportEqualsDeclarations(importEqualsDeclarations: ImportEqualsDeclaration[]) { - var oldWriter = writer; + let oldWriter = writer; forEach(importEqualsDeclarations, aliasToWrite => { - var aliasEmitInfo = forEach(aliasDeclarationEmitInfo, declEmitInfo => declEmitInfo.declaration === aliasToWrite ? declEmitInfo : undefined); + let aliasEmitInfo = forEach(aliasDeclarationEmitInfo, declEmitInfo => declEmitInfo.declaration === aliasToWrite ? declEmitInfo : undefined); // If the alias was marked as not visible when we saw its declaration, we would have saved the aliasEmitInfo, but if we haven't yet visited the alias declaration // then we don't need to write it at this point. We will write it when we actually see its declaration // Eg. @@ -487,7 +488,7 @@ module ts { // we would write alias foo declaration when we visit it since it would now be marked as visible if (aliasEmitInfo) { createAndSetNewTextWriterWithSymbolWriter(); - for (var declarationIndent = aliasEmitInfo.indent; declarationIndent; declarationIndent--) { + for (let declarationIndent = aliasEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } writeImportEqualsDeclaration(aliasToWrite); @@ -507,7 +508,7 @@ module ts { else { // Report error reportedDeclarationError = true; - var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); + let errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); if (errorInfo) { if (errorInfo.typeName) { diagnostics.push(createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, @@ -555,19 +556,19 @@ module ts { } function emitLines(nodes: Node[]) { - for (var i = 0, n = nodes.length; i < n; i++) { - emit(nodes[i]); + for (let node of nodes) { + emit(node); } } function emitSeparatedList(nodes: Node[], separator: string, eachNodeEmitFn: (node: Node) => void) { - var currentWriterPos = writer.getTextPos(); - for (var i = 0, n = nodes.length; i < n; i++) { + let currentWriterPos = writer.getTextPos(); + for (let node of nodes) { if (currentWriterPos !== writer.getTextPos()) { write(separator); } currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(nodes[i]); + eachNodeEmitFn(node); } } @@ -577,7 +578,7 @@ module ts { function writeJsDocComments(declaration: Node) { if (declaration) { - var jsDocComments = getJsDocComments(declaration, currentSourceFile); + let jsDocComments = getJsDocComments(declaration, currentSourceFile); emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); // jsDoc comments are emitted at /*leading comment1 */space/*leading comment*/space emitComments(currentSourceFile, writer, jsDocComments, /*trailingSeparator*/ true, newLine, writeCommentRange); @@ -625,7 +626,7 @@ module ts { } function emitEntityName(entityName: EntityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, + let visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration ? entityName.parent : enclosingDeclaration); @@ -637,7 +638,7 @@ module ts { writeTextOfNode(currentSourceFile, entityName); } else { - var qualifiedName = entityName; + let qualifiedName = entityName; writeEntityName(qualifiedName.left); write("."); writeTextOfNode(currentSourceFile, qualifiedName.right); @@ -700,8 +701,8 @@ module ts { } function emitExportAssignment(node: ExportAssignment) { - write("export = "); - writeTextOfNode(currentSourceFile, node.exportName); + write(node.isExportEquals ? "export = " : "export default "); + writeTextOfNode(currentSourceFile, node.expression); write(";"); writeLine(); } @@ -734,7 +735,7 @@ module ts { } function emitImportEqualsDeclaration(node: ImportEqualsDeclaration) { - var nodeEmitInfo = { + let nodeEmitInfo = { declaration: node, outputPos: writer.getTextPos(), indent: writer.getIndent(), @@ -787,7 +788,7 @@ module ts { write("."); writeTextOfNode(currentSourceFile, node.name); } - var prevEnclosingDeclaration = enclosingDeclaration; + let prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; write(" {"); writeLine(); @@ -842,7 +843,7 @@ module ts { function emitEnumMemberDeclaration(node: EnumMember) { emitJsDocComments(node); writeTextOfNode(currentSourceFile, node.name); - var enumMemberValue = resolver.getConstantValue(node); + let enumMemberValue = resolver.getConstantValue(node); if (enumMemberValue !== undefined) { write(" = "); write(enumMemberValue.toString()); @@ -882,7 +883,7 @@ module ts { function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { // Type parameter constraints are named by user so we should always be able to name it - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; switch (node.parent.kind) { case SyntaxKind.ClassDeclaration: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; @@ -946,7 +947,7 @@ module ts { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); function getHeritageClauseVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; // Heritage clause is written by user so it can always be named if (node.parent.parent.kind === SyntaxKind.ClassDeclaration) { // Class or Interface implemented/extended is inaccessible @@ -984,10 +985,10 @@ module ts { emitModuleElementDeclarationFlags(node); write("class "); writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; + let prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); - var baseTypeNode = getClassBaseTypeNode(node); + let baseTypeNode = getClassBaseTypeNode(node); if (baseTypeNode) { emitHeritageClause([baseTypeNode], /*isImplementsList*/ false); } @@ -1010,7 +1011,7 @@ module ts { emitModuleElementDeclarationFlags(node); write("interface "); writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; + let prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; emitTypeParameters(node.typeParameters); emitHeritageClause(getInterfaceBaseTypeNodes(node), /*isImplementsList*/ false); @@ -1058,7 +1059,7 @@ module ts { } function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; if (node.kind === SyntaxKind.VariableDeclaration) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? @@ -1110,7 +1111,7 @@ module ts { } function emitVariableStatement(node: VariableStatement) { - var hasDeclarationWithEmit = forEach(node.declarationList.declarations, varDeclaration => resolver.isDeclarationVisible(varDeclaration)); + let hasDeclarationWithEmit = forEach(node.declarationList.declarations, varDeclaration => resolver.isDeclarationVisible(varDeclaration)); if (hasDeclarationWithEmit) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); @@ -1134,18 +1135,20 @@ module ts { return; } - var accessors = getAllAccessorDeclarations((node.parent).members, node); + let accessors = getAllAccessorDeclarations((node.parent).members, node); + let accessorWithTypeAnnotation: AccessorDeclaration; + if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); emitClassMemberDeclarationFlags(node); writeTextOfNode(currentSourceFile, node.name); if (!(node.flags & NodeFlags.Private)) { - var accessorWithTypeAnnotation: AccessorDeclaration = node; - var type = getTypeAnnotationFromAccessor(node); + accessorWithTypeAnnotation = node; + let type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === SyntaxKind.GetAccessor ? accessors.setAccessor : accessors.getAccessor; + let anotherAccessor = node.kind === SyntaxKind.GetAccessor ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -1168,7 +1171,7 @@ module ts { } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; if (accessorWithTypeAnnotation.kind === SyntaxKind.SetAccessor) { // Setters have to have type named and cannot infer it so, the type should always be named if (accessorWithTypeAnnotation.parent.flags & NodeFlags.Static) { @@ -1263,7 +1266,7 @@ module ts { write("("); } - var prevEnclosingDeclaration = enclosingDeclaration; + let prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; // Parameters @@ -1277,7 +1280,7 @@ module ts { } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === SyntaxKind.FunctionType || node.kind === SyntaxKind.ConstructorType; + let isFunctionTypeOrConstructorType = node.kind === SyntaxKind.FunctionType || node.kind === SyntaxKind.ConstructorType; if (isFunctionTypeOrConstructorType || node.parent.kind === SyntaxKind.TypeLiteral) { // Emit type literal signature return type only if specified if (node.type) { @@ -1297,7 +1300,7 @@ module ts { } function getReturnTypeVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; switch (node.kind) { case SyntaxKind.ConstructSignature: // Interfaces cannot have return types that cannot be named @@ -1390,7 +1393,7 @@ module ts { } function getParameterDeclarationTypeVisibilityError(symbolAccesibilityResult: SymbolAccessiblityResult): SymbolAccessibilityDiagnostic { - var diagnosticMessage: DiagnosticMessage; + let diagnosticMessage: DiagnosticMessage; switch (node.parent.kind) { case SyntaxKind.Constructor: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? @@ -1499,7 +1502,7 @@ module ts { } function writeReferencePath(referencedFile: SourceFile) { - var declFileName = referencedFile.flags & NodeFlags.DeclarationFile + 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 @@ -1517,8 +1520,8 @@ module ts { } export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { - var diagnostics: Diagnostic[] = []; - var jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); + let diagnostics: Diagnostic[] = []; + let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile); return diagnostics; } @@ -1526,16 +1529,16 @@ module ts { // @internal // targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult { - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || ScriptTarget.ES3; - var sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap ? [] : undefined; - var diagnostics: Diagnostic[] = []; - var newLine = host.getNewLine(); + let compilerOptions = host.getCompilerOptions(); + let languageVersion = compilerOptions.target || ScriptTarget.ES3; + let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap ? [] : undefined; + let diagnostics: Diagnostic[] = []; + let newLine = host.getNewLine(); if (targetSourceFile === undefined) { forEach(host.getSourceFiles(), sourceFile => { if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, ".js"); + let jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, ".js"); emitFile(jsFilePath, sourceFile); } }); @@ -1547,7 +1550,7 @@ module ts { else { // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - var jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); + let jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); emitFile(jsFilePath, targetSourceFile); } else if (!isDeclarationFile(targetSourceFile) && compilerOptions.out) { @@ -1565,55 +1568,57 @@ module ts { }; function emitJavaScript(jsFilePath: string, root?: SourceFile) { - var writer = createTextWriter(newLine); - var write = writer.write; - var writeTextOfNode = writer.writeTextOfNode; - var writeLine = writer.writeLine; - var increaseIndent = writer.increaseIndent; - var decreaseIndent = writer.decreaseIndent; + let writer = createTextWriter(newLine); + let write = writer.write; + let writeTextOfNode = writer.writeTextOfNode; + let writeLine = writer.writeLine; + let increaseIndent = writer.increaseIndent; + let decreaseIndent = writer.decreaseIndent; + let preserveNewLines = compilerOptions.preserveNewLines || false; - var currentSourceFile: SourceFile; + let currentSourceFile: SourceFile; - var lastFrame: ScopeFrame; - var currentScopeNames: Map; + let lastFrame: ScopeFrame; + let currentScopeNames: Map; - var generatedBlockScopeNames: string[]; + let generatedBlockScopeNames: string[]; - var extendsEmitted = false; - var tempCount = 0; - var tempVariables: Identifier[]; - var tempParameters: Identifier[]; - var externalImports: ExternalImportInfo[]; - var exportSpecifiers: Map; + let extendsEmitted = false; + let tempCount = 0; + let tempVariables: Identifier[]; + let tempParameters: Identifier[]; + let externalImports: ExternalImportInfo[]; + let exportSpecifiers: Map; + let exportDefault: FunctionDeclaration | ClassDeclaration | ExportAssignment | ExportSpecifier; /** write emitted output to disk*/ - var writeEmittedFiles = writeJavaScriptFile; + let writeEmittedFiles = writeJavaScriptFile; /** Emit leading comments of the node */ - var emitLeadingComments = compilerOptions.removeComments ? (node: Node) => { } : emitLeadingDeclarationComments; + let emitLeadingComments = compilerOptions.removeComments ? (node: Node) => { } : emitLeadingDeclarationComments; /** Emit Trailing comments of the node */ - var emitTrailingComments = compilerOptions.removeComments ? (node: Node) => { } : emitTrailingDeclarationComments; + let emitTrailingComments = compilerOptions.removeComments ? (node: Node) => { } : emitTrailingDeclarationComments; - var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? (pos: number) => { } : emitLeadingCommentsOfLocalPosition; + let emitLeadingCommentsOfPosition = compilerOptions.removeComments ? (pos: number) => { } : emitLeadingCommentsOfLocalPosition; + + let detachedCommentsInfo: { nodePos: number; detachedCommentEndPos: number }[]; - var detachedCommentsInfo: { nodePos: number; detachedCommentEndPos: number }[]; /** Emit detached comments of the node */ - var emitDetachedComments = compilerOptions.removeComments ? (node: TextRange) => { } : emitDetachedCommentsAtPosition; + let emitDetachedComments = compilerOptions.removeComments ? (node: TextRange) => { } : emitDetachedCommentsAtPosition; - /** Emits /// or pinned which is comment starting with /*! comments */ - var emitPinnedOrTripleSlashComments = compilerOptions.removeComments ? (node: Node) => { } : emitPinnedOrTripleSlashCommentsOfNode; - - var writeComment = writeCommentRange; + let writeComment = writeCommentRange; /** Emit a node */ - var emit = emitNode; + let emitNodeWithoutSourceMap = compilerOptions.removeComments ? emitNodeWithoutSourceMapWithoutComments : emitNodeWithoutSourceMapWithComments; + let emit = emitNodeWithoutSourceMap; + let emitWithoutComments = emitNodeWithoutSourceMapWithoutComments; /** Called just before starting emit of a node */ - var emitStart = function (node: Node) { }; + let emitStart = function (node: Node) { }; /** Called once the emit of the node is done */ - var emitEnd = function (node: Node) { }; + 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 @@ -1621,30 +1626,31 @@ module ts { * @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 */ - var emitToken = emitTokenText; + 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 */ - var scopeEmitStart = function (scopeDeclaration: Node, scopeName?: string) { } + let scopeEmitStart = function (scopeDeclaration: Node, scopeName?: string) { } /** Called after coming out of the scope */ - var scopeEmitEnd = function () { } + let scopeEmitEnd = function () { } /** Sourcemap data that will get encoded */ - var sourceMapData: SourceMapData; + let sourceMapData: SourceMapData; if (compilerOptions.sourceMap) { initializeEmitterWithSourceMaps(); } if (root) { - emit(root); + // Do not call emit directly. It does not set the currentSourceFile. + emitSourceFile(root); } else { forEach(host.getSourceFiles(), sourceFile => { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emit(sourceFile); + emitSourceFile(sourceFile); } }); } @@ -1653,10 +1659,15 @@ module ts { writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM); return; + function emitSourceFile(sourceFile: SourceFile): void { + currentSourceFile = sourceFile; + emit(sourceFile); + } + // enters the new lexical environment // return value should be passed to matching call to exitNameScope. function enterNameScope(): boolean { - var names = currentScopeNames; + let names = currentScopeNames; currentScopeNames = undefined; if (names) { lastFrame = { names, previous: lastFrame }; @@ -1676,7 +1687,7 @@ module ts { } function generateUniqueNameForLocation(location: Node, baseName: string): string { - var name: string + let name: string // first try to check if base name can be used as is if (!isExistingName(location, baseName)) { name = baseName; @@ -1684,7 +1695,11 @@ module ts { else { name = generateUniqueName(baseName, n => isExistingName(location, n)); } - + + return recordNameInCurrentScope(name); + } + + function recordNameInCurrentScope(name: string): string { if (!currentScopeNames) { currentScopeNames = {}; } @@ -1693,33 +1708,62 @@ module ts { } function isExistingName(location: Node, name: string) { - return !resolver.isUnknownIdentifier(location, name) || - (currentScopeNames && hasProperty(currentScopeNames, name)); + // check if resolver is aware of this name (if name was seen during the typecheck) + if (!resolver.isUnknownIdentifier(location, name)) { + return true; + } + + // check if name is present in generated names that were introduced by the emitter + if (currentScopeNames && hasProperty(currentScopeNames, name)) { + return true; + } + + // check generated names in outer scopes + // let x; + // function foo() { + // let x; // 1 + // function bar() { + // { + // let x; // 2 + // } + // console.log(x); // 3 + // } + //} + // here both x(1) and x(2) should be renamed and their names should be different + // so x in (3) will refer to x(1) + let frame = lastFrame; + while (frame) { + if (hasProperty(frame.names, name)) { + return true; + } + frame = frame.previous; + } + return false; } function initializeEmitterWithSourceMaps() { - var sourceMapDir: string; // The directory in which sourcemap will be + let sourceMapDir: string; // The directory in which sourcemap will be // Current source map file and its index in the sources list - var sourceMapSourceIndex = -1; + let sourceMapSourceIndex = -1; // Names and its index map - var sourceMapNameIndexMap: Map = {}; - var sourceMapNameIndices: number[] = []; + let sourceMapNameIndexMap: Map = {}; + let sourceMapNameIndices: number[] = []; function getSourceMapNameIndex() { return sourceMapNameIndices.length ? sourceMapNameIndices[sourceMapNameIndices.length - 1] : -1; } // Last recorded and encoded spans - var lastRecordedSourceMapSpan: SourceMapSpan; - var lastEncodedSourceMapSpan: SourceMapSpan = { + let lastRecordedSourceMapSpan: SourceMapSpan; + let lastEncodedSourceMapSpan: SourceMapSpan = { emittedLine: 1, emittedColumn: 1, sourceLine: 1, sourceColumn: 1, sourceIndex: 0 }; - var lastEncodedNameIndex = 0; + let lastEncodedNameIndex = 0; // Encoding for sourcemap span function encodeLastRecordedSourceMapSpan() { @@ -1727,7 +1771,7 @@ module ts { return; } - var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; + let prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; // Line/Comma delimiters if (lastEncodedSourceMapSpan.emittedLine == lastRecordedSourceMapSpan.emittedLine) { // Emit comma to separate the entry @@ -1737,7 +1781,7 @@ module ts { } else { // Emit line delimiters - for (var encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { + for (let encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { sourceMapData.sourceMapMappings += ";"; } prevEncodedEmittedColumn = 1; @@ -1785,9 +1829,9 @@ module ts { } // Encode 5 bits at a time starting from least significant bits - var encodedStr = ""; + let encodedStr = ""; do { - var currentDigit = inValue & 31; // 11111 + let currentDigit = inValue & 31; // 11111 inValue = inValue >> 5; if (inValue > 0) { // There are still more digits to decode, set the msb (6th bit) @@ -1801,14 +1845,14 @@ module ts { } function recordSourceMapSpan(pos: number) { - var sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); + let sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); // Convert the location to be one-based. sourceLinePos.line++; sourceLinePos.character++; - var emittedLine = writer.getLine(); - var emittedColumn = writer.getColumn(); + let emittedLine = writer.getLine(); + let emittedColumn = writer.getColumn(); // If this location wasn't recorded or the location in source is going backwards, record the span if (!lastRecordedSourceMapSpan || @@ -1848,9 +1892,9 @@ module ts { } function writeTextWithSpanRecord(tokenKind: SyntaxKind, startPos: number, emitFn?: () => void) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); + let tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); recordSourceMapSpan(tokenStartPos); - var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); + let tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); recordSourceMapSpan(tokenEndPos); return tokenEndPos; } @@ -1859,7 +1903,7 @@ module ts { // Add the file to tsFilePaths // If sourceroot option: Use the relative path corresponding to the common directory path // otherwise source locations relative to map file location - var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; + let sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, @@ -1878,14 +1922,14 @@ module ts { } function recordScopeNameStart(scopeName: string) { - var scopeNameIndex = -1; + let scopeNameIndex = -1; if (scopeName) { - var parentIndex = getSourceMapNameIndex(); + let 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. - var name = (node).name; + let name = (node).name; if (!name || name.kind !== SyntaxKind.ComputedPropertyName) { scopeName = "." + scopeName; } @@ -1917,7 +1961,7 @@ module ts { node.kind === SyntaxKind.EnumDeclaration) { // Declaration and has associated name use it if ((node).name) { - var name = (node).name; + let name = (node).name; // For computed property names, the text will include the brackets scopeName = name.kind === SyntaxKind.ComputedPropertyName ? getTextOfNode(name) @@ -1956,8 +2000,8 @@ module ts { return "{\"version\":" + version + ",\"file\":\"" + escapeString(file) + "\",\"sourceRoot\":\"" + escapeString(sourceRoot) + "\",\"sources\":[" + serializeStringArray(sources) + "],\"names\":[" + serializeStringArray(names) + "],\"mappings\":\"" + escapeString(mappings) + "\"}"; function serializeStringArray(list: string[]): string { - var output = ""; - for (var i = 0, n = list.length; i < n; i++) { + let output = ""; + for (let i = 0, n = list.length; i < n; i++) { if (i) { output += ","; } @@ -1984,7 +2028,7 @@ module ts { } // Initialize source map data - var sourceMapJsFile = getBaseFileName(normalizeSlashes(jsFilePath)); + let sourceMapJsFile = getBaseFileName(normalizeSlashes(jsFilePath)); sourceMapData = { sourceMapFilePath: jsFilePath + ".map", jsSourceMappingURL: sourceMapJsFile + ".map", @@ -2030,22 +2074,34 @@ module ts { sourceMapDir = getDirectoryPath(normalizePath(jsFilePath)); } - function emitNodeWithMap(node: Node) { + function emitNodeWithSourceMap(node: Node, allowGeneratedIdentifiers?: boolean) { if (node) { + if (nodeIsSynthesized(node)) { + return emitNodeWithoutSourceMap(node, /*allowGeneratedIdentifiers*/ false); + } if (node.kind != SyntaxKind.SourceFile) { recordEmitNodeStartSpan(node); - emitNode(node); + emitNodeWithoutSourceMap(node, allowGeneratedIdentifiers); recordEmitNodeEndSpan(node); } else { recordNewSourceFileStart(node); - emitNode(node); + emitNodeWithoutSourceMap(node, /*allowGeneratedIdentifiers*/ false); } } } + function emitNodeWithSourceMapWithoutComments(node: Node) { + if (node) { + recordEmitNodeStartSpan(node); + emitNodeWithoutSourceMapWithoutComments(node); + recordEmitNodeEndSpan(node); + } + } + writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithMap; + emit = emitNodeWithSourceMap; + emitWithoutComments = emitNodeWithSourceMapWithoutComments; emitStart = recordEmitNodeStartSpan; emitEnd = recordEmitNodeEndSpan; emitToken = writeTextWithSpanRecord; @@ -2060,17 +2116,29 @@ module ts { // Create a temporary variable with a unique unused name. The forLoopVariable parameter signals that the // name should be one that is appropriate for a for loop variable. - function createTempVariable(location: Node, forLoopVariable?: boolean): Identifier { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && !isExistingName(location, name)) { - break; - } + function createTempVariable(location: Node, preferredName?: string): Identifier { + for (var name = preferredName; !name || isExistingName(location, name); tempCount++) { // _a .. _h, _j ... _z, _0, _1, ... - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + CharacterCodes.a) : tempCount - 25); - tempCount++; + + // Note: we avoid generating _i and _n as those are common names we want in other places. + var char = CharacterCodes.a + tempCount; + if (char === CharacterCodes.i || char === CharacterCodes.n) { + continue; + } + + if (tempCount < 26) { + name = "_" + String.fromCharCode(char); + } + else { + name = "_" + (tempCount - 26); + } } - var result = createSynthesizedNode(SyntaxKind.Identifier); + + // This is necessary so that a name generated via renameNonTopLevelLetAndConst will see the name + // we just generated. + recordNameInCurrentScope(name); + + let result = createSynthesizedNode(SyntaxKind.Identifier); result.text = name; return result; } @@ -2082,8 +2150,8 @@ module ts { tempVariables.push(name); } - function createAndRecordTempVariable(location: Node): Identifier { - var temp = createTempVariable(location, /*forLoopVariable*/ false); + function createAndRecordTempVariable(location: Node, preferredName?: string): Identifier { + let temp = createTempVariable(location, preferredName); recordTempDeclaration(temp); return temp; @@ -2104,7 +2172,7 @@ module ts { } function emitTokenText(tokenKind: SyntaxKind, startPos: number, emitFn?: () => void) { - var tokenString = tokenToString(tokenKind); + let tokenString = tokenToString(tokenKind); if (emitFn) { emitFn(); } @@ -2142,7 +2210,7 @@ module ts { increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -2151,9 +2219,9 @@ module ts { writeLine(); } - for (var i = 0, n = nodes.length; i < n; i++) { + for (let i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -2165,15 +2233,13 @@ module ts { emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes)); - if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -2184,7 +2250,7 @@ module ts { } function emitList(nodes: Node[], start: number, count: number, multiLine: boolean, trailingComma: boolean) { - for (var i = 0; i < count; i++) { + for (let i = 0; i < count; i++) { if (multiLine) { if (i) { write(","); @@ -2217,7 +2283,7 @@ module ts { } function emitLinesStartingAt(nodes: Node[], startIndex: number): void { - for (var i = startIndex; i < nodes.length; i++) { + for (let i = startIndex; i < nodes.length; i++) { writeLine(); emit(nodes[i]); } @@ -2238,7 +2304,7 @@ module ts { } function emitLiteral(node: LiteralExpression) { - var text = getLiteralText(node); + let text = getLiteralText(node); if (compilerOptions.sourceMap && (node.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(node.kind))) { writer.writeLiteral(text); @@ -2293,13 +2359,13 @@ module 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 = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + let text = getSourceTextOfNodeFromSourceFile(currentSourceFile, 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 "}" // Last template piece ends with "`", others with "${" - var isLast = node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.TemplateTail; + let isLast = node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.TemplateTail; text = text.substring(1, text.length - (isLast ? 1 : 2)); // Newline normalization: @@ -2327,7 +2393,7 @@ module ts { } function emitDownlevelTaggedTemplate(node: TaggedTemplateExpression) { - var tempVariable = createAndRecordTempVariable(node); + let tempVariable = createAndRecordTempVariable(node); write("("); emit(tempVariable); write(" = "); @@ -2347,7 +2413,7 @@ module ts { if (node.template.kind === SyntaxKind.TemplateExpression) { forEach((node.template).templateSpans, templateSpan => { write(", "); - var needsParens = templateSpan.expression.kind === SyntaxKind.BinaryExpression + let needsParens = templateSpan.expression.kind === SyntaxKind.BinaryExpression && (templateSpan.expression).operatorToken.kind === SyntaxKind.CommaToken; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -2363,21 +2429,21 @@ module ts { return; } - var emitOuterParens = isExpression(node.parent) + let emitOuterParens = isExpression(node.parent) && templateNeedsParens(node, node.parent); if (emitOuterParens) { write("("); } - var headEmitted = false; + let headEmitted = false; if (shouldEmitTemplateHead()) { emitLiteral(node.head); headEmitted = true; } - for (var i = 0; i < node.templateSpans.length; i++) { - var templateSpan = node.templateSpans[i]; + for (let i = 0, n = node.templateSpans.length; i < n; i++) { + let templateSpan = node.templateSpans[i]; // Check if the expression has operands and binds its operands less closely than binary '+'. // If it does, we need to wrap the expression in parentheses. Otherwise, something like @@ -2388,7 +2454,7 @@ module ts { // ("abc" + 1) << (2 + "") // rather than // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== SyntaxKind.ParenthesizedExpression + let needsParens = templateSpan.expression.kind !== SyntaxKind.ParenthesizedExpression && comparePrecedenceToBinaryPlus(templateSpan.expression) !== Comparison.GreaterThan; if (i > 0 || headEmitted) { @@ -2516,7 +2582,7 @@ module ts { } function isNotExpressionIdentifier(node: Identifier) { - var parent = node.parent; + let parent = node.parent; switch (parent.kind) { case SyntaxKind.Parameter: case SyntaxKind.VariableDeclaration: @@ -2548,7 +2614,7 @@ module ts { } function emitExpressionIdentifier(node: Identifier) { - var substitution = resolver.getExpressionNameSubstitution(node); + let substitution = resolver.getExpressionNameSubstitution(node); if (substitution) { write(substitution); } @@ -2557,17 +2623,24 @@ module ts { } } - function getBlockScopedVariableId(node: Identifier): number { - // return undefined for synthesized nodes - return !nodeIsSynthesized(node) && resolver.getBlockScopedVariableId(node); + function getGeneratedNameForIdentifier(node: Identifier): string { + if (nodeIsSynthesized(node) || !generatedBlockScopeNames) { + return undefined; + } + + var variableId = resolver.getBlockScopedVariableId(node) + if (variableId === undefined) { + return undefined; + } + + return generatedBlockScopeNames[variableId]; } - function emitIdentifier(node: Identifier) { - var variableId = getBlockScopedVariableId(node); - if (variableId !== undefined && generatedBlockScopeNames) { - var text = generatedBlockScopeNames[variableId]; - if (text) { - write(text); + function emitIdentifier(node: Identifier, allowGeneratedIdentifiers: boolean) { + if (allowGeneratedIdentifiers) { + let generatedName = getGeneratedNameForIdentifier(node); + if (generatedName) { + write(generatedName); return; } } @@ -2592,35 +2665,37 @@ module ts { } function emitSuper(node: Node) { - var flags = resolver.getNodeCheckFlags(node); - if (flags & NodeCheckFlags.SuperInstance) { - write("_super.prototype"); - } - else if (flags & NodeCheckFlags.SuperStatic) { - write("_super"); + if (languageVersion >= ScriptTarget.ES6) { + write("super"); } else { - write("super"); + var flags = resolver.getNodeCheckFlags(node); + if (flags & NodeCheckFlags.SuperInstance) { + write("_super.prototype"); + } + else { + write("_super"); + } } } function emitObjectBindingPattern(node: BindingPattern) { write("{ "); - var elements = node.elements; + let elements = node.elements; emitList(elements, 0, elements.length, /*multiLine*/ false, /*trailingComma*/ elements.hasTrailingComma); write(" }"); } function emitArrayBindingPattern(node: BindingPattern) { write("["); - var elements = node.elements; + let elements = node.elements; emitList(elements, 0, elements.length, /*multiLine*/ false, /*trailingComma*/ elements.hasTrailingComma); write("]"); } function emitBindingElement(node: BindingElement) { if (node.propertyName) { - emit(node.propertyName); + emit(node.propertyName, /*allowGeneratedIdentifiers*/ false); write(": "); } if (node.dotDotDotToken) { @@ -2656,9 +2731,9 @@ module ts { } function emitListWithSpread(elements: Expression[], multiLine: boolean, trailingComma: boolean) { - var pos = 0; - var group = 0; - var length = elements.length; + let pos = 0; + let group = 0; + let length = elements.length; while (pos < length) { // Emit using the pattern .concat(, , ...) if (group === 1) { @@ -2667,14 +2742,14 @@ module ts { else if (group > 1) { write(", "); } - var e = elements[pos]; + let e = elements[pos]; if (e.kind === SyntaxKind.SpreadElementExpression) { e = (e).expression; emitParenthesizedIf(e, /*parenthesized*/ group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; } else { - var i = pos; + let i = pos; while (i < length && elements[i].kind !== SyntaxKind.SpreadElementExpression) { i++; } @@ -2701,7 +2776,7 @@ module ts { } function emitArrayLiteral(node: ArrayLiteralExpression) { - var elements = node.elements; + let elements = node.elements; if (elements.length === 0) { write("[]"); } @@ -2717,31 +2792,31 @@ module ts { } function emitDownlevelObjectLiteralWithComputedProperties(node: ObjectLiteralExpression, firstComputedPropertyIndex: number): void { - var parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); + let parenthesizedObjectLiteral = createDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex); return emit(parenthesizedObjectLiteral); } function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral: ObjectLiteralExpression, firstComputedPropertyIndex: number): ParenthesizedExpression { // For computed properties, we need to create a unique handle to the object // literal so we can modify it without risking internal assignments tainting the object. - var tempVar = createAndRecordTempVariable(originalObjectLiteral); + let tempVar = createAndRecordTempVariable(originalObjectLiteral); // Hold onto the initial non-computed properties in a new object literal, // then create the rest through property accesses on the temp variable. - var initialObjectLiteral = createSynthesizedNode(SyntaxKind.ObjectLiteralExpression); + let initialObjectLiteral = createSynthesizedNode(SyntaxKind.ObjectLiteralExpression); initialObjectLiteral.properties = >originalObjectLiteral.properties.slice(0, firstComputedPropertyIndex); initialObjectLiteral.flags |= NodeFlags.MultiLine; // The comma expressions that will patch the object literal. // This will end up being something like '_a = { ... }, _a.x = 10, _a.y = 20, _a'. - var propertyPatches = createBinaryExpression(tempVar, SyntaxKind.EqualsToken, initialObjectLiteral); + let propertyPatches = createBinaryExpression(tempVar, SyntaxKind.EqualsToken, initialObjectLiteral); ts.forEach(originalObjectLiteral.properties, property => { - var patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); + let patchedProperty = tryCreatePatchingPropertyAssignment(originalObjectLiteral, tempVar, property); if (patchedProperty) { // TODO(drosen): Preserve comments - //var leadingComments = getLeadingCommentRanges(currentSourceFile.text, property.pos); - //var trailingComments = getTrailingCommentRanges(currentSourceFile.text, property.end); + //let leadingComments = getLeadingCommentRanges(currentSourceFile.text, property.pos); + //let trailingComments = getTrailingCommentRanges(currentSourceFile.text, property.end); //addCommentsToSynthesizedNode(patchedProperty, leadingComments, trailingComments); propertyPatches = createBinaryExpression(propertyPatches, SyntaxKind.CommaToken, patchedProperty); @@ -2751,11 +2826,11 @@ module ts { // Finally, return the temp variable. propertyPatches = createBinaryExpression(propertyPatches, SyntaxKind.CommaToken, createIdentifier(tempVar.text, /*startsOnNewLine:*/ true)); - var result = createParenthesizedExpression(propertyPatches); + let result = createParenthesizedExpression(propertyPatches); // TODO(drosen): Preserve comments - // var leadingComments = getLeadingCommentRanges(currentSourceFile.text, originalObjectLiteral.pos); - // var trailingComments = getTrailingCommentRanges(currentSourceFile.text, originalObjectLiteral.end); + // let leadingComments = getLeadingCommentRanges(currentSourceFile.text, originalObjectLiteral.pos); + // let trailingComments = getTrailingCommentRanges(currentSourceFile.text, originalObjectLiteral.end); //addCommentsToSynthesizedNode(result, leadingComments, trailingComments); return result; @@ -2769,8 +2844,8 @@ module ts { // Returns 'undefined' if a property has already been accounted for // (e.g. a 'get' accessor which has already been emitted along with its 'set' accessor). function tryCreatePatchingPropertyAssignment(objectLiteral: ObjectLiteralExpression, tempVar: Identifier, property: ObjectLiteralElement): Expression { - var leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); - var maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); + let leftHandSide = createMemberAccessForPropertyName(tempVar, property.name); + let maybeRightHandSide = tryGetRightHandSideOfPatchingPropertyAssignment(objectLiteral, property); return maybeRightHandSide && createBinaryExpression(leftHandSide, SyntaxKind.EqualsToken, maybeRightHandSide, /*startsOnNewLine:*/ true); } @@ -2784,7 +2859,7 @@ module ts { // TODO: (andersh) Technically it isn't correct to make an identifier here since getExpressionNamePrefix returns // a string containing a dotted name. In general I'm not a fan of mini tree rewriters as this one, elsewhere we // manage by just emitting strings (which is a lot more performant). - //var prefix = createIdentifier(resolver.getExpressionNamePrefix((property).name)); + //let prefix = createIdentifier(resolver.getExpressionNamePrefix((property).name)); //return createPropertyAccessExpression(prefix, (property).name); return createIdentifier(resolver.getExpressionNameSubstitution((property).name)); @@ -2793,36 +2868,36 @@ module ts { case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - var { firstAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(objectLiteral.properties, property); + let { firstAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(objectLiteral.properties, property); // Only emit the first accessor. if (firstAccessor !== property) { return undefined; } - var propertyDescriptor = createSynthesizedNode(SyntaxKind.ObjectLiteralExpression); + let propertyDescriptor = createSynthesizedNode(SyntaxKind.ObjectLiteralExpression); - var descriptorProperties = >[]; + let descriptorProperties = >[]; if (getAccessor) { - var getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); + let getProperty = createPropertyAssignment(createIdentifier("get"), createFunctionExpression(getAccessor.parameters, getAccessor.body)); descriptorProperties.push(getProperty); } if (setAccessor) { - var setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); + let setProperty = createPropertyAssignment(createIdentifier("set"), createFunctionExpression(setAccessor.parameters, setAccessor.body)); descriptorProperties.push(setProperty); } - var trueExpr = createSynthesizedNode(SyntaxKind.TrueKeyword); + let trueExpr = createSynthesizedNode(SyntaxKind.TrueKeyword); - var enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); + let enumerableTrue = createPropertyAssignment(createIdentifier("enumerable"), trueExpr); descriptorProperties.push(enumerableTrue); - var configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); + let configurableTrue = createPropertyAssignment(createIdentifier("configurable"), trueExpr); descriptorProperties.push(configurableTrue); propertyDescriptor.properties = descriptorProperties; - var objectDotDefineProperty = createPropertyAccessExpression(createIdentifier("Object"), createIdentifier("defineProperty")); + let objectDotDefineProperty = createPropertyAccessExpression(createIdentifier("Object"), createIdentifier("defineProperty")); return createCallExpression(objectDotDefineProperty, createNodeArray(propertyDescriptor)); default: @@ -2831,14 +2906,14 @@ module ts { } function createParenthesizedExpression(expression: Expression) { - var result = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); + let result = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); result.expression = expression; return result; } function createNodeArray(...elements: T[]): NodeArray { - var result = >elements; + let result = >elements; result.pos = -1; result.end = -1; @@ -2846,13 +2921,19 @@ module ts { } function createBinaryExpression(left: Expression, operator: SyntaxKind, right: Expression, startsOnNewLine?: boolean): BinaryExpression { - var result = createSynthesizedNode(SyntaxKind.BinaryExpression, startsOnNewLine); + let result = createSynthesizedNode(SyntaxKind.BinaryExpression, startsOnNewLine); result.operatorToken = createSynthesizedNode(operator); result.left = left; result.right = right; return result; } + + function createExpressionStatement(expression: Expression): ExpressionStatement { + let result = createSynthesizedNode(SyntaxKind.ExpressionStatement); + result.expression = expression; + return result; + } function createMemberAccessForPropertyName(expression: LeftHandSideExpression, memberName: DeclarationName): PropertyAccessExpression | ElementAccessExpression { if (memberName.kind === SyntaxKind.Identifier) { @@ -2870,7 +2951,7 @@ module ts { } function createPropertyAssignment(name: LiteralExpression | Identifier, initializer: Expression) { - var result = createSynthesizedNode(SyntaxKind.PropertyAssignment); + let result = createSynthesizedNode(SyntaxKind.PropertyAssignment); result.name = name; result.initializer = initializer; @@ -2878,7 +2959,7 @@ module ts { } function createFunctionExpression(parameters: NodeArray, body: Block): FunctionExpression { - var result = createSynthesizedNode(SyntaxKind.FunctionExpression); + let result = createSynthesizedNode(SyntaxKind.FunctionExpression); result.parameters = parameters; result.body = body; @@ -2886,15 +2967,16 @@ module ts { } function createPropertyAccessExpression(expression: LeftHandSideExpression, name: Identifier): PropertyAccessExpression { - var result = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); + let result = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); result.expression = expression; + result.dotToken = createSynthesizedNode(SyntaxKind.DotToken); result.name = name; return result; } function createElementAccessExpression(expression: LeftHandSideExpression, argumentExpression: Expression): ElementAccessExpression { - var result = createSynthesizedNode(SyntaxKind.ElementAccessExpression); + let result = createSynthesizedNode(SyntaxKind.ElementAccessExpression); result.expression = expression; result.argumentExpression = argumentExpression; @@ -2902,14 +2984,14 @@ module ts { } function createIdentifier(name: string, startsOnNewLine?: boolean) { - var result = createSynthesizedNode(SyntaxKind.Identifier, startsOnNewLine); + let result = createSynthesizedNode(SyntaxKind.Identifier, startsOnNewLine); result.text = name; return result; } function createCallExpression(invokedExpression: MemberExpression, arguments: NodeArray) { - var result = createSynthesizedNode(SyntaxKind.CallExpression); + let result = createSynthesizedNode(SyntaxKind.CallExpression); result.expression = invokedExpression; result.arguments = arguments; @@ -2917,22 +2999,22 @@ module ts { } function emitObjectLiteral(node: ObjectLiteralExpression): void { - var properties = node.properties; + let properties = node.properties; if (languageVersion < ScriptTarget.ES6) { - var numProperties = properties.length; + let numProperties = properties.length; // Find the first computed property. // Everything until that point can be emitted as part of the initial object literal. - var numInitialNonComputedProperties = numProperties; - for (var i = 0, n = properties.length; i < n; i++) { + let numInitialNonComputedProperties = numProperties; + for (let i = 0, n = properties.length; i < n; i++) { if (properties[i].name.kind === SyntaxKind.ComputedPropertyName) { numInitialNonComputedProperties = i; break; } } - var hasComputedProperty = numInitialNonComputedProperties !== properties.length; + let hasComputedProperty = numInitialNonComputedProperties !== properties.length; if (hasComputedProperty) { emitDownlevelObjectLiteralWithComputedProperties(node, numInitialNonComputedProperties); return; @@ -2943,7 +3025,6 @@ module ts { // or we're compiling with an ES6+ target. write("{"); - var properties = node.properties; if (properties.length) { emitLinePreservingList(node, properties, /*allowTrailingComma:*/ languageVersion >= ScriptTarget.ES5, /*spacesBetweenBraces:*/ true) } @@ -2958,7 +3039,7 @@ module ts { } function emitMethod(node: MethodDeclaration) { - emit(node.name); + emit(node.name, /*allowGeneratedIdentifiers*/ false); if (languageVersion < ScriptTarget.ES6) { write(": function "); } @@ -2966,22 +3047,35 @@ module ts { } function emitPropertyAssignment(node: PropertyDeclaration) { - emit(node.name); + emit(node.name, /*allowGeneratedIdentifiers*/ false); write(": "); emit(node.initializer); } function emitShorthandPropertyAssignment(node: ShorthandPropertyAssignment) { - emit(node.name); + emit(node.name, /*allowGeneratedIdentifiers*/ false); // If short-hand property has a prefix, then regardless of the target version, we will emit it as normal property assignment. For example: // module m { - // export var y; + // export let y; // } // module m { - // export var obj = { y }; + // export let obj = { y }; // } // The short-hand property in obj need to emit as such ... = { y : m.y } regardless of the TargetScript version - if (languageVersion < ScriptTarget.ES6 || resolver.getExpressionNameSubstitution(node.name)) { + if (languageVersion < ScriptTarget.ES6) { + // Emit identifier as an identifier + write(": "); + var generatedName = getGeneratedNameForIdentifier(node.name); + if (generatedName) { + write(generatedName); + } + else { + // Even though this is stored as identifier treat it as an expression + // Short-hand, { x }, is equivalent of normal form { x: x } + emitExpressionIdentifier(node.name); + } + } + else if (resolver.getExpressionNameSubstitution(node.name)) { // Emit identifier as an identifier write(": "); // Even though this is stored as identifier treat it as an expression @@ -2991,11 +3085,11 @@ module ts { } function tryEmitConstantValue(node: PropertyAccessExpression | ElementAccessExpression): boolean { - var constantValue = resolver.getConstantValue(node); + let constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName: string = node.kind === SyntaxKind.PropertyAccessExpression ? declarationNameToString((node).name) : getTextOfNode((node).argumentExpression); + let propertyName: string = node.kind === SyntaxKind.PropertyAccessExpression ? declarationNameToString((node).name) : getTextOfNode((node).argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -3003,13 +3097,39 @@ module ts { return false; } + // Returns 'true' if the code was actually indented, false otherwise. + // If the code is not indented, an optional valueToWriteWhenNotIndenting will be + // emitted instead. + function indentIfOnDifferentLines(parent: Node, node1: Node, node2: Node, valueToWriteWhenNotIndenting?: string): boolean { + let realNodesAreOnDifferentLines = preserveNewLines && !nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + + // Always use a newline for synthesized code if the synthesizer desires it. + let synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { + increaseIndent(); + writeLine(); + return true; + } + else { + if (valueToWriteWhenNotIndenting) { + write(valueToWriteWhenNotIndenting); + } + return false; + } + } + function emitPropertyAccess(node: PropertyAccessExpression) { if (tryEmitConstantValue(node)) { return; } + emit(node.expression); + let indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); write("."); - emit(node.name); + let indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); + emit(node.name, /*allowGeneratedIdentifiers*/ false); + decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } function emitQualifiedName(node: QualifiedName) { @@ -3044,7 +3164,7 @@ module ts { emit(node); return node; } - var temp = createAndRecordTempVariable(node); + let temp = createAndRecordTempVariable(node); write("("); emit(temp); @@ -3055,8 +3175,8 @@ module ts { } function emitCallWithSpread(node: CallExpression) { - var target: Expression; - var expr = skipParentheses(node.expression); + let target: Expression; + let expr = skipParentheses(node.expression); if (expr.kind === SyntaxKind.PropertyAccessExpression) { // Target will be emitted as "this" argument target = emitCallTarget((expr).expression); @@ -3102,16 +3222,16 @@ module ts { emitCallWithSpread(node); return; } - var superCall = false; + let superCall = false; if (node.expression.kind === SyntaxKind.SuperKeyword) { - write("_super"); + emitSuper(node.expression); superCall = true; } else { emit(node.expression); superCall = node.expression.kind === SyntaxKind.PropertyAccessExpression && (node.expression).expression.kind === SyntaxKind.SuperKeyword; } - if (superCall) { + if (superCall && languageVersion < ScriptTarget.ES6) { write(".call("); emitThis(node.expression); if (node.arguments.length) { @@ -3138,7 +3258,7 @@ module ts { } function emitTaggedTemplateExpression(node: TaggedTemplateExpression): void { - if (compilerOptions.target >= ScriptTarget.ES6) { + if (languageVersion >= ScriptTarget.ES6) { emit(node.tag); write(" "); emit(node.template); @@ -3149,35 +3269,38 @@ module ts { } function emitParenExpression(node: ParenthesizedExpression) { - if (node.expression.kind === SyntaxKind.TypeAssertionExpression) { - var operand = (node.expression).expression; + if (!node.parent || node.parent.kind !== SyntaxKind.ArrowFunction) { + if (node.expression.kind === SyntaxKind.TypeAssertionExpression) { + let operand = (node.expression).expression; - // Make sure we consider all nested cast expressions, e.g.: - // (-A).x; - while (operand.kind == SyntaxKind.TypeAssertionExpression) { - operand = (operand).expression; - } + // Make sure we consider all nested cast expressions, e.g.: + // (-A).x; + while (operand.kind == SyntaxKind.TypeAssertionExpression) { + operand = (operand).expression; + } - // We have an expression of the form: (SubExpr) - // Emitting this as (SubExpr) is really not desirable. We would like to emit the subexpr as is. - // Omitting the parentheses, however, could cause change in the semantics of the generated - // code if the casted expression has a lower precedence than the rest of the expression, e.g.: - // (new A).foo should be emitted as (new A).foo and not new A.foo - // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() - // new (A()) should be emitted as new (A()) and not new A() - // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== SyntaxKind.PrefixUnaryExpression && - operand.kind !== SyntaxKind.VoidExpression && - operand.kind !== SyntaxKind.TypeOfExpression && - operand.kind !== SyntaxKind.DeleteExpression && - operand.kind !== SyntaxKind.PostfixUnaryExpression && - operand.kind !== SyntaxKind.NewExpression && - !(operand.kind === SyntaxKind.CallExpression && node.parent.kind === SyntaxKind.NewExpression) && - !(operand.kind === SyntaxKind.FunctionExpression && node.parent.kind === SyntaxKind.CallExpression)) { - emit(operand); - return; + // We have an expression of the form: (SubExpr) + // Emitting this as (SubExpr) is really not desirable. We would like to emit the subexpr as is. + // Omitting the parentheses, however, could cause change in the semantics of the generated + // code if the casted expression has a lower precedence than the rest of the expression, e.g.: + // (new A).foo should be emitted as (new A).foo and not new A.foo + // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() + // new (A()) should be emitted as new (A()) and not new A() + // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () + if (operand.kind !== SyntaxKind.PrefixUnaryExpression && + operand.kind !== SyntaxKind.VoidExpression && + operand.kind !== SyntaxKind.TypeOfExpression && + operand.kind !== SyntaxKind.DeleteExpression && + operand.kind !== SyntaxKind.PostfixUnaryExpression && + operand.kind !== SyntaxKind.NewExpression && + !(operand.kind === SyntaxKind.CallExpression && node.parent.kind === SyntaxKind.NewExpression) && + !(operand.kind === SyntaxKind.FunctionExpression && node.parent.kind === SyntaxKind.CallExpression)) { + emit(operand); + return; + } } } + write("("); emit(node.expression); write(")"); @@ -3216,7 +3339,7 @@ module ts { // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. if (node.operand.kind === SyntaxKind.PrefixUnaryExpression) { - var operand = node.operand; + let operand = node.operand; if (node.operator === SyntaxKind.PlusToken && (operand.operator === SyntaxKind.PlusToken || operand.operator === SyntaxKind.PlusPlusToken)) { write(" "); } @@ -3235,31 +3358,15 @@ module ts { function emitBinaryExpression(node: BinaryExpression) { if (languageVersion < ScriptTarget.ES6 && node.operatorToken.kind === SyntaxKind.EqualsToken && (node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) { - emitDestructuring(node); + emitDestructuring(node, node.parent.kind === SyntaxKind.ExpressionStatement); } else { emit(node.left); - - if (node.operatorToken.kind !== SyntaxKind.CommaToken) { - write(" "); - } - + let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined); write(tokenToString(node.operatorToken.kind)); - - var shouldPlaceOnNewLine = !nodeIsSynthesized(node) && !nodeEndIsOnSameLineAsNodeStart(node.operatorToken, node.right); - - // Check if the right expression is on a different line versus the operator itself. If so, - // we'll emit newline. - if (shouldPlaceOnNewLine || synthesizedNodeStartsOnNewLine(node.right)) { - increaseIndent(); - writeLine(); - emit(node.right); - decreaseIndent(); - } - else { - write(" "); - emit(node.right); - } + let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); + emit(node.right); + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } } @@ -3269,21 +3376,40 @@ module ts { function emitConditionalExpression(node: ConditionalExpression) { emit(node.condition); - write(" ? "); + let indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); + write("?"); + let indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); emit(node.whenTrue); - write(" : "); + decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); + let indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); + write(":"); + let indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); emit(node.whenFalse); + decreaseIndentIf(indentedBeforeColon, indentedAfterColon); + } + + // Helper function to decrease the indent if we previously indented. Allows multiple + // previous indent values to be considered at a time. This also allows caller to just + // call this once, passing in all their appropriate indent values, instead of needing + // to call this helper function multiple times. + function decreaseIndentIf(value1: boolean, value2?: boolean) { + if (value1) { + decreaseIndent(); + } + if (value2) { + decreaseIndent(); + } } function isSingleLineEmptyBlock(node: Node) { if (node && node.kind === SyntaxKind.Block) { - var block = node; + let block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } } function emitBlock(node: Block) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(SyntaxKind.OpenBraceToken, node.pos); write(" "); emitToken(SyntaxKind.CloseBraceToken, node.statements.end); @@ -3326,7 +3452,7 @@ module ts { } function emitIfStatement(node: IfStatement) { - var endPos = emitToken(SyntaxKind.IfKeyword, node.pos); + let endPos = emitToken(SyntaxKind.IfKeyword, node.pos); write(" "); endPos = emitToken(SyntaxKind.OpenParenToken, endPos); emit(node.expression); @@ -3367,7 +3493,7 @@ module ts { } function emitStartOfVariableDeclarationList(decl: Node, startPos?: number): void { - var tokenKind = SyntaxKind.VarKeyword; + let tokenKind = SyntaxKind.VarKeyword; if (decl && languageVersion >= ScriptTarget.ES6) { if (isLet(decl)) { tokenKind = SyntaxKind.LetKeyword; @@ -3393,12 +3519,12 @@ module ts { } function emitForStatement(node: ForStatement) { - var endPos = emitToken(SyntaxKind.ForKeyword, node.pos); + let endPos = emitToken(SyntaxKind.ForKeyword, node.pos); write(" "); endPos = emitToken(SyntaxKind.OpenParenToken, endPos); if (node.initializer && node.initializer.kind === SyntaxKind.VariableDeclarationList) { - var variableDeclarationList = node.initializer; - var declarations = variableDeclarationList.declarations; + let variableDeclarationList = node.initializer; + let declarations = variableDeclarationList.declarations; emitStartOfVariableDeclarationList(declarations[0], endPos); write(" "); emitCommaList(declarations); @@ -3415,13 +3541,17 @@ module ts { } function emitForInOrForOfStatement(node: ForInStatement | ForOfStatement) { - var endPos = emitToken(SyntaxKind.ForKeyword, node.pos); + if (languageVersion < ScriptTarget.ES6 && node.kind === SyntaxKind.ForOfStatement) { + return emitDownLevelForOfStatement(node); + } + + let endPos = emitToken(SyntaxKind.ForKeyword, node.pos); write(" "); endPos = emitToken(SyntaxKind.OpenParenToken, endPos); if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { - var variableDeclarationList = node.initializer; + let variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; + let decl = variableDeclarationList.declarations[0]; emitStartOfVariableDeclarationList(decl, endPos); write(" "); emit(decl); @@ -3441,6 +3571,164 @@ module ts { emitToken(SyntaxKind.CloseParenToken, node.expression.end); emitEmbeddedStatement(node.statement); } + + function emitDownLevelForOfStatement(node: ForOfStatement) { + // The following ES6 code: + // + // for (let v of expr) { } + // + // should be emitted as + // + // for (let _i = 0, _a = expr; _i < _a.length; _i++) { + // let v = _a[_i]; + // } + // + // where _a and _i are temps emitted to capture the RHS and the counter, + // respectively. + // When the left hand side is an expression instead of a let declaration, + // the "let v" is not emitted. + // When the left hand side is a let/const, the v is renamed if there is + // another v in scope. + // Note that all assignments to the LHS are emitted in the body, including + // all destructuring. + // Note also that because an extra statement is needed to assign to the LHS, + // for-of bodies are always emitted as blocks. + + let endPos = emitToken(SyntaxKind.ForKeyword, node.pos); + write(" "); + endPos = emitToken(SyntaxKind.OpenParenToken, endPos); + + // Do not emit the LHS let declaration yet, because it might contain destructuring. + + // Do not call recordTempDeclaration because we are declaring the temps + // right here. Recording means they will be declared later. + // In the case where the user wrote an identifier as the RHS, like this: + // + // for (let v of arr) { } + // + // we don't want to emit a temporary variable for the RHS, just use it directly. + let rhsIsIdentifier = node.expression.kind === SyntaxKind.Identifier; + let counter = createTempVariable(node, /*preferredName*/ "_i"); + let rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(node); + + var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, /*preferredName:*/ "_n") : undefined; + + // This is the let keyword for the counter and rhsReference. The let keyword for + // the LHS will be emitted inside the body. + emitStart(node.expression); + write("var "); + + // _i = 0 + emitNodeWithoutSourceMap(counter); + write(" = 0"); + emitEnd(node.expression); + + if (!rhsIsIdentifier) { + // , _a = expr + write(", "); + emitStart(node.expression); + emitNodeWithoutSourceMap(rhsReference); + write(" = "); + emitNodeWithoutSourceMap(node.expression); + emitEnd(node.expression); + } + + if (cachedLength) { + write(", "); + emitNodeWithoutSourceMap(cachedLength); + write(" = "); + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + + write("; "); + + // _i < _a.length; + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write(" < "); + + if (cachedLength) { + emitNodeWithoutSourceMap(cachedLength); + } + else { + emitNodeWithoutSourceMap(rhsReference); + write(".length"); + } + + emitEnd(node.initializer); + write("; "); + + // _i++) + emitStart(node.initializer); + emitNodeWithoutSourceMap(counter); + write("++"); + emitEnd(node.initializer); + emitToken(SyntaxKind.CloseParenToken, node.expression.end); + + // Body + write(" {"); + writeLine(); + increaseIndent(); + + // Initialize LHS + // let v = _a[_i]; + let rhsIterationValue = createElementAccessExpression(rhsReference, counter); + emitStart(node.initializer); + if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { + write("var "); + let variableDeclarationList = node.initializer; + if (variableDeclarationList.declarations.length > 0) { + let declaration = variableDeclarationList.declarations[0]; + if (isBindingPattern(declaration.name)) { + // This works whether the declaration is a var, let, or const. + // It will use rhsIterationValue _a[_i] as the initializer. + emitDestructuring(declaration, /*isAssignmentExpressionStatement*/ false, rhsIterationValue); + } + else { + // The following call does not include the initializer, so we have + // to emit it separately. + emitNodeWithoutSourceMap(declaration); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + // It's an empty declaration list. This can only happen in an error case, if the user wrote + // for (let of []) {} + emitNodeWithoutSourceMap(createTempVariable(node)); + write(" = "); + emitNodeWithoutSourceMap(rhsIterationValue); + } + } + else { + // Initializer is an expression. Emit the expression in the body, so that it's + // evaluated on every iteration. + let assignmentExpression = createBinaryExpression(node.initializer, SyntaxKind.EqualsToken, rhsIterationValue, /*startsOnNewLine*/ false); + if (node.initializer.kind === SyntaxKind.ArrayLiteralExpression || node.initializer.kind === SyntaxKind.ObjectLiteralExpression) { + // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause + // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. + emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined, /*locationForCheckingExistingName*/ node); + } + else { + emitNodeWithoutSourceMap(assignmentExpression); + } + } + emitEnd(node.initializer); + write(";"); + + if (node.statement.kind === SyntaxKind.Block) { + emitLines((node.statement).statements); + } + else { + writeLine(); + emit(node.statement); + } + + writeLine(); + decreaseIndent(); + write("}"); + } function emitBreakOrContinueStatement(node: BreakOrContinueStatement) { emitToken(node.kind === SyntaxKind.BreakStatement ? SyntaxKind.BreakKeyword : SyntaxKind.ContinueKeyword, node.pos); @@ -3462,13 +3750,17 @@ module ts { } function emitSwitchStatement(node: SwitchStatement) { - var endPos = emitToken(SyntaxKind.SwitchKeyword, node.pos); + let endPos = emitToken(SyntaxKind.SwitchKeyword, node.pos); write(" "); emitToken(SyntaxKind.OpenParenToken, endPos); emit(node.expression); endPos = emitToken(SyntaxKind.CloseParenToken, node.expression.end); write(" "); - emitToken(SyntaxKind.OpenBraceToken, endPos); + emitCaseBlock(node.caseBlock, endPos) + } + + function emitCaseBlock(node: CaseBlock, startPos: number): void { + emitToken(SyntaxKind.OpenBraceToken, startPos); increaseIndent(); emitLines(node.clauses); decreaseIndent(); @@ -3500,7 +3792,8 @@ module ts { else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -3530,7 +3823,7 @@ module ts { function emitCatchClause(node: CatchClause) { writeLine(); - var endPos = emitToken(SyntaxKind.CatchKeyword, node.pos); + let endPos = emitToken(SyntaxKind.CatchKeyword, node.pos); write(" "); emitToken(SyntaxKind.OpenParenToken, endPos); emit(node.variableDeclaration); @@ -3558,53 +3851,69 @@ module ts { } function emitContainingModuleName(node: Node) { - var container = getContainingModule(node); + let container = getContainingModule(node); write(container ? resolver.getGeneratedNameForNode(container) : "exports"); } function emitModuleMemberName(node: Declaration) { emitStart(node.name); if (getCombinedNodeFlags(node) & NodeFlags.Export) { - emitContainingModuleName(node); - write("."); + var container = getContainingModule(node); + if (container) { + write(resolver.getGeneratedNameForNode(container)); + write("."); + } + else if (languageVersion < ScriptTarget.ES6) { + write("exports."); + } } - emitNode(node.name); + emitNodeWithoutSourceMap(node.name); emitEnd(node.name); } function createVoidZero(): Expression { - var zero = createSynthesizedNode(SyntaxKind.NumericLiteral); + let zero = createSynthesizedNode(SyntaxKind.NumericLiteral); zero.text = "0"; - var result = createSynthesizedNode(SyntaxKind.VoidExpression); + let result = createSynthesizedNode(SyntaxKind.VoidExpression); result.expression = zero; return result; } function emitExportMemberAssignments(name: Identifier) { - if (exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { + if (!exportDefault && exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { forEach(exportSpecifiers[name.text], specifier => { writeLine(); emitStart(specifier.name); emitContainingModuleName(specifier); write("."); - emitNode(specifier.name); + emitNodeWithoutSourceMap(specifier.name); emitEnd(specifier.name); write(" = "); - emitNode(name); + emitNodeWithoutSourceMap(name); write(";"); }); } } - function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, value?: Expression) { - var emitCount = 0; + /** + * If the root has a chance of being a synthesized node, callers should also pass a value for + * lowestNonSynthesizedAncestor. This should be an ancestor of root, it should not be synthesized, + * and there should not be a lower ancestor that introduces a scope. This node will be used as the + * location for ensuring that temporary names are unique. + */ + function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, + isAssignmentExpressionStatement: boolean, + value?: Expression, + lowestNonSynthesizedAncestor?: Node) { + let emitCount = 0; // An exported declaration is actually emitted as an assignment (to a property on the module object), so // temporary variables in an exported declaration need to have real declarations elsewhere - var isDeclaration = (root.kind === SyntaxKind.VariableDeclaration && !(getCombinedNodeFlags(root) & NodeFlags.Export)) || root.kind === SyntaxKind.Parameter; + let isDeclaration = (root.kind === SyntaxKind.VariableDeclaration && !(getCombinedNodeFlags(root) & NodeFlags.Export)) || root.kind === SyntaxKind.Parameter; if (root.kind === SyntaxKind.BinaryExpression) { emitAssignmentExpression(root); } else { + Debug.assert(!isAssignmentExpressionStatement); emitBindingElement(root, value); } @@ -3626,7 +3935,10 @@ module ts { function ensureIdentifier(expr: Expression): Expression { if (expr.kind !== SyntaxKind.Identifier) { - var identifier = createTempVariable(root); + // In case the root is a synthesized node, we need to pass lowestNonSynthesizedAncestor + // as the location for determining uniqueness of the variable we are about to + // generate. + let identifier = createTempVariable(lowestNonSynthesizedAncestor || root); if (!isDeclaration) { recordTempDeclaration(identifier); } @@ -3641,19 +3953,25 @@ module ts { // we need to generate a temporary variable value = ensureIdentifier(value); // Return the expression 'value === void 0 ? defaultValue : value' - var equals = createSynthesizedNode(SyntaxKind.BinaryExpression); + let equals = createSynthesizedNode(SyntaxKind.BinaryExpression); equals.left = value; equals.operatorToken = createSynthesizedNode(SyntaxKind.EqualsEqualsEqualsToken); equals.right = createVoidZero(); - var cond = createSynthesizedNode(SyntaxKind.ConditionalExpression); - cond.condition = equals; - cond.whenTrue = defaultValue; - cond.whenFalse = value; + return createConditionalExpression(equals, defaultValue, value); + } + + function createConditionalExpression(condition: Expression, whenTrue: Expression, whenFalse: Expression) { + let cond = createSynthesizedNode(SyntaxKind.ConditionalExpression); + cond.condition = condition; + cond.questionToken = createSynthesizedNode(SyntaxKind.QuestionToken); + cond.whenTrue = whenTrue; + cond.colonToken = createSynthesizedNode(SyntaxKind.ColonToken); + cond.whenFalse = whenFalse; return cond; } function createNumericLiteral(value: number) { - var node = createSynthesizedNode(SyntaxKind.NumericLiteral); + let node = createSynthesizedNode(SyntaxKind.NumericLiteral); node.text = "" + value; return node; } @@ -3662,7 +3980,7 @@ module ts { if (expr.kind === SyntaxKind.Identifier || expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) { return expr; } - var node = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); + let node = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); node.expression = expr; return node; } @@ -3671,45 +3989,41 @@ module ts { if (propName.kind !== SyntaxKind.Identifier) { return createElementAccess(object, propName); } - var node = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); - node.expression = parenthesizeForAccess(object); - node.name = propName; - return node; + return createPropertyAccessExpression(parenthesizeForAccess(object), propName); } function createElementAccess(object: Expression, index: Expression): Expression { - var node = createSynthesizedNode(SyntaxKind.ElementAccessExpression); + let node = createSynthesizedNode(SyntaxKind.ElementAccessExpression); node.expression = parenthesizeForAccess(object); node.argumentExpression = index; return node; } function emitObjectLiteralAssignment(target: ObjectLiteralExpression, value: Expression) { - var properties = target.properties; + let properties = target.properties; if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. value = ensureIdentifier(value); } - for (var i = 0; i < properties.length; i++) { - var p = properties[i]; + for (let p of properties) { if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { // TODO(andersh): Computed property support - var propName = ((p).name); + let propName = ((p).name); emitDestructuringAssignment((p).initializer || propName, createPropertyAccess(value, propName)); } } } function emitArrayLiteralAssignment(target: ArrayLiteralExpression, value: Expression) { - var elements = target.elements; + let elements = target.elements; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. value = ensureIdentifier(value); } - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; + for (let i = 0; i < elements.length; i++) { + let e = elements[i]; if (e.kind !== SyntaxKind.OmittedExpression) { if (e.kind !== SyntaxKind.SpreadElementExpression) { emitDestructuringAssignment(e, createElementAccess(value, createNumericLiteral(i))); @@ -3742,9 +4056,9 @@ module ts { } function emitAssignmentExpression(root: BinaryExpression) { - var target = root.left; - var value = root.right; - if (root.parent.kind === SyntaxKind.ExpressionStatement) { + let target = root.left; + let value = root.right; + if (isAssignmentExpressionStatement) { emitDestructuringAssignment(target, value); } else { @@ -3771,18 +4085,18 @@ module ts { value = createVoidZero(); } if (isBindingPattern(target.name)) { - var pattern = target.name; - var elements = pattern.elements; + let pattern = target.name; + let elements = pattern.elements; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. value = ensureIdentifier(value); } - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; + for (let i = 0; i < elements.length; i++) { + let element = elements[i]; if (pattern.kind === SyntaxKind.ObjectBindingPattern) { // Rewrite element to a declaration with an initializer that fetches property - var propName = element.propertyName || element.name; + let propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccess(value, propName)); } else if (element.kind !== SyntaxKind.OmittedExpression) { @@ -3809,7 +4123,7 @@ module ts { function emitVariableDeclaration(node: VariableDeclaration) { if (isBindingPattern(node.name)) { if (languageVersion < ScriptTarget.ES6) { - emitDestructuring(node); + emitDestructuring(node, /*isAssignmentExpressionStatement*/ false); } else { emit(node.name); @@ -3817,10 +4131,10 @@ module ts { } } else { - var isLet = renameNonTopLevelLetAndConst(node.name); + renameNonTopLevelLetAndConst(node.name); emitModuleMemberName(node); - var initializer = node.initializer; + let initializer = node.initializer; if (!initializer && languageVersion < ScriptTarget.ES6) { // downlevel emit for non-initialized let bindings defined in loops @@ -3829,7 +4143,7 @@ module ts { // for (...) { var = void 0; } // this is necessary to preserve ES6 semantic in scenarios like // for (...) { let x; console.log(x); x = 1 } // assignment on one iteration should not affect other iterations - var isUninitializedLet = + let isUninitializedLet = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.BlockScopedBindingInLoop) && (getCombinedFlagsForIdentifier(node.name) & NodeFlags.Let); @@ -3846,7 +4160,7 @@ module ts { } function emitExportVariableAssignments(node: VariableDeclaration | BindingElement) { - var name = (node).name; + let name = (node).name; if (name.kind === SyntaxKind.Identifier) { emitExportMemberAssignments(name); } @@ -3855,34 +4169,6 @@ module ts { } } - function getEnclosingBlockScopeContainer(node: Node): Node { - var current = node; - while (current) { - if (isAnyFunction(current)) { - return current; - } - switch (current.kind) { - case SyntaxKind.SourceFile: - case SyntaxKind.SwitchKeyword: - case SyntaxKind.CatchClause: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForOfStatement: - return current; - case SyntaxKind.Block: - // function block is not considered block-scope container - // see comment in binder.ts: bind(...), case for SyntaxKind.Block - if (!isAnyFunction(current.parent)) { - return current; - } - } - - current = current.parent; - } - } - - function getCombinedFlagsForIdentifier(node: Identifier): NodeFlags { if (!node.parent || (node.parent.kind !== SyntaxKind.VariableDeclaration && node.parent.kind !== SyntaxKind.BindingElement)) { return 0; @@ -3905,36 +4191,47 @@ module ts { return; } - var combinedFlags = getCombinedFlagsForIdentifier(node); + let combinedFlags = getCombinedFlagsForIdentifier(node); if (((combinedFlags & NodeFlags.BlockScoped) === 0) || combinedFlags & NodeFlags.Export) { // do not rename exported or non-block scoped variables return; } // here it is known that node is a block scoped variable - var list = getAncestor(node, SyntaxKind.VariableDeclarationList); + let list = getAncestor(node, SyntaxKind.VariableDeclarationList); if (list.parent.kind === SyntaxKind.VariableStatement && list.parent.parent.kind === SyntaxKind.SourceFile) { // do not rename variables that are defined on source file level return; } - var blockScopeContainer = getEnclosingBlockScopeContainer(node); - var parent = blockScopeContainer.kind === SyntaxKind.SourceFile + let blockScopeContainer = getEnclosingBlockScopeContainer(node); + let parent = blockScopeContainer.kind === SyntaxKind.SourceFile ? blockScopeContainer : blockScopeContainer.parent; - var generatedName = generateUniqueNameForLocation(parent, (node).text); - var variableId = resolver.getBlockScopedVariableId(node); + let generatedName = generateUniqueNameForLocation(parent, (node).text); + let variableId = resolver.getBlockScopedVariableId(node); if (!generatedBlockScopeNames) { generatedBlockScopeNames = []; } generatedBlockScopeNames[variableId] = generatedName; } + function isES6ModuleMemberDeclaration(node: Node) { + return !!(node.flags & NodeFlags.Export) && + languageVersion >= ScriptTarget.ES6 && + node.parent.kind === SyntaxKind.SourceFile; + } + function emitVariableStatement(node: VariableStatement) { if (!(node.flags & NodeFlags.Export)) { emitStartOfVariableDeclarationList(node.declarationList); } + else if (languageVersion >= ScriptTarget.ES6 && node.parent.kind === SyntaxKind.SourceFile) { + // Exported ES6 module member + write("export "); + emitStartOfVariableDeclarationList(node.declarationList); + } emitCommaList(node.declarationList.declarations); write(";"); if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile) { @@ -3945,7 +4242,7 @@ module ts { function emitParameter(node: ParameterDeclaration) { if (languageVersion < ScriptTarget.ES6) { if (isBindingPattern(node.name)) { - var name = createTempVariable(node); + let name = createTempVariable(node); if (!tempParameters) { tempParameters = []; } @@ -3967,12 +4264,12 @@ module ts { function emitDefaultValueAssignments(node: FunctionLikeDeclaration) { if (languageVersion < ScriptTarget.ES6) { - var tempIndex = 0; + let tempIndex = 0; forEach(node.parameters, p => { if (isBindingPattern(p.name)) { writeLine(); write("var "); - emitDestructuring(p, tempParameters[tempIndex]); + emitDestructuring(p, /*isAssignmentExpressionStatement*/ false, tempParameters[tempIndex]); write(";"); tempIndex++; } @@ -3980,14 +4277,14 @@ module ts { writeLine(); emitStart(p); write("if ("); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" === void 0)"); emitEnd(p); write(" { "); emitStart(p); - emitNode(p.name); + emitNodeWithoutSourceMap(p.name); write(" = "); - emitNode(p.initializer); + emitNodeWithoutSourceMap(p.initializer); emitEnd(p); write("; }"); } @@ -3997,14 +4294,14 @@ module ts { function emitRestParameter(node: FunctionLikeDeclaration) { if (languageVersion < ScriptTarget.ES6 && hasRestParameters(node)) { - var restIndex = node.parameters.length - 1; - var restParam = node.parameters[restIndex]; - var tempName = createTempVariable(node, /*forLoopVariable*/ true).text; + let restIndex = node.parameters.length - 1; + let restParam = node.parameters[restIndex]; + let tempName = createTempVariable(node, /*preferredName:*/ "_i").text; writeLine(); emitLeadingComments(restParam); emitStart(restParam); write("var "); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write(" = [];"); emitEnd(restParam); emitTrailingComments(restParam); @@ -4025,7 +4322,7 @@ module ts { increaseIndent(); writeLine(); emitStart(restParam); - emitNode(restParam.name); + emitNodeWithoutSourceMap(restParam.name); write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); emitEnd(restParam); decreaseIndent(); @@ -4036,7 +4333,7 @@ module ts { function emitAccessor(node: AccessorDeclaration) { write(node.kind === SyntaxKind.GetAccessor ? "get " : "set "); - emit(node.name); + emit(node.name, /*allowGeneratedIdentifiers*/ false); emitSignatureAndBody(node); } @@ -4044,6 +4341,28 @@ module ts { return node.kind === SyntaxKind.ArrowFunction && languageVersion >= ScriptTarget.ES6; } + function emitDeclarationName(node: Declaration) { + if (node.name) { + emitNodeWithoutSourceMap(node.name); + } + else { + write(resolver.getGeneratedNameForNode(node)); + } + } + + function shouldEmitFunctionName(node: Declaration): boolean { + // Emit a declaration name for the function iff: + // it is a function expression with a name provided + // it is a function declaration with a name provided + // it is a function declaration is not the default export, and is missing a name (emit a generated name for it) + if (node.kind === SyntaxKind.FunctionExpression) { + return !!node.name; + } + else if (node.kind === SyntaxKind.FunctionDeclaration) { + return !!node.name || (languageVersion >= ScriptTarget.ES6 && !(node.flags & NodeFlags.Default)); + } + } + function emitFunctionDeclaration(node: FunctionLikeDeclaration) { if (nodeIsMissing(node.body)) { return emitPinnedOrTripleSlashComments(node); @@ -4057,14 +4376,21 @@ module ts { // For targeting below es6, emit functions-like declaration including arrow function using function keyword. // When targeting ES6, emit arrow function natively in ES6 by omitting function keyword and using fat arrow instead if (!shouldEmitAsArrowFunction(node)) { + if (isES6ModuleMemberDeclaration(node)) { + write("export "); + if (node.flags & NodeFlags.Default) { + write("default "); + } + } write("function "); } - if (node.kind === SyntaxKind.FunctionDeclaration || (node.kind === SyntaxKind.FunctionExpression && node.name)) { - emit(node.name); + if (shouldEmitFunctionName(node)) { + emitDeclarationName(node); } + emitSignatureAndBody(node); - if (languageVersion < ScriptTarget.ES6 && node.kind === SyntaxKind.FunctionDeclaration && node.parent === currentSourceFile) { + if (languageVersion < ScriptTarget.ES6 && node.kind === SyntaxKind.FunctionDeclaration && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments((node).name); } if (node.kind !== SyntaxKind.MethodDeclaration && node.kind !== SyntaxKind.MethodSignature) { @@ -4085,8 +4411,8 @@ module ts { increaseIndent(); write("("); if (node) { - var parameters = node.parameters; - var omitCount = languageVersion < ScriptTarget.ES6 && hasRestParameters(node) ? 1 : 0; + let parameters = node.parameters; + let omitCount = languageVersion < ScriptTarget.ES6 && hasRestParameters(node) ? 1 : 0; emitList(parameters, 0, parameters.length - omitCount, /*multiLine*/ false, /*trailingComma*/ false); } write(")"); @@ -4103,14 +4429,14 @@ module ts { } function emitSignatureAndBody(node: FunctionLikeDeclaration) { - var saveTempCount = tempCount; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; + let saveTempCount = tempCount; + let saveTempVariables = tempVariables; + let saveTempParameters = tempParameters; tempCount = 0; tempVariables = undefined; tempParameters = undefined; - var popFrame = enterNameScope() + let popFrame = enterNameScope() // When targeting ES6, emit arrow function natively in ES6 if (shouldEmitAsArrowFunction(node)) { @@ -4133,12 +4459,12 @@ module ts { emitExpressionFunctionBody(node, node.body); } - if (node.flags & NodeFlags.Export) { + if (node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default) && !isES6ModuleMemberDeclaration(node)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } @@ -4163,9 +4489,19 @@ module ts { return; } - // For es6 and higher we can emit the expression as is. + // For es6 and higher we can emit the expression as is. However, in the case + // where the expression might end up looking like a block when emitted, we'll + // also wrap it in parentheses first. For example if you have: a => {} + // then we need to generate: a => ({}) write(" "); - emit(body); + + // Unwrap all type assertions. + let current = body; + while (current.kind === SyntaxKind.TypeAssertionExpression) { + current = (current).expression; + } + + emitParenthesizedIf(body, current.kind === SyntaxKind.ObjectLiteralExpression); } function emitDownLevelExpressionFunctionBody(node: FunctionLikeDeclaration, body: Expression) { @@ -4173,22 +4509,22 @@ module ts { scopeEmitStart(node); increaseIndent(); - var outPos = writer.getTextPos(); + let outPos = writer.getTextPos(); emitDetachedComments(node.body); emitFunctionBodyPreamble(node); - var preambleEmitted = writer.getTextPos() !== outPos; + let preambleEmitted = writer.getTextPos() !== outPos; decreaseIndent(); // If we didn't have to emit any preamble code, then attempt to keep the arrow // function on one line. - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); // Don't emit comments on this body. We'll have already taken care of it above // when we called emitDetachedComments. - emitNode(body, /*disableComments:*/ true); + emitWithoutComments(body); emitEnd(body); write(";"); emitTempDeclarations(/*newLine*/ false); @@ -4199,7 +4535,10 @@ module ts { writeLine(); emitLeadingComments(node.body); write("return "); - emit(node.body, /*disableComments:*/ true); + + // Don't emit comments on this body. We'll have already taken care of it above + // when we called emitDetachedComments. + emitWithoutComments(node.body); write(";"); emitTrailingComments(node.body); @@ -4219,23 +4558,23 @@ module ts { write(" {"); scopeEmitStart(node); - var initialTextPos = writer.getTextPos(); + let initialTextPos = writer.getTextPos(); increaseIndent(); emitDetachedComments(body.statements); // Emit all the directive prologues (like "use strict"). These have to come before // any other preamble code we write (like parameter initializers). - var startIndex = emitDirectivePrologues(body.statements, /*startWithNewLine*/ true); + let startIndex = emitDirectivePrologues(body.statements, /*startWithNewLine*/ true); emitFunctionBodyPreamble(node); decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== initialTextPos; + let preambleEmitted = writer.getTextPos() !== initialTextPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var i = 0, n = body.statements.length; i < n; i++) { + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + for (let statement of body.statements) { write(" "); - emit(body.statements[i]); + emit(statement); } emitTempDeclarations(/*newLine*/ false); write(" "); @@ -4257,11 +4596,11 @@ module ts { function findInitialSuperCall(ctor: ConstructorDeclaration): ExpressionStatement { if (ctor.body) { - var statement = (ctor.body).statements[0]; + let statement = (ctor.body).statements[0]; if (statement && statement.kind === SyntaxKind.ExpressionStatement) { - var expr = (statement).expression; + let expr = (statement).expression; if (expr && expr.kind === SyntaxKind.CallExpression) { - var func = (expr).expression; + let func = (expr).expression; if (func && func.kind === SyntaxKind.SuperKeyword) { return statement; } @@ -4277,7 +4616,7 @@ module ts { emitStart(param); emitStart(param.name); write("this."); - emitNode(param.name); + emitNodeWithoutSourceMap(param.name); emitEnd(param.name); write(" = "); emit(param.name); @@ -4288,10 +4627,10 @@ module ts { } function emitMemberAccessForPropertyName(memberName: DeclarationName) { - // TODO: (jfreeman,drosen): comment on why this is emitNode instead of emit here. + // TODO: (jfreeman,drosen): comment on why this is emitNodeWithoutSourceMap instead of emit here. if (memberName.kind === SyntaxKind.StringLiteral || memberName.kind === SyntaxKind.NumericLiteral) { write("["); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); write("]"); } else if (memberName.kind === SyntaxKind.ComputedPropertyName) { @@ -4299,7 +4638,7 @@ module ts { } else { write("."); - emitNode(memberName); + emitNodeWithoutSourceMap(memberName); } } @@ -4311,7 +4650,7 @@ module ts { emitStart(member); emitStart((member).name); if (staticFlag) { - emitNode(node.name); + emitDeclarationName(node); } else { write("this"); @@ -4327,7 +4666,7 @@ module ts { }); } - function emitMemberFunctions(node: ClassDeclaration) { + function emitMemberFunctionsForES5AndLower(node: ClassDeclaration) { forEach(node.members, member => { if (member.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature) { if (!(member).body) { @@ -4338,14 +4677,13 @@ module ts { emitLeadingComments(member); emitStart(member); emitStart((member).name); - emitNode(node.name); // TODO (shkamat,drosen): comment for why emitNode instead of emit. + emitDeclarationName(node); if (!(member.flags & NodeFlags.Static)) { write(".prototype"); } emitMemberAccessForPropertyName((member).name); emitEnd((member).name); write(" = "); - // TODO (drosen): Should we performing emitStart twice on emitStart(member)? emitStart(member); emitFunctionDeclaration(member); emitEnd(member); @@ -4354,18 +4692,17 @@ module ts { emitTrailingComments(member); } else if (member.kind === SyntaxKind.GetAccessor || member.kind === SyntaxKind.SetAccessor) { - var accessors = getAllAccessorDeclarations(node.members, member); + let accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); emitStart(member); write("Object.defineProperty("); emitStart((member).name); - emitNode(node.name); + emitDeclarationName(node); if (!(member.flags & NodeFlags.Static)) { write(".prototype"); } write(", "); - // TODO: Shouldn't emitStart on name occur *here*? emitExpressionForPropertyName((member).name); emitEnd((member).name); write(", {"); @@ -4405,11 +4742,213 @@ module ts { }); } - function emitClassDeclaration(node: ClassDeclaration) { - write("var "); - emit(node.name); - write(" = (function ("); + function emitMemberFunctionsForES6AndHigher(node: ClassDeclaration) { + for (let member of node.members) { + if ((member.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature) && !(member).body) { + emitPinnedOrTripleSlashComments(member); + } + else if (member.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature || member.kind === SyntaxKind.GetAccessor || member.kind === SyntaxKind.SetAccessor) { + writeLine(); + emitLeadingComments(member); + emitStart(member); + if (member.flags & NodeFlags.Static) { + write("static "); + } + + if (member.kind === SyntaxKind.GetAccessor) { + write("get "); + } + else if (member.kind === SyntaxKind.SetAccessor) { + write("set "); + } + emit((member).name); + emitSignatureAndBody(member); + emitEnd(member); + emitTrailingComments(member); + } + } + } + + function emitConstructor(node: ClassDeclaration, baseTypeNode: TypeReferenceNode) { + let saveTempCount = tempCount; + let saveTempVariables = tempVariables; + let saveTempParameters = tempParameters; + tempCount = 0; + tempVariables = undefined; + tempParameters = undefined; + + let popFrame = enterNameScope(); + // Check if we have property assignment inside class declaration. + // If there is property assignment, we need to emit constructor whether users define it or not + // If there is no property assignment, we can omit constructor if users do not define it + let hasInstancePropertyWithInitializer = false; + + // Emit the constructor overload pinned comments + forEach(node.members, member => { + if (member.kind === SyntaxKind.Constructor && !(member).body) { + emitPinnedOrTripleSlashComments(member); + } + // Check if there is any non-static property assignment + if (member.kind === SyntaxKind.PropertyDeclaration && (member).initializer && (member.flags & NodeFlags.Static) === 0) { + hasInstancePropertyWithInitializer = true; + } + }); + + let ctor = getFirstConstructorWithBody(node); + + // For target ES6 and above, if there is no user-defined constructor and there is no property assignment + // do not emit constructor in class declaration. + if (languageVersion >= ScriptTarget.ES6 && !ctor && !hasInstancePropertyWithInitializer) { + return; + } + + if (ctor) { + emitLeadingComments(ctor); + } + emitStart(ctor || node); + + if (languageVersion < ScriptTarget.ES6) { + write("function "); + emitDeclarationName(node); + emitSignatureParameters(ctor); + } + else { + write("constructor"); + if (ctor) { + emitSignatureParameters(ctor); + } + else { + // Based on EcmaScript6 section 14.5.14: Runtime Semantics: ClassDefinitionEvaluation. + // If constructor is empty, then, + // If ClassHeritageopt is present, then + // Let constructor be the result of parsing the String "constructor(... args){ super (...args);}" using the syntactic grammar with the goal symbol MethodDefinition. + // Else, + // Let constructor be the result of parsing the String "constructor( ){ }" using the syntactic grammar with the goal symbol MethodDefinition + if (baseTypeNode) { + write("(...args)"); + } + else { + write("()"); + } + } + } + + write(" {"); + scopeEmitStart(node, "constructor"); + increaseIndent(); + if (ctor) { + emitDetachedComments(ctor.body.statements); + } + emitCaptureThisForNodeIfNecessary(node); + if (ctor) { + emitDefaultValueAssignments(ctor); + emitRestParameter(ctor); + if (baseTypeNode) { + var superCall = findInitialSuperCall(ctor); + if (superCall) { + writeLine(); + emit(superCall); + } + } + emitParameterPropertyAssignments(ctor); + } + else { + if (baseTypeNode) { + writeLine(); + emitStart(baseTypeNode); + if (languageVersion < ScriptTarget.ES6) { + write("_super.apply(this, arguments);"); + } + else { + write("super(...args);"); + } + emitEnd(baseTypeNode); + } + } + emitMemberAssignments(node, /*staticFlag*/0); + if (ctor) { + var statements: Node[] = (ctor.body).statements; + if (superCall) { + statements = statements.slice(1); + } + emitLines(statements); + } + emitTempDeclarations(/*newLine*/ true); + writeLine(); + if (ctor) { + emitLeadingCommentsOfPosition((ctor.body).statements.end); + } + decreaseIndent(); + emitToken(SyntaxKind.CloseBraceToken, ctor ? (ctor.body).statements.end : node.members.end); + scopeEmitEnd(); + emitEnd(ctor || node); + if (ctor) { + emitTrailingComments(ctor); + } + + exitNameScope(popFrame); + + tempCount = saveTempCount; + tempVariables = saveTempVariables; + tempParameters = saveTempParameters; + } + + function emitClassDeclarationForES6AndHigher(node: ClassDeclaration) { + if (isES6ModuleMemberDeclaration(node)) { + write("export "); + + if (node.flags & NodeFlags.Default) { + write("default "); + } + } + + write("class "); + // check if this is an "export default class" as it may not have a name + if (node.name || !(node.flags & NodeFlags.Default)) { + emitDeclarationName(node); + } var baseTypeNode = getClassBaseTypeNode(node); + if (baseTypeNode) { + write(" extends "); + emit(baseTypeNode.typeName); + } + write(" {"); + increaseIndent(); + scopeEmitStart(node); + writeLine(); + emitConstructor(node, baseTypeNode); + emitMemberFunctionsForES6AndHigher(node); + decreaseIndent(); + writeLine(); + emitToken(SyntaxKind.CloseBraceToken, node.members.end); + scopeEmitEnd(); + + // Emit static property assignment. Because classDeclaration is lexically evaluated, + // it is safe to emit static property assignment after classDeclaration + // From ES6 specification: + // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using + // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. + writeLine(); + emitMemberAssignments(node, NodeFlags.Static); + + // If this is an exported class, but not on the top level (i.e. on an internal + // module), export it + if (!isES6ModuleMemberDeclaration(node) && (node.flags & NodeFlags.Export)) { + writeLine(); + emitStart(node); + emitModuleMemberName(node); + write(" = "); + emitDeclarationName(node); + emitEnd(node); + write(";"); + } + } + + function emitClassDeclarationBelowES6(node: ClassDeclaration) { + write("var "); + emitDeclarationName(node); + write(" = (function ("); + let baseTypeNode = getClassBaseTypeNode(node); if (baseTypeNode) { write("_super"); } @@ -4420,20 +4959,19 @@ module ts { writeLine(); emitStart(baseTypeNode); write("__extends("); - emit(node.name); + emitDeclarationName(node); write(", _super);"); emitEnd(baseTypeNode); } writeLine(); - emitConstructorOfClass(); - emitMemberFunctions(node); + emitConstructor(node, baseTypeNode); + emitMemberFunctionsForES5AndLower(node); emitMemberAssignments(node, NodeFlags.Static); writeLine(); - function emitClassReturnStatement() { + emitToken(SyntaxKind.CloseBraceToken, node.members.end, () => { write("return "); - emitNode(node.name); - } - emitToken(SyntaxKind.CloseBraceToken, node.members.end, emitClassReturnStatement); + emitDeclarationName(node); + }); write(";"); decreaseIndent(); writeLine(); @@ -4446,96 +4984,20 @@ module ts { } write(");"); emitEnd(node); - if (node.flags & NodeFlags.Export) { + + if (node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) { writeLine(); emitStart(node); emitModuleMemberName(node); write(" = "); - emit(node.name); + emitDeclarationName(node); emitEnd(node); write(";"); } - if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile) { + + if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } - - function emitConstructorOfClass() { - var saveTempCount = tempCount; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - tempCount = 0; - tempVariables = undefined; - tempParameters = undefined; - - var popFrame = enterNameScope(); - - // Emit the constructor overload pinned comments - forEach(node.members, member => { - if (member.kind === SyntaxKind.Constructor && !(member).body) { - emitPinnedOrTripleSlashComments(member); - } - }); - - var ctor = getFirstConstructorWithBody(node); - if (ctor) { - emitLeadingComments(ctor); - } - emitStart(ctor || node); - write("function "); - emit(node.name); - emitSignatureParameters(ctor); - write(" {"); - scopeEmitStart(node, "constructor"); - increaseIndent(); - if (ctor) { - emitDetachedComments((ctor.body).statements); - } - emitCaptureThisForNodeIfNecessary(node); - if (ctor) { - emitDefaultValueAssignments(ctor); - emitRestParameter(ctor); - if (baseTypeNode) { - var superCall = findInitialSuperCall(ctor); - if (superCall) { - writeLine(); - emit(superCall); - } - } - emitParameterPropertyAssignments(ctor); - } - else { - if (baseTypeNode) { - writeLine(); - emitStart(baseTypeNode); - write("_super.apply(this, arguments);"); - emitEnd(baseTypeNode); - } - } - emitMemberAssignments(node, /*nonstatic*/0); - if (ctor) { - var statements: Node[] = (ctor.body).statements; - if (superCall) statements = statements.slice(1); - emitLines(statements); - } - emitTempDeclarations(/*newLine*/ true); - writeLine(); - if (ctor) { - emitLeadingCommentsOfPosition((ctor.body).statements.end); - } - decreaseIndent(); - emitToken(SyntaxKind.CloseBraceToken, ctor ? (ctor.body).statements.end : node.members.end); - scopeEmitEnd(); - emitEnd(ctor || node); - if (ctor) { - emitTrailingComments(ctor); - } - - exitNameScope(popFrame); - - tempCount = saveTempCount; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - } } function emitInterfaceDeclaration(node: InterfaceDeclaration) { @@ -4543,7 +5005,7 @@ module ts { } function shouldEmitEnumDeclaration(node: EnumDeclaration) { - var isConstEnum = isConst(node); + let isConstEnum = isConst(node); return !isConstEnum || compilerOptions.preserveConstEnums; } @@ -4553,7 +5015,7 @@ module ts { return; } - if (!(node.flags & NodeFlags.Export)) { + if (!(node.flags & NodeFlags.Export) || isES6ModuleMemberDeclaration(node)) { emitStart(node); write("var "); emit(node.name); @@ -4580,7 +5042,10 @@ module ts { emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (node.flags & NodeFlags.Export) { + if (isES6ModuleMemberDeclaration(node)) { + emitES6NamedExportForDeclaration(node); + } + else if (node.flags & NodeFlags.Export) { writeLine(); emitStart(node); write("var "); @@ -4596,7 +5061,7 @@ module ts { } function emitEnumMember(node: EnumMember) { - var enumParent = node.parent; + let enumParent = node.parent; emitStart(node); write(resolver.getGeneratedNameForNode(enumParent)); write("["); @@ -4612,7 +5077,7 @@ module ts { } function writeEnumMemberDeclarationValue(member: EnumMember) { - var value = resolver.getConstantValue(member); + let value = resolver.getConstantValue(member); if (value !== undefined) { write(value.toString()); return; @@ -4627,7 +5092,7 @@ module ts { function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration: ModuleDeclaration): ModuleDeclaration { if (moduleDeclaration.body.kind === SyntaxKind.ModuleDeclaration) { - var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); + let recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } } @@ -4638,7 +5103,7 @@ module ts { function emitModuleDeclaration(node: ModuleDeclaration) { // Emit only if this module is non-ambient. - var shouldEmit = shouldEmitModuleDeclaration(node); + let shouldEmit = shouldEmitModuleDeclaration(node); if (!shouldEmit) { return emitPinnedOrTripleSlashComments(node); @@ -4657,11 +5122,11 @@ module ts { emitEnd(node.name); write(") "); if (node.body.kind === SyntaxKind.ModuleBlock) { - var saveTempCount = tempCount; - var saveTempVariables = tempVariables; + let saveTempCount = tempCount; + let saveTempVariables = tempVariables; tempCount = 0; tempVariables = undefined; - var popFrame = enterNameScope(); + let popFrame = enterNameScope(); emit(node.body); @@ -4678,12 +5143,13 @@ module ts { emit(node.body); decreaseIndent(); writeLine(); - var moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; + let moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; emitToken(SyntaxKind.CloseBraceToken, moduleBlock.statements.end); scopeEmitEnd(); } write(")("); - if (node.flags & NodeFlags.Export) { + // write moduleDecl = containingModule.m only if it is not exported es6 module member + if ((node.flags & NodeFlags.Export) && !isES6ModuleMemberDeclaration(node)) { emit(node.name); write(" = "); } @@ -4692,11 +5158,23 @@ module ts { emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (languageVersion < ScriptTarget.ES6 && node.name.kind === SyntaxKind.Identifier && node.parent === currentSourceFile) { + if (isES6ModuleMemberDeclaration(node)) { + emitES6NamedExportForDeclaration(node); + } + else if (languageVersion < ScriptTarget.ES6 && node.name.kind === SyntaxKind.Identifier && node.parent === currentSourceFile) { emitExportMemberAssignments(node.name); } } + function emitES6NamedExportForDeclaration(node: Declaration) { + writeLine(); + emitStart(node); + write("export { "); + emit(node.name); + write(" };"); + emitEnd(node); + } + function emitRequire(moduleName: Expression) { if (moduleName.kind === SyntaxKind.StringLiteral) { write("require("); @@ -4711,15 +5189,103 @@ module ts { } } - function emitImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { - var info = getExternalImportInfo(node); + function emitImportDeclaration(node: ImportDeclaration) { + if (languageVersion < ScriptTarget.ES6) { + return emitExternalImportDeclaration(node); + } + + // ES6 import + if (node.importClause) { + let shouldEmitDefaultBindings = hasReferencedDefaultName(node.importClause); + let shouldEmitNamedBindings = hasReferencedNamedBindings(node.importClause); + if (shouldEmitDefaultBindings || shouldEmitNamedBindings) { + write("import "); + emitStart(node.importClause); + if (shouldEmitDefaultBindings) { + emit(node.importClause.name); + if (shouldEmitNamedBindings) { + write(", "); + } + } + if (shouldEmitNamedBindings) { + emitLeadingComments(node.importClause.namedBindings); + emitStart(node.importClause.namedBindings); + if (node.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { + write("* as "); + emit((node.importClause.namedBindings).name); + } + else { + write("{ "); + let importSpecifiers = (node.importClause.namedBindings).elements; + let currentTextPos = writer.getTextPos(); + let needsComma = false; + for (var i = 0, n = importSpecifiers.length; i < n; i++) { + if (resolver.isReferencedAliasDeclaration(importSpecifiers[i])) { + if (needsComma) { + write(", "); + } + needsComma = true; + emit(importSpecifiers[i]); + } + } + write(" }"); + } + emitEnd(node.importClause.namedBindings); + emitTrailingComments(node.importClause.namedBindings); + } + + emitEnd(node.importClause); + write(" from "); + emit(node.moduleSpecifier); + write(";"); + } + } + else { + write("import "); + emit(node.moduleSpecifier); + write(";"); + } + } + + function hasReferencedDefaultName(importClause: ImportClause) { + // If the default import is used, the mark will be on the importClause, + // as the alias declaration. + // If there are other named bindings on the import clause, we will + // will mark either the namedBindings(import * as n) or the NamedImport + // in the case of import {a} + return resolver.isReferencedAliasDeclaration(importClause); + } + + function hasReferencedNamedBindings(importClause: ImportClause) { + if (importClause && importClause.namedBindings) { + if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { + return resolver.isReferencedAliasDeclaration(importClause.namedBindings); + } + else { + return forEach((importClause.namedBindings).elements, + namedImport => resolver.isReferencedAliasDeclaration(namedImport)); + } + } + } + + function emitImportOrExportSpecifier(node: ImportSpecifier) { + Debug.assert(languageVersion >= ScriptTarget.ES6); + if (node.propertyName) { + emit(node.propertyName); + write(" as "); + } + emit(node.name); + } + + function emitExternalImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { + let info = getExternalImportInfo(node); if (info) { - var declarationNode = info.declarationNode; - var namedImports = info.namedImports; + let declarationNode = info.declarationNode; + let namedImports = info.namedImports; if (compilerOptions.module !== ModuleKind.AMD) { emitLeadingComments(node); emitStart(node); - var moduleName = getExternalModuleName(node); + let moduleName = getExternalModuleName(node); if (declarationNode) { if (!(declarationNode.flags & NodeFlags.Export)) write("var "); emitModuleMemberName(declarationNode); @@ -4753,17 +5319,23 @@ module ts { function emitImportEqualsDeclaration(node: ImportEqualsDeclaration) { if (isExternalModuleImportEqualsDeclaration(node)) { - emitImportDeclaration(node); + emitExternalImportDeclaration(node); return; } // preserve old compiler's behavior: emit 'var' for import declaration (even if we do not consider them referenced) when // - current file is not external module // - import declaration is top level and target is value imported by entity name - if (resolver.isReferencedImportDeclaration(node) || + if (resolver.isReferencedAliasDeclaration(node) || (!isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { emitLeadingComments(node); emitStart(node); - if (!(node.flags & NodeFlags.Export)) write("var "); + if (isES6ModuleMemberDeclaration(node)) { + write("export "); + write("var "); + } + else if (!(node.flags & NodeFlags.Export)) { + write("var "); + } emitModuleMemberName(node); write(" = "); emit(node.moduleReference); @@ -4774,77 +5346,121 @@ module ts { } function emitExportDeclaration(node: ExportDeclaration) { - if (node.moduleSpecifier) { - emitStart(node); - var generatedName = resolver.getGeneratedNameForNode(node); - if (compilerOptions.module !== ModuleKind.AMD) { - write("var "); - write(generatedName); - write(" = "); - emitRequire(getExternalModuleName(node)); - } - if (node.exportClause) { - // export { x, y, ... } - forEach(node.exportClause.elements, specifier => { - writeLine(); - emitStart(specifier); - emitContainingModuleName(specifier); - write("."); - emitNode(specifier.name); - write(" = "); + if (languageVersion < ScriptTarget.ES6 || node.parent.kind !== SyntaxKind.SourceFile) { + if (node.moduleSpecifier) { + emitStart(node); + let generatedName = resolver.getGeneratedNameForNode(node); + if (compilerOptions.module !== ModuleKind.AMD) { + write("var "); write(generatedName); - write("."); - emitNode(specifier.propertyName || specifier.name); - write(";"); - emitEnd(specifier); - }); + write(" = "); + emitRequire(getExternalModuleName(node)); + } + if (node.exportClause) { + // export { x, y, ... } + forEach(node.exportClause.elements, specifier => { + writeLine(); + emitStart(specifier); + emitContainingModuleName(specifier); + write("."); + emitNodeWithoutSourceMap(specifier.name); + write(" = "); + write(generatedName); + write("."); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); + write(";"); + emitEnd(specifier); + }); + } + else { + // export * + let tempName = createTempVariable(node).text; + writeLine(); + write("for (var " + tempName + " in " + generatedName + ") if (!"); + emitContainingModuleName(node); + write(".hasOwnProperty(" + tempName + ")) "); + emitContainingModuleName(node); + write("[" + tempName + "] = " + generatedName + "[" + tempName + "];"); + } + emitEnd(node); } else { - // export * - var tempName = createTempVariable(node).text; - writeLine(); - write("for (var " + tempName + " in " + generatedName + ") if (!"); - emitContainingModuleName(node); - write(".hasOwnProperty(" + tempName + ")) "); - emitContainingModuleName(node); - write("[" + tempName + "] = " + generatedName + "[" + tempName + "];"); + // internal module + if (node.exportClause) { + // export { x, y, ... } + forEach(node.exportClause.elements, specifier => { + writeLine(); + emitStart(specifier); + emitContainingModuleName(specifier); + write("."); + emitNodeWithoutSourceMap(specifier.name); + write(" = "); + emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); + write(";"); + emitEnd(specifier); + }); + } } - emitEnd(node); + } + else { + write("export "); + if (node.exportClause) { + // export { x, y, ... } + write("{ "); + emitCommaList(node.exportClause.elements); + write(" }"); + } + else { + write("*"); + } + if (node.moduleSpecifier) { + write(" from "); + emit(node.moduleSpecifier); + } + write(";"); } } function createExternalImportInfo(node: Node): ExternalImportInfo { if (node.kind === SyntaxKind.ImportEqualsDeclaration) { if ((node).moduleReference.kind === SyntaxKind.ExternalModuleReference) { - return { - rootNode: node, - declarationNode: node - }; + if (resolver.isReferencedAliasDeclaration(node)) { + return { + rootNode: node, + declarationNode: node + }; + } } } else if (node.kind === SyntaxKind.ImportDeclaration) { - var importClause = (node).importClause; + let importClause = (node).importClause; if (importClause) { - if (importClause.name) { + if (importClause.name && resolver.isReferencedAliasDeclaration(importClause)) { return { rootNode: node, declarationNode: importClause }; } - if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { - return { - rootNode: node, - declarationNode: importClause.namedBindings - }; + if (hasReferencedNamedBindings(importClause)) { + if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { + return { + rootNode: node, + declarationNode: importClause.namedBindings + }; + } + else { + return { + rootNode: node, + namedImports: importClause.namedBindings, + localName: resolver.getGeneratedNameForNode(node) + }; + } } - return { - rootNode: node, - namedImports: importClause.namedBindings, - localName: resolver.getGeneratedNameForNode(node) - }; } - return { - rootNode: node + else { + return { + rootNode: node + }; } } else if (node.kind === SyntaxKind.ExportDeclaration) { @@ -4859,19 +5475,29 @@ module ts { function createExternalModuleInfo(sourceFile: SourceFile) { externalImports = []; exportSpecifiers = {}; + exportDefault = undefined; forEach(sourceFile.statements, node => { if (node.kind === SyntaxKind.ExportDeclaration && !(node).moduleSpecifier) { forEach((node).exportClause.elements, specifier => { - var name = (specifier.propertyName || specifier.name).text; + if (specifier.name.text === "default") { + exportDefault = exportDefault || specifier; + } + let name = (specifier.propertyName || specifier.name).text; (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); }); } + else if (node.kind === SyntaxKind.ExportAssignment) { + exportDefault = exportDefault || node; + } + else if (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.ClassDeclaration) { + if (node.flags & NodeFlags.Export && node.flags & NodeFlags.Default) { + exportDefault = exportDefault || node; + } + } else { - var info = createExternalImportInfo(node); + let info = createExternalImportInfo(node); if (info) { - if ((!info.declarationNode && !info.namedImports) || resolver.isReferencedImportDeclaration(node)) { - externalImports.push(info); - } + externalImports.push(info); } } }); @@ -4879,8 +5505,7 @@ module ts { function getExternalImportInfo(node: ImportDeclaration | ImportEqualsDeclaration): ExternalImportInfo { if (externalImports) { - for (var i = 0; i < externalImports.length; i++) { - var info = externalImports[i]; + for (let info of externalImports) { if (info.rootNode === node) { return info; } @@ -4888,14 +5513,6 @@ module ts { } } - function getFirstExportAssignment(sourceFile: SourceFile) { - return forEach(sourceFile.statements, node => { - if (node.kind === SyntaxKind.ExportAssignment) { - return node; - } - }); - } - function sortAMDModules(amdModules: {name: string; path: string}[]) { // AMD modules with declared variable names go first return amdModules.sort((moduleA, moduleB) => { @@ -4910,6 +5527,7 @@ module ts { } function emitAMDModule(node: SourceFile, startIndex: number) { + createExternalModuleInfo(node); writeLine(); write("define("); sortAMDModules(node.amdDependencies); @@ -4919,7 +5537,7 @@ module ts { write("[\"require\", \"exports\""); forEach(externalImports, info => { write(", "); - var moduleName = getExternalModuleName(info.rootNode); + let moduleName = getExternalModuleName(info.rootNode); if (moduleName.kind === SyntaxKind.StringLiteral) { emitLiteral(moduleName); } @@ -4928,7 +5546,7 @@ module ts { } }); forEach(node.amdDependencies, amdDependency => { - var text = "\"" + amdDependency.path + "\""; + let text = "\"" + amdDependency.path + "\""; write(", "); write(text); }); @@ -4953,43 +5571,72 @@ module ts { emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(/*newLine*/ true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { - writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("return "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); - } + emitExportDefault(node, /*emitAsReturn*/ true); decreaseIndent(); writeLine(); write("});"); } function emitCommonJSModule(node: SourceFile, startIndex: number) { + createExternalModuleInfo(node); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(/*newLine*/ true); - var exportName = resolver.getExportAssignmentName(node); - if (exportName) { + emitExportDefault(node, /*emitAsReturn*/ false); + } + + function emitES6Module(node: SourceFile, startIndex: number) { + externalImports = undefined; + exportSpecifiers = undefined; + exportDefault = undefined; + emitCaptureThisForNodeIfNecessary(node); + emitLinesStartingAt(node.statements, startIndex); + emitTempDeclarations(/*newLine*/ true); + // Emit exportDefault if it exists will happen as part + // or normal statment emit. + } + + function emitExportAssignment(node: ExportAssignment) { + // Only emit exportAssignment/export default if we are in ES6 + // Other modules will handel it diffrentlly + if (languageVersion >= ScriptTarget.ES6) { writeLine(); - var exportAssignment = getFirstExportAssignment(node); - emitStart(exportAssignment); - write("module.exports = "); - emitStart(exportAssignment.exportName); - write(exportName); - emitEnd(exportAssignment.exportName); - write(";"); - emitEnd(exportAssignment); + emitStart(node); + write("export default "); + var expression = node.expression; + emit(expression); + if (expression.kind !== SyntaxKind.FunctionDeclaration && + expression.kind !== SyntaxKind.ClassDeclaration) { + write(";"); + } + emitEnd(node); + } + } + + function emitExportDefault(sourceFile: SourceFile, emitAsReturn: boolean) { + // ES6 emit is handled in emitExportAssignment + if (exportDefault && resolver.hasExportDefaultValue(sourceFile)) { + if (languageVersion < ScriptTarget.ES6) { + writeLine(); + emitStart(exportDefault); + write(emitAsReturn ? "return " : "module.exports = "); + if (exportDefault.kind === SyntaxKind.ExportAssignment) { + emit((exportDefault).expression); + } + else if (exportDefault.kind === SyntaxKind.ExportSpecifier) { + emit((exportDefault).propertyName); + } + else { + emitDeclarationName(exportDefault); + } + write(";"); + emitEnd(exportDefault); + } } } function emitDirectivePrologues(statements: Node[], startWithNewLine: boolean): number { - for (var i = 0; i < statements.length; ++i) { + for (let i = 0; i < statements.length; ++i) { if (isPrologueDirective(statements[i])) { if (startWithNewLine || i > 0) { writeLine(); @@ -5004,15 +5651,16 @@ module ts { return statements.length; } - function emitSourceFile(node: SourceFile) { - currentSourceFile = node; + function emitSourceFileNode(node: SourceFile) { // Start new file on new line writeLine(); emitDetachedComments(node); // emit prologue directives prior to __extends var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); - if (!extendsEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitExtends) { + // Only Emit __extends function when target ES5. + // For target ES6 and above, we can emit classDeclaration as if. + if ((languageVersion < ScriptTarget.ES6) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitExtends)) { writeLine(); write("var __extends = this.__extends || function (d, b) {"); increaseIndent(); @@ -5030,8 +5678,10 @@ module ts { extendsEmitted = true; } if (isExternalModule(node)) { - createExternalModuleInfo(node); - if (compilerOptions.module === ModuleKind.AMD) { + if (languageVersion >= ScriptTarget.ES6) { + emitES6Module(node, startIndex); + } + else if (compilerOptions.module === ModuleKind.AMD) { emitAMDModule(node, startIndex); } else { @@ -5041,6 +5691,7 @@ module ts { else { externalImports = undefined; exportSpecifiers = undefined; + exportDefault = undefined; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(/*newLine*/ true); @@ -5049,7 +5700,7 @@ module ts { emitLeadingComments(node.endOfFileToken); } - function emitNode(node: Node, disableComments?:boolean): void { + function emitNodeWithoutSourceMapWithComments(node: Node, allowGeneratedIdentifiers?: boolean): void { if (!node) { return; } @@ -5058,18 +5709,30 @@ module ts { return emitPinnedOrTripleSlashComments(node); } - var emitComments = !disableComments && shouldEmitLeadingAndTrailingComments(node); + let emitComments = shouldEmitLeadingAndTrailingComments(node); if (emitComments) { emitLeadingComments(node); } - emitJavaScriptWorker(node); + emitJavaScriptWorker(node, allowGeneratedIdentifiers); if (emitComments) { emitTrailingComments(node); } } + function emitNodeWithoutSourceMapWithoutComments(node: Node, allowGeneratedIdentifiers?: boolean): void { + if (!node) { + return; + } + + if (node.flags & NodeFlags.Ambient) { + return emitPinnedOrTripleSlashComments(node); + } + + emitJavaScriptWorker(node, allowGeneratedIdentifiers); + } + function shouldEmitLeadingAndTrailingComments(node: Node) { switch (node.kind) { // All of these entities are emitted in a specialized fashion. As such, we allow @@ -5097,11 +5760,11 @@ module ts { return true; } - function emitJavaScriptWorker(node: Node) { + function emitJavaScriptWorker(node: Node, allowGeneratedIdentifiers: boolean = true) { // Check if the node can be emitted regardless of the ScriptTarget switch (node.kind) { case SyntaxKind.Identifier: - return emitIdentifier(node); + return emitIdentifier(node, allowGeneratedIdentifiers); case SyntaxKind.Parameter: return emitParameter(node); case SyntaxKind.MethodDeclaration: @@ -5231,7 +5894,7 @@ module ts { case SyntaxKind.VariableDeclaration: return emitVariableDeclaration(node); case SyntaxKind.ClassDeclaration: - return emitClassDeclaration(node); + return languageVersion < ScriptTarget.ES6 ? emitClassDeclarationBelowES6(node) : emitClassDeclarationForES6AndHigher(node); case SyntaxKind.InterfaceDeclaration: return emitInterfaceDeclaration(node); case SyntaxKind.EnumDeclaration: @@ -5242,12 +5905,17 @@ module ts { return emitModuleDeclaration(node); case SyntaxKind.ImportDeclaration: return emitImportDeclaration(node); + case SyntaxKind.ImportSpecifier: + case SyntaxKind.ExportSpecifier: + return emitImportOrExportSpecifier(node); case SyntaxKind.ImportEqualsDeclaration: return emitImportEqualsDeclaration(node); case SyntaxKind.ExportDeclaration: return emitExportDeclaration(node); + case SyntaxKind.ExportAssignment: + return emitExportAssignment(node); case SyntaxKind.SourceFile: - return emitSourceFile(node); + return emitSourceFileNode(node); } } @@ -5257,7 +5925,7 @@ module ts { function getLeadingCommentsWithoutDetachedComments() { // get the leading comments from detachedPos - var leadingComments = getLeadingCommentRanges(currentSourceFile.text, detachedCommentsInfo[detachedCommentsInfo.length - 1].detachedCommentEndPos); + let leadingComments = getLeadingCommentRanges(currentSourceFile.text, detachedCommentsInfo[detachedCommentsInfo.length - 1].detachedCommentEndPos); if (detachedCommentsInfo.length - 1) { detachedCommentsInfo.pop(); } @@ -5272,7 +5940,7 @@ module ts { // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { if (node.parent.kind === SyntaxKind.SourceFile || node.pos !== node.parent.pos) { - var leadingComments: CommentRange[]; + let leadingComments: CommentRange[]; if (hasDetachedComments(node.pos)) { // get comments without detached comments leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -5287,7 +5955,7 @@ module ts { } function emitLeadingDeclarationComments(node: Node) { - var leadingComments = getLeadingCommentsToEmit(node); + let leadingComments = getLeadingCommentsToEmit(node); emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space emitComments(currentSourceFile, writer, leadingComments, /*trailingSeparator*/ true, newLine, writeComment); @@ -5297,7 +5965,7 @@ module ts { // Emit the trailing comments only if the parent's end doesn't match if (node.parent) { if (node.parent.kind === SyntaxKind.SourceFile || node.end !== node.parent.end) { - var trailingComments = getTrailingCommentRanges(currentSourceFile.text, node.end); + let trailingComments = getTrailingCommentRanges(currentSourceFile.text, node.end); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ emitComments(currentSourceFile, writer, trailingComments, /*trailingSeparator*/ false, newLine, writeComment); } @@ -5305,7 +5973,7 @@ module ts { } function emitLeadingCommentsOfLocalPosition(pos: number) { - var leadingComments: CommentRange[]; + let leadingComments: CommentRange[]; if (hasDetachedComments(pos)) { // get comments without detached comments leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -5320,15 +5988,15 @@ module ts { } function emitDetachedCommentsAtPosition(node: TextRange) { - var leadingComments = getLeadingCommentRanges(currentSourceFile.text, node.pos); + let leadingComments = getLeadingCommentRanges(currentSourceFile.text, node.pos); if (leadingComments) { - var detachedComments: CommentRange[] = []; - var lastComment: CommentRange; + let detachedComments: CommentRange[] = []; + let lastComment: CommentRange; forEach(leadingComments, comment => { if (lastComment) { - var lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); + let lastCommentLine = getLineOfLocalPosition(currentSourceFile, lastComment.end); + let commentLine = getLineOfLocalPosition(currentSourceFile, comment.pos); if (commentLine >= lastCommentLine + 2) { // There was a blank line between the last comment and this comment. This @@ -5346,13 +6014,13 @@ module 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, detachedComments[detachedComments.length - 1].end); - var nodeLine = getLineOfLocalPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node.pos)); + let lastCommentLine = getLineOfLocalPosition(currentSourceFile, detachedComments[detachedComments.length - 1].end); + let nodeLine = getLineOfLocalPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node.pos)); if (nodeLine >= lastCommentLine + 2) { // Valid detachedComments emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); emitComments(currentSourceFile, writer, detachedComments, /*trailingSeparator*/ true, newLine, writeComment); - var currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: detachedComments[detachedComments.length - 1].end }; + let currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: detachedComments[detachedComments.length - 1].end }; if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); } @@ -5364,8 +6032,9 @@ module ts { } } - function emitPinnedOrTripleSlashCommentsOfNode(node: Node) { - var pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); + /** Emits /// or pinned which is comment starting with /*! comments */ + function emitPinnedOrTripleSlashComments(node: Node) { + let pinnedComments = ts.filter(getLeadingCommentsToEmit(node), isPinnedOrTripleSlashComment); function isPinnedOrTripleSlashComment(comment: CommentRange) { if (currentSourceFile.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk) { @@ -5388,13 +6057,13 @@ module ts { } function writeDeclarationFile(jsFilePath: string, sourceFile: SourceFile) { - var emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile); + let 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) { - var declarationOutput = emitDeclarationResult.referencePathsOutput; + let declarationOutput = emitDeclarationResult.referencePathsOutput; // apply additions - var appliedSyncOutputPos = 0; + let appliedSyncOutputPos = 0; forEach(emitDeclarationResult.aliasDeclarationEmitInfo, aliasEmitInfo => { if (aliasEmitInfo.asynchronousOutput) { declarationOutput += emitDeclarationResult.synchronousDeclarationOutput.substring(appliedSyncOutputPos, aliasEmitInfo.outputPos); @@ -5416,3 +6085,4 @@ module ts { } } } + diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 0bb09330070..9eae67a29b8 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2,13 +2,13 @@ /// module ts { - var nodeConstructors = new Array Node>(SyntaxKind.Count); - /* @internal */ export var parseTime = 0; + let nodeConstructors = new Array Node>(SyntaxKind.Count); + /* @internal */ export let parseTime = 0; export function getNodeConstructor(kind: SyntaxKind): new () => Node { return nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)); } - + export function createNode(kind: SyntaxKind): Node { return new (getNodeConstructor(kind))(); } @@ -27,8 +27,8 @@ module ts { function visitEachNode(cbNode: (node: Node) => T, nodes: Node[]) { if (nodes) { - for (var i = 0, len = nodes.length; i < len; i++) { - var result = cbNode(nodes[i]); + for (let node of nodes) { + let result = cbNode(node); if (result) { return result; } @@ -47,8 +47,8 @@ module ts { // The visitXXX functions could be written as local functions that close over the cbNode and cbNodeArray // callback parameters, but that causes a closure allocation for each invocation with noticeable effects // on performance. - var visitNodes: (cb: (node: Node | Node[]) => T, nodes: Node[]) => T = cbNodeArray ? visitNodeArray : visitEachNode; - var cbNodes = cbNodeArray || cbNode; + let visitNodes: (cb: (node: Node | Node[]) => T, nodes: Node[]) => T = cbNodeArray ? visitNodeArray : visitEachNode; + let cbNodes = cbNodeArray || cbNode; switch (node.kind) { case SyntaxKind.QualifiedName: return visitNode(cbNode, (node).left) || @@ -95,6 +95,7 @@ module ts { visitNodes(cbNodes, (node).typeParameters) || visitNodes(cbNodes, (node).parameters) || visitNode(cbNode, (node).type) || + visitNode(cbNode, (node).equalsGreaterThanToken) || visitNode(cbNode, (node).body); case SyntaxKind.TypeReference: return visitNode(cbNode, (node).typeName) || @@ -120,6 +121,7 @@ module ts { return visitNodes(cbNodes, (node).properties); case SyntaxKind.PropertyAccessExpression: return visitNode(cbNode, (node).expression) || + visitNode(cbNode, (node).dotToken) || visitNode(cbNode, (node).name); case SyntaxKind.ElementAccessExpression: return visitNode(cbNode, (node).expression) || @@ -156,7 +158,9 @@ module ts { visitNode(cbNode, (node).right); case SyntaxKind.ConditionalExpression: return visitNode(cbNode, (node).condition) || + visitNode(cbNode, (node).questionToken) || visitNode(cbNode, (node).whenTrue) || + visitNode(cbNode, (node).colonToken) || visitNode(cbNode, (node).whenFalse); case SyntaxKind.SpreadElementExpression: return visitNode(cbNode, (node).expression); @@ -206,7 +210,9 @@ module ts { visitNode(cbNode, (node).statement); case SyntaxKind.SwitchStatement: return visitNode(cbNode, (node).expression) || - visitNodes(cbNodes, (node).clauses); + visitNode(cbNode, (node).caseBlock); + case SyntaxKind.CaseBlock: + return visitNodes(cbNodes, (node).clauses); case SyntaxKind.CaseClause: return visitNode(cbNode, (node).expression) || visitNodes(cbNodes, (node).statements); @@ -277,7 +283,8 @@ module ts { visitNode(cbNode, (node).name); case SyntaxKind.ExportAssignment: return visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, (node).exportName); + visitNode(cbNode, (node).expression) || + visitNode(cbNode, (node).type); case SyntaxKind.TemplateExpression: return visitNode(cbNode, (node).head) || visitNodes(cbNodes, (node).templateSpans); case SyntaxKind.TemplateSpan: @@ -357,28 +364,29 @@ module ts { case SyntaxKind.ExportKeyword: return NodeFlags.Export; case SyntaxKind.DeclareKeyword: return NodeFlags.Ambient; case SyntaxKind.ConstKeyword: return NodeFlags.Const; + case SyntaxKind.DefaultKeyword: return NodeFlags.Default; } return 0; } function fixupParentReferences(sourceFile: SourceFile) { // normally parent references are set during binding. However, for clients that only need - // a syntax tree, and no semantic features, then the binding process is an unnecessary + // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent: Node = sourceFile; + let parent: Node = sourceFile; forEachChild(sourceFile, visitNode); return; function visitNode(n: Node): void { // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental + // allows us to quickly bail out of setting parents for subtrees during incremental // parsing if (n.parent !== parent) { n.parent = parent; - var saveParent = parent; + let saveParent = parent; parent = n; forEachChild(n, visitNode); parent = saveParent; @@ -411,7 +419,7 @@ module ts { var text = oldText.substring(node.pos, node.end); } - // Ditch any existing LS children we may have created. This way we can avoid + // Ditch any existing LS children we may have created. This way we can avoid // moving them forward. node._children = undefined; node.pos += delta; @@ -430,8 +438,8 @@ module ts { array.pos += delta; array.end += delta; - for (var i = 0, n = array.length; i < n; i++) { - visitNode(array[i]); + for (let node of array) { + visitNode(node); } } } @@ -449,9 +457,9 @@ module ts { // 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 + // 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----------------- @@ -465,7 +473,7 @@ module ts { // -------------------XXXYYYYYYY----------------- // -------------------ZZZ----------------- // - // In this case, any element that started in the 'X' range will keep its position. + // 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. @@ -475,7 +483,7 @@ module ts { 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 + // 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: // @@ -490,7 +498,7 @@ module ts { // -------------------XXXYYYYYYY----------------- // -------------------ZZZ----------------- // - // In this case, any element that ended in the 'X' range will keep its position. + // 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. @@ -499,7 +507,7 @@ module ts { element.end += delta; } else { - // Element ends in the change range. The element will keep its position if + // 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); } @@ -513,7 +521,7 @@ module ts { function checkNodePositions(node: Node, aggressiveChecks: boolean) { if (aggressiveChecks) { - var pos = node.pos; + let pos = node.pos; forEachChild(node, child => { Debug.assert(child.pos >= pos); pos = child.end; @@ -538,7 +546,7 @@ module ts { function visitNode(child: IncrementalNode) { 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 + // 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; @@ -547,7 +555,7 @@ module ts { // 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; + let fullEnd = child.end; if (fullEnd >= changeStart) { child.intersectsChange = true; child._children = undefined; @@ -576,15 +584,15 @@ module ts { // 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; + let 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, n = array.length; i < n; i++) { - visitNode(array[i]); + for (let node of array) { + visitNode(node); } return; } @@ -601,39 +609,39 @@ module ts { // 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 + // 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; + // that the prior token sees that change. + let maxLookahead = 1; - var start = changeRange.span.start; + let 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); + for (let i = 0; start > 0 && i <= maxLookahead; i++) { + let nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; + let position = nearestNode.pos; start = Math.max(0, position - 1); } - var finalSpan = createTextSpanFromBounds(start, textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); + let finalSpan = createTextSpanFromBounds(start, textSpanEnd(changeRange.span)); + let finalLength = changeRange.newLength + (changeRange.span.start - start); return createTextChangeRange(finalSpan, finalLength); } function findNearestNodeStartingBeforeOrAtPosition(sourceFile: SourceFile, position: number): Node { - var bestResult: Node = sourceFile; - var lastNodeEntirelyBeforePosition: Node; + let bestResult: Node = sourceFile; + let lastNodeEntirelyBeforePosition: Node; forEachChild(sourceFile, visit); if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); + let lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { bestResult = lastChildOfLastEntireNodeBeforePosition; } @@ -643,7 +651,7 @@ module ts { function getLastChild(node: Node): Node { while (true) { - var lastChild = getLastChildWorker(node); + let lastChild = getLastChildWorker(node); if (lastChild) { node = lastChild; } @@ -654,7 +662,7 @@ module ts { } function getLastChildWorker(node: Node): Node { - var last: Node = undefined; + let last: Node = undefined; forEachChild(node, child => { if (nodeIsPresent(child)) { last = child; @@ -670,7 +678,7 @@ module ts { return; } - // If the child intersects this position, then this node is currently the nearest + // 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) { @@ -681,7 +689,7 @@ module ts { // 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 + // 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 @@ -697,15 +705,15 @@ module 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". + // ? $ : <...> <...> + // + // 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 + // 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; @@ -722,29 +730,29 @@ module ts { } function checkChangeRange(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks: boolean) { - var oldText = sourceFile.text; + let oldText = sourceFile.text; if (textChangeRange) { Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); if (aggressiveChecks || Debug.shouldAssert(AssertionLevel.VeryAggressive)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); + let oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + let newTextPrefix = newText.substr(0, textChangeRange.span.start); Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); + let oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); + let newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); Debug.assert(oldTextSuffix === newTextSuffix); } } } - // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter + // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter // indicates what changed between the 'text' that this SourceFile has and the 'newText'. - // The SourceFile will be created with the compiler attempting to reuse as many nodes from + // The SourceFile will be created with the compiler attempting to reuse as many nodes from // this file as possible. // // Note: this function mutates nodes from this SourceFile. That means any existing nodes - // from this SourceFile that are being held onto may change as a result (including + // from this SourceFile that are being held onto may change as a result (including // becoming detached from any SourceFile). It is recommended that this SourceFile not // be used once 'update' is called on it. export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { @@ -763,36 +771,36 @@ module ts { } // 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. + // 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; + let incrementalSourceFile = sourceFile; Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); + let oldText = sourceFile.text; + let syntaxCursor = createSyntaxCursor(sourceFile); - // Make the actual change larger so that we know to reparse anything whose lookahead + // Make the actual change larger so that we know to reparse anything whose lookahead // might have intersected the change. - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + let changeRange = extendToAffectedRange(sourceFile, textChangeRange); checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - // Ensure that extending the affected range only moved the start of the change range + // Ensure that extending the affected range only moved the start of the change range // earlier in the file. Debug.assert(changeRange.span.start <= textChangeRange.span.start); Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); - // The is the amount the nodes after the edit range need to be adjusted. It can be + // 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 = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; + let delta = 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 + // 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 @@ -805,7 +813,7 @@ module ts { // // 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 + // 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, @@ -816,14 +824,14 @@ module ts { // 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 + // 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 = parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true) + let result = parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /* setParentNode */ true) return result; } @@ -836,7 +844,7 @@ module ts { /// Should be called only on prologue directives (isPrologueDirective(node) should be true) function isUseStrictPrologueDirective(sourceFile: SourceFile, node: Node): boolean { Debug.assert(isPrologueDirective(node)); - var nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(node).expression); + let nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(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). @@ -870,22 +878,22 @@ module ts { } function createSyntaxCursor(sourceFile: SourceFile): SyntaxCursor { - var currentArray: NodeArray = sourceFile.statements; - var currentArrayIndex = 0; + let currentArray: NodeArray = sourceFile.statements; + let currentArrayIndex = 0; Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = InvalidPosition.Value; + let current = currentArray[currentArrayIndex]; + let lastQueriedPosition = InvalidPosition.Value; return { currentNode(position: number) { - // 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 + // 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 + // 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++; @@ -899,7 +907,7 @@ module ts { } } - // Cache this query so that we don't do any extra work if the parser calls back + // 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 @@ -911,7 +919,7 @@ module ts { 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. @@ -942,8 +950,8 @@ module ts { 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]; + for (let i = 0, n = array.length; i < n; i++) { + let child = array[i]; if (child) { if (child.pos === position) { // Found the right node. We're done. @@ -954,7 +962,7 @@ module ts { } else { if (child.pos < position && position < child.end) { - // Position in somewhere within this child. Search in it and + // Position in somewhere within this child. Search in it and // stop searching in this array. forEachChild(child, visitNode, visitArray); return true; @@ -971,21 +979,21 @@ module ts { } export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { - var start = new Date().getTime(); - var result = parseSourceFile(fileName, sourceText, languageVersion, /*syntaxCursor*/ undefined, setParentNodes); + let start = new Date().getTime(); + let result = parseSourceFile(fileName, sourceText, languageVersion, /*syntaxCursor*/ undefined, setParentNodes); parseTime += new Date().getTime() - start; return result; } function parseSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, syntaxCursor: SyntaxCursor, setParentNodes = false): SourceFile { - var parsingContext: ParsingContext = 0; - var identifiers: Map = {}; - var identifierCount = 0; - var nodeCount = 0; - var token: SyntaxKind; + let parsingContext: ParsingContext = 0; + let identifiers: Map = {}; + let identifierCount = 0; + let nodeCount = 0; + let token: SyntaxKind; - var sourceFile = createNode(SyntaxKind.SourceFile, /*pos*/ 0); + let sourceFile = createNode(SyntaxKind.SourceFile, /*pos*/ 0); sourceFile.pos = 0; sourceFile.end = sourceText.length; @@ -1001,10 +1009,10 @@ module ts { // Whether or not we are in strict parsing mode. All that changes in strict parsing mode is // that some tokens that would be considered identifiers may be considered keywords. // - // When adding more parser context flags, consider which is the more common case that the + // When adding more parser context flags, consider which is the more common case that the // flag will be in. This should be hte 'false' state for that flag. The reason for this is // that we don't store data in our nodes unless the value is in the *non-default* state. So, - // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for + // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost // all nodes would need extra state on them to store this info. // @@ -1024,28 +1032,28 @@ module ts { // EqualityExpression[?In, ?Yield] === RelationalExpression[?In, ?Yield] // EqualityExpression[?In, ?Yield] !== RelationalExpression[?In, ?Yield] // - // Where you have to be careful is then understanding what the points are in the grammar + // Where you have to be careful is then understanding what the points are in the grammar // where the values are *not* passed along. For example: // // SingleNameBinding[Yield,GeneratorParameter] // [+GeneratorParameter]BindingIdentifier[Yield] Initializer[In]opt // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt // - // Here this is saying that if the GeneratorParameter context flag is set, that we should + // Here this is saying that if the GeneratorParameter context flag is set, that we should // explicitly set the 'yield' context flag to false before calling into the BindingIdentifier // and we should explicitly unset the 'yield' context flag before calling into the Initializer. - // production. Conversely, if the GeneratorParameter context flag is not set, then we + // production. Conversely, if the GeneratorParameter context flag is not set, then we // should leave the 'yield' context flag alone. // - // Getting this all correct is tricky and requires careful reading of the grammar to + // Getting this all correct is tricky and requires careful reading of the grammar to // understand when these values should be changed versus when they should be inherited. // // Note: it should not be necessary to save/restore these flags during speculative/lookahead // parsing. These context flags are naturally stored and restored through normal recursive // descent parsing and unwinding. - var contextFlags: ParserContextFlags = 0; + let contextFlags: ParserContextFlags = 0; - // Whether or not we've had a parse error since creating the last AST node. If we have + // Whether or not we've had a parse error since creating the last AST node. If we have // encountered an error, it will be stored on the next AST node we create. Parse errors // can be broken down into three categories: // @@ -1056,7 +1064,7 @@ module ts { // by the 'parseExpected' function. // // 3) A token was present that no parsing function was able to consume. This type of error - // only occurs in the 'abortParsingListOrMoveToNextToken' function when the parser + // only occurs in the 'abortParsingListOrMoveToNextToken' function when the parser // decides to skip the token. // // In all of these cases, we want to mark the next node as having had an error before it. @@ -1065,17 +1073,17 @@ module ts { // node. in that event we would then not produce the same errors as we did before, causing // significant confusion problems. // - // Note: it is necessary that this value be saved/restored during speculative/lookahead - // parsing. During lookahead parsing, we will often create a node. That node will have + // Note: it is necessary that this value be saved/restored during speculative/lookahead + // parsing. During lookahead parsing, we will often create a node. That node will have // this value attached, and then this value will be set back to 'false'. If we decide to // rewind, we must get back to the same value we had prior to the lookahead. // // Note: any errors at the end of the file that do not precede a regular node, should get // attached to the EOF token. - var parseErrorBeforeNextFinishedNode: boolean = false; + let parseErrorBeforeNextFinishedNode: boolean = false; // Create and prime the scanner before parsing the source elements. - var scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceText, scanError); + let scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceText, scanError); token = nextToken(); processReferenceComments(sourceFile); @@ -1125,11 +1133,11 @@ module ts { function allowInAnd(func: () => T): T { if (contextFlags & ParserContextFlags.DisallowIn) { setDisallowInContext(false); - var result = func(); + let result = func(); setDisallowInContext(true); return result; } - + // no need to do anything special if 'in' is already allowed. return func(); } @@ -1141,7 +1149,7 @@ module ts { } setDisallowInContext(true); - var result = func(); + let result = func(); setDisallowInContext(false); return result; } @@ -1153,7 +1161,7 @@ module ts { } setYieldContext(true); - var result = func(); + let result = func(); setYieldContext(false); return result; } @@ -1161,7 +1169,7 @@ module ts { function doOutsideOfYieldContext(func: () => T): T { if (contextFlags & ParserContextFlags.Yield) { setYieldContext(false); - var result = func(); + let result = func(); setYieldContext(true); return result; } @@ -1187,26 +1195,26 @@ module ts { } function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { - var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; + let start = scanner.getTokenPos(); + let length = scanner.getTextPos() - start; parseErrorAtPosition(start, length, message, arg0); } function parseErrorAtPosition(start: number, length: number, message: DiagnosticMessage, arg0?: any): void { // Don't report another error if it would just be at the same position as the last error. - var lastError = lastOrUndefined(sourceFile.parseDiagnostics); + let lastError = lastOrUndefined(sourceFile.parseDiagnostics); if (!lastError || start !== lastError.start) { sourceFile.parseDiagnostics.push(createFileDiagnostic(sourceFile, start, length, message, arg0)); } - // Mark that we've encountered an error. We'll set an appropriate bit on the next + // Mark that we've encountered an error. We'll set an appropriate bit on the next // node we finish so that it can't be reused incrementally. parseErrorBeforeNextFinishedNode = true; } function scanError(message: DiagnosticMessage, length?: number) { - var pos = scanner.getTextPos(); + let pos = scanner.getTextPos(); parseErrorAtPosition(pos, length || 0, message); } @@ -1239,22 +1247,22 @@ module ts { } function speculationHelper(callback: () => T, isLookAhead: boolean): T { - // Keep track of the state we'll need to rollback to if lookahead fails (or if the + // Keep track of the state we'll need to rollback to if lookahead fails (or if the // caller asked us to always reset our state). - var saveToken = token; - var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; - var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; + let saveToken = token; + let saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length; + let saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; // Note: it is not actually necessary to save/restore the context flags here. That's // because the saving/restorating of these flags happens naturally through the recursive - // descent nature of our parser. However, we still store this here just so we can + // descent nature of our parser. However, we still store this here just so we can // assert that that invariant holds. - var saveContextFlags = contextFlags; + let saveContextFlags = contextFlags; // If we're only looking ahead, then tell the scanner to only lookahead as well. - // Otherwise, if we're actually speculatively parsing, then tell the scanner to do the - // same. - var result = isLookAhead + // Otherwise, if we're actually speculatively parsing, then tell the scanner to do the + // same. + let result = isLookAhead ? scanner.lookAhead(callback) : scanner.tryScan(callback); @@ -1271,15 +1279,15 @@ module ts { return result; } - // Invokes the provided callback then unconditionally restores the parser to the state it + // Invokes the provided callback then unconditionally restores the parser to the state it // was in immediately prior to invoking the callback. The result of invoking the callback // is returned from this function. function lookAhead(callback: () => T): T { return speculationHelper(callback, /*isLookAhead:*/ true); } - + // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the + // the parser to the state it was in immediately prior to invoking the callback. If the // callback returns something truthy, then the parser state is not rolled back. The result // of invoking the callback is returned from this function. function tryParse(callback: () => T): T { @@ -1290,8 +1298,8 @@ module ts { if (token === SyntaxKind.Identifier) { return true; } - - // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is + + // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is // considered a keyword and is not an identifier. if (token === SyntaxKind.YieldKeyword && inYieldContext()) { return false; @@ -1326,15 +1334,18 @@ module ts { function parseOptionalToken(t: SyntaxKind): Node { if (token === t) { - var node = createNode(t); - nextToken(); - return finishNode(node); + return parseTokenNode(); } return undefined; } + function parseExpectedToken(t: SyntaxKind, reportAtCurrentPosition: boolean, diagnosticMessage: DiagnosticMessage, arg0?: any): Node { + return parseOptionalToken(t) || + createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); + } + function parseTokenNode(): T { - var node = createNode(token); + let node = createNode(token); nextToken(); return finishNode(node); } @@ -1365,7 +1376,7 @@ module ts { function createNode(kind: SyntaxKind, pos?: number): Node { nodeCount++; - var node = new (nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)))(); + let node = new (nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)))(); if (!(pos >= 0)) { pos = scanner.getStartPos(); } @@ -1401,7 +1412,7 @@ module ts { parseErrorAtCurrentToken(diagnosticMessage, arg0); } - var result = createNode(kind, scanner.getStartPos()); + let result = createNode(kind, scanner.getStartPos()); (result).text = ""; return finishNode(result); } @@ -1417,7 +1428,7 @@ module ts { function createIdentifier(isIdentifier: boolean, diagnosticMessage?: DiagnosticMessage): Identifier { identifierCount++; if (isIdentifier) { - var node = createNode(SyntaxKind.Identifier); + let node = createNode(SyntaxKind.Identifier); node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); @@ -1455,17 +1466,17 @@ module ts { // LiteralPropertyName // [+GeneratorParameter] ComputedPropertyName // [~GeneratorParameter] ComputedPropertyName[?Yield] - // + // // ComputedPropertyName[Yield] : // [ AssignmentExpression[In, ?Yield] ] // - var node = createNode(SyntaxKind.ComputedPropertyName); + let node = createNode(SyntaxKind.ComputedPropertyName); parseExpected(SyntaxKind.OpenBracketToken); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. - var yieldContext = inYieldContext(); + let yieldContext = inYieldContext(); if (inGeneratorParameterContext()) { setYieldContext(false); } @@ -1499,8 +1510,14 @@ module ts { } if (token === SyntaxKind.ExportKeyword) { nextToken(); + if (token === SyntaxKind.DefaultKeyword) { + return lookAhead(nextTokenIsClassOrFunction); + } return token !== SyntaxKind.AsteriskToken && token !== SyntaxKind.OpenBraceToken && canFollowModifier(); } + if (token === SyntaxKind.DefaultKeyword) { + return nextTokenIsClassOrFunction(); + } nextToken(); return canFollowModifier(); } @@ -1512,9 +1529,14 @@ module ts { || isLiteralPropertyName(); } + function nextTokenIsClassOrFunction(): boolean { + nextToken(); + return token === SyntaxKind.ClassKeyword || token === SyntaxKind.FunctionKeyword; + } + // True if positioned at the start of a list element function isListElement(parsingContext: ParsingContext, inErrorRecovery: boolean): boolean { - var node = currentNode(parsingContext); + let node = currentNode(parsingContext); if (node) { return true; } @@ -1628,13 +1650,13 @@ module ts { } function isVariableDeclaratorListTerminator(): boolean { - // If we can consume a semicolon (either explicitly, or with ASI), then consider us done + // If we can consume a semicolon (either explicitly, or with ASI), then consider us done // with parsing the list of variable declarators. if (canParseSemicolon()) { return true; } - // in the case where we're parsing the variable declarator of a 'for-in' statement, we + // in the case where we're parsing the variable declarator of a 'for-in' statement, we // are done if we see an 'in' keyword in front of us. Same with for-of if (isInOrOfKeyword(token)) { return true; @@ -1654,7 +1676,7 @@ module ts { // True if positioned at element or terminator of the current list or any enclosing list function isInSomeParsingContext(): boolean { - for (var kind = 0; kind < ParsingContext.Count; kind++) { + for (let kind = 0; kind < ParsingContext.Count; kind++) { if (parsingContext & (1 << kind)) { if (isListElement(kind, /* inErrorRecovery */ true) || isListTerminator(kind)) { return true; @@ -1667,15 +1689,15 @@ module ts { // Parses a list of elements function parseList(kind: ParsingContext, checkForStrictMode: boolean, parseElement: () => T): NodeArray { - var saveParsingContext = parsingContext; + let saveParsingContext = parsingContext; parsingContext |= 1 << kind; - var result = >[]; + let result = >[]; result.pos = getNodePos(); - var savedStrictModeContext = inStrictModeContext(); + let savedStrictModeContext = inStrictModeContext(); while (!isListTerminator(kind)) { if (isListElement(kind, /* inErrorRecovery */ false)) { - var element = parseListElement(kind, parseElement); + let element = parseListElement(kind, parseElement); result.push(element); // test elements only if we are not already in strict mode @@ -1706,11 +1728,11 @@ module ts { } function parseListElement(parsingContext: ParsingContext, parseElement: () => T): T { - var node = currentNode(parsingContext); + let node = currentNode(parsingContext); if (node) { return consumeNode(node); } - + return parseElement(); } @@ -1718,9 +1740,9 @@ module ts { // If there is an outstanding parse error that we've encountered, but not attached to // some node, then we cannot get a node from the old source tree. This is because we // want to mark the next node we encounter as being unusable. - // + // // Note: This may be too conservative. Perhaps we could reuse hte node and set the bit - // on it (or its leftmost child) as having the error. For now though, being conservative + // on it (or its leftmost child) as having the error. For now though, being conservative // is nice and likely won't ever affect perf. if (parseErrorBeforeNextFinishedNode) { return undefined; @@ -1731,7 +1753,7 @@ module ts { return undefined; } - var node = syntaxCursor.currentNode(scanner.getStartPos()); + let node = syntaxCursor.currentNode(scanner.getStartPos()); // Can't reuse a missing node. if (nodeIsMissing(node)) { @@ -1743,24 +1765,24 @@ module ts { return undefined; } - // Can't reuse a node that contains a parse error. This is necessary so that we + // Can't reuse a node that contains a parse error. This is necessary so that we // produce the same set of errors again. if (containsParseError(node)) { return undefined; } - // We can only reuse a node if it was parsed under the same strict mode that we're + // We can only reuse a node if it was parsed under the same strict mode that we're // currently in. i.e. if we originally parsed a node in non-strict mode, but then // the user added 'using strict' at the top of the file, then we can't use that node // again as the presense of strict mode may cause us to parse the tokens in the file // differetly. - // + // // Note: we *can* reuse tokens when the strict mode changes. That's because tokens // are unaffected by strict mode. It's just the parser will decide what to do with it // differently depending on what mode it is in. // // This also applies to all our other context flags as well. - var nodeContextFlags = node.parserContextFlags & ParserContextFlags.ParserGeneratedFlags; + let nodeContextFlags = node.parserContextFlags & ParserContextFlags.ParserGeneratedFlags; if (nodeContextFlags !== contextFlags) { return undefined; } @@ -1808,32 +1830,32 @@ module ts { case ParsingContext.Parameters: return isReusableParameter(node); - // Any other lists we do not care about reusing nodes in. But feel free to add if + // Any other lists we do not care about reusing nodes in. But feel free to add if // you can do so safely. Danger areas involve nodes that may involve speculative // parsing. If speculative parsing is involved with the node, then the range the // parser reached while looking ahead might be in the edited range (see the example // in canReuseVariableDeclaratorNode for a good case of this). case ParsingContext.HeritageClauses: - // This would probably be safe to reuse. There is no speculative parsing with + // This would probably be safe to reuse. There is no speculative parsing with // heritage clauses. case ParsingContext.TypeReferences: - // This would probably be safe to reuse. There is no speculative parsing with + // This would probably be safe to reuse. There is no speculative parsing with // type names in a heritage clause. There can be generic names in the type - // name list. But because it is a type context, we never use speculative + // name list. But because it is a type context, we never use speculative // parsing on the type argument list. case ParsingContext.TypeParameters: - // This would probably be safe to reuse. There is no speculative parsing with + // This would probably be safe to reuse. There is no speculative parsing with // type parameters. Note that that's because type *parameters* only occur in // unambiguous *type* contexts. While type *arguments* occur in very ambiguous // *expression* contexts. case ParsingContext.TupleElementTypes: - // This would probably be safe to reuse. There is no speculative parsing with + // This would probably be safe to reuse. There is no speculative parsing with // tuple types. - // Technically, type argument list types are probably safe to reuse. While + // Technically, type argument list types are probably safe to reuse. While // speculative parsing is involved with them (since type argument lists are only // produced from speculative parsing a < as a type argument list), we only have // the types because speculative parsing succeeded. Thus, the lookahead never @@ -1841,12 +1863,12 @@ module ts { case ParsingContext.TypeArguments: // Note: these are almost certainly not safe to ever reuse. Expressions commonly - // need a large amount of lookahead, and we should not reuse them as they may + // need a large amount of lookahead, and we should not reuse them as they may // have actually intersected the edit. case ParsingContext.ArgumentExpressions: // This is not safe to reuse for the same reason as the 'AssignmentExpression' - // cases. i.e. a property assignment may end with an expression, and thus might + // cases. i.e. a property assignment may end with an expression, and thus might // have lookahead far beyond it's old node. case ParsingContext.ObjectLiteralMembers: } @@ -1958,19 +1980,19 @@ module ts { // Very subtle incremental parsing bug. Consider the following code: // - // var v = new List < A, B + // let v = new List < A, B // - // This is actually legal code. It's a list of variable declarators "v = new List() - // + // let v = new List < A, B >() + // // then we have a problem. "v = new Listnode; + let variableDeclarator = node; return variableDeclarator.initializer === undefined; } @@ -1980,7 +2002,7 @@ module ts { } // See the comment in isReusableVariableDeclaration for why we do this. - var parameter = node; + let parameter = node; return parameter.initializer === undefined; } @@ -1997,12 +2019,12 @@ module ts { // Parses a comma-delimited list of elements function parseDelimitedList(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimeter?: boolean): NodeArray { - var saveParsingContext = parsingContext; + let saveParsingContext = parsingContext; parsingContext |= 1 << kind; - var result = >[]; + let result = >[]; result.pos = getNodePos(); - var commaStart = -1; // Meaning the previous token was not a comma + let commaStart = -1; // Meaning the previous token was not a comma while (true) { if (isListElement(kind, /* inErrorRecovery */ false)) { result.push(parseListElement(kind, parseElement)); @@ -2019,10 +2041,10 @@ module ts { // We didn't get a comma, and the list wasn't terminated, explicitly parse // out a comma so we give a good error message. parseExpected(SyntaxKind.CommaToken); - + // If the token was a semicolon, and the caller allows that, then skip it and // continue. This ensures we get back on track and don't result in tons of - // parse errors. For example, this can happen when people do things like use + // parse errors. For example, this can happen when people do things like use // a semicolon to delimit object literal members. Note: we'll have already // reported an error when we called parseExpected above. if (considerSemicolonAsDelimeter && token === SyntaxKind.SemicolonToken && !scanner.hasPrecedingLineBreak()) { @@ -2056,8 +2078,8 @@ module ts { } function createMissingList(): NodeArray { - var pos = getNodePos(); - var result = >[]; + let pos = getNodePos(); + let result = >[]; result.pos = pos; result.end = pos; return result; @@ -2065,7 +2087,7 @@ module ts { function parseBracketedList(kind: ParsingContext, parseElement: () => T, open: SyntaxKind, close: SyntaxKind): NodeArray { if (parseExpected(open)) { - var result = parseDelimitedList(kind, parseElement); + let result = parseDelimitedList(kind, parseElement); parseExpected(close); return result; } @@ -2075,9 +2097,9 @@ module ts { // The allowReservedWords parameter controls whether reserved words are permitted after the first dot function parseEntityName(allowReservedWords: boolean, diagnosticMessage?: DiagnosticMessage): EntityName { - var entity: EntityName = parseIdentifier(diagnosticMessage); + let entity: EntityName = parseIdentifier(diagnosticMessage); while (parseOptional(SyntaxKind.DotToken)) { - var node = createNode(SyntaxKind.QualifiedName, entity.pos); + let node = createNode(SyntaxKind.QualifiedName, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -2095,22 +2117,22 @@ module ts { // name. // keyword identifierNameOrKeyword // - // Note: the newlines are important here. For example, if that above code + // Note: the newlines are important here. For example, if that above code // were rewritten into: // // name.keyword // identifierNameOrKeyword // // Then we would consider it valid. That's because ASI would take effect and - // the code would be implicitly: "name.keyword; identifierNameOrKeyword". + // the code would be implicitly: "name.keyword; identifierNameOrKeyword". // In the first case though, ASI will not take effect because there is not a // line terminator after the keyword. if (scanner.hasPrecedingLineBreak() && scanner.isReservedWord()) { - var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); + let matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { - // 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 + // 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 woudl be quite confusing. return createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentToken:*/ true, Diagnostics.Identifier_expected); } @@ -2120,12 +2142,12 @@ module ts { } function parseTemplateExpression(): TemplateExpression { - var template = createNode(SyntaxKind.TemplateExpression); + let template = createNode(SyntaxKind.TemplateExpression); template.head = parseLiteralNode(); Debug.assert(template.head.kind === SyntaxKind.TemplateHead, "Template head has wrong token kind"); - var templateSpans = >[]; + let templateSpans = >[]; templateSpans.pos = getNodePos(); do { @@ -2140,18 +2162,17 @@ module ts { } function parseTemplateSpan(): TemplateSpan { - var span = createNode(SyntaxKind.TemplateSpan); + let span = createNode(SyntaxKind.TemplateSpan); span.expression = allowInAnd(parseExpression); - var literal: LiteralExpression; + let literal: LiteralExpression; if (token === SyntaxKind.CloseBraceToken) { reScanTemplateToken() literal = parseLiteralNode(); } else { - literal = createMissingNode( - 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; @@ -2159,22 +2180,22 @@ module ts { } function parseLiteralNode(internName?: boolean): LiteralExpression { - var node = createNode(token); - var text = scanner.getTokenValue(); + let node = createNode(token); + let 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(); + let tokenPos = scanner.getTokenPos(); nextToken(); finishNode(node); - + // Octal literals are not allowed in strict mode or ES5 // Note that theoretically the following condition would hold true literals like 009, // which is not octal.But because of how the scanner separates the tokens, we would @@ -2194,7 +2215,7 @@ module ts { // TYPES function parseTypeReference(): TypeReferenceNode { - var node = createNode(SyntaxKind.TypeReference); + let node = createNode(SyntaxKind.TypeReference); node.typeName = parseEntityName(/*allowReservedWords*/ false, Diagnostics.Type_expected); if (!scanner.hasPrecedingLineBreak() && token === SyntaxKind.LessThanToken) { node.typeArguments = parseBracketedList(ParsingContext.TypeArguments, parseType, SyntaxKind.LessThanToken, SyntaxKind.GreaterThanToken); @@ -2203,17 +2224,17 @@ module ts { } function parseTypeQuery(): TypeQueryNode { - var node = createNode(SyntaxKind.TypeQuery); + let node = createNode(SyntaxKind.TypeQuery); parseExpected(SyntaxKind.TypeOfKeyword); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter(): TypeParameterDeclaration { - var node = createNode(SyntaxKind.TypeParameter); + let node = createNode(SyntaxKind.TypeParameter); node.name = parseIdentifier(); if (parseOptional(SyntaxKind.ExtendsKeyword)) { - // It's not uncommon for people to write improper constraints to a generic. If the + // It's not uncommon for people to write improper constraints to a generic. If the // user writes a constraint that is an expression and not an actual type, then parse // it out as an expression (so we can recover well), but report that a type is needed // instead. @@ -2263,7 +2284,7 @@ module ts { } function parseParameter(): ParameterDeclaration { - var node = createNode(SyntaxKind.Parameter); + let node = createNode(SyntaxKind.Parameter); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); @@ -2275,7 +2296,7 @@ module ts { if (getFullWidth(node.name) === 0 && node.flags === 0 && isModifier(token)) { // in cases like - // 'use strict' + // 'use strict' // function foo(static) // isParameter('static') === true, because of isModifier('static') // however 'static' is not a legal identifier in a strict mode. @@ -2309,7 +2330,7 @@ module ts { yieldAndGeneratorParameterContext: boolean, requireCompleteParameterList: boolean, signature: SignatureDeclaration): void { - var returnTokenRequired = returnToken === SyntaxKind.EqualsGreaterThanToken; + let returnTokenRequired = returnToken === SyntaxKind.EqualsGreaterThanToken; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList); @@ -2322,7 +2343,7 @@ module ts { } } - // Note: after careful analysis of the grammar, it does not appear to be possible to + // Note: after careful analysis of the grammar, it does not appear to be possible to // have 'Yield' And 'GeneratorParameter' not in sync. i.e. any production calling // this FormalParameters production either always sets both to true, or always sets // both to false. As such we only have a single parameter to represent both. @@ -2342,13 +2363,13 @@ module ts { // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt if (parseExpected(SyntaxKind.OpenParenToken)) { - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); + let savedYieldContext = inYieldContext(); + let savedGeneratorParameterContext = inGeneratorParameterContext(); setYieldContext(yieldAndGeneratorParameterContext); setGeneratorParameterContext(yieldAndGeneratorParameterContext); - var result = parseDelimitedList(ParsingContext.Parameters, parseParameter); + let result = parseDelimitedList(ParsingContext.Parameters, parseParameter); setYieldContext(savedYieldContext); setGeneratorParameterContext(savedGeneratorParameterContext); @@ -2369,7 +2390,7 @@ module ts { } function parseTypeMemberSemicolon() { - // We allow type members to be separated by commas or (possibly ASI) semicolons. + // We allow type members to be separated by commas or (possibly ASI) semicolons. // First check if it was a comma. If so, we're done with the member. if (parseOptional(SyntaxKind.CommaToken)) { return; @@ -2380,7 +2401,7 @@ module ts { } function parseSignatureMember(kind: SyntaxKind): SignatureDeclaration { - var node = createNode(kind); + let node = createNode(kind); if (kind === SyntaxKind.ConstructSignature) { parseExpected(SyntaxKind.NewKeyword); } @@ -2453,8 +2474,8 @@ module ts { } function parseIndexSignatureDeclaration(modifiers: ModifiersArray): IndexSignatureDeclaration { - var fullStart = modifiers ? modifiers.pos : scanner.getStartPos(); - var node = createNode(SyntaxKind.IndexSignature, fullStart); + let fullStart = modifiers ? modifiers.pos : scanner.getStartPos(); + let node = createNode(SyntaxKind.IndexSignature, fullStart); setModifiers(node, modifiers); node.parameters = parseBracketedList(ParsingContext.Parameters, parseParameter, SyntaxKind.OpenBracketToken, SyntaxKind.CloseBracketToken); node.type = parseTypeAnnotation(); @@ -2463,12 +2484,12 @@ module ts { } function parsePropertyOrMethodSignature(): Declaration { - var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); - var questionToken = parseOptionalToken(SyntaxKind.QuestionToken); + let fullStart = scanner.getStartPos(); + let name = parsePropertyName(); + let questionToken = parseOptionalToken(SyntaxKind.QuestionToken); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { - var method = createNode(SyntaxKind.MethodSignature, fullStart); + let method = createNode(SyntaxKind.MethodSignature, fullStart); method.name = name; method.questionToken = questionToken; @@ -2479,7 +2500,7 @@ module ts { return finishNode(method); } else { - var property = createNode(SyntaxKind.PropertySignature, fullStart); + let property = createNode(SyntaxKind.PropertySignature, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -2496,7 +2517,7 @@ module ts { return true; default: if (isModifier(token)) { - var result = lookAhead(isStartOfIndexSignatureDeclaration); + let result = lookAhead(isStartOfIndexSignatureDeclaration); if (result) { return result; } @@ -2542,14 +2563,14 @@ module ts { case SyntaxKind.NumericLiteral: return parsePropertyOrMethodSignature(); default: - // Index declaration as allowed as a type member. But as per the grammar, + // Index declaration as allowed as a type member. But as per the grammar, // they also allow modifiers. So we have to check for an index declaration - // that might be following modifiers. This ensures that things work properly + // that might be following modifiers. This ensures that things work properly // 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)) { - var result = tryParse(parseIndexSignatureWithModifiers); + let result = tryParse(parseIndexSignatureWithModifiers); if (result) { return result; } @@ -2562,7 +2583,7 @@ module ts { } function parseIndexSignatureWithModifiers() { - var modifiers = parseModifiers(); + let modifiers = parseModifiers(); return isIndexSignature() ? parseIndexSignatureDeclaration(modifiers) : undefined; @@ -2574,13 +2595,13 @@ module ts { } function parseTypeLiteral(): TypeLiteralNode { - var node = createNode(SyntaxKind.TypeLiteral); + let node = createNode(SyntaxKind.TypeLiteral); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers(): NodeArray { - var members: NodeArray; + let members: NodeArray; if (parseExpected(SyntaxKind.OpenBraceToken)) { members = parseList(ParsingContext.TypeMembers, /*checkForStrictMode*/ false, parseTypeMember); parseExpected(SyntaxKind.CloseBraceToken); @@ -2593,13 +2614,13 @@ module ts { } function parseTupleType(): TupleTypeNode { - var node = createNode(SyntaxKind.TupleType); + let node = createNode(SyntaxKind.TupleType); node.elementTypes = parseBracketedList(ParsingContext.TupleElementTypes, parseType, SyntaxKind.OpenBracketToken, SyntaxKind.CloseBracketToken); return finishNode(node); } function parseParenthesizedType(): ParenthesizedTypeNode { - var node = createNode(SyntaxKind.ParenthesizedType); + let node = createNode(SyntaxKind.ParenthesizedType); parseExpected(SyntaxKind.OpenParenToken); node.type = parseType(); parseExpected(SyntaxKind.CloseParenToken); @@ -2607,7 +2628,7 @@ module ts { } function parseFunctionOrConstructorType(kind: SyntaxKind): FunctionOrConstructorTypeNode { - var node = createNode(kind); + let node = createNode(kind); if (kind === SyntaxKind.ConstructorType) { parseExpected(SyntaxKind.NewKeyword); } @@ -2616,7 +2637,7 @@ module ts { } function parseKeywordAndNoDot(): TypeNode { - var node = parseTokenNode(); + let node = parseTokenNode(); return token === SyntaxKind.DotToken ? undefined : node; } @@ -2628,7 +2649,7 @@ module ts { case SyntaxKind.BooleanKeyword: case SyntaxKind.SymbolKeyword: // If these are followed by a dot, then parse these out as a dotted type reference instead. - var node = tryParse(parseKeywordAndNoDot); + let node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case SyntaxKind.VoidKeyword: return parseTokenNode(); @@ -2674,10 +2695,10 @@ module ts { } function parseArrayTypeOrHigher(): TypeNode { - var type = parseNonArrayType(); + let type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(SyntaxKind.OpenBracketToken)) { parseExpected(SyntaxKind.CloseBracketToken); - var node = createNode(SyntaxKind.ArrayType, type.pos); + let node = createNode(SyntaxKind.ArrayType, type.pos); node.elementType = type; type = finishNode(node); } @@ -2685,15 +2706,15 @@ module ts { } function parseUnionTypeOrHigher(): TypeNode { - var type = parseArrayTypeOrHigher(); + let type = parseArrayTypeOrHigher(); if (token === SyntaxKind.BarToken) { - var types = >[type]; + let types = >[type]; types.pos = type.pos; while (parseOptional(SyntaxKind.BarToken)) { types.push(parseArrayTypeOrHigher()); } types.end = getNodeEnd(); - var node = createNode(SyntaxKind.UnionType, type.pos); + let node = createNode(SyntaxKind.UnionType, type.pos); node.types = types; type = finishNode(node); } @@ -2741,13 +2762,13 @@ module ts { function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); + let savedYieldContext = inYieldContext(); + let savedGeneratorParameterContext = inGeneratorParameterContext(); setYieldContext(false); setGeneratorParameterContext(false); - var result = parseTypeWorker(); + let result = parseTypeWorker(); setYieldContext(savedYieldContext); setGeneratorParameterContext(savedGeneratorParameterContext); @@ -2825,11 +2846,11 @@ module ts { function parseExpression(): Expression { // Expression[in]: - // AssignmentExpression[in] + // AssignmentExpression[in] // Expression[in] , AssignmentExpression[in] - var expr = parseAssignmentExpressionOrHigher(); - var operatorToken: Node; + let expr = parseAssignmentExpressionOrHigher(); + let operatorToken: Node; while ((operatorToken = parseOptionalToken(SyntaxKind.CommaToken))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } @@ -2841,13 +2862,13 @@ module ts { // It's not uncommon during typing for the user to miss writing the '=' token. Check if // there is no newline after the last token and if we're on an expression. If so, parse // this as an equals-value clause with a missing equals. - // NOTE: There are two places where we allow equals-value clauses. The first is in a + // NOTE: There are two places where we allow equals-value clauses. The first is in a // variable declarator. The second is with a parameter. For variable declarators // it's more likely that a { would be a allowed (as an object literal). While this // is also allowed for parameters, the risk is that we consume the { as an object // literal when it really will be for the block following the parameter. if (scanner.hasPrecedingLineBreak() || (inParameter && token === SyntaxKind.OpenBraceToken) || !isStartOfExpression()) { - // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - + // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - // do not try to parse initializer return undefined; } @@ -2868,19 +2889,19 @@ module ts { // 4) ArrowFunctionExpression[?in,?yield] // 5) [+Yield] YieldExpression[?In] // - // Note: for ease of implementation we treat productions '2' and '3' as the same thing. + // Note: for ease of implementation we treat productions '2' and '3' as the same thing. // (i.e. they're both BinaryExpressions with an assignment operator in it). // First, do the simple check if we have a YieldExpression (production '5'). if (isYieldExpression()) { return parseYieldExpression(); - } + } // Then, check if we have an arrow function (production '4') that starts with a parenthesized // parameter list. If we do, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is - // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done + // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. - var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); + let arrowExpression = tryParseParenthesizedArrowFunctionExpression(); if (arrowExpression) { return arrowExpression; } @@ -2889,12 +2910,12 @@ module ts { // start with a LogicalOrExpression, while the assignment productions can only start with // LeftHandSideExpressions. // - // So, first, we try to just parse out a BinaryExpression. If we get something that is a - // LeftHandSide or higher, then we can try to parse out the assignment expression part. - // Otherwise, we try to parse out the conditional expression bit. We want to allow any + // So, first, we try to just parse out a BinaryExpression. If we get something that is a + // LeftHandSide or higher, then we can try to parse out the assignment expression part. + // Otherwise, we try to parse out the conditional expression bit. We want to allow any // binary expression here, so we pass in the 'lowest' precedence here so that it matches // and consumes anything. - var expr = parseBinaryExpressionOrHigher(/*precedence:*/ 0); + let expr = parseBinaryExpressionOrHigher(/*precedence:*/ 0); // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single @@ -2904,7 +2925,7 @@ module ts { } // Now see if we might be in cases '2' or '3'. - // If the expression was a LHS expression, and we have an assignment operator, then + // If the expression was a LHS expression, and we have an assignment operator, then // we're in '2' or '3'. Consume the assignment and return. // // Note: we call reScanGreaterToken so that we get an appropriately merged token @@ -2919,7 +2940,7 @@ module ts { function isYieldExpression(): boolean { if (token === SyntaxKind.YieldKeyword) { - // If we have a 'yield' keyword, and htis is a context where yield expressions are + // If we have a 'yield' keyword, and htis is a context where yield expressions are // allowed, then definitely parse out a yield expression. if (inYieldContext()) { return true; @@ -2934,12 +2955,12 @@ module ts { // We're in a context where 'yield expr' is not allowed. However, if we can // definitely tell that the user was trying to parse a 'yield expr' and not // just a normal expr that start with a 'yield' identifier, then parse out - // a 'yield expr'. We can then report an error later that they are only + // a 'yield expr'. We can then report an error later that they are only // allowed in generator expressions. - // + // // for example, if we see 'yield(foo)', then we'll have to treat that as an // invocation expression of something called 'yield'. However, if we have - // 'yield foo' then that is not legal as a normal expression, so we can + // 'yield foo' then that is not legal as a normal expression, so we can // definitely recognize this as a yield expression. // // for now we just check if the next token is an identifier. More heuristics @@ -2956,8 +2977,14 @@ module ts { return !scanner.hasPrecedingLineBreak() && isIdentifier() } + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.OpenBracketToken); + } + function parseYieldExpression(): YieldExpression { - var node = createNode(SyntaxKind.YieldExpression); + let node = createNode(SyntaxKind.YieldExpression); // YieldExpression[In] : // yield @@ -2972,7 +2999,7 @@ module ts { return finishNode(node); } else { - // if the next token is not on the same line as yield. or we don't have an '*' or + // if the next token is not on the same line as yield. or we don't have an '*' or // the start of an expressin, then this is just a simple "yield" expression. return finishNode(node); } @@ -2981,9 +3008,9 @@ module ts { function parseSimpleArrowFunctionExpression(identifier: Identifier): Expression { Debug.assert(token === SyntaxKind.EqualsGreaterThanToken, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(SyntaxKind.ArrowFunction, identifier.pos); + let node = createNode(SyntaxKind.ArrowFunction, identifier.pos); - var parameter = createNode(SyntaxKind.Parameter, identifier.pos); + let parameter = createNode(SyntaxKind.Parameter, identifier.pos); parameter.name = identifier; finishNode(parameter); @@ -2991,14 +3018,14 @@ module ts { node.parameters.pos = parameter.pos; node.parameters.end = parameter.end; - parseExpected(SyntaxKind.EqualsGreaterThanToken); + node.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, false, Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(); return finishNode(node); } function tryParseParenthesizedArrowFunctionExpression(): Expression { - var triState = isParenthesizedArrowFunctionExpression(); + let triState = isParenthesizedArrowFunctionExpression(); if (triState === Tristate.False) { // It's definitely not a parenthesized arrow function expression. @@ -3009,7 +3036,7 @@ module ts { // following => or { token. Otherwise, we *might* have an arrow function. Try to parse // it out, but don't allow any ambiguity, and return 'undefined' if this could be an // expression instead. - var arrowFunction = triState === Tristate.True + let arrowFunction = triState === Tristate.True ? parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity:*/ true) : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); @@ -3018,15 +3045,13 @@ module ts { return undefined; } - // If we have an arrow, then try to parse the body. Even if not, try to parse if we + // If we have an arrow, then try to parse the body. Even if not, try to parse if we // have an opening brace, just in case we're in an error state. - if (parseExpected(SyntaxKind.EqualsGreaterThanToken) || token === SyntaxKind.OpenBraceToken) { - arrowFunction.body = parseArrowFunctionExpressionBody(); - } - else { - // If not, we're probably better off bailing out and returning a bogus function expression. - arrowFunction.body = parseIdentifier(); - } + var lastToken = token; + arrowFunction.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, /*reportAtCurrentPosition:*/false, Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === SyntaxKind.EqualsGreaterThanToken || lastToken === SyntaxKind.OpenBraceToken) + ? parseArrowFunctionExpressionBody() + : parseIdentifier(); return finishNode(arrowFunction); } @@ -3051,8 +3076,8 @@ module ts { } function isParenthesizedArrowFunctionExpressionWorker() { - var first = token; - var second = nextToken(); + let first = token; + let second = nextToken(); if (first === SyntaxKind.OpenParenToken) { if (second === SyntaxKind.CloseParenToken) { @@ -3060,7 +3085,7 @@ module ts { // This is an arrow function with no parameters. // The last one is not actually an arrow function, // but this is probably what the user intended. - var third = nextToken(); + let third = nextToken(); switch (third) { case SyntaxKind.EqualsGreaterThanToken: case SyntaxKind.ColonToken: @@ -3110,18 +3135,18 @@ module ts { } } - function parsePossibleParenthesizedArrowFunctionExpressionHead() { + function parsePossibleParenthesizedArrowFunctionExpressionHead(): ArrowFunction { return parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity:*/ false); } - function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity: boolean): FunctionExpression { - var node = createNode(SyntaxKind.ArrowFunction); + function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity: boolean): ArrowFunction { + let node = createNode(SyntaxKind.ArrowFunction); // Arrow functions are never generators. // // If we're speculatively parsing a signature for a parenthesized arrow function, then // we have to have a complete parameter list. Otherwise we might see something like // a => (b => c) - // And think that "(b =>" was actually a parenthesized arrow function with a missing + // And think that "(b =>" was actually a parenthesized arrow function with a missing // close paren. fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ !allowAmbiguity, node); @@ -3154,11 +3179,11 @@ module ts { if (isStartOfStatement(/*inErrorRecovery:*/ true) && !isStartOfExpressionStatement() && token !== SyntaxKind.FunctionKeyword) { // Check if we got a plain statement (i.e. no expression-statements, no functions expressions/declarations) // - // Here we try to recover from a potential error situation in the case where the + // Here we try to recover from a potential error situation in the case where the // user meant to supply a block. For example, if the user wrote: // // a => - // var v = 0; + // let v = 0; // } // // they may be missing an open brace. Check to see if that's the case so we can @@ -3174,22 +3199,25 @@ module ts { function parseConditionalExpressionRest(leftOperand: Expression): Expression { // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. - if (!parseOptional(SyntaxKind.QuestionToken)) { + let questionToken = parseOptionalToken(SyntaxKind.QuestionToken); + if (!questionToken) { return leftOperand; } - // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and - // we do not that for the 'whenFalse' part. - var node = createNode(SyntaxKind.ConditionalExpression, leftOperand.pos); + // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and + // we do not that for the 'whenFalse' part. + let node = createNode(SyntaxKind.ConditionalExpression, leftOperand.pos); node.condition = leftOperand; + node.questionToken = questionToken; node.whenTrue = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(SyntaxKind.ColonToken); + node.colonToken = parseExpectedToken(SyntaxKind.ColonToken, /*reportAtCurrentPosition:*/ false, + Diagnostics._0_expected, tokenToString(SyntaxKind.ColonToken)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseBinaryExpressionOrHigher(precedence: number): Expression { - var leftOperand = parseUnaryExpressionOrHigher(); + let leftOperand = parseUnaryExpressionOrHigher(); return parseBinaryExpressionRest(precedence, leftOperand); } @@ -3199,11 +3227,11 @@ module ts { function parseBinaryExpressionRest(precedence: number, leftOperand: Expression): Expression { while (true) { - // We either have a binary operator here, or we're finished. We call + // 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(); + let newPrecedence = getBinaryOperatorPrecedence(); // Check the precedence to see if we should "take" this operator if (newPrecedence <= precedence) { @@ -3271,7 +3299,7 @@ module ts { } function makeBinaryExpression(left: Expression, operatorToken: Node, right: Expression): BinaryExpression { - var node = createNode(SyntaxKind.BinaryExpression, left.pos); + let node = createNode(SyntaxKind.BinaryExpression, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; @@ -3279,7 +3307,7 @@ module ts { } function parsePrefixUnaryExpression() { - var node = createNode(SyntaxKind.PrefixUnaryExpression); + let node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token; nextToken(); node.operand = parseUnaryExpressionOrHigher(); @@ -3287,21 +3315,21 @@ module ts { } function parseDeleteExpression() { - var node = createNode(SyntaxKind.DeleteExpression); + let node = createNode(SyntaxKind.DeleteExpression); nextToken(); node.expression = parseUnaryExpressionOrHigher(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(SyntaxKind.TypeOfExpression); + let node = createNode(SyntaxKind.TypeOfExpression); nextToken(); node.expression = parseUnaryExpressionOrHigher(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(SyntaxKind.VoidExpression); + let node = createNode(SyntaxKind.VoidExpression); nextToken(); node.expression = parseUnaryExpressionOrHigher(); return finishNode(node); @@ -3330,11 +3358,11 @@ module ts { } function parsePostfixExpressionOrHigher(): PostfixExpression { - var expression = parseLeftHandSideExpressionOrHigher(); + let expression = parseLeftHandSideExpressionOrHigher(); Debug.assert(isLeftHandSideExpression(expression)); if ((token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); + let node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); node.operand = expression; node.operator = token; nextToken(); @@ -3346,15 +3374,15 @@ module ts { function parseLeftHandSideExpressionOrHigher(): LeftHandSideExpression { // Original Ecma: - // LeftHandSideExpression: See 11.2 + // LeftHandSideExpression: See 11.2 // NewExpression - // CallExpression + // CallExpression // // Our simplification: // - // LeftHandSideExpression: See 11.2 - // MemberExpression - // CallExpression + // LeftHandSideExpression: See 11.2 + // MemberExpression + // CallExpression // // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with // MemberExpression to make our lives easier. @@ -3363,23 +3391,23 @@ module ts { // out into its own productions: // // CallExpression: - // MemberExpression Arguments + // 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 + // 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 === SyntaxKind.SuperKeyword + let expression = token === SyntaxKind.SuperKeyword ? parseSuperExpression() : parseMemberExpressionOrHigher(); - // Now, we *may* be complete. However, we might have consumed the start of a + // 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); } @@ -3389,39 +3417,39 @@ module ts { // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. // like so: // - // PrimaryExpression : See 11.1 + // PrimaryExpression : See 11.1 // this // Identifier // Literal // ArrayLiteral // ObjectLiteral - // (Expression) + // (Expression) // FunctionExpression // new MemberExpression Arguments? // - // MemberExpression : See 11.2 - // PrimaryExpression + // MemberExpression : See 11.2 + // PrimaryExpression // MemberExpression[Expression] // MemberExpression.IdentifierName // - // CallExpression : See 11.2 - // MemberExpression + // CallExpression : See 11.2 + // MemberExpression // CallExpression Arguments // CallExpression[Expression] - // CallExpression.IdentifierName + // 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 + // 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 + // 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. @@ -3432,27 +3460,27 @@ module ts { // // 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(); + let expression = parsePrimaryExpression(); return parseMemberExpressionRest(expression); } function parseSuperExpression(): MemberExpression { - var expression = parseTokenNode(); + let expression = parseTokenNode(); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.DotToken) { 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(SyntaxKind.PropertyAccessExpression, expression.pos); + let node = createNode(SyntaxKind.PropertyAccessExpression, expression.pos); node.expression = expression; - parseExpected(SyntaxKind.DotToken, Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + node.dotToken = parseExpectedToken(SyntaxKind.DotToken, /*reportAtCurrentPosition:*/ false, Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames:*/ true); return finishNode(node); } function parseTypeAssertion(): TypeAssertion { - var node = createNode(SyntaxKind.TypeAssertionExpression); + let node = createNode(SyntaxKind.TypeAssertionExpression); parseExpected(SyntaxKind.LessThanToken); node.type = parseType(); parseExpected(SyntaxKind.GreaterThanToken); @@ -3462,17 +3490,18 @@ module ts { function parseMemberExpressionRest(expression: LeftHandSideExpression): MemberExpression { while (true) { - var dotOrBracketStart = scanner.getTokenPos(); - if (parseOptional(SyntaxKind.DotToken)) { - var propertyAccess = createNode(SyntaxKind.PropertyAccessExpression, expression.pos); + let dotToken = parseOptionalToken(SyntaxKind.DotToken); + if (dotToken) { + let propertyAccess = createNode(SyntaxKind.PropertyAccessExpression, expression.pos); propertyAccess.expression = expression; + propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames:*/ true); expression = finishNode(propertyAccess); continue; } if (parseOptional(SyntaxKind.OpenBracketToken)) { - var indexedAccess = createNode(SyntaxKind.ElementAccessExpression, expression.pos); + let indexedAccess = createNode(SyntaxKind.ElementAccessExpression, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". @@ -3480,7 +3509,7 @@ module ts { if (token !== SyntaxKind.CloseBracketToken) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === SyntaxKind.StringLiteral || indexedAccess.argumentExpression.kind === SyntaxKind.NumericLiteral) { - var literal = indexedAccess.argumentExpression; + let literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } @@ -3491,7 +3520,7 @@ module ts { } if (token === SyntaxKind.NoSubstitutionTemplateLiteral || token === SyntaxKind.TemplateHead) { - var tagExpression = createNode(SyntaxKind.TaggedTemplateExpression, expression.pos); + let tagExpression = createNode(SyntaxKind.TaggedTemplateExpression, expression.pos); tagExpression.tag = expression; tagExpression.template = token === SyntaxKind.NoSubstitutionTemplateLiteral ? parseLiteralNode() @@ -3510,15 +3539,15 @@ module ts { if (token === SyntaxKind.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 + // 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); + let typeArguments = tryParse(parseTypeArgumentsInExpression); if (!typeArguments) { return expression; } - var callExpr = createNode(SyntaxKind.CallExpression, expression.pos); + let callExpr = createNode(SyntaxKind.CallExpression, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); @@ -3526,7 +3555,7 @@ module ts { continue; } else if (token === SyntaxKind.OpenParenToken) { - var callExpr = createNode(SyntaxKind.CallExpression, expression.pos); + let callExpr = createNode(SyntaxKind.CallExpression, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -3539,7 +3568,7 @@ module ts { function parseArgumentList() { parseExpected(SyntaxKind.OpenParenToken); - var result = parseDelimitedList(ParsingContext.ArgumentExpressions, parseArgumentExpression); + let result = parseDelimitedList(ParsingContext.ArgumentExpressions, parseArgumentExpression); parseExpected(SyntaxKind.CloseParenToken); return result; } @@ -3549,7 +3578,7 @@ module ts { return undefined; } - var typeArguments = parseDelimitedList(ParsingContext.TypeArguments, parseType); + let typeArguments = parseDelimitedList(ParsingContext.TypeArguments, parseType); if (!parseExpected(SyntaxKind.GreaterThanToken)) { // If it doesn't have the closing > then it's definitely not an type argument list. return undefined; @@ -3564,8 +3593,8 @@ module ts { function canFollowTypeArgumentsInExpression(): boolean { switch (token) { - case SyntaxKind.OpenParenToken: // foo( - // this case are the only case where this token can legally follow a type argument + case SyntaxKind.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 SyntaxKind.DotToken: // foo. @@ -3586,7 +3615,7 @@ module ts { case SyntaxKind.BarToken: // foo | case SyntaxKind.CloseBraceToken: // foo } case SyntaxKind.EndOfFileToken: // foo - // these cases can't legally follow a type arg list. However, they're not legal + // 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; @@ -3633,7 +3662,7 @@ module ts { } function parseParenthesizedExpression(): ParenthesizedExpression { - var node = createNode(SyntaxKind.ParenthesizedExpression); + let node = createNode(SyntaxKind.ParenthesizedExpression); parseExpected(SyntaxKind.OpenParenToken); node.expression = allowInAnd(parseExpression); parseExpected(SyntaxKind.CloseParenToken); @@ -3641,7 +3670,7 @@ module ts { } function parseSpreadElement(): Expression { - var node = createNode(SyntaxKind.SpreadElementExpression); + let node = createNode(SyntaxKind.SpreadElementExpression); parseExpected(SyntaxKind.DotDotDotToken); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); @@ -3658,7 +3687,7 @@ module ts { } function parseArrayLiteralExpression(): ArrayLiteralExpression { - var node = createNode(SyntaxKind.ArrayLiteralExpression); + let node = createNode(SyntaxKind.ArrayLiteralExpression); parseExpected(SyntaxKind.OpenBracketToken); if (scanner.hasPrecedingLineBreak()) node.flags |= NodeFlags.MultiLine; node.elements = parseDelimitedList(ParsingContext.ArrayLiteralMembers, parseArgumentOrArrayLiteralElement); @@ -3678,34 +3707,34 @@ module ts { } function parseObjectLiteralElement(): ObjectLiteralElement { - var fullStart = scanner.getStartPos(); - var modifiers = parseModifiers(); + let fullStart = scanner.getStartPos(); + let modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, modifiers); + let accessor = tryParseAccessorDeclaration(fullStart, modifiers); if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); + let asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); + let tokenIsIdentifier = isIdentifier(); + let nameToken = token; + let propertyName = parsePropertyName(); // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(SyntaxKind.QuestionToken); + let questionToken = parseOptionalToken(SyntaxKind.QuestionToken); if (asteriskToken || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { return parseMethodDeclaration(fullStart, modifiers, asteriskToken, propertyName, questionToken); } // Parse to check if it is short-hand property assignment or normal property assignment if ((token === SyntaxKind.CommaToken || token === SyntaxKind.CloseBraceToken) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(SyntaxKind.ShorthandPropertyAssignment, fullStart); + let shorthandDeclaration = createNode(SyntaxKind.ShorthandPropertyAssignment, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(SyntaxKind.PropertyAssignment, fullStart); + let propertyAssignment = createNode(SyntaxKind.PropertyAssignment, fullStart); propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; parseExpected(SyntaxKind.ColonToken); @@ -3715,7 +3744,7 @@ module ts { } function parseObjectLiteralExpression(): ObjectLiteralExpression { - var node = createNode(SyntaxKind.ObjectLiteralExpression); + let node = createNode(SyntaxKind.ObjectLiteralExpression); parseExpected(SyntaxKind.OpenBraceToken); if (scanner.hasPrecedingLineBreak()) { node.flags |= NodeFlags.MultiLine; @@ -3731,7 +3760,7 @@ module ts { // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } // FunctionExpression: // function BindingIdentifieropt(FormalParameters) { FunctionBody } - var node = createNode(SyntaxKind.FunctionExpression); + let node = createNode(SyntaxKind.FunctionExpression); parseExpected(SyntaxKind.FunctionKeyword); node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); node.name = node.asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier(); @@ -3745,7 +3774,7 @@ module ts { } function parseNewExpression(): NewExpression { - var node = createNode(SyntaxKind.NewExpression); + let node = createNode(SyntaxKind.NewExpression); parseExpected(SyntaxKind.NewKeyword); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); @@ -3758,7 +3787,7 @@ module ts { // STATEMENTS function parseBlock(ignoreMissingOpenBrace: boolean, checkForStrictMode: boolean, diagnosticMessage?: DiagnosticMessage): Block { - var node = createNode(SyntaxKind.Block); + let node = createNode(SyntaxKind.Block); if (parseExpected(SyntaxKind.OpenBraceToken, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(ParsingContext.BlockStatements, checkForStrictMode, parseStatement); parseExpected(SyntaxKind.CloseBraceToken); @@ -3770,10 +3799,10 @@ module ts { } function parseFunctionBlock(allowYield: boolean, ignoreMissingOpenBrace: boolean, diagnosticMessage?: DiagnosticMessage): Block { - var savedYieldContext = inYieldContext(); + let savedYieldContext = inYieldContext(); setYieldContext(allowYield); - var block = parseBlock(ignoreMissingOpenBrace, /*checkForStrictMode*/ true, diagnosticMessage); + let block = parseBlock(ignoreMissingOpenBrace, /*checkForStrictMode*/ true, diagnosticMessage); setYieldContext(savedYieldContext); @@ -3781,13 +3810,13 @@ module ts { } function parseEmptyStatement(): Statement { - var node = createNode(SyntaxKind.EmptyStatement); + let node = createNode(SyntaxKind.EmptyStatement); parseExpected(SyntaxKind.SemicolonToken); return finishNode(node); } function parseIfStatement(): IfStatement { - var node = createNode(SyntaxKind.IfStatement); + let node = createNode(SyntaxKind.IfStatement); parseExpected(SyntaxKind.IfKeyword); parseExpected(SyntaxKind.OpenParenToken); node.expression = allowInAnd(parseExpression); @@ -3798,7 +3827,7 @@ module ts { } function parseDoStatement(): DoStatement { - var node = createNode(SyntaxKind.DoStatement); + let node = createNode(SyntaxKind.DoStatement); parseExpected(SyntaxKind.DoKeyword); node.statement = parseStatement(); parseExpected(SyntaxKind.WhileKeyword); @@ -3807,7 +3836,7 @@ module ts { parseExpected(SyntaxKind.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 + // 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(SyntaxKind.SemicolonToken); @@ -3815,7 +3844,7 @@ module ts { } function parseWhileStatement(): WhileStatement { - var node = createNode(SyntaxKind.WhileStatement); + let node = createNode(SyntaxKind.WhileStatement); parseExpected(SyntaxKind.WhileKeyword); parseExpected(SyntaxKind.OpenParenToken); node.expression = allowInAnd(parseExpression); @@ -3825,11 +3854,11 @@ module ts { } function parseForOrForInOrForOfStatement(): Statement { - var pos = getNodePos(); + let pos = getNodePos(); parseExpected(SyntaxKind.ForKeyword); parseExpected(SyntaxKind.OpenParenToken); - var initializer: VariableDeclarationList | Expression = undefined; + let initializer: VariableDeclarationList | Expression = undefined; if (token !== SyntaxKind.SemicolonToken) { if (token === SyntaxKind.VarKeyword || token === SyntaxKind.LetKeyword || token === SyntaxKind.ConstKeyword) { initializer = parseVariableDeclarationList(/*inForStatementInitializer:*/ true); @@ -3838,22 +3867,22 @@ module ts { initializer = disallowInAnd(parseExpression); } } - var forOrForInOrForOfStatement: IterationStatement; + let forOrForInOrForOfStatement: IterationStatement; if (parseOptional(SyntaxKind.InKeyword)) { - var forInStatement = createNode(SyntaxKind.ForInStatement, pos); + let forInStatement = createNode(SyntaxKind.ForInStatement, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(SyntaxKind.CloseParenToken); forOrForInOrForOfStatement = forInStatement; } else if (parseOptional(SyntaxKind.OfKeyword)) { - var forOfStatement = createNode(SyntaxKind.ForOfStatement, pos); + let forOfStatement = createNode(SyntaxKind.ForOfStatement, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(SyntaxKind.CloseParenToken); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(SyntaxKind.ForStatement, pos); + let forStatement = createNode(SyntaxKind.ForStatement, pos); forStatement.initializer = initializer; parseExpected(SyntaxKind.SemicolonToken); if (token !== SyntaxKind.SemicolonToken && token !== SyntaxKind.CloseParenToken) { @@ -3873,7 +3902,7 @@ module ts { } function parseBreakOrContinueStatement(kind: SyntaxKind): BreakOrContinueStatement { - var node = createNode(kind); + let node = createNode(kind); parseExpected(kind === SyntaxKind.BreakStatement ? SyntaxKind.BreakKeyword : SyntaxKind.ContinueKeyword); if (!canParseSemicolon()) { @@ -3885,7 +3914,7 @@ module ts { } function parseReturnStatement(): ReturnStatement { - var node = createNode(SyntaxKind.ReturnStatement); + let node = createNode(SyntaxKind.ReturnStatement); parseExpected(SyntaxKind.ReturnKeyword); if (!canParseSemicolon()) { @@ -3897,7 +3926,7 @@ module ts { } function parseWithStatement(): WithStatement { - var node = createNode(SyntaxKind.WithStatement); + let node = createNode(SyntaxKind.WithStatement); parseExpected(SyntaxKind.WithKeyword); parseExpected(SyntaxKind.OpenParenToken); node.expression = allowInAnd(parseExpression); @@ -3907,7 +3936,7 @@ module ts { } function parseCaseClause(): CaseClause { - var node = createNode(SyntaxKind.CaseClause); + let node = createNode(SyntaxKind.CaseClause); parseExpected(SyntaxKind.CaseKeyword); node.expression = allowInAnd(parseExpression); parseExpected(SyntaxKind.ColonToken); @@ -3916,7 +3945,7 @@ module ts { } function parseDefaultClause(): DefaultClause { - var node = createNode(SyntaxKind.DefaultClause); + let node = createNode(SyntaxKind.DefaultClause); parseExpected(SyntaxKind.DefaultKeyword); parseExpected(SyntaxKind.ColonToken); node.statements = parseList(ParsingContext.SwitchClauseStatements, /*checkForStrictMode*/ false, parseStatement); @@ -3928,14 +3957,16 @@ module ts { } function parseSwitchStatement(): SwitchStatement { - var node = createNode(SyntaxKind.SwitchStatement); + let node = createNode(SyntaxKind.SwitchStatement); parseExpected(SyntaxKind.SwitchKeyword); parseExpected(SyntaxKind.OpenParenToken); node.expression = allowInAnd(parseExpression); parseExpected(SyntaxKind.CloseParenToken); + let caseBlock = createNode(SyntaxKind.CaseBlock, scanner.getStartPos()); parseExpected(SyntaxKind.OpenBraceToken); - node.clauses = parseList(ParsingContext.SwitchClauses, /*checkForStrictMode*/ false, parseCaseOrDefaultClause); + caseBlock.clauses = parseList(ParsingContext.SwitchClauses, /*checkForStrictMode*/ false, parseCaseOrDefaultClause); parseExpected(SyntaxKind.CloseBraceToken); + node.caseBlock = finishNode(caseBlock); return finishNode(node); } @@ -3943,12 +3974,12 @@ module ts { // ThrowStatement[Yield] : // throw [no LineTerminator here]Expression[In, ?Yield]; - // Because of automatic semicolon insertion, we need to report error if this + // 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. + // 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(SyntaxKind.ThrowStatement); + let node = createNode(SyntaxKind.ThrowStatement); parseExpected(SyntaxKind.ThrowKeyword); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); @@ -3957,7 +3988,7 @@ module ts { // TODO: Review for error recovery function parseTryStatement(): TryStatement { - var node = createNode(SyntaxKind.TryStatement); + let node = createNode(SyntaxKind.TryStatement); parseExpected(SyntaxKind.TryKeyword); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace:*/ false, /*checkForStrictMode*/ false); @@ -3974,7 +4005,7 @@ module ts { } function parseCatchClause(): CatchClause { - var result = createNode(SyntaxKind.CatchClause); + let result = createNode(SyntaxKind.CatchClause); parseExpected(SyntaxKind.CatchKeyword); if (parseExpected(SyntaxKind.OpenParenToken)) { result.variableDeclaration = parseVariableDeclaration(); @@ -3986,7 +4017,7 @@ module ts { } function parseDebuggerStatement(): Statement { - var node = createNode(SyntaxKind.DebuggerStatement); + let node = createNode(SyntaxKind.DebuggerStatement); parseExpected(SyntaxKind.DebuggerKeyword); parseSemicolon(); return finishNode(node); @@ -3996,17 +4027,17 @@ module ts { // 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); + let fullStart = scanner.getStartPos(); + let expression = allowInAnd(parseExpression); if (expression.kind === SyntaxKind.Identifier && parseOptional(SyntaxKind.ColonToken)) { - var labeledStatement = createNode(SyntaxKind.LabeledStatement, fullStart); + let labeledStatement = createNode(SyntaxKind.LabeledStatement, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return finishNode(labeledStatement); } else { - var expressionStatement = createNode(SyntaxKind.ExpressionStatement, fullStart); + let expressionStatement = createNode(SyntaxKind.ExpressionStatement, fullStart); expressionStatement.expression = expression; parseSemicolon(); return finishNode(expressionStatement); @@ -4015,12 +4046,12 @@ module ts { function isStartOfStatement(inErrorRecovery: boolean): boolean { // Functions and variable statements are allowed as a statement. But as per the grammar, - // they also allow modifiers. So we have to check for those statements that might be - // following modifiers.This ensures that things work properly when incrementally parsing - // as the parser will produce the same FunctionDeclaraiton or VariableStatement if it has + // they also allow modifiers. So we have to check for those statements that might be + // following modifiers.This ensures that things work properly when incrementally parsing + // as the parser will produce the same FunctionDeclaraiton or VariableStatement if it has // the same text regardless of whether it is inside a block or not. if (isModifier(token)) { - var result = lookAhead(parseVariableStatementOrFunctionDeclarationWithModifiers); + let result = lookAhead(parseVariableStatementOrFunctionDeclarationWithModifiers); if (result) { return true; } @@ -4060,7 +4091,7 @@ module ts { // const keyword can precede enum keyword when defining constant enums // 'const enum' do not start statement. // In ES 6 'enum' is a future reserved keyword, so it should not be used as identifier - var isConstEnum = lookAhead(nextTokenIsEnumKeyword); + let isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; case SyntaxKind.InterfaceKeyword: case SyntaxKind.ClassKeyword: @@ -4103,7 +4134,7 @@ module ts { return parseBlock(/*ignoreMissingOpenBrace:*/ false, /*checkForStrictMode:*/ false); case SyntaxKind.VarKeyword: case SyntaxKind.ConstKeyword: - // const here should always be parsed as const declaration because of check in 'isStatement' + // const here should always be parsed as const declaration because of check in 'isStatement' return parseVariableStatement(scanner.getStartPos(), /*modifiers:*/ undefined); case SyntaxKind.FunctionKeyword: return parseFunctionDeclaration(scanner.getStartPos(), /*modifiers:*/ undefined); @@ -4143,14 +4174,14 @@ module ts { } // Else parse it like identifier - fall through default: - // Functions and variable statements are allowed as a statement. But as per - // the grammar, they also allow modifiers. So we have to check for those + // Functions and variable statements are allowed as a statement. But as per + // the grammar, they also allow modifiers. So we have to check for those // statements that might be following modifiers. This ensures that things // work properly when incrementally parsing as the parser will produce the // same FunctionDeclaraiton or VariableStatement if it has the same text // regardless of whether it is inside a block or not. if (isModifier(token)) { - var result = tryParse(parseVariableStatementOrFunctionDeclarationWithModifiers); + let result = tryParse(parseVariableStatementOrFunctionDeclarationWithModifiers); if (result) { return result; } @@ -4161,11 +4192,11 @@ module ts { } function parseVariableStatementOrFunctionDeclarationWithModifiers(): FunctionDeclaration | VariableStatement { - var start = scanner.getStartPos(); - var modifiers = parseModifiers(); + let start = scanner.getStartPos(); + let modifiers = parseModifiers(); switch (token) { case SyntaxKind.ConstKeyword: - var nextTokenIsEnum = lookAhead(nextTokenIsEnumKeyword) + let nextTokenIsEnum = lookAhead(nextTokenIsEnumKeyword) if (nextTokenIsEnum) { return undefined; } @@ -4201,7 +4232,7 @@ module ts { if (token === SyntaxKind.CommaToken) { return createNode(SyntaxKind.OmittedExpression); } - var node = createNode(SyntaxKind.BindingElement); + let node = createNode(SyntaxKind.BindingElement); node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); node.name = parseIdentifierOrPattern(); node.initializer = parseInitializer(/*inParameter*/ false); @@ -4209,9 +4240,9 @@ module ts { } function parseObjectBindingElement(): BindingElement { - var node = createNode(SyntaxKind.BindingElement); + let node = createNode(SyntaxKind.BindingElement); // TODO(andersh): Handle computed properties - var id = parsePropertyName(); + let id = parsePropertyName(); if (id.kind === SyntaxKind.Identifier && token !== SyntaxKind.ColonToken) { node.name = id; } @@ -4225,7 +4256,7 @@ module ts { } function parseObjectBindingPattern(): BindingPattern { - var node = createNode(SyntaxKind.ObjectBindingPattern); + let node = createNode(SyntaxKind.ObjectBindingPattern); parseExpected(SyntaxKind.OpenBraceToken); node.elements = parseDelimitedList(ParsingContext.ObjectBindingElements, parseObjectBindingElement); parseExpected(SyntaxKind.CloseBraceToken); @@ -4233,7 +4264,7 @@ module ts { } function parseArrayBindingPattern(): BindingPattern { - var node = createNode(SyntaxKind.ArrayBindingPattern); + let node = createNode(SyntaxKind.ArrayBindingPattern); parseExpected(SyntaxKind.OpenBracketToken); node.elements = parseDelimitedList(ParsingContext.ArrayBindingElements, parseArrayBindingElement); parseExpected(SyntaxKind.CloseBracketToken); @@ -4255,7 +4286,7 @@ module ts { } function parseVariableDeclaration(): VariableDeclaration { - var node = createNode(SyntaxKind.VariableDeclaration); + let node = createNode(SyntaxKind.VariableDeclaration); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token)) { @@ -4265,7 +4296,7 @@ module ts { } function parseVariableDeclarationList(inForStatementInitializer: boolean): VariableDeclarationList { - var node = createNode(SyntaxKind.VariableDeclarationList); + let node = createNode(SyntaxKind.VariableDeclarationList); switch (token) { case SyntaxKind.VarKeyword: @@ -4284,7 +4315,7 @@ module ts { // The user may have written the following: // - // for (var of X) { } + // 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. @@ -4295,7 +4326,7 @@ module ts { node.declarations = createMissingList(); } else { - var savedDisallowIn = inDisallowInContext(); + let savedDisallowIn = inDisallowInContext(); setDisallowInContext(inForStatementInitializer); node.declarations = parseDelimitedList(ParsingContext.VariableDeclarations, parseVariableDeclaration); @@ -4305,13 +4336,13 @@ module ts { return finishNode(node); } - + function canFollowContextualOfKeyword(): boolean { return nextTokenIsIdentifier() && nextToken() === SyntaxKind.CloseParenToken; } function parseVariableStatement(fullStart: number, modifiers: ModifiersArray): VariableStatement { - var node = createNode(SyntaxKind.VariableStatement, fullStart); + let node = createNode(SyntaxKind.VariableStatement, fullStart); setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer:*/ false); parseSemicolon(); @@ -4319,18 +4350,18 @@ module ts { } function parseFunctionDeclaration(fullStart: number, modifiers: ModifiersArray): FunctionDeclaration { - var node = createNode(SyntaxKind.FunctionDeclaration, fullStart); + let node = createNode(SyntaxKind.FunctionDeclaration, fullStart); setModifiers(node, modifiers); parseExpected(SyntaxKind.FunctionKeyword); node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - node.name = parseIdentifier(); + node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ !!node.asteriskToken, /*requireCompleteParameterList:*/ false, node); node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, Diagnostics.or_expected); return finishNode(node); } function parseConstructorDeclaration(pos: number, modifiers: ModifiersArray): ConstructorDeclaration { - var node = createNode(SyntaxKind.Constructor, pos); + let node = createNode(SyntaxKind.Constructor, pos); setModifiers(node, modifiers); parseExpected(SyntaxKind.ConstructorKeyword); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); @@ -4339,7 +4370,7 @@ module ts { } function parseMethodDeclaration(fullStart: number, modifiers: ModifiersArray, asteriskToken: Node, name: DeclarationName, questionToken: Node, diagnosticMessage?: DiagnosticMessage): MethodDeclaration { - var method = createNode(SyntaxKind.MethodDeclaration, fullStart); + let method = createNode(SyntaxKind.MethodDeclaration, fullStart); setModifiers(method, modifiers); method.asteriskToken = asteriskToken; method.name = name; @@ -4350,17 +4381,17 @@ module ts { } function parsePropertyOrMethodDeclaration(fullStart: number, modifiers: ModifiersArray): ClassElement { - var asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - var name = parsePropertyName(); + let asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); + let 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(SyntaxKind.QuestionToken); + let questionToken = parseOptionalToken(SyntaxKind.QuestionToken); if (asteriskToken || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { return parseMethodDeclaration(fullStart, modifiers, asteriskToken, name, questionToken, Diagnostics.or_expected); } else { - var property = createNode(SyntaxKind.PropertyDeclaration, fullStart); + let property = createNode(SyntaxKind.PropertyDeclaration, fullStart); setModifiers(property, modifiers); property.name = name; property.questionToken = questionToken; @@ -4376,7 +4407,7 @@ module ts { } function parseAccessorDeclaration(kind: SyntaxKind, fullStart: number, modifiers: ModifiersArray): AccessorDeclaration { - var node = createNode(kind, fullStart); + let node = createNode(kind, fullStart); setModifiers(node, modifiers); node.name = parsePropertyName(); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); @@ -4385,7 +4416,7 @@ module ts { } function isClassMemberStart(): boolean { - var idToken: SyntaxKind; + let idToken: SyntaxKind; // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. while (isModifier(token)) { @@ -4408,7 +4439,7 @@ module ts { if (token === SyntaxKind.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. @@ -4439,11 +4470,11 @@ module ts { } function parseModifiers(): ModifiersArray { - var flags = 0; - var modifiers: ModifiersArray; + let flags = 0; + let modifiers: ModifiersArray; while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; + let modifierStart = scanner.getStartPos(); + let modifierKind = token; if (!parseAnyContextualModifier()) { break; @@ -4464,10 +4495,10 @@ module ts { } function parseClassElement(): ClassElement { - var fullStart = getNodePos(); - var modifiers = parseModifiers(); + let fullStart = getNodePos(); + let modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, modifiers); + let accessor = tryParseAccessorDeclaration(fullStart, modifiers); if (accessor) { return accessor; } @@ -4496,10 +4527,16 @@ module ts { } function parseClassDeclaration(fullStart: number, modifiers: ModifiersArray): ClassDeclaration { + // In ES6 specification, All parts of a ClassDeclaration or a ClassExpression are strict mode code + let savedStrictModeContext = inStrictModeContext(); + if (languageVersion >= ScriptTarget.ES6) { + setStrictModeContext(true); + } + var node = createNode(SyntaxKind.ClassDeclaration, fullStart); setModifiers(node, modifiers); parseExpected(SyntaxKind.ClassKeyword); - node.name = parseIdentifier(); + node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause:*/ true); @@ -4516,7 +4553,10 @@ module ts { else { node.members = createMissingList(); } - return finishNode(node); + + var finishedNode = finishNode(node); + setStrictModeContext(savedStrictModeContext); + return finishedNode; } function parseHeritageClauses(isClassHeritageClause: boolean): NodeArray { @@ -4539,7 +4579,7 @@ module ts { function parseHeritageClause() { if (token === SyntaxKind.ExtendsKeyword || token === SyntaxKind.ImplementsKeyword) { - var node = createNode(SyntaxKind.HeritageClause); + let node = createNode(SyntaxKind.HeritageClause); node.token = token; nextToken(); node.types = parseDelimitedList(ParsingContext.TypeReferences, parseTypeReference); @@ -4558,7 +4598,7 @@ module ts { } function parseInterfaceDeclaration(fullStart: number, modifiers: ModifiersArray): InterfaceDeclaration { - var node = createNode(SyntaxKind.InterfaceDeclaration, fullStart); + let node = createNode(SyntaxKind.InterfaceDeclaration, fullStart); setModifiers(node, modifiers); parseExpected(SyntaxKind.InterfaceKeyword); node.name = parseIdentifier(); @@ -4569,7 +4609,7 @@ module ts { } function parseTypeAliasDeclaration(fullStart: number, modifiers: ModifiersArray): TypeAliasDeclaration { - var node = createNode(SyntaxKind.TypeAliasDeclaration, fullStart); + let node = createNode(SyntaxKind.TypeAliasDeclaration, fullStart); setModifiers(node, modifiers); parseExpected(SyntaxKind.TypeKeyword); node.name = parseIdentifier(); @@ -4584,14 +4624,14 @@ module ts { // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember(): EnumMember { - var node = createNode(SyntaxKind.EnumMember, scanner.getStartPos()); + let node = createNode(SyntaxKind.EnumMember, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart: number, modifiers: ModifiersArray): EnumDeclaration { - var node = createNode(SyntaxKind.EnumDeclaration, fullStart); + let node = createNode(SyntaxKind.EnumDeclaration, fullStart); setModifiers(node, modifiers); parseExpected(SyntaxKind.EnumKeyword); node.name = parseIdentifier(); @@ -4606,7 +4646,7 @@ module ts { } function parseModuleBlock(): ModuleBlock { - var node = createNode(SyntaxKind.ModuleBlock, scanner.getStartPos()); + let node = createNode(SyntaxKind.ModuleBlock, scanner.getStartPos()); if (parseExpected(SyntaxKind.OpenBraceToken)) { node.statements = parseList(ParsingContext.ModuleElements, /*checkForStrictMode*/false, parseModuleElement); parseExpected(SyntaxKind.CloseBraceToken); @@ -4618,7 +4658,7 @@ module ts { } function parseInternalModuleTail(fullStart: number, modifiers: ModifiersArray, flags: NodeFlags): ModuleDeclaration { - var node = createNode(SyntaxKind.ModuleDeclaration, fullStart); + let node = createNode(SyntaxKind.ModuleDeclaration, fullStart); setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); @@ -4629,7 +4669,7 @@ module ts { } function parseAmbientExternalModuleDeclaration(fullStart: number, modifiers: ModifiersArray): ModuleDeclaration { - var node = createNode(SyntaxKind.ModuleDeclaration, fullStart); + let node = createNode(SyntaxKind.ModuleDeclaration, fullStart); setModifiers(node, modifiers); node.name = parseLiteralNode(/*internName:*/ true); node.body = parseModuleBlock(); @@ -4660,16 +4700,16 @@ module ts { function parseImportDeclarationOrImportEqualsDeclaration(fullStart: number, modifiers: ModifiersArray): ImportEqualsDeclaration | ImportDeclaration { parseExpected(SyntaxKind.ImportKeyword); - var afterImportPos = scanner.getStartPos(); + let afterImportPos = scanner.getStartPos(); - var identifier: Identifier; + let identifier: Identifier; if (isIdentifier()) { identifier = parseIdentifier(); if (token !== SyntaxKind.CommaToken && token !== SyntaxKind.FromKeyword) { // ImportEquals declaration of type: // import x = require("mod"); or // import x = M.x; - var importEqualsDeclaration = createNode(SyntaxKind.ImportEqualsDeclaration, fullStart); + let importEqualsDeclaration = createNode(SyntaxKind.ImportEqualsDeclaration, fullStart); setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; parseExpected(SyntaxKind.EqualsToken); @@ -4680,14 +4720,14 @@ module ts { } // Import statement - var importDeclaration = createNode(SyntaxKind.ImportDeclaration, fullStart); + let importDeclaration = createNode(SyntaxKind.ImportDeclaration, fullStart); setModifiers(importDeclaration, modifiers); // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; if (identifier || // import id - token === SyntaxKind.AsteriskToken || // import * + token === SyntaxKind.AsteriskToken || // import * token === SyntaxKind.OpenBraceToken) { // import { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); parseExpected(SyntaxKind.FromKeyword); @@ -4706,14 +4746,14 @@ module ts { // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(SyntaxKind.ImportClause, fullStart); + let importClause = createNode(SyntaxKind.ImportClause, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding importClause.name = identifier; } - // If there was no default import or if there is comma token after default import + // If there was no default import or if there is comma token after default import // parse namespace or named imports if (!importClause.name || parseOptional(SyntaxKind.CommaToken)) { @@ -4730,7 +4770,7 @@ module ts { } function parseExternalModuleReference() { - var node = createNode(SyntaxKind.ExternalModuleReference); + let node = createNode(SyntaxKind.ExternalModuleReference); parseExpected(SyntaxKind.RequireKeyword); parseExpected(SyntaxKind.OpenParenToken); node.expression = parseModuleSpecifier(); @@ -4739,11 +4779,11 @@ module ts { } function parseModuleSpecifier(): Expression { - // We allow arbitrary expressions here, even though the grammar only allows string + // 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 + let 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 === SyntaxKind.StringLiteral) { internIdentifier((result).text); @@ -4754,7 +4794,7 @@ module ts { function parseNamespaceImport(): NamespaceImport { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(SyntaxKind.NamespaceImport); + let namespaceImport = createNode(SyntaxKind.NamespaceImport); parseExpected(SyntaxKind.AsteriskToken); parseExpected(SyntaxKind.AsKeyword); namespaceImport.name = parseIdentifier(); @@ -4762,7 +4802,7 @@ module ts { } function parseNamedImportsOrExports(kind: SyntaxKind): NamedImportsOrExports { - var node = createNode(kind); + let node = createNode(kind); // NamedImports: // { } @@ -4787,13 +4827,13 @@ module ts { } function parseImportOrExportSpecifier(kind: SyntaxKind): ImportOrExportSpecifier { - var node = createNode(kind); + let node = createNode(kind); // ImportSpecifier: // ImportedBinding // IdentifierName as ImportedBinding - var isFirstIdentifierNameNotAnIdentifier = isKeyword(token) && !isIdentifier(); - var start = scanner.getTokenPos(); - var identifierName = parseIdentifierName(); + let isFirstIdentifierNameNotAnIdentifier = isKeyword(token) && !isIdentifier(); + let start = scanner.getTokenPos(); + let identifierName = parseIdentifierName(); if (token === SyntaxKind.AsKeyword) { node.propertyName = identifierName; parseExpected(SyntaxKind.AsKeyword); @@ -4816,7 +4856,7 @@ module ts { } function parseExportDeclaration(fullStart: number, modifiers: ModifiersArray): ExportDeclaration { - var node = createNode(SyntaxKind.ExportDeclaration, fullStart); + let node = createNode(SyntaxKind.ExportDeclaration, fullStart); setModifiers(node, modifiers); if (parseOptional(SyntaxKind.AsteriskToken)) { parseExpected(SyntaxKind.FromKeyword); @@ -4832,18 +4872,30 @@ module ts { return finishNode(node); } - function parseExportAssignmentTail(fullStart: number, modifiers: ModifiersArray): ExportAssignment { - var node = createNode(SyntaxKind.ExportAssignment, fullStart); + function parseExportAssignment(fullStart: number, modifiers: ModifiersArray): ExportAssignment { + let node = createNode(SyntaxKind.ExportAssignment, fullStart); setModifiers(node, modifiers); - node.exportName = parseIdentifier(); + if (parseOptional(SyntaxKind.EqualsToken)) { + node.isExportEquals = true; + node.expression = parseAssignmentExpressionOrHigher(); + } + else { + parseExpected(SyntaxKind.DefaultKeyword); + if (parseOptional(SyntaxKind.ColonToken)) { + node.type = parseType(); + } + else { + node.expression = parseAssignmentExpressionOrHigher(); + } + } parseSemicolon(); return finishNode(node); } function isLetDeclaration() { - // It is let declaration if in strict mode or next token is identifier on same line. + // It is let declaration if in strict mode or next token is identifier\open bracket\open curly on same line. // otherwise it needs to be treated like identifier - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOnSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart(): boolean { @@ -4902,7 +4954,7 @@ module ts { function nextTokenCanFollowExportKeyword() { nextToken(); return token === SyntaxKind.EqualsToken || token === SyntaxKind.AsteriskToken || - token === SyntaxKind.OpenBraceToken || isDeclarationStart(); + token === SyntaxKind.OpenBraceToken || token === SyntaxKind.DefaultKeyword || isDeclarationStart(); } function nextTokenIsDeclarationStart() { @@ -4915,12 +4967,12 @@ module ts { } function parseDeclaration(): ModuleElement { - var fullStart = getNodePos(); - var modifiers = parseModifiers(); + let fullStart = getNodePos(); + let modifiers = parseModifiers(); if (token === SyntaxKind.ExportKeyword) { nextToken(); - if (parseOptional(SyntaxKind.EqualsToken)) { - return parseExportAssignmentTail(fullStart, modifiers); + if (token === SyntaxKind.DefaultKeyword || token === SyntaxKind.EqualsToken) { + return parseExportAssignment(fullStart, modifiers); } if (token === SyntaxKind.AsteriskToken || token === SyntaxKind.OpenBraceToken) { return parseExportDeclaration(fullStart, modifiers); @@ -4970,16 +5022,16 @@ module ts { } function processReferenceComments(sourceFile: SourceFile): void { - var triviaScanner = createScanner(sourceFile.languageVersion, /*skipTrivia*/false, sourceText); - var referencedFiles: FileReference[] = []; - var amdDependencies: {path: string; name: string}[] = []; - var amdModuleName: string; + let triviaScanner = createScanner(sourceFile.languageVersion, /*skipTrivia*/false, sourceText); + let referencedFiles: FileReference[] = []; + let amdDependencies: {path: string; name: string}[] = []; + let amdModuleName: string; - // 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 + // 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(); + let kind = triviaScanner.scan(); if (kind === SyntaxKind.WhitespaceTrivia || kind === SyntaxKind.NewLineTrivia || kind === SyntaxKind.MultiLineCommentTrivia) { continue; } @@ -4987,14 +5039,14 @@ module ts { break; } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos() }; + let range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = getFileReferenceFromReferencePath(comment, range); + let comment = sourceText.substring(range.pos, range.end); + let referencePathMatchResult = getFileReferenceFromReferencePath(comment, range); if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; + let fileReference = referencePathMatchResult.fileReference; sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; + let diagnosticMessage = referencePathMatchResult.diagnosticMessage; if (fileReference) { referencedFiles.push(fileReference); } @@ -5003,8 +5055,8 @@ module ts { } } else { - var amdModuleNameRegEx = /^\/\/\/\s* module ts { - /* @internal */ export var emitTime = 0; - /* @internal */ export var ioReadTime = 0; + /* @internal */ export let programTime = 0; + /* @internal */ export let emitTime = 0; + /* @internal */ export let ioReadTime = 0; + /* @internal */ export let ioWriteTime = 0; + + /** The version of the TypeScript compiler release */ + export let version = "1.5.0.0"; export function createCompilerHost(options: CompilerOptions): CompilerHost { - var currentDirectory: string; - var existingDirectories: Map = {}; + let currentDirectory: string; + let existingDirectories: Map = {}; function getCanonicalFileName(fileName: string): string { // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. @@ -16,12 +21,13 @@ module ts { } // returned by CScript sys environment - var unsupportedFileEncodingErrorCode = -2147024809; + let unsupportedFileEncodingErrorCode = -2147024809; function getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile { + let text: string; try { - var start = new Date().getTime(); - var text = sys.readFile(fileName, options.charset); + let start = new Date().getTime(); + text = sys.readFile(fileName, options.charset); ioReadTime += new Date().getTime() - start; } catch (e) { @@ -32,33 +38,34 @@ module ts { } text = ""; } - return text !== undefined ? createSourceFile(fileName, text, languageVersion) : undefined; } + function directoryExists(directoryPath: string): boolean { + if (hasProperty(existingDirectories, directoryPath)) { + return true; + } + if (sys.directoryExists(directoryPath)) { + existingDirectories[directoryPath] = true; + return true; + } + return false; + } + + function ensureDirectoriesExist(directoryPath: string) { + if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { + let parentDirectory = getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory); + sys.createDirectory(directoryPath); + } + } + function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { - function directoryExists(directoryPath: string): boolean { - if (hasProperty(existingDirectories, directoryPath)) { - return true; - } - if (sys.directoryExists(directoryPath)) { - existingDirectories[directoryPath] = true; - return true; - } - return false; - } - - function ensureDirectoriesExist(directoryPath: string) { - if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - sys.createDirectory(directoryPath); - } - } - try { + var start = new Date().getTime(); ensureDirectoriesExist(getDirectoryPath(normalizePath(fileName))); sys.writeFile(fileName, data, writeByteOrderMark); + ioWriteTime += new Date().getTime() - start; } catch (e) { if (onError) { @@ -79,7 +86,7 @@ module ts { } export function getPreEmitDiagnostics(program: Program): Diagnostic[] { - var diagnostics = program.getSyntacticDiagnostics().concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics()); + let diagnostics = program.getSyntacticDiagnostics().concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics()); return sortAndDeduplicateDiagnostics(diagnostics); } @@ -88,15 +95,15 @@ module ts { return messageText; } else { - var diagnosticChain = messageText; - var result = ""; + let diagnosticChain = messageText; + let result = ""; - var indent = 0; + let indent = 0; while (diagnosticChain) { if (indent) { result += newLine; - for (var i = 0; i < indent; i++) { + for (let i = 0; i < indent; i++) { result += " "; } } @@ -110,22 +117,25 @@ module ts { } export function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program { - var program: Program; - var files: SourceFile[] = []; - var filesByName: Map = {}; - var diagnostics = createDiagnosticCollection(); - var seenNoDefaultLib = options.noLib; - var commonSourceDirectory: string; - host = host || createCompilerHost(options); + let program: Program; + let files: SourceFile[] = []; + let filesByName: Map = {}; + let diagnostics = createDiagnosticCollection(); + let seenNoDefaultLib = options.noLib; + let commonSourceDirectory: string; + let diagnosticsProducingTypeChecker: TypeChecker; + let noDiagnosticsTypeChecker: TypeChecker; + let start = new Date().getTime(); + + host = host || createCompilerHost(options); forEach(rootNames, name => processRootFile(name, false)); if (!seenNoDefaultLib) { processRootFile(host.getDefaultLibFileName(options), true); } verifyCompilerOptions(); - var diagnosticsProducingTypeChecker: TypeChecker; - var noDiagnosticsTypeChecker: TypeChecker; + programTime += new Date().getTime() - start; program = { getSourceFile: getSourceFile, @@ -169,7 +179,7 @@ module ts { } function getDeclarationDiagnostics(targetSourceFile: SourceFile): Diagnostic[] { - var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(targetSourceFile); + let resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(targetSourceFile); return ts.getDeclarationDiagnostics(getEmitHost(), resolver, targetSourceFile); } @@ -183,11 +193,11 @@ module ts { // Create the emit resolver outside of the "emitTime" tracking code below. That way // any cost associated with it (like type checking) are appropriate associated with // the type-checking counter. - var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); + let emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); - var start = new Date().getTime(); + let start = new Date().getTime(); - var emitResult = emitFiles( + let emitResult = emitFiles( emitResolver, getEmitHost(writeFileCallback), sourceFile); @@ -206,7 +216,7 @@ module ts { return getDiagnostics(sourceFile); } - var allDiagnostics: Diagnostic[] = []; + let allDiagnostics: Diagnostic[] = []; forEach(program.getSourceFiles(), sourceFile => { addRange(allDiagnostics, getDiagnostics(sourceFile)); }); @@ -227,20 +237,20 @@ module ts { } function getSemanticDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] { - var typeChecker = getDiagnosticsProducingTypeChecker(); + let typeChecker = getDiagnosticsProducingTypeChecker(); Debug.assert(!!sourceFile.bindDiagnostics); - var bindDiagnostics = sourceFile.bindDiagnostics; - var checkDiagnostics = typeChecker.getDiagnostics(sourceFile); - var programDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); + let bindDiagnostics = sourceFile.bindDiagnostics; + let checkDiagnostics = typeChecker.getDiagnostics(sourceFile); + let programDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); return bindDiagnostics.concat(checkDiagnostics).concat(programDiagnostics); } function getGlobalDiagnostics(): Diagnostic[] { - var typeChecker = getDiagnosticsProducingTypeChecker(); + let typeChecker = getDiagnosticsProducingTypeChecker(); - var allDiagnostics: Diagnostic[] = []; + let allDiagnostics: Diagnostic[] = []; addRange(allDiagnostics, typeChecker.getGlobalDiagnostics()); addRange(allDiagnostics, diagnostics.getGlobalDiagnostics()); @@ -256,11 +266,13 @@ module ts { } function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) { + let start: number; + let length: number; if (refEnd !== undefined && refPos !== undefined) { - var start = refPos; - var length = refEnd - refPos; + start = refPos; + length = refEnd - refPos; } - var diagnostic: DiagnosticMessage; + let diagnostic: DiagnosticMessage; if (hasExtension(fileName)) { if (!options.allowNonTsExtensions && !fileExtensionIs(host.getCanonicalFileName(fileName), ".ts")) { diagnostic = Diagnostics.File_0_must_have_extension_ts_or_d_ts; @@ -294,20 +306,20 @@ module ts { // Get source file from normalized fileName function findSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refStart?: number, refLength?: number): SourceFile { - var canonicalName = host.getCanonicalFileName(fileName); + let canonicalName = host.getCanonicalFileName(fileName); if (hasProperty(filesByName, canonicalName)) { // We've already looked for this file, use cached result return getSourceFileFromCache(fileName, canonicalName, /*useAbsolutePath*/ false); } else { - var normalizedAbsolutePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); - var canonicalAbsolutePath = host.getCanonicalFileName(normalizedAbsolutePath); + let normalizedAbsolutePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); + let canonicalAbsolutePath = host.getCanonicalFileName(normalizedAbsolutePath); if (hasProperty(filesByName, canonicalAbsolutePath)) { return getSourceFileFromCache(normalizedAbsolutePath, canonicalAbsolutePath, /*useAbsolutePath*/ true); } // We haven't looked for this file, do so now and cache result - var file = filesByName[canonicalName] = host.getSourceFile(fileName, options.target, hostErrorMessage => { + let file = filesByName[canonicalName] = host.getSourceFile(fileName, options.target, hostErrorMessage => { if (refFile) { diagnostics.add(createFileDiagnostic(refFile, refStart, refLength, Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); @@ -323,7 +335,7 @@ module ts { filesByName[canonicalAbsolutePath] = file; if (!options.noResolve) { - var basePath = getDirectoryPath(fileName); + let basePath = getDirectoryPath(fileName); processReferencedFiles(file, basePath); processImportedModules(file, basePath); } @@ -334,13 +346,14 @@ module ts { files.push(file); } } + + return file; } - return file; function getSourceFileFromCache(fileName: string, canonicalName: string, useAbsolutePath: boolean): SourceFile { - var file = filesByName[canonicalName]; + let file = filesByName[canonicalName]; if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; + let sourceFileName = useAbsolutePath ? getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; if (canonicalName !== sourceFileName) { diagnostics.add(createFileDiagnostic(refFile, refStart, refLength, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); @@ -352,7 +365,7 @@ module ts { function processReferencedFiles(file: SourceFile, basePath: string) { forEach(file.referencedFiles, ref => { - var referencedFileName = isRootedDiskPath(ref.fileName) ? ref.fileName : combinePaths(basePath, ref.fileName); + let referencedFileName = isRootedDiskPath(ref.fileName) ? ref.fileName : combinePaths(basePath, ref.fileName); processSourceFile(normalizePath(referencedFileName), /* isDefaultLib */ false, file, ref.pos, ref.end); }); } @@ -360,17 +373,17 @@ module ts { function processImportedModules(file: SourceFile, basePath: string) { forEach(file.statements, node => { if (node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration || node.kind === SyntaxKind.ExportDeclaration) { - var moduleNameExpr = getExternalModuleName(node); + let moduleNameExpr = getExternalModuleName(node); if (moduleNameExpr && moduleNameExpr.kind === SyntaxKind.StringLiteral) { - var moduleNameText = (moduleNameExpr).text; + let moduleNameText = (moduleNameExpr).text; if (moduleNameText) { - var searchPath = basePath; + let searchPath = basePath; while (true) { - var searchName = normalizePath(combinePaths(searchPath, moduleNameText)); + let searchName = normalizePath(combinePaths(searchPath, moduleNameText)); if (findModuleSourceFile(searchName + ".ts", moduleNameExpr) || findModuleSourceFile(searchName + ".d.ts", moduleNameExpr)) { break; } - var parentPath = getDirectoryPath(searchPath); + let parentPath = getDirectoryPath(searchPath); if (parentPath === searchPath) { break; } @@ -389,14 +402,14 @@ module ts { if (isExternalModuleImportEqualsDeclaration(node) && getExternalModuleImportEqualsDeclarationExpression(node).kind === SyntaxKind.StringLiteral) { - var nameLiteral = getExternalModuleImportEqualsDeclarationExpression(node); - var moduleName = nameLiteral.text; + let nameLiteral = getExternalModuleImportEqualsDeclarationExpression(node); + let moduleName = nameLiteral.text; if (moduleName) { // 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. - var searchName = normalizePath(combinePaths(basePath, moduleName)); - var tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); + let searchName = normalizePath(combinePaths(basePath, moduleName)); + let tsFile = findModuleSourceFile(searchName + ".ts", nameLiteral); if (!tsFile) { findModuleSourceFile(searchName + ".d.ts", nameLiteral); } @@ -423,13 +436,20 @@ module ts { return; } - var firstExternalModule = forEach(files, f => isExternalModule(f) ? f : undefined); - if (firstExternalModule && !options.module) { - // We cannot use createDiagnosticFromNode because nodes do not have parents yet - var externalModuleErrorSpan = getErrorSpanForNode(firstExternalModule.externalModuleIndicator); - var errorStart = skipTrivia(firstExternalModule.text, externalModuleErrorSpan.pos); - var errorLength = externalModuleErrorSpan.end - errorStart; - diagnostics.add(createFileDiagnostic(firstExternalModule, errorStart, errorLength, Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + let languageVersion = options.target || ScriptTarget.ES3; + + let firstExternalModuleSourceFile = forEach(files, f => isExternalModule(f) ? f : undefined); + if (firstExternalModuleSourceFile && !options.module) { + if (!options.module && languageVersion < ScriptTarget.ES6) { + // We cannot use createDiagnosticFromNode because nodes do not have parents yet + let span = getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); + diagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + } + } + + // Cannot specify module gen target when in es6 or above + if (options.module && languageVersion >= ScriptTarget.ES6) { + diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_external_modules_into_amd_or_commonjs_when_targeting_es6_or_higher)); } // there has to be common source directory if user specified --outdir || --sourcRoot @@ -437,17 +457,17 @@ module ts { if (options.outDir || // there is --outDir specified options.sourceRoot || // there is --sourceRoot specified (options.mapRoot && // there is --mapRoot Specified and there would be multiple js files generated - (!options.out || firstExternalModule !== undefined))) { + (!options.out || firstExternalModuleSourceFile !== undefined))) { - var commonPathComponents: string[]; + let commonPathComponents: string[]; forEach(files, sourceFile => { // Each file contributes into common source file path if (!(sourceFile.flags & NodeFlags.DeclarationFile) && !fileExtensionIs(sourceFile.fileName, ".js")) { - var sourcePathComponents = getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); + let sourcePathComponents = getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory()); sourcePathComponents.pop(); // FileName is not part of directory if (commonPathComponents) { - for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) { + for (let i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) { if (commonPathComponents[i] !== sourcePathComponents[i]) { if (i === 0) { diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 9bb66f10f41..fbcadab8c1d 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -37,7 +37,7 @@ module ts { tryScan(callback: () => T): T; } - var textToToken: Map = { + let textToToken: Map = { "any": SyntaxKind.AnyKeyword, "as": SyntaxKind.AsKeyword, "boolean": SyntaxKind.BooleanKeyword, @@ -170,8 +170,8 @@ module ts { Codepoint ranges for ES3 Identifiers are extracted from the Unicode 3.0.0 specification at: http://www.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.txt */ - var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; - var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; + let unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; + let unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; /* As per ECMAScript Language Specification 5th Edition, Section 7.6: ISyntaxToken Names and Identifiers @@ -195,8 +195,8 @@ module ts { Codepoint ranges for ES5 Identifiers are extracted from the Unicode 6.2 specification at: http://www.unicode.org/Public/6.2.0/ucd/UnicodeData.txt */ - var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; - var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; + let unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; + let unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, ]; function lookupInUnicodeMap(code: number, map: number[]): boolean { // Bail out quickly if it couldn't possibly be in the map. @@ -205,9 +205,9 @@ module ts { } // Perform binary search in one of the Unicode range maps - var lo: number = 0; - var hi: number = map.length; - var mid: number; + let lo: number = 0; + let hi: number = map.length; + let mid: number; while (lo + 1 < hi) { mid = lo + (hi - lo) / 2; @@ -241,8 +241,8 @@ module ts { } function makeReverseMap(source: Map): string[] { - var result: string[] = []; - for (var name in source) { + let result: string[] = []; + for (let name in source) { if (source.hasOwnProperty(name)) { result[source[name]] = name; } @@ -250,18 +250,18 @@ module ts { return result; } - var tokenStrings = makeReverseMap(textToToken); + let tokenStrings = makeReverseMap(textToToken); export function tokenToString(t: SyntaxKind): string { return tokenStrings[t]; } export function computeLineStarts(text: string): number[] { - var result: number[] = new Array(); - var pos = 0; - var lineStart = 0; + let result: number[] = new Array(); + let pos = 0; + let lineStart = 0; while (pos < text.length) { - var ch = text.charCodeAt(pos++); + let ch = text.charCodeAt(pos++); switch (ch) { case CharacterCodes.carriageReturn: if (text.charCodeAt(pos) === CharacterCodes.lineFeed) { @@ -297,7 +297,7 @@ module ts { } export function computeLineAndCharacterOfPosition(lineStarts: number[], position: number) { - var lineNumber = binarySearch(lineStarts, position); + let lineNumber = binarySearch(lineStarts, position); if (lineNumber < 0) { // If the actual position was not found, // the binary search returns the negative value of the next line start @@ -315,7 +315,7 @@ module ts { return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } - var hasOwnProperty = Object.prototype.hasOwnProperty; + let hasOwnProperty = Object.prototype.hasOwnProperty; export function isWhiteSpace(ch: number): boolean { return ch === CharacterCodes.space || ch === CharacterCodes.tab || ch === CharacterCodes.verticalTab || ch === CharacterCodes.formFeed || @@ -337,7 +337,7 @@ module ts { export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number { while (true) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); switch (ch) { case CharacterCodes.carriageReturn: if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { @@ -401,17 +401,17 @@ module ts { // All conflict markers consist of the same character repeated seven times. If it is // a <<<<<<< or >>>>>>> marker then it is also followd by a space. - var mergeConflictMarkerLength = "<<<<<<<".length; + let mergeConflictMarkerLength = "<<<<<<<".length; function isConflictMarkerTrivia(text: string, pos: number) { Debug.assert(pos >= 0); // Conflict markers must be at the start of a line. if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if ((pos + mergeConflictMarkerLength) < text.length) { - for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) { + for (let i = 0, n = mergeConflictMarkerLength; i < n; i++) { if (text.charCodeAt(pos + i) !== ch) { return false; } @@ -430,8 +430,8 @@ module ts { error(Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength); } - var ch = text.charCodeAt(pos); - var len = text.length; + let ch = text.charCodeAt(pos); + let len = text.length; if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) { while (pos < len && !isLineBreak(text.charCodeAt(pos))) { @@ -443,7 +443,7 @@ module ts { // Consume everything from the start of the mid-conlict marker to the start of the next // end-conflict marker. while (pos < len) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if (ch === CharacterCodes.greaterThan && isConflictMarkerTrivia(text, pos)) { break; } @@ -461,10 +461,10 @@ module ts { // comment. Single-line comment ranges include the beginning '//' characters but not the ending line break. Multi-line comment // ranges include the beginning '/* and ending '*/' characters. The return value is undefined if no comments were found. function getCommentRanges(text: string, pos: number, trailing: boolean): CommentRange[] { - var result: CommentRange[]; - var collecting = trailing || pos === 0; + let result: CommentRange[]; + let collecting = trailing || pos === 0; while (true) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); switch (ch) { case CharacterCodes.carriageReturn: if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) pos++; @@ -485,10 +485,10 @@ module ts { pos++; continue; case CharacterCodes.slash: - var nextChar = text.charCodeAt(pos + 1); - var hasTrailingNewLine = false; + let nextChar = text.charCodeAt(pos + 1); + let hasTrailingNewLine = false; if (nextChar === CharacterCodes.slash || nextChar === CharacterCodes.asterisk) { - var startPos = pos; + let startPos = pos; pos += 2; if (nextChar === CharacterCodes.slash) { while (pos < text.length) { @@ -550,15 +550,15 @@ module ts { } export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner { - var pos: number; // Current position (end position of text of current token) - var len: number; // Length of text - var startPos: number; // Start position of whitespace before current token - var tokenPos: number; // Start position of text of current token - var token: SyntaxKind; - var tokenValue: string; - var precedingLineBreak: boolean; - var hasExtendedUnicodeEscape: boolean; - var tokenIsUnterminated: boolean; + let pos: number; // Current position (end position of text of current token) + let len: number; // Length of text + let startPos: number; // Start position of whitespace before current token + let tokenPos: number; // Start position of text of current token + let token: SyntaxKind; + let tokenValue: string; + let precedingLineBreak: boolean; + let hasExtendedUnicodeEscape: boolean; + let tokenIsUnterminated: boolean; function error(message: DiagnosticMessage, length?: number): void { if (onError) { @@ -579,13 +579,13 @@ module ts { } function scanNumber(): number { - var start = pos; + let start = pos; while (isDigit(text.charCodeAt(pos))) pos++; if (text.charCodeAt(pos) === CharacterCodes.dot) { pos++; while (isDigit(text.charCodeAt(pos))) pos++; } - var end = pos; + let end = pos; if (text.charCodeAt(pos) === CharacterCodes.E || text.charCodeAt(pos) === CharacterCodes.e) { pos++; if (text.charCodeAt(pos) === CharacterCodes.plus || text.charCodeAt(pos) === CharacterCodes.minus) pos++; @@ -602,7 +602,7 @@ module ts { } function scanOctalDigits(): number { - var start = pos; + let start = pos; while (isOctalDigit(text.charCodeAt(pos))) { pos++; } @@ -626,10 +626,10 @@ module ts { } function scanHexDigits(minCount: number, scanAsManyAsPossible: boolean): number { - var digits = 0; - var value = 0; + let digits = 0; + let value = 0; while (digits < minCount || scanAsManyAsPossible) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if (ch >= CharacterCodes._0 && ch <= CharacterCodes._9) { value = value * 16 + ch - CharacterCodes._0; } @@ -652,9 +652,9 @@ module ts { } function scanString(): string { - var quote = text.charCodeAt(pos++); - var result = ""; - var start = pos; + let quote = text.charCodeAt(pos++); + let result = ""; + let start = pos; while (true) { if (pos >= len) { result += text.substring(start, pos); @@ -662,7 +662,7 @@ module ts { error(Diagnostics.Unterminated_string_literal); break; } - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if (ch === quote) { result += text.substring(start, pos); pos++; @@ -690,12 +690,12 @@ module ts { * a literal component of a TemplateExpression. */ function scanTemplateAndSetTokenValue(): SyntaxKind { - var startedWithBacktick = text.charCodeAt(pos) === CharacterCodes.backtick; + let startedWithBacktick = text.charCodeAt(pos) === CharacterCodes.backtick; pos++; - var start = pos; - var contents = "" - var resultingToken: SyntaxKind; + let start = pos; + let contents = "" + let resultingToken: SyntaxKind; while (true) { if (pos >= len) { @@ -706,7 +706,7 @@ module ts { break; } - var currChar = text.charCodeAt(pos); + let currChar = text.charCodeAt(pos); // '`' if (currChar === CharacterCodes.backtick) { @@ -762,7 +762,7 @@ module ts { error(Diagnostics.Unexpected_end_of_text); return ""; } - var ch = text.charCodeAt(pos++); + let ch = text.charCodeAt(pos++); switch (ch) { case CharacterCodes._0: return "\0"; @@ -814,7 +814,7 @@ module ts { } function scanHexadecimalEscape(numDigits: number): string { - var escapedValue = scanExactNumberOfHexDigits(numDigits); + let escapedValue = scanExactNumberOfHexDigits(numDigits); if (escapedValue >= 0) { return String.fromCharCode(escapedValue); @@ -826,8 +826,8 @@ module ts { } function scanExtendedUnicodeEscape(): string { - var escapedValue = scanMinimumNumberOfHexDigits(1); - var isInvalidExtendedEscape = false; + let escapedValue = scanMinimumNumberOfHexDigits(1); + let isInvalidExtendedEscape = false; // Validate the value of the digit if (escapedValue < 0) { @@ -867,8 +867,8 @@ module ts { return String.fromCharCode(codePoint); } - var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; - var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; + let codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; + let codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; return String.fromCharCode(codeUnit1, codeUnit2); } @@ -877,9 +877,9 @@ module ts { // and return code point value if valid Unicode escape is found. Otherwise return -1. function peekUnicodeEscape(): number { if (pos + 5 < len && text.charCodeAt(pos + 1) === CharacterCodes.u) { - var start = pos; + let start = pos; pos += 2; - var value = scanExactNumberOfHexDigits(4); + let value = scanExactNumberOfHexDigits(4); pos = start; return value; } @@ -887,10 +887,10 @@ module ts { } function scanIdentifierParts(): string { - var result = ""; - var start = pos; + let result = ""; + let start = pos; while (pos < len) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if (isIdentifierPart(ch)) { pos++; } @@ -915,9 +915,9 @@ module ts { function getIdentifierToken(): SyntaxKind { // Reserved words are between 2 and 11 characters long and start with a lowercase letter - var len = tokenValue.length; + let len = tokenValue.length; if (len >= 2 && len <= 11) { - var ch = tokenValue.charCodeAt(0); + let ch = tokenValue.charCodeAt(0); if (ch >= CharacterCodes.a && ch <= CharacterCodes.z && hasOwnProperty.call(textToToken, tokenValue)) { return token = textToToken[tokenValue]; } @@ -928,13 +928,13 @@ module ts { function scanBinaryOrOctalDigits(base: number): number { Debug.assert(base !== 2 || base !== 8, "Expected either base 2 or base 8"); - var value = 0; + let value = 0; // For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b. // Similarly valid octalIntegerLiteral must have at least one octal digit following o or O. - var numberOfDigits = 0; + let numberOfDigits = 0; while (true) { - var ch = text.charCodeAt(pos); - var valueOfCh = ch - CharacterCodes._0; + let ch = text.charCodeAt(pos); + let valueOfCh = ch - CharacterCodes._0; if (!isDigit(ch) || valueOfCh >= base) { break; } @@ -959,7 +959,7 @@ module ts { if (pos >= len) { return token = SyntaxKind.EndOfFileToken; } - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); switch (ch) { case CharacterCodes.lineFeed: case CharacterCodes.carriageReturn: @@ -1079,9 +1079,9 @@ module ts { if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { pos += 2; - var commentClosed = false; + let commentClosed = false; while (pos < len) { - var ch = text.charCodeAt(pos); + let ch = text.charCodeAt(pos); if (ch === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { pos += 2; @@ -1117,7 +1117,7 @@ module ts { case CharacterCodes._0: if (pos + 2 < len && (text.charCodeAt(pos + 1) === CharacterCodes.X || text.charCodeAt(pos + 1) === CharacterCodes.x)) { pos += 2; - var value = scanMinimumNumberOfHexDigits(1); + let value = scanMinimumNumberOfHexDigits(1); if (value < 0) { error(Diagnostics.Hexadecimal_digit_expected); value = 0; @@ -1127,7 +1127,7 @@ module ts { } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === CharacterCodes.B || text.charCodeAt(pos + 1) === CharacterCodes.b)) { pos += 2; - var value = scanBinaryOrOctalDigits(/* base */ 2); + let value = scanBinaryOrOctalDigits(/* base */ 2); if (value < 0) { error(Diagnostics.Binary_digit_expected); value = 0; @@ -1137,7 +1137,7 @@ module ts { } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === CharacterCodes.O || text.charCodeAt(pos + 1) === CharacterCodes.o)) { pos += 2; - var value = scanBinaryOrOctalDigits(/* base */ 8); + let value = scanBinaryOrOctalDigits(/* base */ 8); if (value < 0) { error(Diagnostics.Octal_digit_expected); value = 0; @@ -1248,10 +1248,10 @@ module ts { case CharacterCodes.tilde: return pos++, token = SyntaxKind.TildeToken; case CharacterCodes.backslash: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { + let cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } error(Diagnostics.Invalid_character); @@ -1304,9 +1304,9 @@ module ts { function reScanSlashToken(): SyntaxKind { if (token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) { - var p = tokenPos + 1; - var inEscape = false; - var inCharacterClass = false; + let p = tokenPos + 1; + let inEscape = false; + let inCharacterClass = false; while (true) { // If we reach the end of a file, or hit a newline, then this is an unterminated // regex. Report error and return what we have so far. @@ -1316,7 +1316,7 @@ module ts { break; } - var ch = text.charCodeAt(p); + let ch = text.charCodeAt(p); if (isLineBreak(ch)) { tokenIsUnterminated = true; error(Diagnostics.Unterminated_regular_expression_literal) @@ -1366,13 +1366,13 @@ module ts { } function speculationHelper(callback: () => T, isLookahead: boolean): T { - var savePos = pos; - var saveStartPos = startPos; - var saveTokenPos = tokenPos; - var saveToken = token; - var saveTokenValue = tokenValue; - var savePrecedingLineBreak = precedingLineBreak; - var result = callback(); + let savePos = pos; + let saveStartPos = startPos; + let saveTokenPos = tokenPos; + let saveToken = token; + let saveTokenValue = tokenValue; + let savePrecedingLineBreak = precedingLineBreak; + let result = callback(); // If our callback returned something 'falsy' or we're just looking ahead, // then unconditionally restore us to where we were. diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5f10a747d42..f89c474ce7f 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -124,15 +124,14 @@ module ts { function visitDirectory(path: string) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var i = 0; i < files.length; i++) { - var name = files[i]; + for (let name of files) { if (!extension || fileExtensionIs(name, extension)) { result.push(combinePaths(path, name)); } } var subfolders = getNames(folder.subfolders); - for (var i = 0; i < subfolders.length; i++) { - visitDirectory(combinePaths(path, subfolders[i])); + for (let current of subfolders) { + visitDirectory(combinePaths(path, current)); } } } @@ -230,8 +229,8 @@ module ts { function visitDirectory(path: string) { var files = _fs.readdirSync(path || ".").sort(); var directories: string[] = []; - for (var i = 0; i < files.length; i++) { - var name = combinePaths(path, files[i]); + for (let current of files) { + var name = combinePaths(path, current); var stat = _fs.lstatSync(name); if (stat.isFile()) { if (!extension || fileExtensionIs(name, extension)) { @@ -242,8 +241,8 @@ module ts { directories.push(name); } } - for (var i = 0; i < directories.length; i++) { - visitDirectory(directories[i]); + for (let current of directories) { + visitDirectory(current); } } } diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 68507b34574..3f82d6c8cf5 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -2,8 +2,6 @@ /// module ts { - var version = "1.5.0.0"; - export interface SourceFile { fileWatcher: FileWatcher; } @@ -178,7 +176,7 @@ module ts { } if (commandLine.options.version) { - reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, version)); + reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, ts.version)); return sys.exit(ExitStatus.Success); } @@ -250,7 +248,7 @@ module ts { var compileResult = compile(rootFileNames, compilerOptions, compilerHost); - if (!commandLine.options.watch) { + if (!compilerOptions.watch) { return sys.exit(compileResult.exitStatus); } @@ -258,7 +256,7 @@ module ts { reportDiagnostic(createCompilerDiagnostic(Diagnostics.Compilation_complete_Watching_for_file_changes)); } - function getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void) { + function getSourceFile(fileName: string, languageVersion: ScriptTarget, onError ?: (message: string) => void) { // Return existing SourceFile object if one is available if (cachedProgram) { var sourceFile = cachedProgram.getSourceFile(fileName); @@ -269,7 +267,7 @@ module ts { } // Use default host function var sourceFile = hostGetSourceFile(fileName, languageVersion, onError); - if (sourceFile && commandLine.options.watch) { + if (sourceFile && compilerOptions.watch) { // Attach a file watcher sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, () => sourceFileChanged(sourceFile)); } @@ -322,22 +320,16 @@ module ts { } function compile(fileNames: string[], compilerOptions: CompilerOptions, compilerHost: CompilerHost) { - ts.ioReadTime = 0; - ts.parseTime = 0; - ts.bindTime = 0; - ts.checkTime = 0; - ts.emitTime = 0; - - var start = new Date().getTime(); + ioReadTime = 0; + ioWriteTime = 0; + programTime = 0; + bindTime = 0; + checkTime = 0; + emitTime = 0; var program = createProgram(fileNames, compilerOptions, compilerHost); - var programTime = new Date().getTime() - start; - var exitStatus = compileProgram(); - var end = new Date().getTime() - start; - var compileTime = end - programTime; - if (compilerOptions.listFiles) { forEach(program.getSourceFiles(), file => { sys.write(file.fileName + sys.newLine); @@ -358,19 +350,16 @@ module ts { } // Individual component times. - // Note: we output 'programTime' as parseTime to match the tsc 1.3 behavior. tsc 1.3 - // measured parse time along with read IO as a single counter. We preserve that - // behavior so we can accurately compare times. For actual parse times (in isolation) - // is reported below. + // Note: To match the behavior of previous versions of the compiler, the reported parse time includes + // I/O read time and processing time for triple-slash references and module imports, and the reported + // emit time includes I/O write time. We preserve this behavior so we can accurately compare times. + reportTimeStatistic("I/O read", ioReadTime); + reportTimeStatistic("I/O write", ioWriteTime); reportTimeStatistic("Parse time", programTime); - reportTimeStatistic("Bind time", ts.bindTime); - reportTimeStatistic("Check time", ts.checkTime); - reportTimeStatistic("Emit time", ts.emitTime); - - reportTimeStatistic("Parse time w/o IO", ts.parseTime); - reportTimeStatistic("IO read", ts.ioReadTime); - reportTimeStatistic("Compile time", compileTime); - reportTimeStatistic("Total time", end); + reportTimeStatistic("Bind time", bindTime); + reportTimeStatistic("Check time", checkTime); + reportTimeStatistic("Emit time", emitTime); + reportTimeStatistic("Total time", programTime + bindTime + checkTime + emitTime); } return { program, exitStatus }; @@ -411,7 +400,7 @@ module ts { // The emitter emitted something, inform the caller if that happened in the presence // of diagnostics or not. if (diagnostics.length > 0 || emitOutput.diagnostics.length > 0) { - ExitStatus.DiagnosticsPresent_OutputsGenerated; + return ExitStatus.DiagnosticsPresent_OutputsGenerated; } return ExitStatus.Success; @@ -419,7 +408,7 @@ module ts { } function printVersion() { - sys.write(getDiagnosticText(Diagnostics.Version_0, version) + sys.newLine); + sys.write(getDiagnosticText(Diagnostics.Version_0, ts.version) + sys.newLine); } function printHelp() { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c7339bcd60d..87d219c2e84 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -233,6 +233,7 @@ module ts { EnumDeclaration, ModuleDeclaration, ModuleBlock, + CaseBlock, ImportEqualsDeclaration, ImportDeclaration, ImportClause, @@ -299,14 +300,15 @@ module ts { Private = 0x00000020, // Property/Method Protected = 0x00000040, // Property/Method Static = 0x00000080, // Property/Method - MultiLine = 0x00000100, // Multi-line array or object literal - Synthetic = 0x00000200, // Synthetic node (for full fidelity) - DeclarationFile = 0x00000400, // Node is a .d.ts file - Let = 0x00000800, // Variable declaration - Const = 0x00001000, // Variable declaration - OctalLiteral = 0x00002000, + Default = 0x00000100, // Function/Class (export default declaration) + MultiLine = 0x00000200, // Multi-line array or object literal + Synthetic = 0x00000400, // Synthetic node (for full fidelity) + DeclarationFile = 0x00000800, // Node is a .d.ts file + Let = 0x00001000, // Variable declaration + Const = 0x00002000, // Variable declaration + OctalLiteral = 0x00004000, - Modifier = Export | Ambient | Public | Private | Protected | Static, + Modifier = Export | Ambient | Public | Private | Protected | Static | Default, AccessibilityModifier = Public | Private | Protected, BlockScoped = Let | Const } @@ -327,7 +329,7 @@ module ts { // If the parser encountered an error when parsing the code that created this node. Note // the parser only sets this directly on the node it creates right after encountering the - // error. + // error. ThisNodeHasError = 1 << 4, // Context flags set directly by the parser. @@ -335,7 +337,7 @@ module ts { // Context flags computed by aggregating child flags upwards. - // Used during incremental parsing to determine if this node or any of its children had an + // Used during incremental parsing to determine if this node or any of its children had an // error. Computed only once and then cached. ThisNodeOrAnySubNodesHasError = 1 << 5, @@ -352,7 +354,7 @@ module ts { export interface Node extends TextRange { kind: SyntaxKind; flags: NodeFlags; - // Specific context the parser was in when this node was created. Normally undefined. + // Specific context the parser was in when this node was created. Normally undefined. // Only set when the parser was in some interesting context (like async/yield). parserContextFlags?: ParserContextFlags; modifiers?: ModifiersArray; // Array of modifiers @@ -501,7 +503,7 @@ module ts { } export interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } @@ -522,7 +524,7 @@ module ts { body?: Block; } - // See the comment on MethodDeclaration for the intuition behind AccessorDeclaration being a + // See the comment on MethodDeclaration for the intuition behind AccessorDeclaration being a // ClassElement and an ObjectLiteralElement. export interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { _accessorDeclarationBrand: any; @@ -573,12 +575,12 @@ module ts { export interface StringLiteralTypeNode extends LiteralExpression, TypeNode { } - // Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing. + // Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing. // Consider 'Expression'. Without the brand, 'Expression' is actually no different // (structurally) than 'Node'. Because of this you can pass any Node to a function that // takes an Expression without any error. By using the 'brands' we ensure that the type - // checker actually thinks you have something of the right type. Note: the brands are - // never actually given values. At runtime they have zero cost. + // checker actually thinks you have something of the right type. Note: the brands are + // never actually given values. At runtime they have zero cost. export interface Expression extends Node { _expressionBrand: any; @@ -640,7 +642,9 @@ module ts { export interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } @@ -649,6 +653,10 @@ module ts { body: Block | Expression; // Required, whereas the member inherited from FunctionDeclaration is optional } + export interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } + // 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". @@ -693,6 +701,7 @@ module ts { export interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } @@ -730,7 +739,7 @@ module ts { } export interface VariableStatement extends Statement { - declarationList: VariableDeclarationList; + declarationList: VariableDeclarationList; } export interface ExpressionStatement extends Statement { @@ -786,6 +795,10 @@ module ts { export interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + + export interface CaseBlock extends Node { clauses: NodeArray; } @@ -825,7 +838,7 @@ module ts { } export interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -864,11 +877,7 @@ module ts { members: NodeArray; } - export interface ExportContainer { - exportStars?: ExportDeclaration[]; // List of 'export *' statements (initialized by binding) - } - - export interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + export interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -898,7 +907,7 @@ module ts { moduleSpecifier: Expression; } - // In case of: + // In case of: // import d from "mod" => name = d, namedBinding = undefined // import * as ns from "mod" => name = undefined, namedBinding: NamespaceImport = { name: ns } // import d, * as ns from "mod" => name = d, namedBinding: NamespaceImport = { name: ns } @@ -913,7 +922,7 @@ module ts { name: Identifier; } - export interface ExportDeclaration extends Statement, ModuleElement { + export interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -933,8 +942,10 @@ module ts { export type ImportSpecifier = ImportOrExportSpecifier; export type ExportSpecifier = ImportOrExportSpecifier; - export interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + export interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression?: Expression; + type?: TypeNode; } export interface FileReference extends TextRange { @@ -946,7 +957,7 @@ module ts { } // Source files are declarations when they are external modules. - export interface SourceFile extends Declaration, ExportContainer { + export interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; @@ -963,7 +974,7 @@ module ts { externalModuleIndicator: Node; languageVersion: ScriptTarget; identifiers: Map; - + /* @internal */ nodeCount: number; /* @internal */ identifierCount: number; /* @internal */ symbolCount: number; @@ -971,10 +982,10 @@ module ts { // File level diagnostics reported by the parser (includes diagnostics about /// references // as well as code diagnostics). /* @internal */ parseDiagnostics: Diagnostic[]; - + // File level diagnostics reported by the binder. /* @internal */ bindDiagnostics: Diagnostic[]; - + // Stores a line map for the file. // This field should never be used directly to obtain line map, use getLineMap function instead. /* @internal */ lineMap: number[]; @@ -994,10 +1005,10 @@ module ts { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then + * Emits the javascript and declaration files. If targetSourceFile is not specified, then * the javascript and declaration files will be produced for all the files in this program. * If targetSourceFile is specified, then only the javascript and declaration for that - * specific file will be generated. + * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be * used for writing the javascript and declaration files. Otherwise, the writeFile parameter @@ -1015,7 +1026,7 @@ module ts { getCommonSourceDirectory(): string; - // For testing purposes only. Should not be used by any other consumers (including the + // For testing purposes only. Should not be used by any other consumers (including the // language service). /* @internal */ getDiagnosticsProducingTypeChecker(): TypeChecker; @@ -1052,7 +1063,7 @@ module ts { // when -version or -help was provided, or this was a normal compilation, no diagnostics // were produced, and all outputs were generated successfully. Success = 0, - + // Diagnostics were produced and because of them no code was generated. DiagnosticsPresent_OutputsSkipped = 1, @@ -1162,12 +1173,12 @@ module ts { // Write symbols's type argument if it is instantiated symbol // eg. class C { p: T } <-- Show p as C.p here - // var a: C; + // var a: C; // var p = a.p; <--- Here p is property of C so show it as C.p instead of just C.p - WriteTypeParametersOrArguments = 0x00000001, + WriteTypeParametersOrArguments = 0x00000001, // Use only external alias information to get the symbol name in the given context - // eg. module m { export class c { } } import x = m.c; + // eg. module m { export class c { } } import x = m.c; // When this flag is specified m.c will be used to refer to the class instead of alias symbol x UseOnlyExternalAliasing = 0x00000002, } @@ -1190,10 +1201,10 @@ module ts { } export interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -1229,18 +1240,17 @@ module ts { Signature = 0x00020000, // Call, construct, or index signature TypeParameter = 0x00040000, // Type parameter TypeAlias = 0x00080000, // Type alias - - // Export markers (see comment in declareModuleMember in binder) - ExportValue = 0x00100000, // Exported value marker - ExportType = 0x00200000, // Exported type marker - ExportNamespace = 0x00400000, // Exported namespace marker - Import = 0x00800000, // Import + ExportValue = 0x00100000, // Exported value marker (see comment in declareModuleMember in binder) + ExportType = 0x00200000, // Exported type marker (see comment in declareModuleMember in binder) + ExportNamespace = 0x00400000, // Exported namespace marker (see comment in declareModuleMember in binder) + Alias = 0x00800000, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker) Instantiated = 0x01000000, // Instantiated symbol Merged = 0x02000000, // Merged symbol (created during program binding) Transient = 0x04000000, // Transient symbol (created during type check) Prototype = 0x08000000, // Prototype property (no source representation) UnionProperty = 0x10000000, // Property in union type Optional = 0x20000000, // Optional property + ExportStar = 0x40000000, // Export * declaration Enum = RegularEnum | ConstEnum, Variable = FunctionScopedVariable | BlockScopedVariable, @@ -1273,9 +1283,9 @@ module ts { SetAccessorExcludes = Value & ~GetAccessor, TypeParameterExcludes = Type & ~TypeParameter, TypeAliasExcludes = Type, - ImportExcludes = Import, // Imports collide with all other imports with the same name + AliasExcludes = Alias, - ModuleMember = Variable | Function | Class | Interface | Enum | Module | TypeAlias | Import, + ModuleMember = Variable | Function | Class | Interface | Enum | Module | TypeAlias | Alias, ExportHasLocal = Function | Class | Enum | ValueModule, @@ -1308,10 +1318,9 @@ module ts { declaredType?: Type; // Type of class, interface, enum, or type parameter mapper?: TypeMapper; // Type mapper for instantiation alias referenced?: boolean; // True if alias symbol has been referenced as a value - exportAssignmentChecked?: boolean; // True if export assignment was checked - exportAssignmentSymbol?: Symbol; // Symbol exported from external module unionType?: UnionType; // Containing union type for union property resolvedExports?: SymbolTable; // Resolved exports of module + exportsChecked?: boolean; // True if exports of external module have been checked } export interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1478,11 +1487,15 @@ module ts { (t: Type): Type; } + // @internal export interface TypeInferences { primary: Type[]; // Inferences made directly to a type parameter secondary: Type[]; // Inferences made to a type parameter in a union type + isFixed: boolean; // Whether the type parameter is fixed, as defined in section 4.12.2 of the TypeScript spec + // If a type parameter is fixed, no more inferences can be made for the type parameter } + // @internal export interface InferenceContext { typeParameters: TypeParameter[]; // Type parameters for which inferences are made inferUnionTypes: boolean; // Infer union types for disjoint candidates (otherwise undefinedType) @@ -1554,7 +1567,9 @@ module ts { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; + /* @internal */ stripInternal?: boolean; + /* @internal */ preserveNewLines?: boolean; + /* @internal */ cacheDownlevelForOfLength?: boolean; [option: string]: string | number | boolean; } @@ -1772,7 +1787,7 @@ module ts { // Gets a count of how many times this collection has been modified. This value changes // each time 'add' is called (regardless of whether or not an equivalent diagnostic was // already in the collection). As such, it can be used as a simple way to tell if any - // operation caused diagnostics to be returned by storing and comparing the return value + // operation caused diagnostics to be returned by storing and comparing the return value // of this method before/after the operation is performed. getModificationCount(): number; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index cb8f7f537bc..4fce9c928f7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -14,9 +14,8 @@ module ts { } export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; + let declarations = symbol.declarations; + for (let declaration of declarations) { if (declaration.kind === kind) { return declaration; } @@ -40,12 +39,12 @@ module ts { } // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters: StringSymbolWriter[] = []; + let stringWriters: StringSymbolWriter[] = []; export function getSingleLineStringWriter(): StringSymbolWriter { if (stringWriters.length == 0) { - var str = ""; + let str = ""; - var writeText: (text: string) => void = text => str += text; + let writeText: (text: string) => void = text => str += text; return { string: () => str, writeKeyword: writeText, @@ -89,7 +88,7 @@ module ts { // 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 & ParserContextFlags.ThisNodeHasError) !== 0) || + let thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & ParserContextFlags.ThisNodeHasError) !== 0) || forEachChild(node, containsParseError); // If so, mark ourselves accordingly. @@ -118,8 +117,8 @@ module ts { // This is a useful function for debugging purposes. export function nodePosToString(node: Node): string { - var file = getSourceFileOfNode(node); - var loc = getLineAndCharacterOfPosition(file, node.pos); + let file = getSourceFileOfNode(node); + let loc = getLineAndCharacterOfPosition(file, node.pos); return `${ file.fileName }(${ loc.line + 1 },${ loc.character + 1 })`; } @@ -133,7 +132,7 @@ module ts { // 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: // - // var a: ; + // 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. @@ -166,7 +165,7 @@ module ts { return ""; } - var text = sourceFile.text; + let text = sourceFile.text; return text.substring(skipTrivia(text, node.pos), node.end); } @@ -203,6 +202,33 @@ module ts { isCatchClauseVariableDeclaration(declaration); } + export function getEnclosingBlockScopeContainer(node: Node): Node { + let current = node; + while (current) { + if (isFunctionLike(current)) { + return current; + } + switch (current.kind) { + case SyntaxKind.SourceFile: + case SyntaxKind.CaseBlock: + case SyntaxKind.CatchClause: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForOfStatement: + return current; + case SyntaxKind.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; + } + } + export function isCatchClauseVariableDeclaration(declaration: Declaration) { return declaration && declaration.kind === SyntaxKind.VariableDeclaration && @@ -218,32 +244,35 @@ module ts { } export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - - var start = getTokenPosOfNode(node, file); - var length = node.end - start; - - return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + let sourceFile = getSourceFileOfNode(node); + let span = getErrorSpanForNode(sourceFile, node); + return createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2); } export function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = skipTrivia(file.text, node.pos); - var length = node.end - start; + let sourceFile = getSourceFileOfNode(node); + let span = getErrorSpanForNode(sourceFile, node); return { - file, - start, - length, + file: sourceFile, + start: span.start, + length: span.length, code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText }; } - export function getErrorSpanForNode(node: Node): Node { - var errorSpan: Node; + /* @internal */ + export function getSpanOfTokenAtPosition(sourceFile: SourceFile, pos: number): TextSpan { + let scanner = createScanner(sourceFile.languageVersion, /*skipTrivia*/ true, sourceFile.text); + scanner.setTextPos(pos); + scanner.scan(); + let start = scanner.getTokenPos(); + return createTextSpanFromBounds(start, scanner.getTextPos()); + } + + export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { + let errorNode = node; switch (node.kind) { // This list is a work in progress. Add missing node kinds to improve their error // spans. @@ -254,16 +283,23 @@ module ts { case SyntaxKind.ModuleDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.EnumMember: - errorSpan = (node).name; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + errorNode = (node).name; break; } + + if (errorNode === undefined) { + // If we don't have a better node, then just set the error on the first token of + // construct. + return getSpanOfTokenAtPosition(sourceFile, node.pos); + } - // We now have the ideal error span, but it may be a node that is optional and absent - // (e.g. the name of a function expression), in which case errorSpan will be undefined. - // Alternatively, it might be required and missing (e.g. the name of a module), in which - // case its pos will equal its end (length 0). In either of these cases, we should fall - // back to the original node that the error was issued on. - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + let pos = nodeIsMissing(errorNode) + ? errorNode.pos + : skipTrivia(sourceFile.text, errorNode.pos); + + return createTextSpanFromBounds(pos, errorNode.end); } export function isExternalModule(file: SourceFile): boolean { @@ -296,7 +332,7 @@ module ts { export function getCombinedNodeFlags(node: Node): NodeFlags { node = walkUpBindingElementsAndPatterns(node); - var flags = node.flags; + let flags = node.flags; if (node.kind === SyntaxKind.VariableDeclaration) { node = node.parent; } @@ -353,7 +389,7 @@ module ts { } } - export var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ + export let fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ // Warning: This has the same semantics as the forEach family of functions, @@ -366,6 +402,7 @@ module ts { switch (node.kind) { case SyntaxKind.ReturnStatement: return visitor(node); + case SyntaxKind.CaseBlock: case SyntaxKind.Block: case SyntaxKind.IfStatement: case SyntaxKind.DoStatement: @@ -385,7 +422,26 @@ module ts { } } - export function isAnyFunction(node: Node): boolean { + /* @internal */ + export function isVariableLike(node: Node): boolean { + if (node) { + switch (node.kind) { + case SyntaxKind.BindingElement: + case SyntaxKind.EnumMember: + case SyntaxKind.Parameter: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.VariableDeclaration: + return true; + } + } + + return false; + } + + export function isFunctionLike(node: Node): boolean { if (node) { switch (node.kind) { case SyntaxKind.Constructor: @@ -412,7 +468,7 @@ module ts { } export function isFunctionBlock(node: Node) { - return node && node.kind === SyntaxKind.Block && isAnyFunction(node.parent); + return node && node.kind === SyntaxKind.Block && isFunctionLike(node.parent); } export function isObjectLiteralMethod(node: Node) { @@ -422,7 +478,7 @@ module ts { export function getContainingFunction(node: Node): FunctionLikeDeclaration { while (true) { node = node.parent; - if (!node || isAnyFunction(node)) { + if (!node || isFunctionLike(node)) { return node; } } @@ -563,7 +619,7 @@ module ts { // fall through case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: - var parent = node.parent; + let parent = node.parent; switch (parent.kind) { case SyntaxKind.VariableDeclaration: case SyntaxKind.Parameter: @@ -585,13 +641,13 @@ module ts { case SyntaxKind.SwitchStatement: return (parent).expression === node; case SyntaxKind.ForStatement: - var forStatement = parent; + let forStatement = parent; return (forStatement.initializer === node && forStatement.initializer.kind !== SyntaxKind.VariableDeclarationList) || forStatement.condition === node || forStatement.iterator === node; case SyntaxKind.ForInStatement: case SyntaxKind.ForOfStatement: - var forInStatement = parent; + let forInStatement = parent; return (forInStatement.initializer === node && forInStatement.initializer.kind !== SyntaxKind.VariableDeclarationList) || forInStatement.expression === node; case SyntaxKind.TypeAssertionExpression: @@ -610,7 +666,7 @@ module ts { } export function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean) { - var moduleState = getModuleInstanceState(node) + let moduleState = getModuleInstanceState(node) return moduleState === ModuleInstanceState.Instantiated || (preserveConstEnums && moduleState === ModuleInstanceState.ConstEnumOnly); } @@ -633,7 +689,7 @@ module ts { return (node).moduleSpecifier; } if (node.kind === SyntaxKind.ImportEqualsDeclaration) { - var reference = (node).moduleReference; + let reference = (node).moduleReference; if (reference.kind === SyntaxKind.ExternalModuleReference) { return (reference).expression; } @@ -764,7 +820,7 @@ module ts { return false; } - var parent = name.parent; + let parent = name.parent; if (parent.kind === SyntaxKind.ImportSpecifier || parent.kind === SyntaxKind.ExportSpecifier) { if ((parent).propertyName) { return true; @@ -779,25 +835,25 @@ module ts { } export function getClassBaseTypeNode(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + let heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } export function getClassImplementedTypeNodes(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); + let heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); return heritageClause ? heritageClause.types : undefined; } export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + let heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); return heritageClause ? heritageClause.types : undefined; } export function getHeritageClause(clauses: NodeArray, kind: SyntaxKind) { if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; + for (let clause of clauses) { + if (clause.token === kind) { + return clause; } } } @@ -807,7 +863,7 @@ module ts { export function tryResolveScriptReference(host: ScriptReferenceHost, sourceFile: SourceFile, reference: FileReference) { if (!host.getCompilerOptions().noResolve) { - var referenceFileName = isRootedDiskPath(reference.fileName) ? reference.fileName : combinePaths(getDirectoryPath(sourceFile.fileName), reference.fileName); + let referenceFileName = isRootedDiskPath(reference.fileName) ? reference.fileName : combinePaths(getDirectoryPath(sourceFile.fileName), reference.fileName); referenceFileName = getNormalizedAbsolutePath(referenceFileName, host.getCurrentDirectory()); return host.getSourceFile(referenceFileName); } @@ -824,8 +880,8 @@ module ts { } export function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; + let simpleReferenceRegEx = /^\/\/\/\s*/gim; if (simpleReferenceRegEx.exec(comment)) { if (isNoDefaultLibRegEx.exec(comment)) { return { @@ -833,10 +889,10 @@ module ts { } } else { - var matchResult = fullTripleSlashReferencePathRegEx.exec(comment); + let matchResult = fullTripleSlashReferencePathRegEx.exec(comment); if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; + let start = commentRange.pos; + let end = commentRange.end; return { fileReference: { pos: start, @@ -893,9 +949,9 @@ module ts { return (name).text; } if (name.kind === SyntaxKind.ComputedPropertyName) { - var nameExpression = (name).expression; + let nameExpression = (name).expression; if (isWellKnownSymbolSyntactically(nameExpression)) { - var rightHandSideName = (nameExpression).name.text; + let rightHandSideName = (nameExpression).name.text; return getPropertyNameForKnownSymbolName(rightHandSideName); } } @@ -923,6 +979,7 @@ module ts { case SyntaxKind.ExportKeyword: case SyntaxKind.DeclareKeyword: case SyntaxKind.ConstKeyword: + case SyntaxKind.DefaultKeyword: return true; } return false; @@ -946,14 +1003,14 @@ module ts { } export function textSpanOverlapsWith(span: TextSpan, other: TextSpan) { - var overlapStart = Math.max(span.start, other.start); - var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); + let overlapStart = Math.max(span.start, other.start); + let overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); return overlapStart < overlapEnd; } export function textSpanOverlap(span1: TextSpan, span2: TextSpan) { - var overlapStart = Math.max(span1.start, span2.start); - var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); + let overlapStart = Math.max(span1.start, span2.start); + let overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); if (overlapStart < overlapEnd) { return createTextSpanFromBounds(overlapStart, overlapEnd); } @@ -965,7 +1022,7 @@ module ts { } export function textSpanIntersectsWith(span: TextSpan, start: number, length: number) { - var end = start + length; + let end = start + length; return start <= textSpanEnd(span) && end >= span.start; } @@ -974,8 +1031,8 @@ module ts { } export function textSpanIntersection(span1: TextSpan, span2: TextSpan) { - var intersectStart = Math.max(span1.start, span2.start); - var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); + let intersectStart = Math.max(span1.start, span2.start); + let intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); if (intersectStart <= intersectEnd) { return createTextSpanFromBounds(intersectStart, intersectEnd); } @@ -1013,7 +1070,7 @@ module ts { return { span, newLength }; } - export var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); + export let unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); /** * Called to merge all the changes that occurred across several versions of a script snapshot @@ -1034,14 +1091,14 @@ module ts { // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } // as it makes things much easier to reason about. - var change0 = changes[0]; + let change0 = changes[0]; - var oldStartN = change0.span.start; - var oldEndN = textSpanEnd(change0.span); - var newEndN = oldStartN + change0.newLength; + let oldStartN = change0.span.start; + let oldEndN = textSpanEnd(change0.span); + let newEndN = oldStartN + change0.newLength; - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; + for (let i = 1; i < changes.length; i++) { + let nextChange = changes[i]; // Consider the following case: // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting @@ -1123,13 +1180,13 @@ module ts { // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) // } - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; + let oldStart1 = oldStartN; + let oldEnd1 = oldEndN; + let newEnd1 = newEndN; - var oldStart2 = nextChange.span.start; - var oldEnd2 = textSpanEnd(nextChange.span); - var newEnd2 = oldStart2 + nextChange.newLength; + let oldStart2 = nextChange.span.start; + let oldEnd2 = textSpanEnd(nextChange.span); + let newEnd2 = oldStart2 + nextChange.newLength; oldStartN = Math.min(oldStart1, oldStart2); oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); @@ -1140,15 +1197,15 @@ module ts { } export function nodeStartsNewLexicalEnvironment(n: Node): boolean { - return isAnyFunction(n) || n.kind === SyntaxKind.ModuleDeclaration || n.kind === SyntaxKind.SourceFile; + return isFunctionLike(n) || n.kind === SyntaxKind.ModuleDeclaration || n.kind === SyntaxKind.SourceFile; } export function nodeIsSynthesized(node: Node): boolean { - return node.pos === -1 && node.end === -1; + return node.pos === -1; } export function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node { - var node = createNode(kind); + let node = createNode(kind); node.pos = -1; node.end = -1; node.startsOnNewLine = startsOnNewLine; @@ -1158,7 +1215,7 @@ module ts { export function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string { // First try '_name' if (baseName.charCodeAt(0) !== CharacterCodes._) { - var baseName = "_" + baseName; + baseName = "_" + baseName; if (!isExistingName(baseName)) { return baseName; } @@ -1167,9 +1224,9 @@ module ts { if (baseName.charCodeAt(baseName.length - 1) !== CharacterCodes._) { baseName += "_"; } - var i = 1; + let i = 1; while (true) { - var name = baseName + i; + let name = baseName + i; if (!isExistingName(name)) { return name; } @@ -1177,12 +1234,13 @@ module ts { } } + // @internal export function createDiagnosticCollection(): DiagnosticCollection { - var nonFileDiagnostics: Diagnostic[] = []; - var fileDiagnostics: Map = {}; + let nonFileDiagnostics: Diagnostic[] = []; + let fileDiagnostics: Map = {}; - var diagnosticsModified = false; - var modificationCount = 0; + let diagnosticsModified = false; + let modificationCount = 0; return { add, @@ -1196,7 +1254,7 @@ module ts { } function add(diagnostic: Diagnostic): void { - var diagnostics: Diagnostic[]; + let diagnostics: Diagnostic[]; if (diagnostic.file) { diagnostics = fileDiagnostics[diagnostic.file.fileName]; if (!diagnostics) { @@ -1224,14 +1282,14 @@ module ts { return fileDiagnostics[fileName] || []; } - var allDiagnostics: Diagnostic[] = []; + let allDiagnostics: Diagnostic[] = []; function pushDiagnostic(d: Diagnostic) { allDiagnostics.push(d); } forEach(nonFileDiagnostics, pushDiagnostic); - for (var key in fileDiagnostics) { + for (let key in fileDiagnostics) { if (hasProperty(fileDiagnostics, key)) { forEach(fileDiagnostics[key], pushDiagnostic); } @@ -1248,7 +1306,7 @@ module ts { diagnosticsModified = false; nonFileDiagnostics = sortAndDeduplicateDiagnostics(nonFileDiagnostics); - for (var key in fileDiagnostics) { + for (let key in fileDiagnostics) { if (hasProperty(fileDiagnostics, key)) { fileDiagnostics[key] = sortAndDeduplicateDiagnostics(fileDiagnostics[key]); } @@ -1261,8 +1319,8 @@ module ts { // the language service. These characters should be escaped when printing, and if any characters are added, // the map below must be updated. Note that this regexp *does not* include the 'delete' character. // There is no reason for this other than that JSON.stringify does not handle it either. - var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap: Map = { + let escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + let escapedCharsMap: Map = { "\0": "\\0", "\t": "\\t", "\v": "\\v", @@ -1293,12 +1351,12 @@ module ts { } function get16BitUnicodeEscapeSequence(charCode: number): string { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); + let hexCharCode = charCode.toString(16).toUpperCase(); + let paddedHexCode = ("0000" + hexCharCode).slice(-4); return "\\u" + paddedHexCode; } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; + let nonAsciiCharacters = /[^\u0000-\u007F]/g; export function escapeNonAsciiCharacters(s: string): string { // Replace non-ASCII characters with '\uNNNN' escapes if any exist. // Otherwise just return the original string. @@ -1306,4 +1364,4 @@ module ts { s.replace(nonAsciiCharacters, c => get16BitUnicodeEscapeSequence(c.charCodeAt(0))) : s; } -} \ No newline at end of file +} diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index e4979f7a3c4..d4dd8e31258 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -152,7 +152,6 @@ class CompilerBaselineRunner extends RunnerBase { if (this.errors) { Harness.Baseline.runBaseline('Correct errors for ' + fileName, justName.replace(/\.ts$/, '.errors.txt'), (): string => { if (result.errors.length === 0) return null; - return getErrorBaseline(toBeCompiled, otherFiles, result); }); } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index d8b7c358a55..95a320ac052 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1621,8 +1621,9 @@ module FourSlash { this.taoInvalidReason = 'verifyIndentationAtCurrentPosition NYI'; var actual = this.getIndentation(this.activeFile.fileName, this.currentCaretPosition); - if (actual != numberOfSpaces) { - this.raiseError('verifyIndentationAtCurrentPosition failed - expected: ' + numberOfSpaces + ', actual: ' + actual); + var lineCol = this.getLineColStringAtPosition(this.currentCaretPosition); + if (actual !== numberOfSpaces) { + this.raiseError('verifyIndentationAtCurrentPosition failed at ' + lineCol + ' - expected: ' + numberOfSpaces + ', actual: ' + actual); } } @@ -1630,8 +1631,9 @@ module FourSlash { this.taoInvalidReason = 'verifyIndentationAtPosition NYI'; var actual = this.getIndentation(fileName, position); + var lineCol = this.getLineColStringAtPosition(position); if (actual !== numberOfSpaces) { - this.raiseError('verifyIndentationAtPosition failed - expected: ' + numberOfSpaces + ', actual: ' + actual); + this.raiseError('verifyIndentationAtPosition failed at ' + lineCol + ' - expected: ' + numberOfSpaces + ', actual: ' + actual); } } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 26c06c7950c..90ffcef07ff 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -835,7 +835,7 @@ module Harness { // Register input files function register(file: { unitName: string; content: string; }) { if (file.content !== undefined) { - var fileName = ts.normalizeSlashes(file.unitName); + var fileName = ts.normalizePath(file.unitName); filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, scriptTarget); } }; @@ -844,6 +844,7 @@ module Harness { return { getCurrentDirectory, getSourceFile: (fn, languageVersion) => { + fn = ts.normalizePath(fn); if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { return filemap[getCanonicalFileName(fn)]; } @@ -1007,6 +1008,10 @@ module Harness { options.outDir = setting.value; break; + case 'preservenewlines': + options.preserveNewLines = !!setting.value; + break; + case 'sourceroot': options.sourceRoot = setting.value; break; @@ -1074,16 +1079,6 @@ module Harness { } }); - var filemap: { [name: string]: ts.SourceFile; } = {}; - var register = (file: { unitName: string; content: string; }) => { - if (file.content !== undefined) { - var fileName = ts.normalizeSlashes(file.unitName); - filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, options.target, assertInvariants); - } - }; - inputFiles.forEach(register); - otherFiles.forEach(register); - var fileOutputs: GeneratedFile[] = []; var programFiles = inputFiles.map(file => file.unitName); @@ -1470,7 +1465,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "preservenewlines", "includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 4206f16bab3..68ac8d916fb 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -469,6 +469,7 @@ module Harness.LanguageService { this.writeMessage(message); } + readFile(fileName: string): string { if (fileName.indexOf(Harness.Compiler.defaultLibFileName) >= 0) { fileName = Harness.Compiler.defaultLibFileName; @@ -526,6 +527,15 @@ module Harness.LanguageService { msg(message: string) { return this.host.log(message); } + + loggingEnabled() { + return true; + } + + isVerbose() { + return false; + } + endGroup(): void { } diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts index cb5324fbd3d..040eb69ae96 100644 --- a/src/lib/core.d.ts +++ b/src/lib/core.d.ts @@ -164,19 +164,19 @@ interface ObjectConstructor { * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - seal(o: any): any; + seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: any): any; + freeze(o: T): T; /** * Prevents the addition of new properties to an object. * @param o Object to make non-extensible. */ - preventExtensions(o: any): any; + preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. @@ -410,6 +410,9 @@ interface String { */ substr(from: number, length?: number): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; + [index: number]: string; } @@ -462,6 +465,9 @@ interface Number { * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 5ca4cb4d00f..7c9ccfa7854 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -5,6 +5,8 @@ module ts.server { export interface Logger { close(): void; + isVerbose(): boolean; + loggingEnabled(): boolean; perftrc(s: string): void; info(s: string): void; startGroup(): void; @@ -1071,6 +1073,7 @@ module ts.server { static changeNumberThreshold = 8; static changeLengthThreshold = 256; + static maxVersions = 8; // REVIEW: can optimize by coalescing simple edits edit(pos: number, deleteLen: number, insertedText?: string) { @@ -1131,6 +1134,13 @@ module ts.server { this.currentVersion = snap.version; this.versions[snap.version] = snap; this.changes = []; + if ((this.currentVersion - this.minVersion) >= ScriptVersionCache.maxVersions) { + var oldMin = this.minVersion; + this.minVersion = (this.currentVersion - ScriptVersionCache.maxVersions) + 1; + for (var j = oldMin; j < this.minVersion; j++) { + this.versions[j] = undefined; + } + } } return snap; } diff --git a/src/server/server.ts b/src/server/server.ts index c48ba951347..4c13be80c4c 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -19,7 +19,7 @@ module ts.server { inGroup = false; firstInGroup = true; - constructor(public logFilename: string) { + constructor(public logFilename: string, public level: string) { } static padStringRight(str: string, padding: string) { @@ -51,9 +51,20 @@ module ts.server { this.firstInGroup = true; } + loggingEnabled() { + return !!this.logFilename; + } + + isVerbose() { + return this.loggingEnabled() && (this.level == "verbose"); + } + + msg(s: string, type = "Err") { if (this.fd < 0) { - this.fd = fs.openSync(this.logFilename, "w"); + if (this.logFilename) { + this.fd = fs.openSync(this.logFilename, "w"); + } } if (this.fd >= 0) { s = s + "\n"; @@ -173,17 +184,61 @@ module ts.server { }); rl.on('close',() => { - this.projectService.closeLog(); this.projectService.log("Exiting..."); + this.projectService.closeLog(); process.exit(0); }); } } + interface LogOptions { + file?: string; + detailLevel?: string; + } + + function parseLoggingEnvironmentString(logEnvStr: string): LogOptions { + var logEnv: LogOptions = {}; + var args = logEnvStr.split(' '); + for (var i = 0, len = args.length; i < (len - 1); i += 2) { + var option = args[i]; + var value = args[i + 1]; + if (option && value) { + switch (option) { + case "-file": + logEnv.file = value; + break; + case "-level": + logEnv.detailLevel = value; + break; + } + } + } + return logEnv; + } + + // TSS_LOG "{ level: "normal | verbose | terse", file?: string}" + function createLoggerFromEnv() { + var fileName: string = undefined; + var detailLevel = "normal"; + var logEnvStr = process.env["TSS_LOG"]; + if (logEnvStr) { + var logEnv = parseLoggingEnvironmentString(logEnvStr); + if (logEnv.file) { + fileName = logEnv.file; + } + else { + fileName = __dirname + "/.log" + process.pid.toString(); + } + if (logEnv.detailLevel) { + detailLevel = logEnv.detailLevel; + } + } + return new Logger(fileName, detailLevel); + } // This places log file in the directory containing editorServices.js // TODO: check that this location is writable - var logger = new Logger(__dirname + "/.log" + process.pid.toString()); + var logger = createLoggerFromEnv(); // REVIEW: for now this implementation uses polling. // The advantage of polling is that it works reliably diff --git a/src/server/session.ts b/src/server/session.ts index 7e9c6972a1f..cc705d64d5e 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -145,6 +145,9 @@ module ts.server { send(msg: NodeJS._debugger.Message) { var json = JSON.stringify(msg); + if (this.logger.isVerbose()) { + this.logger.info(msg.type + ": " + json); + } this.sendLineToClient('Content-Length: ' + (1 + Buffer.byteLength(json, 'utf8')) + '\r\n\r\n' + json); } @@ -461,19 +464,49 @@ module ts.server { var compilerService = project.compilerService; var position = compilerService.host.lineColToPosition(file, line, col); var edits = compilerService.languageService.getFormattingEditsAfterKeystroke(file, position, key, - compilerService.formatCodeOptions); + compilerService.formatCodeOptions); + // Check whether we should auto-indent. This will be when + // the position is on a line containing only whitespace. + // This should leave the edits returned from + // getFormattingEditsAfterKeytroke either empty or pertaining + // only to the previous line. If all this is true, then + // add edits necessary to properly indent the current line. if ((key == "\n") && ((!edits) || (edits.length == 0) || allEditsBeforePos(edits, position))) { - // TODO: get these options from host - var editorOptions: ts.EditorOptions = { - IndentSize: 4, - TabSize: 4, - NewLineCharacter: "\n", - ConvertTabsToSpaces: true, - }; - var indentPosition = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); - var spaces = generateSpaces(indentPosition); - if (indentPosition > 0) { - edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces }); + var scriptInfo = compilerService.host.getScriptInfo(file); + if (scriptInfo) { + var lineInfo = scriptInfo.getLineInfo(line); + if (lineInfo && (lineInfo.leaf) && (lineInfo.leaf.text)) { + var lineText = lineInfo.leaf.text; + if (lineText.search("\\S") < 0) { + // TODO: get these options from host + var editorOptions: ts.EditorOptions = { + IndentSize: 4, + TabSize: 4, + NewLineCharacter: "\n", + ConvertTabsToSpaces: true, + }; + var indentPosition = + compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); + for (var i = 0, len = lineText.length; i < len; i++) { + if (lineText.charAt(i) == " ") { + indentPosition--; + } + else { + break; + } + } + if (indentPosition > 0) { + var spaces = generateSpaces(indentPosition); + edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces }); + } + else if (indentPosition < 0) { + edits.push({ + span: ts.createTextSpanFromBounds(position, position - indentPosition), + newText: "" + }); + } + } + } } } @@ -491,7 +524,7 @@ module ts.server { }; }); } - + getCompletions(line: number, col: number, prefix: string, fileName: string): protocol.CompletionEntry[] { if (!prefix) { prefix = ""; @@ -693,6 +726,10 @@ module ts.server { } onMessage(message: string) { + if (this.logger.isVerbose()) { + this.logger.info("request: " + message); + var start = process.hrtime(); + } try { var request = JSON.parse(message); var response: any; @@ -798,13 +835,23 @@ module ts.server { } } + if (this.logger.isVerbose()) { + var elapsed = process.hrtime(start); + var seconds = elapsed[0] + var nanoseconds = elapsed[1]; + var elapsedMs = ((1e9 * seconds) + nanoseconds)/1000000.0; + var leader = "Elapsed time (in milliseconds)"; + if (!responseRequired) { + leader = "Async elapsed time (in milliseconds)"; + } + this.logger.msg(leader + ": " + elapsedMs.toFixed(4).toString(), "Perf"); + } if (response) { this.output(response, request.command, request.seq); } else if (responseRequired) { this.output(undefined, request.command, request.seq, "No content available."); } - } catch (err) { if (err instanceof OperationCanceledException) { // Handle cancellation exceptions diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 59c4e716890..395141cc4cc 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -13,13 +13,13 @@ module ts.BreakpointResolver { return undefined; } - var tokenAtLocation = getTokenAtPosition(sourceFile, position); - var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; + let tokenAtLocation = getTokenAtPosition(sourceFile, position); + let lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { // Get previous token if the token is returned starts on new line - // eg: var x =10; |--- cursor is here - // var y = 10; - // token at position will return var keyword on second line as the token but we would like to use + // eg: let x =10; |--- cursor is here + // let y = 10; + // token at position will return let keyword on second line as the token but we would like to use // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line tokenAtLocation = findPrecedingToken(tokenAtLocation.pos, sourceFile); @@ -173,8 +173,12 @@ module ts.BreakpointResolver { return textSpan(node, (node).expression); case SyntaxKind.ExportAssignment: + if (!(node).expression) { + return undefined; + } + // span on export = id - return textSpan(node, (node).exportName); + return textSpan(node, (node).expression); case SyntaxKind.ImportEqualsDeclaration: // import statement without including semicolon @@ -259,7 +263,7 @@ module ts.BreakpointResolver { } // return type of function go to previous token - if (isAnyFunction(node.parent) && (node.parent).type === node) { + if (isFunctionLike(node.parent) && (node.parent).type === node) { return spanInPreviousNode(node); } @@ -275,9 +279,9 @@ module ts.BreakpointResolver { return spanInNode(variableDeclaration.parent.parent); } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement && contains(((variableDeclaration.parent.parent).initializer).declarations, variableDeclaration); - var declarations = isParentVariableStatement + let isParentVariableStatement = variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement; + let isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement && contains(((variableDeclaration.parent.parent).initializer).declarations, variableDeclaration); + let declarations = isParentVariableStatement ? (variableDeclaration.parent.parent).declarationList.declarations : isDeclarationOfForStatement ? ((variableDeclaration.parent.parent).initializer).declarations @@ -287,12 +291,12 @@ module ts.BreakpointResolver { if (variableDeclaration.initializer || (variableDeclaration.flags & NodeFlags.Export)) { if (declarations && declarations[0] === variableDeclaration) { if (isParentVariableStatement) { - // First declaration - include var keyword + // First declaration - include let keyword return textSpan(variableDeclaration.parent, variableDeclaration); } else { Debug.assert(isDeclarationOfForStatement); - // Include var keyword from for statement declarations in the span + // Include let keyword from for statement declarations in the span return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); } } @@ -303,7 +307,7 @@ module ts.BreakpointResolver { } else if (declarations && declarations[0] !== variableDeclaration) { // If we cant set breakpoint on this declaration, set it on previous one - var indexOfCurrentDeclaration = indexOf(declarations, variableDeclaration); + let indexOfCurrentDeclaration = indexOf(declarations, variableDeclaration); return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); } } @@ -319,8 +323,8 @@ module ts.BreakpointResolver { return textSpan(parameter); } else { - var functionDeclaration = parameter.parent; - var indexOfParameter = indexOf(functionDeclaration.parameters, parameter); + let functionDeclaration = parameter.parent; + let indexOfParameter = indexOf(functionDeclaration.parameters, parameter); if (indexOfParameter) { // Not a first parameter, go to previous parameter return spanInParameterDeclaration(functionDeclaration.parameters[indexOfParameter - 1]); @@ -353,7 +357,7 @@ module ts.BreakpointResolver { } function spanInFunctionBlock(block: Block): TextSpan { - var nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); + let nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); if (canFunctionHaveSpanInWholeDeclaration(block.parent)) { return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock); } @@ -387,7 +391,7 @@ module ts.BreakpointResolver { function spanInForStatement(forStatement: ForStatement): TextSpan { if (forStatement.initializer) { if (forStatement.initializer.kind === SyntaxKind.VariableDeclarationList) { - var variableDeclarationList = forStatement.initializer; + let variableDeclarationList = forStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); } @@ -409,15 +413,15 @@ module ts.BreakpointResolver { function spanInOpenBraceToken(node: Node): TextSpan { switch (node.parent.kind) { case SyntaxKind.EnumDeclaration: - var enumDeclaration = node.parent; + let enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); case SyntaxKind.ClassDeclaration: - var classDeclaration = node.parent; + let classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case SyntaxKind.SwitchStatement: - return spanInNodeIfStartsOnSameLine(node.parent, (node.parent).clauses[0]); + case SyntaxKind.CaseBlock: + return spanInNodeIfStartsOnSameLine(node.parent.parent, (node.parent).clauses[0]); } // Default to parent node @@ -447,10 +451,10 @@ module ts.BreakpointResolver { case SyntaxKind.CatchClause: return spanInNode((node.parent).statements[(node.parent).statements.length - 1]);; - case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseBlock: // breakpoint in last statement of the last clause - var switchStatement = node.parent; - var lastClause = switchStatement.clauses[switchStatement.clauses.length - 1]; + let caseBlock = node.parent; + let lastClause = caseBlock.clauses[caseBlock.clauses.length - 1]; if (lastClause) { return spanInNode(lastClause.statements[lastClause.statements.length - 1]); } @@ -499,7 +503,7 @@ module ts.BreakpointResolver { function spanInColonToken(node: Node): TextSpan { // Is this : specifying return annotation of the function declaration - if (isAnyFunction(node.parent) || node.parent.kind === SyntaxKind.PropertyAssignment) { + if (isFunctionLike(node.parent) || node.parent.kind === SyntaxKind.PropertyAssignment) { return spanInPreviousNode(node); } diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index dd12b452b57..23a392d7718 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -23,7 +23,7 @@ module ts.formatting { * Indentation for the scope that can be dynamically recomputed. * i.e * while(true) - * { var x; + * { let x; * } * Normally indentation is applied only to the first token in line so at glance 'var' should not be touched. * However if some format rule adds new line between '}' and 'var' 'var' will become @@ -67,12 +67,12 @@ module ts.formatting { } export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { - var line = sourceFile.getLineAndCharacterOfPosition(position).line; + let line = sourceFile.getLineAndCharacterOfPosition(position).line; if (line === 0) { return []; } // get the span for the previous\current line - var span = { + let span = { // get start position for the previous line pos: getStartPositionOfLine(line - 1, sourceFile), // get end position for the current line (end value is exclusive so add 1 to the result) @@ -90,7 +90,7 @@ module ts.formatting { } export function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { - var span = { + let span = { pos: 0, end: sourceFile.text.length }; @@ -99,7 +99,7 @@ module ts.formatting { export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { // format from the beginning of the line - var span = { + let span = { pos: getLineStartPositionForPosition(start, sourceFile), end: end }; @@ -107,11 +107,11 @@ module ts.formatting { } function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[] { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); + let parent = findOutermostParent(position, expectedLastToken, sourceFile); if (!parent) { return []; } - var span = { + let span = { pos: getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), end: parent.end }; @@ -119,7 +119,7 @@ module ts.formatting { } function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node { - var precedingToken = findPrecedingToken(position, sourceFile); + let precedingToken = findPrecedingToken(position, sourceFile); // when it is claimed that trigger character was typed at given position // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). @@ -134,13 +134,13 @@ module ts.formatting { // walk up and search for the parent node that ends at the same position with precedingToken. // for cases like this // - // var x = 1; + // let x = 1; // while (true) { // } // after typing close curly in while statement we want to reformat just the while statement. // However if we just walk upwards searching for the parent that has the same end value - // we'll end up with the whole source file. isListElement allows to stop on the list element level - var current = precedingToken; + let current = precedingToken; while (current && current.parent && current.parent.end === precedingToken.end && @@ -159,7 +159,7 @@ module ts.formatting { case SyntaxKind.InterfaceDeclaration: return rangeContainsRange((parent).members, node); case SyntaxKind.ModuleDeclaration: - var body = (parent).body; + let body = (parent).body; return body && body.kind === SyntaxKind.Block && rangeContainsRange((body).statements, node); case SyntaxKind.SourceFile: case SyntaxKind.Block: @@ -177,9 +177,9 @@ module ts.formatting { return find(sourceFile); function find(n: Node): Node { - var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); + let candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); if (candidate) { - var result = find(candidate); + let result = find(candidate); if (result) { return result; } @@ -199,7 +199,7 @@ module ts.formatting { } // pick only errors that fall in range - var sorted = errors + let sorted = errors .filter(d => rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length)) .sort((e1, e2) => e1.start - e2.start); @@ -207,7 +207,7 @@ module ts.formatting { return rangeHasNoErrors; } - var index = 0; + let index = 0; return r => { // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. @@ -218,7 +218,7 @@ module ts.formatting { return false; } - var error = sorted[index]; + let error = sorted[index]; if (r.end <= error.start) { // specified range ends before the error refered by 'index' - no error in range return false; @@ -244,12 +244,12 @@ module ts.formatting { * and return its end as start position for the scanner. */ function getScanStartPosition(enclosingNode: Node, originalRange: TextRange, sourceFile: SourceFile): number { - var start = enclosingNode.getStart(sourceFile); + let start = enclosingNode.getStart(sourceFile); if (start === originalRange.pos && enclosingNode.end === originalRange.end) { return start; } - var precedingToken = findPrecedingToken(originalRange.pos, sourceFile); + let precedingToken = findPrecedingToken(originalRange.pos, sourceFile); if (!precedingToken) { // no preceding token found - start from the beginning of enclosing node return enclosingNode.pos; @@ -280,10 +280,10 @@ module ts.formatting { * to the initial indentation. */ function getOwnOrInheritedDelta(n: Node, options: FormatCodeOptions, sourceFile: SourceFile): number { - var previousLine = Constants.Unknown; - var childKind = SyntaxKind.Unknown; + let previousLine = Constants.Unknown; + let childKind = SyntaxKind.Unknown; while (n) { - var line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line; + let line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line; if (previousLine !== Constants.Unknown && line !== previousLine) { break; } @@ -305,30 +305,30 @@ module ts.formatting { rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[] { - var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange); + let rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange); // formatting context is used by rules provider - var formattingContext = new FormattingContext(sourceFile, requestKind); + let formattingContext = new FormattingContext(sourceFile, requestKind); // find the smallest node that fully wraps the range and compute the initial indentation for the node - var enclosingNode = findEnclosingNode(originalRange, sourceFile); + let enclosingNode = findEnclosingNode(originalRange, sourceFile); - var formattingScanner = getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); + let formattingScanner = getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); - var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); + let initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - var previousRangeHasError: boolean; - var previousRange: TextRangeWithKind; - var previousParent: Node; - var previousRangeStartLine: number; + let previousRangeHasError: boolean; + let previousRange: TextRangeWithKind; + let previousParent: Node; + let previousRangeStartLine: number; - var edits: TextChange[] = []; + let edits: TextChange[] = []; formattingScanner.advance(); if (formattingScanner.isOnToken()) { - var startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line; - var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); + let startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line; + let delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); } @@ -357,9 +357,9 @@ module ts.formatting { } } else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; - var startLinePosition = getLineStartPositionForPosition(startPos, sourceFile); - var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); + let startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; + let startLinePosition = getLineStartPositionForPosition(startPos, sourceFile); + let column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); if (startLine !== parentStartLine || startPos === column) { return column } @@ -376,7 +376,7 @@ module ts.formatting { parentDynamicIndentation: DynamicIndentation, effectiveParentStartLine: number): Indentation { - var indentation = inheritedIndentation; + let indentation = inheritedIndentation; if (indentation === Constants.Unknown) { if (isSomeBlock(node.kind)) { // blocks should be indented in @@ -475,7 +475,7 @@ module ts.formatting { return; } - var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); + let nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); // a useful observations when tracking context node // / @@ -489,7 +489,7 @@ module ts.formatting { // context node is set to parent node value after processing every child node // context node is set to parent of the token after processing every token - var childContextNode = contextNode; + let childContextNode = contextNode; // if there are any tokens that logically belong to node and interleave child nodes // such tokens will be consumed in processChildNode for for the child that follows them @@ -504,7 +504,7 @@ module ts.formatting { // proceed any tokens in the node that are located after child nodes while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); + let tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > node.end) { break; } @@ -519,12 +519,12 @@ module ts.formatting { parentStartLine: number, isListItem: boolean): number { - var childStartPos = child.getStart(sourceFile); + let childStartPos = child.getStart(sourceFile); - var childStart = sourceFile.getLineAndCharacterOfPosition(childStartPos); + let childStart = sourceFile.getLineAndCharacterOfPosition(childStartPos); // if child is a list item - try to get its indentation - var childIndentationAmount = Constants.Unknown; + let childIndentationAmount = Constants.Unknown; if (isListItem) { childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); if (childIndentationAmount !== Constants.Unknown) { @@ -543,7 +543,7 @@ module ts.formatting { while (formattingScanner.isOnToken()) { // proceed any parent tokens that are located prior to child.getStart() - var tokenInfo = formattingScanner.readTokenInfo(node); + let tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > childStartPos) { // stop when formatting scanner advances past the beginning of the child break; @@ -558,13 +558,13 @@ module ts.formatting { if (isToken(child)) { // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules - var tokenInfo = formattingScanner.readTokenInfo(child); + let tokenInfo = formattingScanner.readTokenInfo(child); Debug.assert(tokenInfo.token.end === child.end); consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); return inheritedIndentation; } - var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); + let childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); @@ -578,16 +578,16 @@ module ts.formatting { parentStartLine: number, parentDynamicIndentation: DynamicIndentation): void { - var listStartToken = getOpenTokenForList(parent, nodes); - var listEndToken = getCloseTokenForOpenToken(listStartToken); + let listStartToken = getOpenTokenForList(parent, nodes); + let listEndToken = getCloseTokenForOpenToken(listStartToken); - var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; + let listDynamicIndentation = parentDynamicIndentation; + let startLine = parentStartLine; if (listStartToken !== SyntaxKind.Unknown) { // introduce a new indentation scope for lists (including list start and end tokens) while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); + let tokenInfo = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.end > nodes.pos) { // stop when formatting scanner moves past the beginning of node list break; @@ -595,7 +595,7 @@ module ts.formatting { else if (tokenInfo.token.kind === listStartToken) { // consume list start token startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation = + let indentation = computeIndentation(tokenInfo.token, startLine, Constants.Unknown, parent, parentDynamicIndentation, startLine); listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); @@ -608,14 +608,14 @@ module ts.formatting { } } - var inheritedIndentation = Constants.Unknown; - for (var i = 0, len = nodes.length; i < len; ++i) { - inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, /*isListElement*/ true) + let inheritedIndentation = Constants.Unknown; + for (let child of nodes) { + inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, /*isListElement*/ true) } if (listEndToken !== SyntaxKind.Unknown) { if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); + let tokenInfo = formattingScanner.readTokenInfo(parent); // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one // function (x: function) <-- @@ -631,21 +631,21 @@ module ts.formatting { function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation): void { Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); - var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - var indentToken = false; + let lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + let indentToken = false; if (currentTokenInfo.leadingTrivia) { processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); } - var lineAdded: boolean; - var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); + let lineAdded: boolean; + let isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); - var tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos); + let tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos); if (isTokenInRange) { - var rangeHasError = rangeContainsError(currentTokenInfo.token); + let rangeHasError = rangeContainsError(currentTokenInfo.token); // save prevStartLine since processRange will overwrite this value with current ones - var prevStartLine = previousRangeStartLine; + let prevStartLine = previousRangeStartLine; lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); if (rangeHasError) { // do not indent comments\token if token range overlaps with some error @@ -666,24 +666,23 @@ module ts.formatting { } if (indentToken) { - var indentNextTokenOrTrivia = true; + let indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { - for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { - var triviaItem = currentTokenInfo.leadingTrivia[i]; + for (let triviaItem of currentTokenInfo.leadingTrivia) { if (!rangeContainsRange(originalRange, triviaItem)) { continue; } - var triviaStartLine = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos).line; + let triviaStartLine = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos).line; switch (triviaItem.kind) { case SyntaxKind.MultiLineCommentTrivia: - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); indentNextTokenOrTrivia = false; break; case SyntaxKind.SingleLineCommentTrivia: if (indentNextTokenOrTrivia) { - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); insertIndentation(triviaItem.pos, commentIndentation, /*lineAdded*/ false); indentNextTokenOrTrivia = false; } @@ -697,7 +696,7 @@ module ts.formatting { // indent token only if is it is in target range and does not overlap with any error ranges if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); + let tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); } } @@ -709,10 +708,9 @@ module ts.formatting { } function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, dynamicIndentation: DynamicIndentation): void { - for (var i = 0, len = trivia.length; i < len; ++i) { - var triviaItem = trivia[i]; + for (let triviaItem of trivia) { if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { - var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); + let triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); } } @@ -724,12 +722,12 @@ module ts.formatting { contextNode: Node, dynamicIndentation: DynamicIndentation): boolean { - var rangeHasError = rangeContainsError(range); - var lineAdded: boolean; + let rangeHasError = rangeContainsError(range); + let lineAdded: boolean; if (!rangeHasError && !previousRangeHasError) { if (!previousRange) { // trim whitespaces starting from the beginning of the span up to the current line - var originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos); + let originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos); trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); } else { @@ -757,10 +755,10 @@ module ts.formatting { formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); - var rule = rulesProvider.getRulesMap().GetRule(formattingContext); + let rule = rulesProvider.getRulesMap().GetRule(formattingContext); - var trimTrailingWhitespaces: boolean; - var lineAdded: boolean; + let trimTrailingWhitespaces: boolean; + let lineAdded: boolean; if (rule) { applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); @@ -800,16 +798,16 @@ module ts.formatting { } function insertIndentation(pos: number, indentation: number, lineAdded: boolean): void { - var indentationString = getIndentationString(indentation, options); + let indentationString = getIndentationString(indentation, options); if (lineAdded) { // new line is added before the token by the formatting rules // insert indentation string at the very beginning of the token recordReplace(pos, 0, indentationString); } else { - var tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); + let tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); if (indentation !== tokenStart.character) { - var startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); + let startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); recordReplace(startLinePosition, tokenStart.character, indentationString); } } @@ -817,9 +815,9 @@ module ts.formatting { function indentMultilineComment(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean) { // split comment in lines - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; - var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - + let startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; + let endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; + let parts: TextRange[]; if (startLine === endLine) { if (!firstLineIsIndented) { // treat as single line comment @@ -828,10 +826,10 @@ module ts.formatting { return; } else { - var parts: TextRange[] = []; - var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { - var endOfLine = getEndLinePosition(line, sourceFile); + parts = []; + let startPos = commentRange.pos; + for (let line = startLine; line < endLine; ++line) { + let endOfLine = getEndLinePosition(line, sourceFile); parts.push({ pos: startPos, end: endOfLine }); startPos = getStartPositionOfLine(line + 1, sourceFile); } @@ -839,33 +837,33 @@ module ts.formatting { parts.push({ pos: startPos, end: commentRange.end }); } - var startLinePos = getStartPositionOfLine(startLine, sourceFile); + let startLinePos = getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceColumnInFirstPart = + let nonWhitespaceColumnInFirstPart = SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); if (indentation === nonWhitespaceColumnInFirstPart.column) { return; } - var startIndex = 0; + let startIndex = 0; if (firstLineIsIndented) { startIndex = 1; startLine++; } // shift all parts on the delta size - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos = getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = + let delta = indentation - nonWhitespaceColumnInFirstPart.column; + for (let i = startIndex, len = parts.length; i < len; ++i, ++startLine) { + let startLinePos = getStartPositionOfLine(startLine, sourceFile); + let nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; + let newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { - var indentationString = getIndentationString(newIndentation, options); + let indentationString = getIndentationString(newIndentation, options); recordReplace(startLinePos, nonWhitespaceCharacterAndColumn.character, indentationString); } else { @@ -875,16 +873,16 @@ module ts.formatting { } function trimTrailingWhitespacesForLines(line1: number, line2: number, range?: TextRangeWithKind) { - for (var line = line1; line < line2; ++line) { - var lineStartPosition = getStartPositionOfLine(line, sourceFile); - var lineEndPosition = getEndLinePosition(line, sourceFile); + for (let line = line1; line < line2; ++line) { + let lineStartPosition = getStartPositionOfLine(line, sourceFile); + let lineEndPosition = getEndLinePosition(line, sourceFile); // do not trim whitespaces in comments if (range && isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { continue; } - var pos = lineEndPosition; + let pos = lineEndPosition; while (pos >= lineStartPosition && isWhiteSpace(sourceFile.text.charCodeAt(pos))) { pos--; } @@ -917,7 +915,7 @@ module ts.formatting { currentRange: TextRangeWithKind, currentStartLine: number): void { - var between: TextRange; + let between: TextRange; switch (rule.Operation.Action) { case RuleAction.Ignore: // no action required @@ -937,7 +935,7 @@ module ts.formatting { } // edit should not be applied only if we have one line feed between elements - var lineDelta = currentStartLine - previousStartLine; + let lineDelta = currentStartLine - previousStartLine; if (lineDelta !== 1) { recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); } @@ -948,7 +946,7 @@ module ts.formatting { return; } - var posDelta = currentRange.pos - previousRange.end; + let posDelta = currentRange.pos - previousRange.end; if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== CharacterCodes.space) { recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); } @@ -1010,15 +1008,25 @@ module ts.formatting { return SyntaxKind.Unknown; } + var internedSizes: { tabSize: number; indentSize: number }; var internedTabsIndentation: string[]; var internedSpacesIndentation: string[]; export function getIndentationString(indentation: number, options: FormatCodeOptions): string { - if (!options.ConvertTabsToSpaces) { - var tabs = Math.floor(indentation / options.TabSize); - var spaces = indentation - tabs * options.TabSize; + // reset interned strings if FormatCodeOptions were changed + let resetInternedStrings = + !internedSizes || (internedSizes.tabSize !== options.TabSize || internedSizes.indentSize !== options.IndentSize); - var tabString: string; + if (resetInternedStrings) { + internedSizes = { tabSize: options.TabSize, indentSize: options.IndentSize }; + internedTabsIndentation = internedSpacesIndentation = undefined; + } + + if (!options.ConvertTabsToSpaces) { + let tabs = Math.floor(indentation / options.TabSize); + let spaces = indentation - tabs * options.TabSize; + + let tabString: string; if (!internedTabsIndentation) { internedTabsIndentation = []; } @@ -1033,9 +1041,9 @@ module ts.formatting { return spaces ? tabString + repeat(" ", spaces) : tabString; } else { - var spacesString: string; - var quotient = Math.floor(indentation / options.IndentSize); - var remainder = indentation % options.IndentSize; + let spacesString: string; + let quotient = Math.floor(indentation / options.IndentSize); + let remainder = indentation % options.IndentSize; if (!internedSpacesIndentation) { internedSpacesIndentation = []; } @@ -1048,13 +1056,12 @@ module ts.formatting { spacesString = internedSpacesIndentation[quotient]; } - return remainder ? spacesString + repeat(" ", remainder) : spacesString; } function repeat(value: string, count: number): string { - var s = ""; - for (var i = 0; i < count; ++i) { + let s = ""; + for (let i = 0; i < count; ++i) { s += value; } diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 52de4105df6..8683a975777 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -71,8 +71,8 @@ module ts.formatting { public TokensAreOnSameLine(): boolean { if (this.tokensAreOnSameLine === undefined) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; + let startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line; + let endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; this.tokensAreOnSameLine = (startLine == endLine); } @@ -96,17 +96,17 @@ module ts.formatting { } private NodeIsOnOneLine(node: Node): boolean { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; + let startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line; + let endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; return startLine == endLine; } private BlockIsOnOneLine(node: Node): boolean { - var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); - var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); + let openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); + let closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); if (openBrace && closeBrace) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; + let startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; + let endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; return startLine === endLine; } return false; diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 962f142f609..f93739d6fb5 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -2,7 +2,7 @@ /// module ts.formatting { - var scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); + let scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); export interface FormattingScanner { advance(): void; @@ -24,13 +24,13 @@ module ts.formatting { scanner.setText(sourceFile.text); scanner.setTextPos(startPos); - var wasNewLine: boolean = true; - var leadingTrivia: TextRangeWithKind[]; - var trailingTrivia: TextRangeWithKind[]; + let wasNewLine: boolean = true; + let leadingTrivia: TextRangeWithKind[]; + let trailingTrivia: TextRangeWithKind[]; - var savedPos: number; - var lastScanAction: ScanAction; - var lastTokenInfo: TokenInfo; + let savedPos: number; + let lastScanAction: ScanAction; + let lastTokenInfo: TokenInfo; return { advance: advance, @@ -45,7 +45,7 @@ module ts.formatting { function advance(): void { lastTokenInfo = undefined; - var isStarted = scanner.getStartPos() !== startPos; + let isStarted = scanner.getStartPos() !== startPos; if (isStarted) { if (trailingTrivia) { @@ -64,19 +64,19 @@ module ts.formatting { scanner.scan(); } - var t: SyntaxKind; - var pos = scanner.getStartPos(); + let t: SyntaxKind; + let pos = scanner.getStartPos(); // Read leading trivia and token while (pos < endPos) { - var t = scanner.getToken(); + let t = scanner.getToken(); if (!isTrivia(t)) { break; } // consume leading trivia scanner.scan(); - var item = { + let item = { pos: pos, end: scanner.getStartPos(), kind: t @@ -133,7 +133,7 @@ module ts.formatting { // normally scanner returns the smallest available token // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. - var expectedScanAction = + let expectedScanAction = shouldRescanGreaterThanToken(n) ? ScanAction.RescanGreaterThanToken : shouldRescanSlashToken(n) @@ -159,7 +159,7 @@ module ts.formatting { scanner.scan(); } - var currentToken = scanner.getToken(); + let currentToken = scanner.getToken(); if (expectedScanAction === ScanAction.RescanGreaterThanToken && currentToken === SyntaxKind.GreaterThanToken) { currentToken = scanner.reScanGreaterToken(); @@ -179,7 +179,7 @@ module ts.formatting { lastScanAction = ScanAction.Scan; } - var token: TextRangeWithKind = { + let token: TextRangeWithKind = { pos: scanner.getStartPos(), end: scanner.getTextPos(), kind: currentToken @@ -194,7 +194,7 @@ module ts.formatting { if (!isTrivia(currentToken)) { break; } - var trivia = { + let trivia = { pos: scanner.getStartPos(), end: scanner.getTextPos(), kind: currentToken @@ -223,8 +223,8 @@ module ts.formatting { } function isOnToken(): boolean { - var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + let current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); + let startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); } diff --git a/src/services/formatting/indentation.ts b/src/services/formatting/indentation.ts deleted file mode 100644 index f6f8fc0319f..00000000000 --- a/src/services/formatting/indentation.ts +++ /dev/null @@ -1,54 +0,0 @@ -module ts.formatting { - - var internedTabsIndentation: string[]; - var internedSpacesIndentation: string[]; - - export function getIndentationString(indentation: number, options: FormatCodeOptions): string { - if (!options.ConvertTabsToSpaces) { - var tabs = Math.floor(indentation / options.TabSize); - var spaces = indentation - tabs * options.TabSize; - - var tabString: string; - if (!internedTabsIndentation) { - internedTabsIndentation = []; - } - - if (internedTabsIndentation[tabs] === undefined) { - internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); - } - else { - tabString = internedTabsIndentation[tabs]; - } - - return spaces ? tabString + repeat(" ", spaces) : tabString; - } - else { - var spacesString: string; - var quotient = Math.floor(indentation / options.IndentSize); - var remainder = indentation % options.IndentSize; - if (!internedSpacesIndentation) { - internedSpacesIndentation = []; - } - - if (internedSpacesIndentation[quotient] === undefined) { - spacesString = repeat(" ", options.IndentSize * quotient); - internedSpacesIndentation[quotient] = spacesString; - } - else { - spacesString = internedSpacesIndentation[quotient]; - } - - - return remainder ? spacesString + repeat(" ", remainder) : spacesString; - } - - function repeat(value: string, count: number): string { - var s = ""; - for (var i = 0; i < count; ++i) { - s += value; - } - - return s; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index e5b7d6f3186..031f88be00e 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -33,8 +33,7 @@ module ts.formatting { return RuleDescriptor.create4(left, Shared.TokenRange.FromToken(right)); } - static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor - { + static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor { return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); } diff --git a/src/services/formatting/ruleOperation.ts b/src/services/formatting/ruleOperation.ts index c73e3b6bcf7..7bd092e9584 100644 --- a/src/services/formatting/ruleOperation.ts +++ b/src/services/formatting/ruleOperation.ts @@ -35,7 +35,7 @@ module ts.formatting { } static create2(context: RuleOperationContext, action: RuleAction) { - var result = new RuleOperation(); + let result = new RuleOperation(); result.Context = context; result.Action = action; return result; diff --git a/src/services/formatting/ruleOperationContext.ts b/src/services/formatting/ruleOperationContext.ts index d037f8e70d7..dc4e5d4f105 100644 --- a/src/services/formatting/ruleOperationContext.ts +++ b/src/services/formatting/ruleOperationContext.ts @@ -36,8 +36,8 @@ module ts.formatting { return true; } - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { + for (let check of this.customContextChecks) { + if (!check(context)) { return false; } } diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index ecfc5012915..7d3509ef495 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -18,8 +18,8 @@ module ts.formatting { export class Rules { public getRuleName(rule: Rule) { - var o: ts.Map = this; - for (var name in o) { + let o: ts.Map = this; + for (let name in o) { if (o[name] === rule) { return name; } @@ -139,7 +139,7 @@ module ts.formatting { // Lambda expressions public SpaceAfterArrow: Rule; - // Optional parameters and var args + // Optional parameters and let args public NoSpaceAfterEllipsis: Rule; public NoSpaceAfterOptionalParameters: Rule; @@ -330,7 +330,7 @@ module ts.formatting { // Lambda expressions this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); - // Optional parameters and var args + // Optional parameters and let args this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); this.NoSpaceAfterOptionalParameters = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); @@ -462,7 +462,7 @@ module ts.formatting { // equal in import a = module('a'); case SyntaxKind.ImportEqualsDeclaration: - // equal in var a = 0; + // equal in let a = 0; case SyntaxKind.VariableDeclaration: // equal in p = 0; case SyntaxKind.Parameter: @@ -470,7 +470,7 @@ module ts.formatting { case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; - // "in" keyword in for (var x in []) { } + // "in" keyword in for (let x in []) { } case SyntaxKind.ForInStatement: return context.currentTokenSpan.kind === SyntaxKind.InKeyword || context.nextTokenSpan.kind === SyntaxKind.InKeyword; // Technically, "of" is not a binary operator, but format it the same way as "in" @@ -541,7 +541,7 @@ module ts.formatting { switch (node.kind) { case SyntaxKind.Block: - case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseBlock: case SyntaxKind.ObjectLiteralExpression: case SyntaxKind.ModuleBlock: return true; diff --git a/src/services/formatting/rulesMap.ts b/src/services/formatting/rulesMap.ts index d25320f16a8..b43e91424f8 100644 --- a/src/services/formatting/rulesMap.ts +++ b/src/services/formatting/rulesMap.ts @@ -26,7 +26,7 @@ module ts.formatting { } static create(rules: Rule[]): RulesMap { - var result = new RulesMap(); + let result = new RulesMap(); result.Initialize(rules); return result; } @@ -36,7 +36,7 @@ module ts.formatting { this.map = new Array(this.mapRowLength * this.mapRowLength);//new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map - var rulesBucketConstructionStateList: RulesBucketConstructionState[] = new Array(this.map.length);//new Array(this.map.length); + let rulesBucketConstructionStateList: RulesBucketConstructionState[] = new Array(this.map.length);//new Array(this.map.length); this.FillRules(rules, rulesBucketConstructionStateList); return this.map; @@ -49,20 +49,20 @@ module ts.formatting { } private GetRuleBucketIndex(row: number, column: number): number { - var rulesBucketIndex = (row * this.mapRowLength) + column; + let rulesBucketIndex = (row * this.mapRowLength) + column; //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); return rulesBucketIndex; } private FillRule(rule: Rule, rulesBucketConstructionStateList: RulesBucketConstructionState[]): void { - var specificRule = rule.Descriptor.LeftTokenRange != Shared.TokenRange.Any && + let specificRule = rule.Descriptor.LeftTokenRange != Shared.TokenRange.Any && rule.Descriptor.RightTokenRange != Shared.TokenRange.Any; rule.Descriptor.LeftTokenRange.GetTokens().forEach((left) => { rule.Descriptor.RightTokenRange.GetTokens().forEach((right) => { - var rulesBucketIndex = this.GetRuleBucketIndex(left, right); + let rulesBucketIndex = this.GetRuleBucketIndex(left, right); - var rulesBucket = this.map[rulesBucketIndex]; + let rulesBucket = this.map[rulesBucketIndex]; if (rulesBucket == undefined) { rulesBucket = this.map[rulesBucketIndex] = new RulesBucket(); } @@ -73,21 +73,21 @@ module ts.formatting { } public GetRule(context: FormattingContext): Rule { - var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); - var bucket = this.map[bucketIndex]; + let bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); + let bucket = this.map[bucketIndex]; if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) + for (let rule of bucket.Rules()) { + if (rule.Operation.Context.InContext(context)) { return rule; + } } } return null; } } - var MaskBitSize = 5; - var Mask = 0x1f; + let MaskBitSize = 5; + let Mask = 0x1f; export enum RulesPosition { IgnoreRulesSpecific = 0, @@ -121,10 +121,10 @@ module ts.formatting { } public GetInsertionIndex(maskPosition: RulesPosition): number { - var index = 0; + let index = 0; - var pos = 0; - var indexBitmap = this.rulesInsertionIndexBitmap; + let pos = 0; + let indexBitmap = this.rulesInsertionIndexBitmap; while (pos <= maskPosition) { index += (indexBitmap & Mask); @@ -136,11 +136,11 @@ module ts.formatting { } public IncreaseInsertionIndex(maskPosition: RulesPosition): void { - var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; + let value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; value++; Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); + let temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); temp |= value << maskPosition; this.rulesInsertionIndexBitmap = temp; @@ -159,7 +159,7 @@ module ts.formatting { } public AddRule(rule: Rule, specificTokens: boolean, constructionState: RulesBucketConstructionState[], rulesBucketIndex: number): void { - var position: RulesPosition; + let position: RulesPosition; if (rule.Operation.Action == RuleAction.Ignore) { position = specificTokens ? @@ -177,11 +177,11 @@ module ts.formatting { RulesPosition.NoContextRulesAny; } - var state = constructionState[rulesBucketIndex]; + let state = constructionState[rulesBucketIndex]; if (state === undefined) { state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); } - var index = state.GetInsertionIndex(position); + let index = state.GetInsertionIndex(position); this.rules.splice(index, 0, rule); state.IncreaseInsertionIndex(position); } diff --git a/src/services/formatting/rulesProvider.ts b/src/services/formatting/rulesProvider.ts index 25b6f1ba772..5f63db8630b 100644 --- a/src/services/formatting/rulesProvider.ts +++ b/src/services/formatting/rulesProvider.ts @@ -40,8 +40,8 @@ module ts.formatting { public ensureUpToDate(options: ts.FormatCodeOptions) { if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules = this.createActiveRules(options); - var rulesMap = RulesMap.create(activeRules); + let activeRules = this.createActiveRules(options); + let rulesMap = RulesMap.create(activeRules); this.activeRules = activeRules; this.rulesMap = rulesMap; @@ -50,7 +50,7 @@ module ts.formatting { } private createActiveRules(options: ts.FormatCodeOptions): Rule[] { - var rules = this.globalRules.HighPriorityCommonRules.slice(0); + let rules = this.globalRules.HighPriorityCommonRules.slice(0); if (options.InsertSpaceAfterCommaDelimiter) { rules.push(this.globalRules.SpaceAfterComma); diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 6974f160e10..1a52c72c9d8 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -12,13 +12,13 @@ module ts.formatting { return 0; // past EOF } - var precedingToken = findPrecedingToken(position, sourceFile); + let precedingToken = findPrecedingToken(position, sourceFile); if (!precedingToken) { return 0; } // no indentation in string \regex\template literals - var precedingTokenIsLiteral = + let precedingTokenIsLiteral = precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral || precedingToken.kind === SyntaxKind.NoSubstitutionTemplateLiteral || @@ -29,11 +29,11 @@ module ts.formatting { return 0; } - var lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; + let lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); + let actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== Value.Unknown) { return actualIndentation; } @@ -41,10 +41,10 @@ module ts.formatting { // try to find node that can contribute to indentation and includes 'position' starting from 'precedingToken' // if such node is found - compute initial indentation for 'position' inside this node - var previous: Node; - var current = precedingToken; - var currentStart: LineAndCharacter; - var indentationDelta: number; + let previous: Node; + let current = precedingToken; + let currentStart: LineAndCharacter; + let indentationDelta: number; while (current) { if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : SyntaxKind.Unknown)) { @@ -61,7 +61,7 @@ module ts.formatting { } // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + let actualIndentation = getActualIndentationForListItem(current, sourceFile, options); if (actualIndentation !== Value.Unknown) { return actualIndentation; } @@ -79,7 +79,7 @@ module ts.formatting { } export function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions): number { - var start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); + let start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); } @@ -91,33 +91,33 @@ module ts.formatting { sourceFile: SourceFile, options: EditorOptions): number { - var parent: Node = current.parent; - var parentStart: LineAndCharacter; + let parent: Node = current.parent; + let parentStart: LineAndCharacter; // walk upwards and collect indentations for pairs of parent-child nodes // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' while (parent) { - var useActualIndentation = true; + let useActualIndentation = true; if (ignoreActualIndentationRange) { - var start = current.getStart(sourceFile); + let start = current.getStart(sourceFile); useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; } if (useActualIndentation) { // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + let actualIndentation = getActualIndentationForListItem(current, sourceFile, options); if (actualIndentation !== Value.Unknown) { return actualIndentation + indentationDelta; } } parentStart = getParentStart(parent, current, sourceFile); - var parentAndChildShareLine = + let parentAndChildShareLine = parentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); if (useActualIndentation) { // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + let actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); if (actualIndentation !== Value.Unknown) { return actualIndentation + indentationDelta; } @@ -138,7 +138,7 @@ module ts.formatting { function getParentStart(parent: Node, child: Node, sourceFile: SourceFile): LineAndCharacter { - var containingList = getContainingList(child, sourceFile); + let containingList = getContainingList(child, sourceFile); if (containingList) { return sourceFile.getLineAndCharacterOfPosition(containingList.pos); } @@ -151,7 +151,7 @@ module ts.formatting { */ function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var commaItemInfo = findListItemInfo(commaToken); + let commaItemInfo = findListItemInfo(commaToken); if (commaItemInfo && commaItemInfo.listItemIndex > 0) { return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); } @@ -174,7 +174,7 @@ module ts.formatting { // actual indentation is used for statements\declarations if one of cases below is true: // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line - var useActualIndentation = + let useActualIndentation = (isDeclaration(current) || isStatement(current)) && (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); @@ -186,7 +186,7 @@ module ts.formatting { } function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { - var nextToken = findNextToken(precedingToken, current); + let nextToken = findNextToken(precedingToken, current); if (!nextToken) { return false; } @@ -205,7 +205,7 @@ module ts.formatting { // class A { // $} - var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; + let nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; return lineAtPosition === nextTokenStartLine; } @@ -222,10 +222,10 @@ module ts.formatting { export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { - var elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); + let elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword !== undefined); - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; + let elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; } @@ -251,8 +251,8 @@ module ts.formatting { case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - var start = node.getStart(sourceFile); + case SyntaxKind.ConstructSignature: { + let start = node.getStart(sourceFile); if ((node.parent).typeParameters && rangeContainsStartEnd((node.parent).typeParameters, start, node.getEnd())) { return (node.parent).typeParameters; @@ -261,9 +261,10 @@ module ts.formatting { return (node.parent).parameters; } break; + } case SyntaxKind.NewExpression: - case SyntaxKind.CallExpression: - var start = node.getStart(sourceFile); + case SyntaxKind.CallExpression: { + let start = node.getStart(sourceFile); if ((node.parent).typeArguments && rangeContainsStartEnd((node.parent).typeArguments, start, node.getEnd())) { return (node.parent).typeArguments; @@ -273,34 +274,35 @@ module ts.formatting { return (node.parent).arguments; } break; + } } } return undefined; } function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { - var containingList = getContainingList(node, sourceFile); + let containingList = getContainingList(node, sourceFile); return containingList ? getActualIndentationFromList(containingList) : Value.Unknown; function getActualIndentationFromList(list: Node[]): number { - var index = indexOf(list, node); + let index = indexOf(list, node); return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : Value.Unknown; } } function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: EditorOptions): number { Debug.assert(index >= 0 && index < list.length); - var node = list[index]; + let node = list[index]; // walk toward the start of the list starting from current node and check if the line is the same for all items. // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (var i = index - 1; i >= 0; --i) { + let lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); + for (let i = index - 1; i >= 0; --i) { if (list[i].kind === SyntaxKind.CommaToken) { continue; } // skip list items that ends on the same line with the current list element - var prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; + let prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; if (prevEndLine !== lineAndCharacter.line) { return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); } @@ -311,7 +313,7 @@ module ts.formatting { } function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { - var lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0); + let lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0); return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); } @@ -323,10 +325,10 @@ module ts.formatting { value of 'column' for '$' is 6 (assuming that tab size is 4) */ export function findFirstNonWhitespaceCharacterAndColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorOptions) { - var character = 0; - var column = 0; - for (var pos = startPos; pos < endPos; ++pos) { - var ch = sourceFile.text.charCodeAt(pos); + let character = 0; + let column = 0; + for (let pos = startPos; pos < endPos; ++pos) { + let ch = sourceFile.text.charCodeAt(pos); if (!isWhiteSpace(ch)) { break; } @@ -357,7 +359,8 @@ module ts.formatting { case SyntaxKind.ModuleBlock: case SyntaxKind.ObjectLiteralExpression: case SyntaxKind.TypeLiteral: - case SyntaxKind.SwitchStatement: + case SyntaxKind.TupleType: + case SyntaxKind.CaseBlock: case SyntaxKind.DefaultClause: case SyntaxKind.CaseClause: case SyntaxKind.ParenthesizedExpression: @@ -368,6 +371,8 @@ module ts.formatting { case SyntaxKind.ExportAssignment: case SyntaxKind.ReturnStatement: case SyntaxKind.ConditionalExpression: + case SyntaxKind.ArrayBindingPattern: + case SyntaxKind.ObjectBindingPattern: return true; } return false; @@ -388,6 +393,7 @@ module ts.formatting { case SyntaxKind.FunctionExpression: case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: + case SyntaxKind.CallSignature: case SyntaxKind.ArrowFunction: case SyntaxKind.Constructor: case SyntaxKind.GetAccessor: @@ -403,9 +409,9 @@ module ts.formatting { * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. */ function nodeEndsWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { - var children = n.getChildren(sourceFile); + let children = n.getChildren(sourceFile); if (children.length) { - var last = children[children.length - 1]; + let last = children[children.length - 1]; if (last.kind === expectedLastToken) { return true; } @@ -429,47 +435,93 @@ module ts.formatting { case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ObjectBindingPattern: + case SyntaxKind.TypeLiteral: case SyntaxKind.Block: case SyntaxKind.ModuleBlock: - case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseBlock: return nodeEndsWith(n, SyntaxKind.CloseBraceToken, sourceFile); case SyntaxKind.CatchClause: return isCompletedNode((n).block, sourceFile); - case SyntaxKind.ParenthesizedExpression: - case SyntaxKind.CallSignature: + case SyntaxKind.NewExpression: + if (!(n).arguments) { + return true; + } + // fall through case SyntaxKind.CallExpression: - case SyntaxKind.ConstructSignature: + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.ParenthesizedType: return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); + + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + return isCompletedNode((n).type, sourceFile); + + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: case SyntaxKind.ArrowFunction: - return !(n).body || isCompletedNode((n).body, sourceFile); + if ((n).body) { + return isCompletedNode((n).body, sourceFile); + } + + if ((n).type) { + return isCompletedNode((n).type, sourceFile); + } + + // Even though type parameters can be unclosed, we can get away with + // having at least a closing paren. + return hasChildOfKind(n, SyntaxKind.CloseParenToken, sourceFile); + case SyntaxKind.ModuleDeclaration: return (n).body && isCompletedNode((n).body, sourceFile); + case SyntaxKind.IfStatement: if ((n).elseStatement) { return isCompletedNode((n).elseStatement, sourceFile); } return isCompletedNode((n).thenStatement, sourceFile); + case SyntaxKind.ExpressionStatement: return isCompletedNode((n).expression, sourceFile); + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ArrayBindingPattern: + case SyntaxKind.ComputedPropertyName: + case SyntaxKind.TupleType: return nodeEndsWith(n, SyntaxKind.CloseBracketToken, sourceFile); + + case SyntaxKind.IndexSignature: + if ((n).type) { + return isCompletedNode((n).type, sourceFile); + } + + return hasChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: - // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed + // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed return false; + + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForOfStatement: case SyntaxKind.WhileStatement: - return isCompletedNode((n).statement, sourceFile); + return isCompletedNode((n).statement, sourceFile); case SyntaxKind.DoStatement: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = findChildOfKind(n, SyntaxKind.WhileKeyword, sourceFile); + let hasWhileKeyword = findChildOfKind(n, SyntaxKind.WhileKeyword, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); } return isCompletedNode((n).statement, sourceFile); + default: return true; } diff --git a/src/services/formatting/tokenRange.ts b/src/services/formatting/tokenRange.ts index ff9cb91ce68..f1cdfebc978 100644 --- a/src/services/formatting/tokenRange.ts +++ b/src/services/formatting/tokenRange.ts @@ -27,7 +27,7 @@ module ts.formatting { constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]) { this.tokens = []; - for (var token = from; token <= to; token++) { + for (let token = from; token <= to; token++) { if (except.indexOf(token) < 0) { this.tokens.push(token); } @@ -74,8 +74,8 @@ module ts.formatting { export class TokenAllAccess implements ITokenAccess { public GetTokens(): SyntaxKind[] { - var result: SyntaxKind[] = []; - for (var token = SyntaxKind.FirstToken; token <= SyntaxKind.LastToken; token++) { + let result: SyntaxKind[] = []; + for (let token = SyntaxKind.FirstToken; token <= SyntaxKind.LastToken; token++) { result.push(token); } return result; diff --git a/src/services/navigateTo.ts b/src/services/navigateTo.ts index b3f72d83cb3..9871a447c05 100644 --- a/src/services/navigateTo.ts +++ b/src/services/navigateTo.ts @@ -2,22 +2,21 @@ module ts.NavigateTo { type RawNavigateToItem = { name: string; fileName: string; matchKind: PatternMatchKind; isCaseSensitive: boolean; declaration: Declaration }; export function getNavigateToItems(program: Program, cancellationToken: CancellationTokenObject, searchValue: string, maxResultCount: number): NavigateToItem[] { - var patternMatcher = createPatternMatcher(searchValue); - var rawItems: RawNavigateToItem[] = []; + let patternMatcher = createPatternMatcher(searchValue); + let rawItems: RawNavigateToItem[] = []; // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] forEach(program.getSourceFiles(), sourceFile => { cancellationToken.throwIfCancellationRequested(); - var declarations = sourceFile.getNamedDeclarations(); - for (var i = 0, n = declarations.length; i < n; i++) { - var declaration = declarations[i]; + let declarations = sourceFile.getNamedDeclarations(); + for (let declaration of declarations) { var name = getDeclarationName(declaration); if (name !== undefined) { // 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); + let matches = patternMatcher.getMatchesForLastSegmentOfPattern(name); if (!matches) { continue; @@ -26,7 +25,7 @@ module ts.NavigateTo { // It was a match! If the pattern has dots in it, then also see if hte // declaration container matches as well. if (patternMatcher.patternContainsDots) { - var containers = getContainers(declaration); + let containers = getContainers(declaration); if (!containers) { return undefined; } @@ -38,8 +37,8 @@ module ts.NavigateTo { } } - var fileName = sourceFile.fileName; - var matchKind = bestMatchKind(matches); + let fileName = sourceFile.fileName; + let matchKind = bestMatchKind(matches); rawItems.push({ name, fileName, matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration }); } } @@ -50,7 +49,7 @@ module ts.NavigateTo { rawItems = rawItems.slice(0, maxResultCount); } - var items = map(rawItems, createNavigateToItem); + let items = map(rawItems, createNavigateToItem); return items; @@ -58,8 +57,8 @@ module ts.NavigateTo { Debug.assert(matches.length > 0); // This is a case sensitive match, only if all the submatches were case sensitive. - for (var i = 0, n = matches.length; i < n; i++) { - if (!matches[i].isCaseSensitive) { + for (let match of matches) { + if (!match.isCaseSensitive) { return false; } } @@ -68,13 +67,13 @@ module ts.NavigateTo { } function getDeclarationName(declaration: Declaration): string { - var result = getTextOfIdentifierOrLiteral(declaration.name); + let result = getTextOfIdentifierOrLiteral(declaration.name); if (result !== undefined) { return result; } if (declaration.name.kind === SyntaxKind.ComputedPropertyName) { - var expr = (declaration.name).expression; + let expr = (declaration.name).expression; if (expr.kind === SyntaxKind.PropertyAccessExpression) { return (expr).name.text; } @@ -98,7 +97,7 @@ module ts.NavigateTo { function tryAddSingleDeclarationName(declaration: Declaration, containers: string[]) { if (declaration && declaration.name) { - var text = getTextOfIdentifierOrLiteral(declaration.name); + let text = getTextOfIdentifierOrLiteral(declaration.name); if (text !== undefined) { containers.unshift(text); } @@ -118,7 +117,7 @@ module ts.NavigateTo { // // [X.Y.Z]() { } function tryAddComputedPropertyName(expression: Expression, containers: string[], includeLastPortion: boolean): boolean { - var text = getTextOfIdentifierOrLiteral(expression); + let text = getTextOfIdentifierOrLiteral(expression); if (text !== undefined) { if (includeLastPortion) { containers.unshift(text); @@ -127,7 +126,7 @@ module ts.NavigateTo { } if (expression.kind === SyntaxKind.PropertyAccessExpression) { - var propertyAccess = expression; + let propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); } @@ -139,7 +138,7 @@ module ts.NavigateTo { } function getContainers(declaration: Declaration) { - var containers: string[] = []; + let containers: string[] = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. @@ -165,10 +164,10 @@ module ts.NavigateTo { function bestMatchKind(matches: PatternMatch[]) { Debug.assert(matches.length > 0); - var bestMatchKind = PatternMatchKind.camelCase; + let bestMatchKind = PatternMatchKind.camelCase; - for (var i = 0, n = matches.length; i < n; i++) { - var kind = matches[i].kind; + for (let match of matches) { + let kind = match.kind; if (kind < bestMatchKind) { bestMatchKind = kind; } @@ -178,7 +177,7 @@ module ts.NavigateTo { } // This means "compare in a case insensitive manner." - var baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" }; + let baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" }; function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem) { // TODO(cyrusn): get the gamut of comparisons that VS already uses here. // Right now we just sort by kind first, and then by name of the item. @@ -190,8 +189,8 @@ module ts.NavigateTo { } function createNavigateToItem(rawItem: RawNavigateToItem): NavigateToItem { - var declaration = rawItem.declaration; - var container = getContainerNode(declaration); + let declaration = rawItem.declaration; + let container = getContainerNode(declaration); return { name: rawItem.name, kind: getNodeKind(declaration), diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 90c639287ce..c6463aba733 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -4,16 +4,16 @@ module ts.NavigationBar { export function getNavigationBarItems(sourceFile: SourceFile): 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. - var hasGlobalNode = false; + let hasGlobalNode = false; return getItemsWorker(getTopLevelNodes(sourceFile), createTopLevelItem); function getIndent(node: Node): number { // If we have a global node in the tree, // then it adds an extra layer of depth to all subnodes. - var indent = hasGlobalNode ? 1 : 0; + let indent = hasGlobalNode ? 1 : 0; - var current = node.parent; + let current = node.parent; while (current) { switch (current.kind) { case SyntaxKind.ModuleDeclaration: @@ -39,7 +39,7 @@ module ts.NavigationBar { } function getChildNodes(nodes: Node[]): Node[] { - var childNodes: Node[] = []; + let childNodes: Node[] = []; function visit(node: Node) { switch (node.kind) { @@ -60,7 +60,7 @@ module ts.NavigationBar { break; case SyntaxKind.ImportDeclaration: - var importClause = (node).importClause; + let importClause = (node).importClause; if (importClause) { // Handle default import case e.g.: // import d from "mod"; @@ -102,8 +102,8 @@ module ts.NavigationBar { } } - //for (var i = 0, n = nodes.length; i < n; i++) { - // var node = nodes[i]; + //for (let i = 0, n = nodes.length; i < n; i++) { + // let node = nodes[i]; // if (node.kind === SyntaxKind.ClassDeclaration || // node.kind === SyntaxKind.EnumDeclaration || @@ -122,7 +122,7 @@ module ts.NavigationBar { } function getTopLevelNodes(node: SourceFile): Node[] { - var topLevelNodes: Node[] = []; + let topLevelNodes: Node[] = []; topLevelNodes.push(node); addTopLevelNodes(node.statements, topLevelNodes); @@ -150,8 +150,7 @@ module ts.NavigationBar { function addTopLevelNodes(nodes: Node[], topLevelNodes: Node[]): void { nodes = sortNodes(nodes); - for (var i = 0, n = nodes.length; i < n; i++) { - var node = nodes[i]; + for (let node of nodes) { switch (node.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.EnumDeclaration: @@ -160,13 +159,13 @@ module ts.NavigationBar { break; case SyntaxKind.ModuleDeclaration: - var moduleDeclaration = node; + let moduleDeclaration = node; topLevelNodes.push(node); addTopLevelNodes((getInnermostModule(moduleDeclaration).body).statements, topLevelNodes); break; case SyntaxKind.FunctionDeclaration: - var functionDeclaration = node; + let functionDeclaration = node; if (isTopLevelFunctionDeclaration(functionDeclaration)) { topLevelNodes.push(node); addTopLevelNodes((functionDeclaration.body).statements, topLevelNodes); @@ -200,18 +199,17 @@ module ts.NavigationBar { } function getItemsWorker(nodes: Node[], createItem: (n: Node) => ts.NavigationBarItem): ts.NavigationBarItem[] { - var items: ts.NavigationBarItem[] = []; + let items: ts.NavigationBarItem[] = []; - var keyToItem: Map = {}; + let keyToItem: Map = {}; - for (var i = 0, n = nodes.length; i < n; i++) { - var child = nodes[i]; - var item = createItem(child); + for (let child of nodes) { + let item = createItem(child); if (item !== undefined) { if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; + let key = item.text + "-" + item.kind + "-" + item.indent; - var itemWithSameName = keyToItem[key]; + let itemWithSameName = keyToItem[key]; if (itemWithSameName) { // We had an item with the same name. Merge these items together. merge(itemWithSameName, item); @@ -238,12 +236,8 @@ module ts.NavigationBar { // Next, recursively merge or add any children in the source as appropriate. outer: - for (var i = 0, n = source.childItems.length; i < n; i++) { - var sourceChild = source.childItems[i]; - - for (var j = 0, m = target.childItems.length; j < m; j++) { - var targetChild = target.childItems[j]; - + for (let sourceChild of source.childItems) { + for (let targetChild of target.childItems) { if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { // Found a match. merge them. merge(targetChild, sourceChild); @@ -299,8 +293,8 @@ module ts.NavigationBar { case SyntaxKind.VariableDeclaration: case SyntaxKind.BindingElement: - var variableDeclarationNode: Node; - var name: Node; + let variableDeclarationNode: Node; + let name: Node; if (node.kind === SyntaxKind.BindingElement) { name = (node).name; @@ -397,7 +391,7 @@ module ts.NavigationBar { } // Otherwise, we need to aggregate each identifier to build up the qualified name. - var result: string[] = []; + let result: string[] = []; result.push(moduleDeclaration.name.text); @@ -411,9 +405,9 @@ module ts.NavigationBar { } function createModuleItem(node: ModuleDeclaration): NavigationBarItem { - var moduleName = getModuleName(node); + let moduleName = getModuleName(node); - var childItems = getItemsWorker(getChildNodes((getInnermostModule(node).body).statements), createChildItem); + let childItems = getItemsWorker(getChildNodes((getInnermostModule(node).body).statements), createChildItem); return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, @@ -424,10 +418,10 @@ module ts.NavigationBar { } function createFunctionItem(node: FunctionDeclaration) { - if (node.name && node.body && node.body.kind === SyntaxKind.Block) { - var childItems = getItemsWorker(sortNodes((node.body).statements), createChildItem); + if ((node.name || node.flags & NodeFlags.Default) && node.body && node.body.kind === SyntaxKind.Block) { + let childItems = getItemsWorker(sortNodes((node.body).statements), createChildItem); - return getNavigationBarItem(node.name.text, + return getNavigationBarItem((!node.name && node.flags & NodeFlags.Default) ? "default": node.name.text , ts.ScriptElementKind.functionElement, getNodeModifiers(node), [getNodeSpan(node)], @@ -439,14 +433,14 @@ module ts.NavigationBar { } function createSourceFileItem(node: SourceFile): ts.NavigationBarItem { - var childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); + let childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); if (childItems === undefined || childItems.length === 0) { return undefined; } hasGlobalNode = true; - var rootName = isExternalModule(node) + let rootName = isExternalModule(node) ? "\"" + escapeString(getBaseFileName(removeFileExtension(normalizePath(node.fileName)))) + "\"" : "" @@ -458,26 +452,28 @@ module ts.NavigationBar { } function createClassItem(node: ClassDeclaration): ts.NavigationBarItem { - var childItems: NavigationBarItem[]; + let childItems: NavigationBarItem[]; if (node.members) { - var constructor = forEach(node.members, member => { + let constructor = forEach(node.members, member => { return member.kind === SyntaxKind.Constructor && member; }); // Add the constructor parameters in as children of the class (for property parameters). // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that // are not properties will be filtered out later by createChildItem. - var nodes: Node[] = removeDynamicallyNamedProperties(node); + let nodes: Node[] = removeDynamicallyNamedProperties(node); if (constructor) { nodes.push.apply(nodes, filter(constructor.parameters, p => !isBindingPattern(p.name))); } - var childItems = getItemsWorker(sortNodes(nodes), createChildItem); + childItems = getItemsWorker(sortNodes(nodes), createChildItem); } + var nodeName = !node.name && (node.flags & NodeFlags.Default) ? "default" : node.name.text; + return getNavigationBarItem( - node.name.text, + nodeName, ts.ScriptElementKind.classElement, getNodeModifiers(node), [getNodeSpan(node)], @@ -486,7 +482,7 @@ module ts.NavigationBar { } function createEnumItem(node: EnumDeclaration): ts.NavigationBarItem { - var childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); + let childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); return getNavigationBarItem( node.name.text, ts.ScriptElementKind.enumElement, @@ -497,7 +493,7 @@ module ts.NavigationBar { } function createIterfaceItem(node: InterfaceDeclaration): ts.NavigationBarItem { - var childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); + let childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); return getNavigationBarItem( node.name.text, ts.ScriptElementKind.interfaceElement, diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index 54b548336de..4c9dcedc7a4 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -16,12 +16,12 @@ module ts { export module OutliningElementsCollector { export function collectElements(sourceFile: SourceFile): OutliningSpan[] { - var elements: OutliningSpan[] = []; - var collapseText = "..."; + let elements: OutliningSpan[] = []; + let collapseText = "..."; function addOutliningSpan(hintSpanNode: Node, startElement: Node, endElement: Node, autoCollapse: boolean) { if (hintSpanNode && startElement && endElement) { - var span: OutliningSpan = { + let span: OutliningSpan = { textSpan: createTextSpanFromBounds(startElement.pos, endElement.end), hintSpan: createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end), bannerText: collapseText, @@ -35,8 +35,8 @@ module ts { return isFunctionBlock(node) && node.parent.kind !== SyntaxKind.ArrowFunction; } - var depth = 0; - var maxDepth = 20; + let depth = 0; + let maxDepth = 20; function walk(n: Node): void { if (depth > maxDepth) { return; @@ -44,9 +44,9 @@ module ts { switch (n.kind) { case SyntaxKind.Block: if (!isFunctionBlock(n)) { - var parent = n.parent; - var openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); - var closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); + let parent = n.parent; + let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); + let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. // If the latter, we want to collaps the block, but consider its hint span @@ -66,13 +66,13 @@ module ts { if (parent.kind === SyntaxKind.TryStatement) { // Could be the try-block, or the finally-block. - var tryStatement = parent; + let tryStatement = parent; if (tryStatement.tryBlock === n) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { - var finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile); + let finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile); if (finallyKeyword) { addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); break; @@ -84,7 +84,7 @@ module ts { // Block was a standalone block. In this case we want to only collapse // the span of the block, independent of any parent span. - var span = createTextSpanFromBounds(n.getStart(), n.end); + let span = createTextSpanFromBounds(n.getStart(), n.end); elements.push({ textSpan: span, hintSpan: span, @@ -95,23 +95,25 @@ module ts { } // Fallthrough. - case SyntaxKind.ModuleBlock: - var openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); - var closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); + case SyntaxKind.ModuleBlock: { + let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); + let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; + } case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.SwitchStatement: - var openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); - var closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); + case SyntaxKind.CaseBlock: { + let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile); + let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; + } case SyntaxKind.ArrayLiteralExpression: - var openBracket = findChildOfKind(n, SyntaxKind.OpenBracketToken, sourceFile); - var closeBracket = findChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile); + let openBracket = findChildOfKind(n, SyntaxKind.OpenBracketToken, sourceFile); + let closeBracket = findChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); break; } diff --git a/src/services/patternMatcher.ts b/src/services/patternMatcher.ts index 9bcd3e1d000..61642552cab 100644 --- a/src/services/patternMatcher.ts +++ b/src/services/patternMatcher.ts @@ -112,13 +112,13 @@ module ts { // we see the name of a module that is used everywhere, or the name of an overload). As // such, we cache the information we compute about the candidate for the life of this // pattern matcher so we don't have to compute it multiple times. - var stringToWordSpans: Map = {}; + let stringToWordSpans: Map = {}; pattern = pattern.trim(); - var fullPatternSegment = createSegment(pattern); - var dotSeparatedSegments = pattern.split(".").map(p => createSegment(p.trim())); - var invalidPattern = dotSeparatedSegments.length === 0 || forEach(dotSeparatedSegments, segmentIsInvalid); + let fullPatternSegment = createSegment(pattern); + let dotSeparatedSegments = pattern.split(".").map(p => createSegment(p.trim())); + let invalidPattern = dotSeparatedSegments.length === 0 || forEach(dotSeparatedSegments, segmentIsInvalid); return { getMatches, @@ -147,7 +147,7 @@ module ts { // First, check that the last part of the dot separated pattern matches the name of the // candidate. If not, then there's no point in proceeding and doing the more // expensive work. - var candidateMatch = matchSegment(candidate, lastOrUndefined(dotSeparatedSegments)); + let candidateMatch = matchSegment(candidate, lastOrUndefined(dotSeparatedSegments)); if (!candidateMatch) { return undefined; } @@ -164,16 +164,16 @@ module ts { // So far so good. Now break up the container for the candidate and check if all // the dotted parts match up correctly. - var totalMatch = candidateMatch; + let totalMatch = candidateMatch; - for (var i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; + for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; i >= 0; i--, j--) { - var segment = dotSeparatedSegments[i]; - var containerName = candidateContainers[j]; + let segment = dotSeparatedSegments[i]; + let containerName = candidateContainers[j]; - var containerMatch = matchSegment(containerName, segment); + let containerMatch = matchSegment(containerName, segment); if (!containerMatch) { // This container didn't match the pattern piece. So there's no match at all. return undefined; @@ -196,7 +196,7 @@ module ts { } function matchTextChunk(candidate: string, chunk: TextChunk, punctuationStripped: boolean): PatternMatch { - var index = indexOfIgnoringCase(candidate, chunk.textLowerCase); + let index = indexOfIgnoringCase(candidate, chunk.textLowerCase); if (index === 0) { if (chunk.text.length === candidate.length) { // a) Check if the part matches the candidate entirely, in an case insensitive or @@ -210,7 +210,7 @@ module ts { } } - var isLowercase = chunk.isLowerCase; + let isLowercase = chunk.isLowerCase; if (isLowercase) { if (index > 0) { // c) If the part is entirely lowercase, then check if it is contained anywhere in the @@ -220,9 +220,8 @@ module ts { // Note: We only have a substring match if the lowercase part is prefix match of some // word part. That way we don't match something like 'Class' when the user types 'a'. // But we would match 'FooAttribute' (since 'Attribute' starts with 'a'). - var wordSpans = getWordSpans(candidate); - for (var i = 0, n = wordSpans.length; i < n; i++) { - var span = wordSpans[i] + let wordSpans = getWordSpans(candidate); + for (let span of wordSpans) { if (partStartsWith(candidate, span, chunk.text, /*ignoreCase:*/ true)) { return createPatternMatch(PatternMatchKind.substring, punctuationStripped, /*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, /*ignoreCase:*/ false)); @@ -242,8 +241,8 @@ module ts { if (!isLowercase) { // e) If the part was not entirely lowercase, then attempt a camel cased match as well. if (chunk.characterSpans.length > 0) { - var candidateParts = getWordSpans(candidate); - var camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, /*ignoreCase:*/ false); + let candidateParts = getWordSpans(candidate); + let camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, /*ignoreCase:*/ false); if (camelCaseWeight !== undefined) { return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, /*isCaseSensitive:*/ true, /*camelCaseWeight:*/ camelCaseWeight); } @@ -274,8 +273,8 @@ module ts { } function containsSpaceOrAsterisk(text: string): boolean { - for (var i = 0; i < text.length; i++) { - var ch = text.charCodeAt(i); + for (let i = 0; i < text.length; i++) { + let ch = text.charCodeAt(i); if (ch === CharacterCodes.space || ch === CharacterCodes.asterisk) { return true; } @@ -293,7 +292,7 @@ module ts { // Note: if the segment contains a space or an asterisk then we must assume that it's a // multi-word segment. if (!containsSpaceOrAsterisk(segment.totalTextChunk.text)) { - var match = matchTextChunk(candidate, segment.totalTextChunk, /*punctuationStripped:*/ false); + let match = matchTextChunk(candidate, segment.totalTextChunk, /*punctuationStripped:*/ false); if (match) { return [match]; } @@ -336,14 +335,12 @@ module ts { // // Only if all words have some sort of match is the pattern considered matched. - var subWordTextChunks = segment.subWordTextChunks; - var matches: PatternMatch[] = undefined; - - for (var i = 0, n = subWordTextChunks.length; i < n; i++) { - var subWordTextChunk = subWordTextChunks[i]; + let subWordTextChunks = segment.subWordTextChunks; + let matches: PatternMatch[] = undefined; + for (let subWordTextChunk of subWordTextChunks) { // Try to match the candidate with this word - var result = matchTextChunk(candidate, subWordTextChunk, /*punctuationStripped:*/ true); + let result = matchTextChunk(candidate, subWordTextChunk, /*punctuationStripped:*/ true); if (!result) { return undefined; } @@ -356,8 +353,8 @@ module ts { } function partStartsWith(candidate: string, candidateSpan: TextSpan, pattern: string, ignoreCase: boolean, patternSpan?: TextSpan): boolean { - var patternPartStart = patternSpan ? patternSpan.start : 0; - var patternPartLength = patternSpan ? patternSpan.length : pattern.length; + let patternPartStart = patternSpan ? patternSpan.start : 0; + let patternPartLength = patternSpan ? patternSpan.length : pattern.length; if (patternPartLength > candidateSpan.length) { // Pattern part is longer than the candidate part. There can never be a match. @@ -365,18 +362,18 @@ module ts { } if (ignoreCase) { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); + for (let i = 0; i < patternPartLength; i++) { + let ch1 = pattern.charCodeAt(patternPartStart + i); + let ch2 = candidate.charCodeAt(candidateSpan.start + i); if (toLowerCase(ch1) !== toLowerCase(ch2)) { return false; } } } else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); + for (let i = 0; i < patternPartLength; i++) { + let ch1 = pattern.charCodeAt(patternPartStart + i); + let ch2 = candidate.charCodeAt(candidateSpan.start + i); if (ch1 !== ch2) { return false; } @@ -387,23 +384,23 @@ module ts { } function tryCamelCaseMatch(candidate: string, candidateParts: TextSpan[], chunk: TextChunk, ignoreCase: boolean): number { - var chunkCharacterSpans = chunk.characterSpans; + let chunkCharacterSpans = chunk.characterSpans; // Note: we may have more pattern parts than candidate parts. This is because multiple // pattern parts may match a candidate part. For example "SiUI" against "SimpleUI". // We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U // and I will both match in UI. - var currentCandidate = 0; - var currentChunkSpan = 0; - var firstMatch: number = undefined; - var contiguous: boolean = undefined; + let currentCandidate = 0; + let currentChunkSpan = 0; + let firstMatch: number = undefined; + let contiguous: boolean = undefined; while (true) { // Let's consider our termination cases if (currentChunkSpan === chunkCharacterSpans.length) { // We did match! We shall assign a weight to this - var weight = 0; + let weight = 0; // Was this contiguous? if (contiguous) { @@ -422,15 +419,15 @@ module ts { return undefined; } - var candidatePart = candidateParts[currentCandidate]; - var gotOneMatchThisCandidate = false; + let candidatePart = candidateParts[currentCandidate]; + let gotOneMatchThisCandidate = false; // Consider the case of matching SiUI against SimpleUIElement. The candidate parts // will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si' // against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to // still keep matching pattern parts against that candidate part. for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { - var chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; + let chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; if (gotOneMatchThisCandidate) { // We've already gotten one pattern part match in this candidate. We will @@ -540,7 +537,7 @@ module ts { // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. - var str = String.fromCharCode(ch); + let str = String.fromCharCode(ch); return str === str.toUpperCase(); } @@ -557,12 +554,12 @@ module ts { // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. - var str = String.fromCharCode(ch); + let str = String.fromCharCode(ch); return str === str.toLowerCase(); } function containsUpperCaseLetter(string: string): boolean { - for (var i = 0, n = string.length; i < n; i++) { + for (let i = 0, n = string.length; i < n; i++) { if (isUpperCaseLetter(string.charCodeAt(i))) { return true; } @@ -572,7 +569,7 @@ module ts { } function startsWith(string: string, search: string) { - for (var i = 0, n = search.length; i < n; i++) { + for (let i = 0, n = search.length; i < n; i++) { if (string.charCodeAt(i) !== search.charCodeAt(i)) { return false; } @@ -583,7 +580,7 @@ module ts { // Assumes 'value' is already lowercase. function indexOfIgnoringCase(string: string, value: string): number { - for (var i = 0, n = string.length - value.length; i <= n; i++) { + for (let i = 0, n = string.length - value.length; i <= n; i++) { if (startsWithIgnoringCase(string, value, i)) { return i; } @@ -594,9 +591,9 @@ module ts { // Assumes 'value' is already lowercase. function startsWithIgnoringCase(string: string, value: string, start: number): boolean { - for (var i = 0, n = value.length; i < n; i++) { - var ch1 = toLowerCase(string.charCodeAt(i + start)); - var ch2 = value.charCodeAt(i); + for (let i = 0, n = value.length; i < n; i++) { + let ch1 = toLowerCase(string.charCodeAt(i + start)); + let ch2 = value.charCodeAt(i); if (ch1 !== ch2) { return false; @@ -631,12 +628,12 @@ module ts { } function breakPatternIntoTextChunks(pattern: string): TextChunk[] { - var result: TextChunk[] = []; - var wordStart = 0; - var wordLength = 0; + let result: TextChunk[] = []; + let wordStart = 0; + let wordLength = 0; - for (var i = 0; i < pattern.length; i++) { - var ch = pattern.charCodeAt(i); + for (let i = 0; i < pattern.length; i++) { + let ch = pattern.charCodeAt(i); if (isWordChar(ch)) { if (wordLength++ === 0) { wordStart = i; @@ -658,7 +655,7 @@ module ts { } function createTextChunk(text: string): TextChunk { - var textLowerCase = text.toLowerCase(); + let textLowerCase = text.toLowerCase(); return { text, textLowerCase, @@ -676,15 +673,15 @@ module ts { } function breakIntoSpans(identifier: string, word: boolean): TextSpan[] { - var result: TextSpan[] = []; + let result: TextSpan[] = []; - var wordStart = 0; - for (var i = 1, n = identifier.length; i < n; i++) { - var lastIsDigit = isDigit(identifier.charCodeAt(i - 1)); - var currentIsDigit = isDigit(identifier.charCodeAt(i)); + let wordStart = 0; + for (let i = 1, n = identifier.length; i < n; i++) { + let lastIsDigit = isDigit(identifier.charCodeAt(i - 1)); + let currentIsDigit = isDigit(identifier.charCodeAt(i)); - var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i); - var hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart); + let hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i); + let hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart); if (charIsPunctuation(identifier.charCodeAt(i - 1)) || charIsPunctuation(identifier.charCodeAt(i)) || @@ -739,8 +736,8 @@ module ts { } function isAllPunctuation(identifier: string, start: number, end: number): boolean { - for (var i = start; i < end; i++) { - var ch = identifier.charCodeAt(i); + for (let i = start; i < end; i++) { + let ch = identifier.charCodeAt(i); // We don't consider _ or $ as punctuation as there may be things with that name. if (!charIsPunctuation(ch) || ch === CharacterCodes._ || ch === CharacterCodes.$) { @@ -761,8 +758,8 @@ module ts { // etc. if (index != wordStart && index + 1 < identifier.length) { - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1)); + let currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); + let nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1)); if (currentIsUpper && nextIsLower) { // We have a transition from an upper to a lower letter here. But we only @@ -773,7 +770,7 @@ module ts { // that follows. Note: this will make the following not split properly: // "HELLOthere". However, these sorts of names do not show up in .Net // programs. - for (var i = wordStart; i < index; i++) { + for (let i = wordStart; i < index; i++) { if (!isUpperCaseLetter(identifier.charCodeAt(i))) { return false; } @@ -788,8 +785,8 @@ module ts { } function transitionFromLowerToUpper(identifier: string, word: boolean, index: number): boolean { - var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); + let lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); + let currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); // See if the casing indicates we're starting a new word. Note: if we're breaking on // words, then just seeing an upper case character isn't enough. Instead, it has to @@ -804,7 +801,7 @@ module ts { // on characters would be: A M // // We break the search string on characters. But we break the symbol name on words. - var transition = word + let transition = word ? (currentIsUpper && !lastIsUpper) : currentIsUpper; return transition; diff --git a/src/services/services.ts b/src/services/services.ts index fc4d1eff223..1bf5f6336d4 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -11,7 +11,8 @@ /// module ts { - export var servicesVersion = "0.4" + /** The version of the language service API */ + export let servicesVersion = "0.4" export interface Node { getSourceFile(): SourceFile; @@ -123,12 +124,12 @@ module ts { isLibFile: boolean } - var scanner: Scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true); + let scanner: Scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true); - var emptyArray: any[] = []; + let emptyArray: any[] = []; function createNode(kind: SyntaxKind, pos: number, end: number, flags: NodeFlags, parent?: Node): NodeObject { - var node = new (getNodeConstructor(kind))(); + let node = new (getNodeConstructor(kind))(); node.pos = pos; node.end = end; node.flags = flags; @@ -183,8 +184,8 @@ module ts { private addSyntheticNodes(nodes: Node[], pos: number, end: number): number { scanner.setTextPos(pos); while (pos < end) { - var token = scanner.scan(); - var textPos = scanner.getTextPos(); + let token = scanner.scan(); + let textPos = scanner.getTextPos(); nodes.push(createNode(token, pos, textPos, NodeFlags.Synthetic, this)); pos = textPos; } @@ -192,11 +193,10 @@ module ts { } private createSyntaxList(nodes: NodeArray): Node { - var list = createNode(SyntaxKind.SyntaxList, nodes.pos, nodes.end, NodeFlags.Synthetic, this); + let list = createNode(SyntaxKind.SyntaxList, nodes.pos, nodes.end, NodeFlags.Synthetic, this); list._children = []; - var pos = nodes.pos; - for (var i = 0, len = nodes.length; i < len; i++) { - var node = nodes[i]; + let pos = nodes.pos; + for (let node of nodes) { if (pos < node.pos) { pos = this.addSyntheticNodes(list._children, pos, node.pos); } @@ -210,18 +210,19 @@ module ts { } private createChildren(sourceFile?: SourceFile) { + let children: Node[]; if (this.kind >= SyntaxKind.FirstNode) { scanner.setText((sourceFile || this.getSourceFile()).text); - var children: Node[] = []; - var pos = this.pos; - var processNode = (node: Node) => { + children = []; + let pos = this.pos; + let processNode = (node: Node) => { if (pos < node.pos) { pos = this.addSyntheticNodes(children, pos, node.pos); } children.push(node); pos = node.end; }; - var processNodes = (nodes: NodeArray) => { + let processNodes = (nodes: NodeArray) => { if (pos < nodes.pos) { pos = this.addSyntheticNodes(children, pos, nodes.pos); } @@ -253,9 +254,8 @@ module ts { } public getFirstToken(sourceFile?: SourceFile): Node { - var children = this.getChildren(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; + let children = this.getChildren(); + for (let child of children) { if (child.kind < SyntaxKind.FirstNode) { return child; } @@ -265,9 +265,9 @@ module ts { } public getLastToken(sourceFile?: SourceFile): Node { - var children = this.getChildren(sourceFile); - for (var i = children.length - 1; i >= 0; i--) { - var child = children[i]; + let children = this.getChildren(sourceFile); + for (let i = children.length - 1; i >= 0; i--) { + let child = children[i]; if (child.kind < SyntaxKind.FirstNode) { return child; } @@ -313,8 +313,8 @@ module ts { } function getJsDocCommentsFromDeclarations(declarations: Declaration[], name: string, canUseParsedParamTagComments: boolean) { - var documentationComment = []; - var docComments = getJsDocCommentsSeparatedByNewLines(); + let documentationComment = []; + let docComments = getJsDocCommentsSeparatedByNewLines(); ts.forEach(docComments, docComment => { if (documentationComment.length) { documentationComment.push(lineBreakPart()); @@ -325,22 +325,22 @@ module ts { return documentationComment; function getJsDocCommentsSeparatedByNewLines() { - var paramTag = "@param"; - var jsDocCommentParts: SymbolDisplayPart[] = []; + let paramTag = "@param"; + let jsDocCommentParts: SymbolDisplayPart[] = []; ts.forEach(declarations, (declaration, indexOfDeclaration) => { // Make sure we are collecting doc comment from declaration once, // In case of union property there might be same declaration multiple times // which only varies in type parameter - // Eg. var a: Array | Array; a.length + // Eg. let a: Array | Array; a.length // The property length will have two declarations of property length coming // from Array - Array and Array if (indexOf(declarations, declaration) === indexOfDeclaration) { - var sourceFileOfDeclaration = getSourceFileOfNode(declaration); + let sourceFileOfDeclaration = getSourceFileOfNode(declaration); // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments if (canUseParsedParamTagComments && declaration.kind === SyntaxKind.Parameter) { ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), jsDocCommentTextRange => { - var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); + let cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedParamJsDocComment) { jsDocCommentParts.push.apply(jsDocCommentParts, cleanedParamJsDocComment); } @@ -360,7 +360,7 @@ module ts { // Get the cleaned js doc comment text from the declaration ts.forEach(getJsDocCommentTextRange( declaration.kind === SyntaxKind.VariableDeclaration ? declaration.parent.parent : declaration, sourceFileOfDeclaration), jsDocCommentTextRange => { - var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); + let cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedJsDocComment) { jsDocCommentParts.push.apply(jsDocCommentParts, cleanedJsDocComment); } @@ -386,7 +386,7 @@ module ts { } for (; pos < end; pos++) { - var ch = sourceFile.text.charCodeAt(pos); + let ch = sourceFile.text.charCodeAt(pos); if (!isWhiteSpace(ch) || isLineBreak(ch)) { // Either found lineBreak or non whiteSpace return pos; @@ -423,19 +423,19 @@ module ts { } function getCleanedJsDocComment(pos: number, end: number, sourceFile: SourceFile) { - var spacesToRemoveAfterAsterisk: number; - var docComments: SymbolDisplayPart[] = []; - var blankLineCount = 0; - var isInParamTag = false; + let spacesToRemoveAfterAsterisk: number; + let docComments: SymbolDisplayPart[] = []; + let blankLineCount = 0; + let isInParamTag = false; while (pos < end) { - var docCommentTextOfLine = ""; + let docCommentTextOfLine = ""; // First consume leading white space pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile); // If the comment starts with '*' consume the spaces on this line if (pos < end && sourceFile.text.charCodeAt(pos) === CharacterCodes.asterisk) { - var lineStartPos = pos + 1; + let lineStartPos = pos + 1; pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, spacesToRemoveAfterAsterisk); // Set the spaces to remove after asterisk as margin if not already set @@ -449,7 +449,7 @@ module ts { // Analyse text on this line while (pos < end && !isLineBreak(sourceFile.text.charCodeAt(pos))) { - var ch = sourceFile.text.charAt(pos); + let ch = sourceFile.text.charAt(pos); if (ch === "@") { // If it is @param tag if (isParamTag(pos, end, sourceFile)) { @@ -487,12 +487,12 @@ module ts { } function getCleanedParamJsDocComment(pos: number, end: number, sourceFile: SourceFile) { - var paramHelpStringMargin: number; - var paramDocComments: SymbolDisplayPart[] = []; + let paramHelpStringMargin: number; + let paramDocComments: SymbolDisplayPart[] = []; while (pos < end) { if (isParamTag(pos, end, sourceFile)) { - var blankLineCount = 0; - var recordedParamTag = false; + let blankLineCount = 0; + let recordedParamTag = false; // Consume leading spaces pos = consumeWhiteSpaces(pos + paramTag.length); if (pos >= end) { @@ -502,8 +502,8 @@ module ts { // Ignore type expression if (sourceFile.text.charCodeAt(pos) === CharacterCodes.openBrace) { pos++; - for (var curlies = 1; pos < end; pos++) { - var charCode = sourceFile.text.charCodeAt(pos); + for (let curlies = 1; pos < end; pos++) { + let charCode = sourceFile.text.charCodeAt(pos); // { character means we need to find another } to match the found one if (charCode === CharacterCodes.openBrace) { @@ -546,10 +546,10 @@ module ts { break; } - var paramHelpString = ""; - var firstLineParamHelpStringPos = pos; + let paramHelpString = ""; + let firstLineParamHelpStringPos = pos; while (pos < end) { - var ch = sourceFile.text.charCodeAt(pos); + let ch = sourceFile.text.charCodeAt(pos); // at line break, set this comment line text and go to next line if (isLineBreak(ch)) { @@ -618,15 +618,15 @@ module ts { } // Now consume white spaces max - var startOfLinePos = pos; + let startOfLinePos = pos; pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile, paramHelpStringMargin); if (pos >= end) { return; } - var consumedSpaces = pos - startOfLinePos; + let consumedSpaces = pos - startOfLinePos; if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); + let ch = sourceFile.text.charCodeAt(pos); if (ch === CharacterCodes.asterisk) { // Consume more spaces after asterisk pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); @@ -766,18 +766,18 @@ module ts { public getNamedDeclarations() { if (!this.namedDeclarations) { - var sourceFile = this; - var namedDeclarations: Declaration[] = []; + let sourceFile = this; + let namedDeclarations: Declaration[] = []; forEachChild(sourceFile, function visit(node: Node): void { switch (node.kind) { case SyntaxKind.FunctionDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: - var functionDeclaration = node; + let functionDeclaration = node; if (functionDeclaration.name && functionDeclaration.name.getFullWidth() > 0) { - var lastDeclaration = namedDeclarations.length > 0 ? + let lastDeclaration = namedDeclarations.length > 0 ? namedDeclarations[namedDeclarations.length - 1] : undefined; @@ -857,7 +857,7 @@ module ts { break; case SyntaxKind.ImportDeclaration: - var importClause = (node).importClause; + let importClause = (node).importClause; if (importClause) { // Handle default import case e.g.: // import d from "mod"; @@ -1325,7 +1325,7 @@ module ts { static enumElement = "enum"; // Inside module and script only - // var v = .. + // let v = .. static variableElement = "var"; // Inside function @@ -1469,7 +1469,7 @@ module ts { } // If the parent is not sourceFile or module block it is local variable - for (var parent = declaration.parent; !isFunctionBlock(parent); parent = parent.parent) { + for (let parent = declaration.parent; !isFunctionBlock(parent); parent = parent.parent) { // Reached source file or module block if (parent.kind === SyntaxKind.SourceFile || parent.kind === SyntaxKind.ModuleBlock) { return false; @@ -1521,9 +1521,9 @@ module ts { this.fileNameToEntry = {}; // Initialize the list with the root file names - var rootFileNames = host.getScriptFileNames(); - for (var i = 0, n = rootFileNames.length; i < n; i++) { - this.createEntry(rootFileNames[i]); + let rootFileNames = host.getScriptFileNames(); + for (let fileName of rootFileNames) { + this.createEntry(fileName); } // store the compilation settings @@ -1535,8 +1535,8 @@ module ts { } private createEntry(fileName: string) { - var entry: HostFileInformation; - var scriptSnapshot = this.host.getScriptSnapshot(fileName); + let entry: HostFileInformation; + let scriptSnapshot = this.host.getScriptSnapshot(fileName); if (scriptSnapshot) { entry = { hostFileName: fileName, @@ -1565,7 +1565,7 @@ module ts { } public getRootFileNames(): string[] { - var fileNames: string[] = []; + let fileNames: string[] = []; forEachKey(this.fileNameToEntry, key => { if (hasProperty(this.fileNameToEntry, key) && this.fileNameToEntry[key]) @@ -1576,12 +1576,12 @@ module ts { } public getVersion(fileName: string): string { - var file = this.getEntry(fileName); + let file = this.getEntry(fileName); return file && file.version; } public getScriptSnapshot(fileName: string): IScriptSnapshot { - var file = this.getEntry(fileName); + let file = this.getEntry(fileName); return file && file.scriptSnapshot; } } @@ -1598,14 +1598,14 @@ module ts { } public getCurrentSourceFile(fileName: string): SourceFile { - var scriptSnapshot = this.host.getScriptSnapshot(fileName); + let scriptSnapshot = this.host.getScriptSnapshot(fileName); if (!scriptSnapshot) { // The host does not know about this file. throw new Error("Could not find file: '" + fileName + "'."); } - var version = this.host.getScriptVersion(fileName); - var sourceFile: SourceFile; + let version = this.host.getScriptVersion(fileName); + let sourceFile: SourceFile; if (this.currentFileName !== fileName) { // This is a new file, just parse it @@ -1613,7 +1613,7 @@ module ts { } else if (this.currentFileVersion !== version) { // This is the same file, just a newer version. Incrementally parse the file. - var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); + let editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); } @@ -1635,14 +1635,14 @@ module ts { } export function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile { - var sourceFile = createSourceFile(fileName, scriptSnapshot.getText(0, scriptSnapshot.getLength()), scriptTarget, setNodeParents); + let sourceFile = createSourceFile(fileName, scriptSnapshot.getText(0, scriptSnapshot.getLength()), scriptTarget, setNodeParents); setSourceFileFields(sourceFile, scriptSnapshot, version); // after full parsing we can use table with interned strings as name table sourceFile.nameTable = sourceFile.identifiers; return sourceFile; } - export var disableIncrementalParsing = false; + export let disableIncrementalParsing = false; export function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { // If we were given a text change range, and our version or open-ness changed, then @@ -1651,7 +1651,7 @@ module ts { if (version !== sourceFile.version) { // Once incremental parsing is ready, then just call into this function. if (!disableIncrementalParsing) { - var newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange, aggressiveChecks); + let newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange, aggressiveChecks); setSourceFileFields(newSourceFile, scriptSnapshot, version); // after incremental parsing nameTable might not be up-to-date // drop it so it can be lazily recreated later @@ -1668,15 +1668,15 @@ module ts { export function createDocumentRegistry(): DocumentRegistry { // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. - var buckets: Map> = {}; + let buckets: Map> = {}; function getKeyFromCompilationSettings(settings: CompilerOptions): string { return "_" + settings.target; // + "|" + settings.propagateEnumConstantoString() } function getBucketForCompilationSettings(settings: CompilerOptions, createIfMissing: boolean): Map { - var key = getKeyFromCompilationSettings(settings); - var bucket = lookUp(buckets, key); + let key = getKeyFromCompilationSettings(settings); + let bucket = lookUp(buckets, key); if (!bucket && createIfMissing) { buckets[key] = bucket = {}; } @@ -1684,11 +1684,11 @@ module ts { } function reportStats() { - var bucketInfoArray = Object.keys(buckets).filter(name => name && name.charAt(0) === '_').map(name => { - var entries = lookUp(buckets, name); - var sourceFiles: { name: string; refCount: number; references: string[]; }[] = []; - for (var i in entries) { - var entry = entries[i]; + let bucketInfoArray = Object.keys(buckets).filter(name => name && name.charAt(0) === '_').map(name => { + let entries = lookUp(buckets, name); + let sourceFiles: { name: string; refCount: number; references: string[]; }[] = []; + for (let i in entries) { + let entry = entries[i]; sourceFiles.push({ name: i, refCount: entry.languageServiceRefCount, @@ -1719,13 +1719,13 @@ module ts { version: string, acquiring: boolean): SourceFile { - var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); - var entry = lookUp(bucket, fileName); + let bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); + let entry = lookUp(bucket, fileName); if (!entry) { Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); // Have never seen this file with these settings. Create a new source file for it. - var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, /*setNodeParents:*/ false); + let sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, /*setNodeParents:*/ false); bucket[fileName] = entry = { sourceFile: sourceFile, @@ -1756,10 +1756,10 @@ module ts { } function releaseDocument(fileName: string, compilationSettings: CompilerOptions): void { - var bucket = getBucketForCompilationSettings(compilationSettings, false); + let bucket = getBucketForCompilationSettings(compilationSettings, false); Debug.assert(bucket !== undefined); - var entry = lookUp(bucket, fileName); + let entry = lookUp(bucket, fileName); entry.languageServiceRefCount--; Debug.assert(entry.languageServiceRefCount >= 0); @@ -1777,18 +1777,18 @@ module ts { } export function preProcessFile(sourceText: string, readImportFiles = true): PreProcessedFileInfo { - var referencedFiles: FileReference[] = []; - var importedFiles: FileReference[] = []; - var isNoDefaultLib = false; + let referencedFiles: FileReference[] = []; + let importedFiles: FileReference[] = []; + let isNoDefaultLib = false; function processTripleSlashDirectives(): void { - var commentRanges = getLeadingCommentRanges(sourceText, 0); + let commentRanges = getLeadingCommentRanges(sourceText, 0); forEach(commentRanges, commentRange => { - var comment = sourceText.substring(commentRange.pos, commentRange.end); - var referencePathMatchResult = getFileReferenceFromReferencePath(comment, commentRange); + let comment = sourceText.substring(commentRange.pos, commentRange.end); + let referencePathMatchResult = getFileReferenceFromReferencePath(comment, commentRange); if (referencePathMatchResult) { isNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var fileReference = referencePathMatchResult.fileReference; + let fileReference = referencePathMatchResult.fileReference; if (fileReference) { referencedFiles.push(fileReference); } @@ -1797,8 +1797,8 @@ module ts { } function recordModuleName() { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); + let importPath = scanner.getTokenValue(); + let pos = scanner.getTokenPos(); importedFiles.push({ fileName: importPath, pos: pos, @@ -1808,7 +1808,7 @@ module ts { function processImport(): void { scanner.setText(sourceText); - var token = scanner.scan(); + let token = scanner.scan(); // Look for: // import "mod"; // import d from "mod" @@ -1973,7 +1973,7 @@ module ts { * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node: Node, labelName: string) { - for (var owner = node.parent; owner.kind === SyntaxKind.LabeledStatement; owner = owner.parent) { + for (let owner = node.parent; owner.kind === SyntaxKind.LabeledStatement; owner = owner.parent) { if ((owner).label.text === labelName) { return true; } @@ -2014,7 +2014,7 @@ module ts { function isNameOfFunctionDeclaration(node: Node): boolean { return node.kind === SyntaxKind.Identifier && - isAnyFunction(node.parent) && (node.parent).name === node; + isFunctionLike(node.parent) && (node.parent).name === node; } /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ @@ -2067,8 +2067,8 @@ module ts { return true; } else if (position === comment.end) { - var text = sourceFile.text; - var width = comment.end - comment.pos; + let text = sourceFile.text; + let width = comment.end - comment.pos; // is single line comment or just /* if (width <= 2 || text.charCodeAt(comment.pos + 1) === CharacterCodes.slash) { return true; @@ -2100,8 +2100,8 @@ module ts { } // A cache of completion entries for keywords, these do not change between sessions - var keywordCompletions: CompletionEntry[] = []; - for (var i = SyntaxKind.FirstKeyword; i <= SyntaxKind.LastKeyword; i++) { + let keywordCompletions: CompletionEntry[] = []; + for (let i = SyntaxKind.FirstKeyword; i <= SyntaxKind.LastKeyword; i++) { keywordCompletions.push({ name: tokenToString(i), kind: ScriptElementKind.keyword, @@ -2172,15 +2172,15 @@ module ts { } export function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry = createDocumentRegistry()): LanguageService { - var syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); - var ruleProvider: formatting.RulesProvider; - var program: Program; + let syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); + let ruleProvider: formatting.RulesProvider; + let program: Program; // this checker is used to answer all LS questions except errors - var typeInfoResolver: TypeChecker; - var useCaseSensitivefileNames = false; - var cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); - var activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details + let typeInfoResolver: TypeChecker; + let useCaseSensitivefileNames = false; + let cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); + let activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details // Check if the localized messages json is set, otherwise query the host for it if (!localizedDiagnosticMessages && host.getLocalizedDiagnosticMessages) { @@ -2199,7 +2199,7 @@ module ts { function getValidSourceFile(fileName: string): SourceFile { fileName = normalizeSlashes(fileName); - var sourceFile = program.getSourceFile(getCanonicalFileName(fileName)); + let sourceFile = program.getSourceFile(getCanonicalFileName(fileName)); if (!sourceFile) { throw new Error("Could not find file: '" + fileName + "'."); } @@ -2218,7 +2218,7 @@ module ts { function synchronizeHostData(): void { // Get a fresh cache of the host information - var hostCache = new HostCache(host); + let hostCache = new HostCache(host); // If the program is already up-to-date, we can reuse it if (programUpToDate()) { @@ -2231,12 +2231,12 @@ module ts { // the program points to old source files that have been invalidated because of // incremental parsing. - var oldSettings = program && program.getCompilerOptions(); - var newSettings = hostCache.compilationSettings(); - var changesInCompilationSettingsAffectSyntax = oldSettings && oldSettings.target !== newSettings.target; + let oldSettings = program && program.getCompilerOptions(); + let newSettings = hostCache.compilationSettings(); + let changesInCompilationSettingsAffectSyntax = oldSettings && oldSettings.target !== newSettings.target; // Now create a new compiler - var newProgram = createProgram(hostCache.getRootFileNames(), newSettings, { + let newProgram = createProgram(hostCache.getRootFileNames(), newSettings, { getSourceFile: getOrCreateSourceFile, getCancellationToken: () => cancellationToken, getCanonicalFileName: (fileName) => useCaseSensitivefileNames ? fileName : fileName.toLowerCase(), @@ -2250,9 +2250,9 @@ module ts { // Release any files we have acquired in the old program but are // not part of the new program. if (program) { - var oldSourceFiles = program.getSourceFiles(); - for (var i = 0, n = oldSourceFiles.length; i < n; i++) { - var fileName = oldSourceFiles[i].fileName; + let oldSourceFiles = program.getSourceFiles(); + for (let oldSourceFile of oldSourceFiles) { + let fileName = oldSourceFile.fileName; if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { documentRegistry.releaseDocument(fileName, oldSettings); } @@ -2268,7 +2268,7 @@ module ts { // The program is asking for this file, check first if the host can locate it. // If the host can not locate the file, then it does not exist. return undefined // to the program to allow reporting of errors for missing files. - var hostFileInformation = hostCache.getOrCreateEntry(fileName); + let hostFileInformation = hostCache.getOrCreateEntry(fileName); if (!hostFileInformation) { return undefined; } @@ -2278,7 +2278,7 @@ module ts { // can not be reused. we have to dump all syntax trees and create new ones. if (!changesInCompilationSettingsAffectSyntax) { // Check if the old program had this file already - var oldSourceFile = program && program.getSourceFile(fileName); + let oldSourceFile = program && program.getSourceFile(fileName); if (oldSourceFile) { // We already had a source file for this file name. Go to the registry to // ensure that we get the right up to date version of it. We need this to @@ -2322,14 +2322,14 @@ module ts { } // If number of files in the program do not match, it is not up-to-date - var rootFileNames = hostCache.getRootFileNames(); + let rootFileNames = hostCache.getRootFileNames(); if (program.getSourceFiles().length !== rootFileNames.length) { return false; } // If any file is not up-to-date, then the whole program is not up-to-date - for (var i = 0, n = rootFileNames.length; i < n; i++) { - if (!sourceFileUpToDate(program.getSourceFile(rootFileNames[i]))) { + for (let fileName of rootFileNames) { + if (!sourceFileUpToDate(program.getSourceFile(fileName))) { return false; } } @@ -2377,18 +2377,18 @@ module ts { function getSemanticDiagnostics(fileName: string) { synchronizeHostData(); - var targetSourceFile = getValidSourceFile(fileName); + let targetSourceFile = getValidSourceFile(fileName); // 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. - var semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile); + let semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile); if (!program.getCompilerOptions().declaration) { return semanticDiagnostics; } // If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface - var declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile); + let declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile); return semanticDiagnostics.concat(declarationDiagnostics); } @@ -2399,13 +2399,13 @@ module ts { /// Completion function getValidCompletionEntryDisplayName(symbol: Symbol, target: ScriptTarget): string { - var displayName = symbol.getName(); + let displayName = symbol.getName(); if (displayName && displayName.length > 0) { - var firstCharCode = displayName.charCodeAt(0); + let firstCharCode = displayName.charCodeAt(0); // First check of the displayName is not external module; if it is an external module, it is not valid entry if ((symbol.flags & SymbolFlags.Namespace) && (firstCharCode === CharacterCodes.singleQuote || firstCharCode === CharacterCodes.doubleQuote)) { // If the symbol is external module, don't show it in the completion list - // (i.e declare module "http" { var x; } | // <= request completion here, "http" should not be there) + // (i.e declare module "http" { let x; } | // <= request completion here, "http" should not be there) return undefined; } @@ -2416,8 +2416,8 @@ module ts { displayName = displayName.substring(1, displayName.length - 1); } - var isValid = isIdentifierStart(displayName.charCodeAt(0), target); - for (var i = 1, n = displayName.length; isValid && i < n; i++) { + let isValid = isIdentifierStart(displayName.charCodeAt(0), target); + for (let i = 1, n = displayName.length; isValid && i < n; i++) { isValid = isIdentifierPart(displayName.charCodeAt(i), target); } @@ -2434,7 +2434,7 @@ module ts { // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed with a dot (a.1 <- invalid) - var displayName = getValidCompletionEntryDisplayName(symbol, program.getCompilerOptions().target); + let displayName = getValidCompletionEntryDisplayName(symbol, program.getCompilerOptions().target); if (!displayName) { return undefined; } @@ -2453,16 +2453,16 @@ module ts { function getCompletionsAtPosition(fileName: string, position: number) { synchronizeHostData(); - var syntacticStart = new Date().getTime(); - var sourceFile = getValidSourceFile(fileName); + let syntacticStart = new Date().getTime(); + let sourceFile = getValidSourceFile(fileName); - var start = new Date().getTime(); - var currentToken = getTokenAtPosition(sourceFile, position); + let start = new Date().getTime(); + let currentToken = getTokenAtPosition(sourceFile, position); log("getCompletionsAtPosition: Get current token: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); // Completion not allowed inside comments, bail out if this is the case - var insideComment = isInsideComment(sourceFile, currentToken, position); + let insideComment = isInsideComment(sourceFile, currentToken, position); log("getCompletionsAtPosition: Is inside comment: " + (new Date().getTime() - start)); if (insideComment) { @@ -2472,14 +2472,14 @@ module ts { // The decision to provide completion depends on the previous token, so find it // Note: previousToken can be undefined if we are the beginning of the file - var start = new Date().getTime(); - var previousToken = findPrecedingToken(position, sourceFile); + start = new Date().getTime(); + let previousToken = findPrecedingToken(position, sourceFile); log("getCompletionsAtPosition: Get previous token 1: " + (new Date().getTime() - start)); // The caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS| // Skip this partial identifier to the previous token if (previousToken && position <= previousToken.end && previousToken.kind === SyntaxKind.Identifier) { - var start = new Date().getTime(); + let start = new Date().getTime(); previousToken = findPrecedingToken(previousToken.pos, sourceFile); log("getCompletionsAtPosition: Get previous token 2: " + (new Date().getTime() - start)); } @@ -2492,8 +2492,8 @@ module ts { // Find the node where completion is requested on, in the case of a completion after a dot, it is the member access expression // other wise, it is a request for all visible symbols in the scope, and the node is the current location - var node: Node; - var isRightOfDot: boolean; + let node: Node; + let isRightOfDot: boolean; if (previousToken && previousToken.kind === SyntaxKind.DotToken && previousToken.parent.kind === SyntaxKind.PropertyAccessExpression) { node = (previousToken.parent).expression; isRightOfDot = true; @@ -2517,20 +2517,23 @@ module ts { }; log("getCompletionsAtPosition: Syntactic work: " + (new Date().getTime() - syntacticStart)); - var location = getTouchingPropertyName(sourceFile, position); + let location = getTouchingPropertyName(sourceFile, position); // Populate the completion list - var semanticStart = new Date().getTime(); + let semanticStart = new Date().getTime(); + let isMemberCompletion: boolean; + let isNewIdentifierLocation: boolean; + if (isRightOfDot) { // Right of dot member completion list - var symbols: Symbol[] = []; - var isMemberCompletion = true; - var isNewIdentifierLocation = false; + let symbols: Symbol[] = []; + isMemberCompletion = true; + isNewIdentifierLocation = false; if (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression) { - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); // This is an alias, follow what it aliases - if (symbol && symbol.flags & SymbolFlags.Import) { + if (symbol && symbol.flags & SymbolFlags.Alias) { symbol = typeInfoResolver.getAliasedSymbol(symbol); } @@ -2544,7 +2547,7 @@ module ts { } } - var type = typeInfoResolver.getTypeAtLocation(node); + let type = typeInfoResolver.getTypeAtLocation(node); if (type) { // Filter private properties forEach(type.getApparentProperties(), symbol => { @@ -2557,21 +2560,21 @@ module ts { getCompletionEntriesFromSymbols(symbols, activeCompletionSession); } else { - var containingObjectLiteral = getContainingObjectLiteralApplicableForCompletion(previousToken); + let containingObjectLiteral = getContainingObjectLiteralApplicableForCompletion(previousToken); if (containingObjectLiteral) { // Object literal expression, look up possible property names from contextual type isMemberCompletion = true; isNewIdentifierLocation = true; - var contextualType = typeInfoResolver.getContextualType(containingObjectLiteral); + let contextualType = typeInfoResolver.getContextualType(containingObjectLiteral); if (!contextualType) { return undefined; } - var contextualTypeMembers = typeInfoResolver.getPropertiesOfType(contextualType); + let contextualTypeMembers = typeInfoResolver.getPropertiesOfType(contextualType); if (contextualTypeMembers && contextualTypeMembers.length > 0) { // Add filtered items to the completion list - var filteredMembers = filterContextualMembersList(contextualTypeMembers, containingObjectLiteral.properties); + let filteredMembers = filterContextualMembersList(contextualTypeMembers, containingObjectLiteral.properties); getCompletionEntriesFromSymbols(filteredMembers, activeCompletionSession); } } @@ -2581,10 +2584,10 @@ module ts { isMemberCompletion = true; isNewIdentifierLocation = true; if (showCompletionsInImportsClause(previousToken)) { - var importDeclaration = getAncestor(previousToken, SyntaxKind.ImportDeclaration); + let importDeclaration = getAncestor(previousToken, SyntaxKind.ImportDeclaration); Debug.assert(importDeclaration !== undefined); - var exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); - var filteredExports = filterModuleExports(exports, importDeclaration); + let exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); + let filteredExports = filterModuleExports(exports, importDeclaration); getCompletionEntriesFromSymbols(filteredExports, activeCompletionSession); } } @@ -2594,8 +2597,8 @@ module ts { isNewIdentifierLocation = isNewIdentifierDefinitionLocation(previousToken); /// TODO filter meaning based on the current context - var symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Import; - var symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); + let symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Alias; + let symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); getCompletionEntriesFromSymbols(symbols, activeCompletionSession); } @@ -2615,11 +2618,11 @@ module ts { }; function getCompletionEntriesFromSymbols(symbols: Symbol[], session: CompletionSession): void { - var start = new Date().getTime(); + let start = new Date().getTime(); forEach(symbols, symbol => { - var entry = createCompletionEntry(symbol, session.typeChecker, location); + let entry = createCompletionEntry(symbol, session.typeChecker, location); if (entry) { - var id = escapeIdentifier(entry.name); + let id = escapeIdentifier(entry.name); if (!lookUp(session.symbols, id)) { session.entries.push(entry); session.symbols[id] = symbol; @@ -2630,8 +2633,8 @@ module ts { } function isCompletionListBlocker(previousToken: Node): boolean { - var start = new Date().getTime(); - var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || + let start = new Date().getTime(); + let result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || isIdentifierDefinitionLocation(previousToken) || isRightOfIllegalDot(previousToken); log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); @@ -2652,21 +2655,21 @@ module ts { function isNewIdentifierDefinitionLocation(previousToken: Node): boolean { if (previousToken) { - var containingNodeKind = previousToken.parent.kind; + let containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case SyntaxKind.CommaToken: return containingNodeKind === SyntaxKind.CallExpression // func( a, | || containingNodeKind === SyntaxKind.Constructor // constructor( a, | public, protected, private keywords are allowed here, so show completion || containingNodeKind === SyntaxKind.NewExpression // new C(a, | || containingNodeKind === SyntaxKind.ArrayLiteralExpression // [a, | - || containingNodeKind === SyntaxKind.BinaryExpression; // var x = (a, | + || containingNodeKind === SyntaxKind.BinaryExpression; // let x = (a, | case SyntaxKind.OpenParenToken: return containingNodeKind === SyntaxKind.CallExpression // func( | || containingNodeKind === SyntaxKind.Constructor // constructor( | || containingNodeKind === SyntaxKind.NewExpression // new C(a| - || containingNodeKind === SyntaxKind.ParenthesizedExpression; // var x = (a| + || containingNodeKind === SyntaxKind.ParenthesizedExpression; // let x = (a| case SyntaxKind.OpenBracketToken: return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ | @@ -2681,7 +2684,7 @@ module ts { return containingNodeKind === SyntaxKind.ClassDeclaration; // class A{ | case SyntaxKind.EqualsToken: - return containingNodeKind === SyntaxKind.VariableDeclaration // var x = a| + return containingNodeKind === SyntaxKind.VariableDeclaration // let x = a| || containingNodeKind === SyntaxKind.BinaryExpression; // x = a| case SyntaxKind.TemplateHead: @@ -2714,8 +2717,8 @@ module ts { || isTemplateLiteralKind(previousToken.kind)) { // The position has to be either: 1. entirely within the token text, or // 2. at the end position of an unterminated token. - var start = previousToken.getStart(); - var end = previousToken.getEnd(); + let start = previousToken.getStart(); + let end = previousToken.getEnd(); if (start < position && position < end) { return true; @@ -2732,11 +2735,11 @@ module ts { // The locations in an object literal expression that are applicable for completion are property name definition locations. if (previousToken) { - var parent = previousToken.parent; + let parent = previousToken.parent; switch (previousToken.kind) { - case SyntaxKind.OpenBraceToken: // var x = { | - case SyntaxKind.CommaToken: // var x = { a: 0, | + case SyntaxKind.OpenBraceToken: // let x = { | + case SyntaxKind.CommaToken: // let x = { a: 0, | if (parent && parent.kind === SyntaxKind.ObjectLiteralExpression) { return parent; } @@ -2766,7 +2769,7 @@ module ts { function isIdentifierDefinitionLocation(previousToken: Node): boolean { if (previousToken) { - var containingNodeKind = previousToken.parent.kind; + let containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case SyntaxKind.CommaToken: return containingNodeKind === SyntaxKind.VariableDeclaration || @@ -2793,13 +2796,13 @@ module ts { case SyntaxKind.OpenBraceToken: return containingNodeKind === SyntaxKind.EnumDeclaration || // enum a { | containingNodeKind === SyntaxKind.InterfaceDeclaration || // interface a { | - containingNodeKind === SyntaxKind.TypeLiteral || // var x : { | + containingNodeKind === SyntaxKind.TypeLiteral || // let x : { | containingNodeKind === SyntaxKind.ObjectBindingPattern; // function func({ x| case SyntaxKind.SemicolonToken: return containingNodeKind === SyntaxKind.PropertySignature && (previousToken.parent.parent.kind === SyntaxKind.InterfaceDeclaration || // interface a { f; | - previousToken.parent.parent.kind === SyntaxKind.TypeLiteral); // var x : { a; | + previousToken.parent.parent.kind === SyntaxKind.TypeLiteral); // let x : { a; | case SyntaxKind.LessThanToken: return containingNodeKind === SyntaxKind.ClassDeclaration || // class A< | @@ -2854,7 +2857,7 @@ module ts { function isRightOfIllegalDot(previousToken: Node): boolean { if (previousToken && previousToken.kind === SyntaxKind.NumericLiteral) { - var text = previousToken.getFullText(); + let text = previousToken.getFullText(); return text.charAt(text.length - 1) === "."; } @@ -2862,7 +2865,7 @@ module ts { } function filterModuleExports(exports: Symbol[], importDeclaration: ImportDeclaration): Symbol[] { - var exisingImports: Map = {}; + let exisingImports: Map = {}; if (!importDeclaration.importClause) { return exports; @@ -2872,7 +2875,7 @@ module ts { importDeclaration.importClause.namedBindings.kind === SyntaxKind.NamedImports) { forEach((importDeclaration.importClause.namedBindings).elements, el => { - var name = el.propertyName || el.name; + let name = el.propertyName || el.name; exisingImports[name.text] = true; }); } @@ -2888,7 +2891,7 @@ module ts { return contextualMemberSymbols; } - var existingMemberNames: Map = {}; + let existingMemberNames: Map = {}; forEach(existingMembers, m => { if (m.kind !== SyntaxKind.PropertyAssignment && m.kind !== SyntaxKind.ShorthandPropertyAssignment) { // Ignore omitted expressions for missing members in the object literal @@ -2904,7 +2907,7 @@ module ts { existingMemberNames[(m.name).text] = true; }); - var filteredMembers: Symbol[] = []; + let filteredMembers: Symbol[] = []; forEach(contextualMemberSymbols, s => { if (!existingMemberNames[s.name]) { filteredMembers.push(s); @@ -2918,25 +2921,25 @@ module ts { function getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails { // Note: No need to call synchronizeHostData, as we have captured all the data we need // in the getCompletionsAtPosition earlier - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var session = activeCompletionSession; + let session = activeCompletionSession; // Ensure that the current active completion session is still valid for this request if (!session || session.fileName !== fileName || session.position !== position) { return undefined; } - var symbol = lookUp(activeCompletionSession.symbols, escapeIdentifier(entryName)); + let symbol = lookUp(activeCompletionSession.symbols, escapeIdentifier(entryName)); if (symbol) { - var location = getTouchingPropertyName(sourceFile, position); - var completionEntry = createCompletionEntry(symbol, session.typeChecker, location); + let location = getTouchingPropertyName(sourceFile, position); + let completionEntry = createCompletionEntry(symbol, session.typeChecker, location); // TODO(drosen): Right now we just permit *all* semantic meanings when calling 'getSymbolKind' // which is permissible given that it is backwards compatible; but really we should consider // passing the meaning for the node so that we don't report that a suggestion for a value is an interface. // We COULD also just do what 'getSymbolModifiers' does, which is to use the first declaration. Debug.assert(session.typeChecker.getTypeOfSymbolAtLocation(symbol, location) !== undefined, "Could not find type for symbol"); - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location, session.typeChecker, location, SemanticMeaning.All); + let displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location, session.typeChecker, location, SemanticMeaning.All); return { name: entryName, kind: displayPartsDocumentationsAndSymbolKind.symbolKind, @@ -2959,7 +2962,7 @@ module ts { // TODO(drosen): use contextual SemanticMeaning. function getSymbolKind(symbol: Symbol, typeResolver: TypeChecker, location: Node): string { - var flags = symbol.getFlags(); + let flags = symbol.getFlags(); if (flags & SymbolFlags.Class) return ScriptElementKind.classElement; if (flags & SymbolFlags.Enum) return ScriptElementKind.enumElement; @@ -2967,11 +2970,11 @@ module ts { if (flags & SymbolFlags.Interface) return ScriptElementKind.interfaceElement; if (flags & SymbolFlags.TypeParameter) return ScriptElementKind.typeParameterElement; - var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver, location); + let result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver, location); if (result === ScriptElementKind.unknown) { if (flags & SymbolFlags.TypeParameter) return ScriptElementKind.typeParameterElement; if (flags & SymbolFlags.EnumMember) return ScriptElementKind.variableElement; - if (flags & SymbolFlags.Import) return ScriptElementKind.alias; + if (flags & SymbolFlags.Alias) return ScriptElementKind.alias; if (flags & SymbolFlags.Module) return ScriptElementKind.moduleElement; } @@ -3006,8 +3009,8 @@ module ts { if (flags & SymbolFlags.Property) { if (flags & SymbolFlags.UnionProperty) { // If union property is result of union of non method (property/accessors/variables), it is labeled as property - var unionPropertyKind = forEach(typeInfoResolver.getRootSymbols(symbol), rootSymbol => { - var rootSymbolFlags = rootSymbol.getFlags(); + let unionPropertyKind = forEach(typeInfoResolver.getRootSymbols(symbol), rootSymbol => { + let rootSymbolFlags = rootSymbol.getFlags(); if (rootSymbolFlags & (SymbolFlags.PropertyOrAccessor | SymbolFlags.Variable)) { return ScriptElementKind.memberVariableElement; } @@ -3016,7 +3019,7 @@ module ts { if (!unionPropertyKind) { // If this was union of all methods, //make sure it has call signatures before we can label it as method - var typeOfUnionProperty = typeInfoResolver.getTypeOfSymbolAtLocation(symbol, location); + let typeOfUnionProperty = typeInfoResolver.getTypeOfSymbolAtLocation(symbol, location); if (typeOfUnionProperty.getCallSignatures().length) { return ScriptElementKind.memberFunctionElement; } @@ -3031,7 +3034,7 @@ module ts { } function getTypeKind(type: Type): string { - var flags = type.getFlags(); + let flags = type.getFlags(); if (flags & TypeFlags.Enum) return ScriptElementKind.enumElement; if (flags & TypeFlags.Class) return ScriptElementKind.classElement; @@ -3053,22 +3056,24 @@ module ts { typeResolver: TypeChecker, location: Node, // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location semanticMeaning = getMeaningFromLocation(location)) { - var displayParts: SymbolDisplayPart[] = []; - var documentation: SymbolDisplayPart[]; - var symbolFlags = symbol.flags; - var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); - var hasAddedSymbolInfo: boolean; + let displayParts: SymbolDisplayPart[] = []; + let documentation: SymbolDisplayPart[]; + let symbolFlags = symbol.flags; + let symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); + let hasAddedSymbolInfo: boolean; + let type: Type; // Class at constructor site need to be shown as constructor apart from property,method, vars - if (symbolKind !== ScriptElementKind.unknown || symbolFlags & SymbolFlags.Class || symbolFlags & SymbolFlags.Import) { + if (symbolKind !== ScriptElementKind.unknown || symbolFlags & SymbolFlags.Class || symbolFlags & SymbolFlags.Alias) { // If it is accessor they are allowed only if location is at name of the accessor if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { symbolKind = ScriptElementKind.memberVariableElement; } - var type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); + let signature: Signature; + type = typeResolver.getTypeOfSymbolAtLocation(symbol, location); if (type) { if (location.parent && location.parent.kind === SyntaxKind.PropertyAccessExpression) { - var right = (location.parent).name; + let right = (location.parent).name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { location = location.parent; @@ -3076,7 +3081,7 @@ module ts { } // try get the call/construct signature from the type if it matches - var callExpression: CallExpression; + let callExpression: CallExpression; if (location.kind === SyntaxKind.CallExpression || location.kind === SyntaxKind.NewExpression) { callExpression = location; } @@ -3085,15 +3090,15 @@ module ts { } if (callExpression) { - var candidateSignatures: Signature[] = []; + let candidateSignatures: Signature[] = []; signature = typeResolver.getResolvedSignature(callExpression, candidateSignatures); if (!signature && candidateSignatures.length) { // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === SyntaxKind.NewExpression || callExpression.expression.kind === SyntaxKind.SuperKeyword; - var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); + let useConstructSignatures = callExpression.kind === SyntaxKind.NewExpression || callExpression.expression.kind === SyntaxKind.SuperKeyword; + let allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!contains(allSignatures, signature.target || signature)) { // Get the first signature if there @@ -3106,7 +3111,7 @@ module ts { symbolKind = ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } - else if (symbolFlags & SymbolFlags.Import) { + else if (symbolFlags & SymbolFlags.Alias) { symbolKind = ScriptElementKind.alias; displayParts.push(punctuationPart(SyntaxKind.OpenParenToken)); displayParts.push(textPart(symbolKind)); @@ -3152,9 +3157,8 @@ module ts { else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & SymbolFlags.Accessor)) || // name of function declaration (location.kind === SyntaxKind.ConstructorKeyword && location.parent.kind === SyntaxKind.Constructor)) { // At constructor keyword of constructor declaration // get the signature from the declaration and write it - var signature: Signature; - var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === SyntaxKind.Constructor ? type.getConstructSignatures() : type.getCallSignatures(); + let functionDeclaration = location.parent; + let allSignatures = functionDeclaration.kind === SyntaxKind.Constructor ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeResolver.isImplementationOfOverload(functionDeclaration)) { signature = typeResolver.getSignatureFromDeclaration(functionDeclaration); } @@ -3234,8 +3238,8 @@ module ts { } else { // Method/function type parameter - var signatureDeclaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter).parent; - var signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); + let signatureDeclaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter).parent; + let signature = typeResolver.getSignatureFromDeclaration(signatureDeclaration); if (signatureDeclaration.kind === SyntaxKind.ConstructSignature) { displayParts.push(keywordPart(SyntaxKind.NewKeyword)); displayParts.push(spacePart()); @@ -3248,9 +3252,9 @@ module ts { } if (symbolFlags & SymbolFlags.EnumMember) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); - var declaration = symbol.declarations[0]; + let declaration = symbol.declarations[0]; if (declaration.kind === SyntaxKind.EnumMember) { - var constantValue = typeResolver.getConstantValue(declaration); + let constantValue = typeResolver.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(spacePart()); displayParts.push(operatorPart(SyntaxKind.EqualsToken)); @@ -3259,14 +3263,14 @@ module ts { } } } - if (symbolFlags & SymbolFlags.Import) { + if (symbolFlags & SymbolFlags.Alias) { addNewLineIfDisplayPartsExist(); displayParts.push(keywordPart(SyntaxKind.ImportKeyword)); displayParts.push(spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, declaration => { if (declaration.kind === SyntaxKind.ImportEqualsDeclaration) { - var importEqualsDeclaration = declaration; + let importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); displayParts.push(operatorPart(SyntaxKind.EqualsToken)); @@ -3277,7 +3281,7 @@ module ts { displayParts.push(punctuationPart(SyntaxKind.CloseParenToken)); } else { - var internalAliasSymbol = typeResolver.getSymbolAtLocation(importEqualsDeclaration.moduleReference); + let internalAliasSymbol = typeResolver.getSymbolAtLocation(importEqualsDeclaration.moduleReference); if (internalAliasSymbol) { displayParts.push(spacePart()); displayParts.push(operatorPart(SyntaxKind.EqualsToken)); @@ -3301,7 +3305,7 @@ module ts { displayParts.push(spacePart()); // If the type is type parameter, format it specially if (type.symbol && type.symbol.flags & SymbolFlags.TypeParameter) { - var typeParameterParts = mapToDisplayParts(writer => { + let typeParameterParts = mapToDisplayParts(writer => { typeResolver.getSymbolDisplayBuilder().buildTypeParameterDisplay(type, writer, enclosingDeclaration); }); displayParts.push.apply(displayParts, typeParameterParts); @@ -3316,7 +3320,7 @@ module ts { symbolFlags & SymbolFlags.Signature || symbolFlags & SymbolFlags.Accessor || symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); + let allSignatures = type.getCallSignatures(); addSignatureDisplayParts(allSignatures[0], allSignatures); } } @@ -3339,7 +3343,7 @@ module ts { } function addFullSymbolName(symbol: Symbol, enclosingDeclaration?: Node) { - var fullSymbolDisplayParts = symbolToDisplayParts(typeResolver, symbol, enclosingDeclaration || sourceFile, /*meaning*/ undefined, + let fullSymbolDisplayParts = symbolToDisplayParts(typeResolver, symbol, enclosingDeclaration || sourceFile, /*meaning*/ undefined, SymbolFormatFlags.WriteTypeParametersOrArguments | SymbolFormatFlags.UseOnlyExternalAliasing); displayParts.push.apply(displayParts, fullSymbolDisplayParts); } @@ -3370,7 +3374,7 @@ module ts { } function writeTypeParametersOfSymbol(symbol: Symbol, enclosingDeclaration: Node) { - var typeParameterParts = mapToDisplayParts(writer => { + let typeParameterParts = mapToDisplayParts(writer => { typeResolver.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); }); displayParts.push.apply(displayParts, typeParameterParts); @@ -3380,13 +3384,13 @@ module ts { function getQuickInfoAtPosition(fileName: string, position: number): QuickInfo { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = getTouchingPropertyName(sourceFile, position); + let sourceFile = getValidSourceFile(fileName); + let node = getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); if (!symbol) { // Try getting just type at this position and show switch (node.kind) { @@ -3396,7 +3400,7 @@ module ts { case SyntaxKind.ThisKeyword: case SyntaxKind.SuperKeyword: // For the identifiers/this/super etc get the type at position - var type = typeInfoResolver.getTypeAtLocation(node); + let type = typeInfoResolver.getTypeAtLocation(node); if (type) { return { kind: ScriptElementKind.unknown, @@ -3411,7 +3415,7 @@ module ts { return undefined; } - var displayPartsDocumentationsAndKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, getContainerNode(node), typeInfoResolver, node); + let displayPartsDocumentationsAndKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, getContainerNode(node), typeInfoResolver, node); return { kind: displayPartsDocumentationsAndKind.symbolKind, kindModifiers: getSymbolModifiers(symbol), @@ -3425,24 +3429,24 @@ module ts { function getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[] { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var node = getTouchingPropertyName(sourceFile, position); + let node = getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } // Labels if (isJumpStatementTarget(node)) { - var labelName = (node).text; - var label = getTargetLabel((node.parent), (node).text); + let labelName = (node).text; + let label = getTargetLabel((node.parent), (node).text); return label ? [getDefinitionInfo(label, ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined; } /// Triple slash reference comments - var comment = forEach(sourceFile.referencedFiles, r => (r.pos <= position && position < r.end) ? r : undefined); + let comment = forEach(sourceFile.referencedFiles, r => (r.pos <= position && position < r.end) ? r : undefined); if (comment) { - var referenceFile = tryResolveScriptReference(program, sourceFile, comment); + let referenceFile = tryResolveScriptReference(program, sourceFile, comment); if (referenceFile) { return [{ fileName: referenceFile.fileName, @@ -3456,7 +3460,7 @@ module ts { return undefined; } - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); // Could not find a symbol e.g. node is string or number keyword, // or the symbol was an internal symbol and does not have a declaration e.g. undefined symbol @@ -3468,14 +3472,14 @@ module ts { // get the aliased symbol instead. This allows for goto def on an import e.g. // import {A, B} from "mod"; // to jump to the implementation directelly. - if (symbol.flags & SymbolFlags.Import) { - var declaration = symbol.declarations[0]; + if (symbol.flags & SymbolFlags.Alias) { + let declaration = symbol.declarations[0]; if (node.kind === SyntaxKind.Identifier && node.parent === declaration) { symbol = typeInfoResolver.getAliasedSymbol(symbol); } } - var result: DefinitionInfo[] = []; + let result: DefinitionInfo[] = []; // Because name in short-hand property assignment has two different meanings: property name and property value, // using go-to-definition at such position should go to the variable declaration of the property value rather than @@ -3483,22 +3487,22 @@ module ts { // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. if (node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) { - var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); - var shorthandDeclarations = shorthandSymbol.getDeclarations(); - var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver, node); - var shorthandSymbolName = typeInfoResolver.symbolToString(shorthandSymbol); - var shorthandContainerName = typeInfoResolver.symbolToString(symbol.parent, node); + let shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); + let shorthandDeclarations = shorthandSymbol.getDeclarations(); + let shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver, node); + let shorthandSymbolName = typeInfoResolver.symbolToString(shorthandSymbol); + let shorthandContainerName = typeInfoResolver.symbolToString(symbol.parent, node); forEach(shorthandDeclarations, declaration => { result.push(getDefinitionInfo(declaration, shorthandSymbolKind, shorthandSymbolName, shorthandContainerName)); }); return result } - var declarations = symbol.getDeclarations(); - var symbolName = typeInfoResolver.symbolToString(symbol); // Do not get scoped name, just the name of the symbol - var symbolKind = getSymbolKind(symbol, typeInfoResolver, node); - var containerSymbol = symbol.parent; - var containerName = containerSymbol ? typeInfoResolver.symbolToString(containerSymbol, node) : ""; + let declarations = symbol.getDeclarations(); + let symbolName = typeInfoResolver.symbolToString(symbol); // Do not get scoped name, just the name of the symbol + let symbolKind = getSymbolKind(symbol, typeInfoResolver, node); + let containerSymbol = symbol.parent; + let containerName = containerSymbol ? typeInfoResolver.symbolToString(containerSymbol, node) : ""; if (!tryAddConstructSignature(symbol, node, symbolKind, symbolName, containerName, result) && !tryAddCallSignature(symbol, node, symbolKind, symbolName, containerName, result)) { @@ -3522,8 +3526,8 @@ module ts { } function tryAddSignature(signatureDeclarations: Declaration[], selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) { - var declarations: Declaration[] = []; - var definition: Declaration; + let declarations: Declaration[] = []; + let definition: Declaration; forEach(signatureDeclarations, d => { if ((selectConstructors && d.kind === SyntaxKind.Constructor) || @@ -3550,7 +3554,7 @@ module ts { // and in either case the symbol has a construct signature definition, i.e. class if (isNewExpressionTarget(location) || location.kind === SyntaxKind.ConstructorKeyword) { if (symbol.flags & SymbolFlags.Class) { - var classDeclaration = symbol.getDeclarations()[0]; + let classDeclaration = symbol.getDeclarations()[0]; Debug.assert(classDeclaration && classDeclaration.kind === SyntaxKind.ClassDeclaration); return tryAddSignature(classDeclaration.members, /*selectConstructors*/ true, symbolKind, symbolName, containerName, result); @@ -3571,9 +3575,9 @@ module ts { function getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[] { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var node = getTouchingWord(sourceFile, position); + let node = getTouchingWord(sourceFile, position); if (!node) { return undefined; } @@ -3618,8 +3622,8 @@ module ts { break; case SyntaxKind.CaseKeyword: case SyntaxKind.DefaultKeyword: - if (hasKind(parent(parent(node)), SyntaxKind.SwitchStatement)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent); + if (hasKind(parent(parent(parent(node))), SyntaxKind.SwitchStatement)) { + return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case SyntaxKind.BreakKeyword: @@ -3661,7 +3665,7 @@ module ts { return undefined; function getIfElseOccurrences(ifStatement: IfStatement): ReferenceEntry[] { - var keywords: Node[] = []; + let keywords: Node[] = []; // Traverse upwards through all parent if-statements linked by their else-branches. while (hasKind(ifStatement.parent, SyntaxKind.IfStatement) && (ifStatement.parent).elseStatement === ifStatement) { @@ -3670,11 +3674,11 @@ module ts { // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. while (ifStatement) { - var children = ifStatement.getChildren(); + let children = ifStatement.getChildren(); pushKeywordIf(keywords, children[0], SyntaxKind.IfKeyword); // Generally the 'else' keyword is second-to-last, so we traverse backwards. - for (var i = children.length - 1; i >= 0; i--) { + for (let i = children.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, children[i], SyntaxKind.ElseKeyword)) { break; } @@ -3687,19 +3691,19 @@ module ts { ifStatement = ifStatement.elseStatement; } - var result: ReferenceEntry[] = []; + let result: ReferenceEntry[] = []; // We'd like to highlight else/ifs together if they are only separated by whitespace // (i.e. the keywords are separated by no comments, no newlines). - for (var i = 0; i < keywords.length; i++) { + for (let i = 0; i < keywords.length; i++) { if (keywords[i].kind === SyntaxKind.ElseKeyword && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. + let elseKeyword = keywords[i]; + let ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. - var shouldHighlightNextKeyword = true; + let shouldHighlightNextKeyword = true; // Avoid recalculating getStart() by iterating backwards. - for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { + for (let j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { if (!isWhiteSpace(sourceFile.text.charCodeAt(j))) { shouldHighlightNextKeyword = false; break; @@ -3725,14 +3729,14 @@ module ts { } function getReturnOccurrences(returnStatement: ReturnStatement): ReferenceEntry[] { - var func = getContainingFunction(returnStatement); + let func = getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. if (!(func && hasKind(func.body, SyntaxKind.Block))) { return undefined; } - var keywords: Node[] = [] + let keywords: Node[] = [] forEachReturnStatement(func.body, returnStatement => { pushKeywordIf(keywords, returnStatement.getFirstToken(), SyntaxKind.ReturnKeyword); }); @@ -3746,13 +3750,13 @@ module ts { } function getThrowOccurrences(throwStatement: ThrowStatement) { - var owner = getThrowStatementOwner(throwStatement); + let owner = getThrowStatementOwner(throwStatement); if (!owner) { return undefined; } - var keywords: Node[] = []; + let keywords: Node[] = []; forEach(aggregateOwnedThrowStatements(owner), throwStatement => { pushKeywordIf(keywords, throwStatement.getFirstToken(), SyntaxKind.ThrowKeyword); @@ -3774,7 +3778,7 @@ module ts { * into function boundaries and try-blocks with catch-clauses. */ function aggregateOwnedThrowStatements(node: Node): ThrowStatement[] { - var statementAccumulator: ThrowStatement[] = [] + let statementAccumulator: ThrowStatement[] = [] aggregate(node); return statementAccumulator; @@ -3783,7 +3787,7 @@ module ts { statementAccumulator.push(node); } else if (node.kind === SyntaxKind.TryStatement) { - var tryStatement = node; + let tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -3799,7 +3803,7 @@ module ts { } } // Do not cross function boundaries. - else if (!isAnyFunction(node)) { + else if (!isFunctionLike(node)) { forEachChild(node, aggregate); } }; @@ -3811,10 +3815,10 @@ module ts { * function-block, or source file. */ function getThrowStatementOwner(throwStatement: ThrowStatement): Node { - var child: Node = throwStatement; + let child: Node = throwStatement; while (child.parent) { - var parent = child.parent; + let parent = child.parent; if (isFunctionBlock(parent) || parent.kind === SyntaxKind.SourceFile) { return parent; @@ -3823,7 +3827,7 @@ module ts { // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. if (parent.kind === SyntaxKind.TryStatement) { - var tryStatement = parent; + let tryStatement = parent; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; @@ -3837,7 +3841,7 @@ module ts { } function getTryCatchFinallyOccurrences(tryStatement: TryStatement): ReferenceEntry[] { - var keywords: Node[] = []; + let keywords: Node[] = []; pushKeywordIf(keywords, tryStatement.getFirstToken(), SyntaxKind.TryKeyword); @@ -3846,7 +3850,7 @@ module ts { } if (tryStatement.finallyBlock) { - var finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile); + let finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile); pushKeywordIf(keywords, finallyKeyword, SyntaxKind.FinallyKeyword); } @@ -3854,14 +3858,14 @@ module ts { } function getLoopBreakContinueOccurrences(loopNode: IterationStatement): ReferenceEntry[] { - var keywords: Node[] = []; + let keywords: Node[] = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), SyntaxKind.ForKeyword, SyntaxKind.WhileKeyword, SyntaxKind.DoKeyword)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. if (loopNode.kind === SyntaxKind.DoStatement) { - var loopTokens = loopNode.getChildren(); + let loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { + for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], SyntaxKind.WhileKeyword)) { break; } @@ -3869,7 +3873,7 @@ module ts { } } - var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); + let breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); forEach(breaksAndContinues, statement => { if (ownsBreakOrContinueStatement(loopNode, statement)) { @@ -3881,15 +3885,15 @@ module ts { } function getSwitchCaseDefaultOccurrences(switchStatement: SwitchStatement) { - var keywords: Node[] = []; + let keywords: Node[] = []; pushKeywordIf(keywords, switchStatement.getFirstToken(), SyntaxKind.SwitchKeyword); // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. - forEach(switchStatement.clauses, clause => { + forEach(switchStatement.caseBlock.clauses, clause => { pushKeywordIf(keywords, clause.getFirstToken(), SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword); - var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); + let breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); forEach(breaksAndContinues, statement => { if (ownsBreakOrContinueStatement(switchStatement, statement)) { @@ -3902,7 +3906,7 @@ module ts { } function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[] { - var owner = getBreakOrContinueOwner(breakOrContinueStatement); + let owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { @@ -3922,7 +3926,7 @@ module ts { } function aggregateAllBreakAndContinueStatements(node: Node): BreakOrContinueStatement[] { - var statementAccumulator: BreakOrContinueStatement[] = [] + let statementAccumulator: BreakOrContinueStatement[] = [] aggregate(node); return statementAccumulator; @@ -3931,20 +3935,20 @@ module ts { statementAccumulator.push(node); } // Do not cross function boundaries. - else if (!isAnyFunction(node)) { + else if (!isFunctionLike(node)) { forEachChild(node, aggregate); } }; } function ownsBreakOrContinueStatement(owner: Node, statement: BreakOrContinueStatement): boolean { - var actualOwner = getBreakOrContinueOwner(statement); + let actualOwner = getBreakOrContinueOwner(statement); return actualOwner && actualOwner === owner; } function getBreakOrContinueOwner(statement: BreakOrContinueStatement): Node { - for (var node = statement.parent; node; node = node.parent) { + for (let node = statement.parent; node; node = node.parent) { switch (node.kind) { case SyntaxKind.SwitchStatement: if (statement.kind === SyntaxKind.ContinueStatement) { @@ -3962,7 +3966,7 @@ module ts { break; default: // Don't cross function boundaries. - if (isAnyFunction(node)) { + if (isFunctionLike(node)) { return undefined; } break; @@ -3973,9 +3977,9 @@ module ts { } function getConstructorOccurrences(constructorDeclaration: ConstructorDeclaration): ReferenceEntry[] { - var declarations = constructorDeclaration.symbol.getDeclarations() + let declarations = constructorDeclaration.symbol.getDeclarations() - var keywords: Node[] = []; + let keywords: Node[] = []; forEach(declarations, declaration => { forEach(declaration.getChildren(), token => { @@ -3987,7 +3991,7 @@ module ts { } function getGetAndSetOccurrences(accessorDeclaration: AccessorDeclaration): ReferenceEntry[] { - var keywords: Node[] = []; + let keywords: Node[] = []; tryPushAccessorKeyword(accessorDeclaration.symbol, SyntaxKind.GetAccessor); tryPushAccessorKeyword(accessorDeclaration.symbol, SyntaxKind.SetAccessor); @@ -3995,7 +3999,7 @@ module ts { return map(keywords, getReferenceEntryFromNode); function tryPushAccessorKeyword(accessorSymbol: Symbol, accessorKind: SyntaxKind): void { - var accessor = getDeclarationOfKind(accessorSymbol, accessorKind); + let accessor = getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { forEach(accessor.getChildren(), child => pushKeywordIf(keywords, child, SyntaxKind.GetKeyword, SyntaxKind.SetKeyword)); @@ -4004,7 +4008,7 @@ module ts { } function getModifierOccurrences(modifier: SyntaxKind, declaration: Node) { - var container = declaration.parent; + let container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (declaration.flags & NodeFlags.AccessibilityModifier) { @@ -4028,10 +4032,10 @@ module ts { return undefined; } - var keywords: Node[] = []; - var modifierFlag: NodeFlags = getFlagFromModifier(modifier); + let keywords: Node[] = []; + let modifierFlag: NodeFlags = getFlagFromModifier(modifier); - var nodes: Node[]; + let nodes: Node[]; switch (container.kind) { case SyntaxKind.ModuleBlock: case SyntaxKind.SourceFile: @@ -4047,7 +4051,7 @@ module ts { // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. if (modifierFlag & NodeFlags.AccessibilityModifier) { - var constructor = forEach((container).members, member => { + let constructor = forEach((container).members, member => { return member.kind === SyntaxKind.Constructor && member; }); @@ -4119,9 +4123,9 @@ module ts { function findReferences(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): ReferenceEntry[] { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var node = getTouchingPropertyName(sourceFile, position); + let node = getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } @@ -4143,7 +4147,7 @@ module ts { // Labels if (isLabelName(node)) { if (isJumpStatementTarget(node)) { - var labelDefinition = getTargetLabel((node.parent), (node).text); + let labelDefinition = getTargetLabel((node.parent), (node).text); // if we have a label definition, look within its statement for references, if not, then // the label is undefined, just return a set of one for the current node. return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : [getReferenceEntryFromNode(node)]; @@ -4162,7 +4166,7 @@ module ts { return getReferencesForSuperKeyword(node); } - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); // Could not find a symbol e.g. unknown identifier if (!symbol) { @@ -4171,24 +4175,24 @@ module ts { return [getReferenceEntryFromNode(node)]; } - var declarations = symbol.declarations; + let declarations = symbol.declarations; // The symbol was an internal symbol and does not have a declaration e.g.undefined symbol if (!declarations || !declarations.length) { return undefined; } - var result: ReferenceEntry[]; + let result: ReferenceEntry[]; // Compute the meaning from the location and the symbol it references - var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); + let searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); // Get the text to search for, we need to normalize it as external module names will have quote - var declaredName = getDeclaredName(symbol, node); + let declaredName = getDeclaredName(symbol, node); // Try to get the smallest valid scope that we can limit our search to; // otherwise we'll need to search globally (i.e. include each file). - var scope = getSymbolScope(symbol); + let scope = getSymbolScope(symbol); if (scope) { result = []; @@ -4201,11 +4205,11 @@ module ts { getReferencesInNode(sourceFiles[0], symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result); } else { - var internedName = getInternedName(symbol, node, declarations) + let internedName = getInternedName(symbol, node, declarations) forEach(sourceFiles, sourceFile => { cancellationToken.throwIfCancellationRequested(); - var nameTable = getNameTable(sourceFile); + let nameTable = getNameTable(sourceFile); if (lookUp(nameTable, internedName)) { result = result || []; @@ -4224,22 +4228,23 @@ module ts { } function isImportOrExportSpecifierImportSymbol(symbol: Symbol) { - return (symbol.flags & SymbolFlags.Import) && forEach(symbol.declarations, declaration => { + return (symbol.flags & SymbolFlags.Alias) && forEach(symbol.declarations, declaration => { return declaration.kind === SyntaxKind.ImportSpecifier || declaration.kind === SyntaxKind.ExportSpecifier; }); } function getDeclaredName(symbol: Symbol, location: Node) { // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = forEach(symbol.declarations, d => d.kind === SyntaxKind.FunctionExpression ? d : undefined); + let functionExpression = forEach(symbol.declarations, d => d.kind === SyntaxKind.FunctionExpression ? d : undefined); // When a name gets interned into a SourceFile's 'identifiers' Map, // its name is escaped and stored in the same way its symbol name/identifier // name should be stored. Function expressions, however, are a special case, // because despite sometimes having a name, the binder unconditionally binds them // to a symbol with the name "__function". + let name: string; if (functionExpression && functionExpression.name) { - var name = functionExpression.name.text; + name = functionExpression.name.text; } // If this is an export or import specifier it could have been renamed using the as syntax. @@ -4249,7 +4254,7 @@ module ts { return location.getText(); } - var name = typeInfoResolver.symbolToString(symbol); + name = typeInfoResolver.symbolToString(symbol); return stripQuotes(name); } @@ -4263,25 +4268,22 @@ module ts { } // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = forEach(declarations, d => d.kind === SyntaxKind.FunctionExpression ? d : undefined); + let functionExpression = forEach(declarations, d => d.kind === SyntaxKind.FunctionExpression ? d : undefined); // When a name gets interned into a SourceFile's 'identifiers' Map, // its name is escaped and stored in the same way its symbol name/identifier // name should be stored. Function expressions, however, are a special case, // because despite sometimes having a name, the binder unconditionally binds them // to a symbol with the name "__function". - if (functionExpression && functionExpression.name) { - var name = functionExpression.name.text; - } - else { - var name = symbol.name; - } + let name = functionExpression && functionExpression.name + ? functionExpression.name.text + : symbol.name; return stripQuotes(name); } function stripQuotes(name: string) { - var length = name.length; + let length = name.length; if (length >= 2 && name.charCodeAt(0) === CharacterCodes.doubleQuote && name.charCodeAt(length - 1) === CharacterCodes.doubleQuote) { return name.substring(1, length - 1); }; @@ -4291,7 +4293,7 @@ module ts { function getSymbolScope(symbol: Symbol): Node { // If this is private property or method, the scope is the containing class if (symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { - var privateDeclaration = forEach(symbol.getDeclarations(), d => (d.flags & NodeFlags.Private) ? d : undefined); + let privateDeclaration = forEach(symbol.getDeclarations(), d => (d.flags & NodeFlags.Private) ? d : undefined); if (privateDeclaration) { return getAncestor(privateDeclaration, SyntaxKind.ClassDeclaration); } @@ -4299,7 +4301,7 @@ module ts { // If the symbol is an import we would like to find it if we are looking for what it imports. // So consider it visibile outside its declaration scope. - if (symbol.flags & SymbolFlags.Import) { + if (symbol.flags & SymbolFlags.Alias) { return undefined; } @@ -4309,12 +4311,12 @@ module ts { return undefined; } - var scope: Node = undefined; + let scope: Node = undefined; - var declarations = symbol.getDeclarations(); + let declarations = symbol.getDeclarations(); if (declarations) { - for (var i = 0, n = declarations.length; i < n; i++) { - var container = getContainerNode(declarations[i]); + for (let declaration of declarations) { + let container = getContainerNode(declaration); if (!container) { return undefined; @@ -4340,7 +4342,7 @@ module ts { } function getPossibleSymbolReferencePositions(sourceFile: SourceFile, symbolName: string, start: number, end: number): number[] { - var positions: number[] = []; + let positions: number[] = []; /// TODO: Cache symbol existence for files to save text search // Also, need to make this work for unicode escapes. @@ -4350,11 +4352,11 @@ module ts { return positions; } - var text = sourceFile.text; - var sourceLength = text.length; - var symbolNameLength = symbolName.length; + let text = sourceFile.text; + let sourceLength = text.length; + let symbolNameLength = symbolName.length; - var position = text.indexOf(symbolName, start); + let position = text.indexOf(symbolName, start); while (position >= 0) { cancellationToken.throwIfCancellationRequested(); @@ -4363,7 +4365,7 @@ module ts { // We found a match. Make sure it's not part of a larger word (i.e. the char // before and after it have to be a non-identifier char). - var endPosition = position + symbolNameLength; + let endPosition = position + symbolNameLength; if ((position === 0 || !isIdentifierPart(text.charCodeAt(position - 1), ScriptTarget.Latest)) && (endPosition === sourceLength || !isIdentifierPart(text.charCodeAt(endPosition), ScriptTarget.Latest))) { @@ -4377,14 +4379,14 @@ module ts { } function getLabelReferencesInNode(container: Node, targetLabel: Identifier): ReferenceEntry[] { - var result: ReferenceEntry[] = []; - var sourceFile = container.getSourceFile(); - var labelName = targetLabel.text; - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); + let result: ReferenceEntry[] = []; + let sourceFile = container.getSourceFile(); + let labelName = targetLabel.text; + let possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); forEach(possiblePositions, position => { cancellationToken.throwIfCancellationRequested(); - var node = getTouchingWord(sourceFile, position); + let node = getTouchingWord(sourceFile, position); if (!node || node.getWidth() !== labelName.length) { return; } @@ -4436,19 +4438,19 @@ module ts { findInStrings: boolean, findInComments: boolean, result: ReferenceEntry[]): void { - var sourceFile = container.getSourceFile(); - var tripleSlashDirectivePrefixRegex = /^\/\/\/\s* { cancellationToken.throwIfCancellationRequested(); - var referenceLocation = getTouchingPropertyName(sourceFile, position); + let referenceLocation = getTouchingPropertyName(sourceFile, position); if (!isValidReferencePosition(referenceLocation, searchText)) { // This wasn't the start of a token. Check to see if it might be a // match in a comment or string if that's what the caller is asking @@ -4468,10 +4470,10 @@ module ts { return; } - var referenceSymbol = typeInfoResolver.getSymbolAtLocation(referenceLocation); + let referenceSymbol = typeInfoResolver.getSymbolAtLocation(referenceLocation); if (referenceSymbol) { - var referenceSymbolDeclaration = referenceSymbol.valueDeclaration; - var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration); + let referenceSymbolDeclaration = referenceSymbol.valueDeclaration; + let shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration); if (isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { result.push(getReferenceEntryFromNode(referenceLocation)); } @@ -4489,21 +4491,21 @@ module ts { } function isInString(position: number) { - var token = getTokenAtPosition(sourceFile, position); + let token = getTokenAtPosition(sourceFile, position); return token && token.kind === SyntaxKind.StringLiteral && position > token.getStart(); } function isInComment(position: number) { - var token = getTokenAtPosition(sourceFile, position); + let token = getTokenAtPosition(sourceFile, position); if (token && position < token.getStart()) { // First, we have to see if this position actually landed in a comment. - var commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); + let commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); // Then we want to make sure that it wasn't in a "///<" directive comment // We don't want to unintentionally update a file name. return forEach(commentRanges, c => { if (c.pos < position && position < c.end) { - var commentText = sourceFile.text.substring(c.pos, c.end); + let commentText = sourceFile.text.substring(c.pos, c.end); if (!tripleSlashDirectivePrefixRegex.test(commentText)) { return true; } @@ -4516,12 +4518,12 @@ module ts { } function getReferencesForSuperKeyword(superKeyword: Node): ReferenceEntry[] { - var searchSpaceNode = getSuperContainer(superKeyword, /*includeFunctions*/ false); + let searchSpaceNode = getSuperContainer(superKeyword, /*includeFunctions*/ false); if (!searchSpaceNode) { return undefined; } // Whether 'super' occurs in a static context within a class. - var staticFlag = NodeFlags.Static; + let staticFlag = NodeFlags.Static; switch (searchSpaceNode.kind) { case SyntaxKind.PropertyDeclaration: @@ -4538,20 +4540,20 @@ module ts { return undefined; } - var result: ReferenceEntry[] = []; + let result: ReferenceEntry[] = []; - var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + let sourceFile = searchSpaceNode.getSourceFile(); + let possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); forEach(possiblePositions, position => { cancellationToken.throwIfCancellationRequested(); - var node = getTouchingWord(sourceFile, position); + let node = getTouchingWord(sourceFile, position); if (!node || node.kind !== SyntaxKind.SuperKeyword) { return; } - var container = getSuperContainer(node, /*includeFunctions*/ false); + let container = getSuperContainer(node, /*includeFunctions*/ false); // If we have a 'super' container, we must have an enclosing class. // Now make sure the owning class is the same as the search-space @@ -4565,10 +4567,10 @@ module ts { } function getReferencesForThisKeyword(thisOrSuperKeyword: Node, sourceFiles: SourceFile[]): ReferenceEntry[] { - var searchSpaceNode = getThisContainer(thisOrSuperKeyword, /* includeArrowFunctions */ false); + let searchSpaceNode = getThisContainer(thisOrSuperKeyword, /* includeArrowFunctions */ false); // Whether 'this' occurs in a static context within a class. - var staticFlag = NodeFlags.Static; + let staticFlag = NodeFlags.Static; switch (searchSpaceNode.kind) { case SyntaxKind.MethodDeclaration: @@ -4599,17 +4601,18 @@ module ts { return undefined; } - var result: ReferenceEntry[] = []; + let result: ReferenceEntry[] = []; + let possiblePositions: number[]; if (searchSpaceNode.kind === SyntaxKind.SourceFile) { forEach(sourceFiles, sourceFile => { - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); }); } else { - var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + let sourceFile = searchSpaceNode.getSourceFile(); + possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result); } @@ -4619,12 +4622,12 @@ module ts { forEach(possiblePositions, position => { cancellationToken.throwIfCancellationRequested(); - var node = getTouchingWord(sourceFile, position); + let node = getTouchingWord(sourceFile, position); if (!node || node.kind !== SyntaxKind.ThisKeyword) { return; } - var container = getThisContainer(node, /* includeArrowFunctions */ false); + let container = getThisContainer(node, /* includeArrowFunctions */ false); switch (searchSpaceNode.kind) { case SyntaxKind.FunctionExpression: @@ -4658,7 +4661,7 @@ module ts { function populateSearchSymbolSet(symbol: Symbol, location: Node): Symbol[] { // The search set contains at least the current symbol - var result = [symbol]; + let result = [symbol]; // If the symbol is an alias, add what it alaises to the list if (isImportOrExportSpecifierImportSymbol(symbol)) { @@ -4678,13 +4681,13 @@ module ts { * property name and variable declaration of the identifier. * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service * should show both 'name' in 'obj' and 'name' in variable declaration - * var name = "Foo"; - * var obj = { name }; + * let name = "Foo"; + * let obj = { name }; * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration * will be included correctly. */ - var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); + let shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); if (shorthandValueSymbol) { result.push(shorthandValueSymbol); } @@ -4722,9 +4725,9 @@ module ts { function getPropertySymbolFromTypeReference(typeReference: TypeReferenceNode) { if (typeReference) { - var type = typeInfoResolver.getTypeAtLocation(typeReference); + let type = typeInfoResolver.getTypeAtLocation(typeReference); if (type) { - var propertySymbol = typeInfoResolver.getPropertyOfType(type, propertyName); + let propertySymbol = typeInfoResolver.getPropertyOfType(type, propertyName); if (propertySymbol) { result.push(propertySymbol); } @@ -4768,7 +4771,7 @@ module ts { // Finally, try all properties with the same name in any type the containing type extended or implemented, and // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { - var result: Symbol[] = []; + let result: Symbol[] = []; getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); return forEach(result, s => searchSymbols.indexOf(s) >= 0); } @@ -4779,21 +4782,21 @@ module ts { function getPropertySymbolsFromContextualType(node: Node): Symbol[] { if (isNameOfPropertyAssignment(node)) { - var objectLiteral = node.parent.parent; - var contextualType = typeInfoResolver.getContextualType(objectLiteral); - var name = (node).text; + let objectLiteral = node.parent.parent; + let contextualType = typeInfoResolver.getContextualType(objectLiteral); + let name = (node).text; if (contextualType) { if (contextualType.flags & TypeFlags.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) + let unionProperty = contextualType.getProperty(name) if (unionProperty) { return [unionProperty]; } else { - var result: Symbol[] = []; + let result: Symbol[] = []; forEach((contextualType).types, t => { - var symbol = t.getProperty(name); + let symbol = t.getProperty(name); if (symbol) { result.push(symbol); } @@ -4802,7 +4805,7 @@ module ts { } } else { - var symbol = contextualType.getProperty(name); + let symbol = contextualType.getProperty(name); if (symbol) { return [symbol]; } @@ -4821,6 +4824,7 @@ module ts { */ function getIntersectingMeaningFromDeclarations(meaning: SemanticMeaning, declarations: Declaration[]): SemanticMeaning { if (declarations) { + let lastIterationMeaning: SemanticMeaning; do { // The result is order-sensitive, for instance if initialMeaning === Namespace, and declarations = [class, instantiated module] // we need to consider both as they initialMeaning intersects with the module in the namespace space, and the module @@ -4828,24 +4832,25 @@ module ts { // To achieve that we will keep iterating until the result stabilizes. // Remember the last meaning - var lastIterationMeaning = meaning; + lastIterationMeaning = meaning; - for (var i = 0, n = declarations.length; i < n; i++) { - var declarationMeaning = getMeaningFromDeclaration(declarations[i]); + for (let declaration of declarations) { + let declarationMeaning = getMeaningFromDeclaration(declaration); if (declarationMeaning & meaning) { meaning |= declarationMeaning; } } - } while (meaning !== lastIterationMeaning); + } + while (meaning !== lastIterationMeaning); } return meaning; } } function getReferenceEntryFromNode(node: Node): ReferenceEntry { - var start = node.getStart(); - var end = node.getEnd(); + let start = node.getStart(); + let end = node.getEnd(); if (node.kind === SyntaxKind.StringLiteral) { start += 1; @@ -4865,13 +4870,13 @@ module ts { return true; } - var parent = node.parent; + let parent = node.parent; if (parent) { if (parent.kind === SyntaxKind.PostfixUnaryExpression || parent.kind === SyntaxKind.PrefixUnaryExpression) { return true; } else if (parent.kind === SyntaxKind.BinaryExpression && (parent).left === node) { - var operator = (parent).operatorToken.kind; + let operator = (parent).operatorToken.kind; return SyntaxKind.FirstAssignment <= operator && operator <= SyntaxKind.LastAssignment; } } @@ -4893,9 +4898,9 @@ module ts { function getEmitOutput(fileName: string): EmitOutput { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var outputFiles: OutputFile[] = []; + let outputFiles: OutputFile[] = []; function writeFile(fileName: string, data: string, writeByteOrderMark: boolean) { outputFiles.push({ @@ -4905,7 +4910,7 @@ module ts { }); } - var emitOutput = program.emit(sourceFile, writeFile); + let emitOutput = program.emit(sourceFile, writeFile); return { outputFiles, @@ -4982,8 +4987,8 @@ module ts { } function isNamespaceReference(node: Node): boolean { - var root = node; - var isLastClause = true; + let root = node; + let isLastClause = true; if (root.parent.kind === SyntaxKind.QualifiedName) { while (root.parent && root.parent.kind === SyntaxKind.QualifiedName) root = root.parent; @@ -5044,7 +5049,7 @@ module ts { function getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); return SignatureHelp.getSignatureHelpItems(sourceFile, position, typeInfoResolver, cancellationToken); } @@ -5055,10 +5060,10 @@ module ts { } function getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); // Get node at the location - var node = getTouchingPropertyName(sourceFile, startPos); + let node = getTouchingPropertyName(sourceFile, startPos); if (!node) { return; @@ -5081,7 +5086,7 @@ module ts { return; } - var nodeForStartPos = node; + let nodeForStartPos = node; while (true) { if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { // If on the span is in right side of the the property or qualified name, return the span from the qualified name pos to end of this node @@ -5112,13 +5117,13 @@ module ts { function getBreakpointStatementAtPosition(fileName: string, position: number) { // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); return BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position); } function getNavigationBarItems(fileName: string): NavigationBarItem[]{ - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); return NavigationBar.getNavigationBarItems(sourceFile); } @@ -5126,15 +5131,15 @@ module ts { function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var result: ClassifiedSpan[] = []; + let result: ClassifiedSpan[] = []; processNode(sourceFile); return result; function classifySymbol(symbol: Symbol, meaningAtPosition: SemanticMeaning) { - var flags = symbol.getFlags(); + let flags = symbol.getFlags(); if (flags & SymbolFlags.Class) { return ClassificationTypeNames.className; @@ -5179,9 +5184,9 @@ module ts { // Only walk into nodes that intersect the requested span. if (node && textSpanIntersectsWith(span, node.getStart(), node.getWidth())) { if (node.kind === SyntaxKind.Identifier && node.getWidth() > 0) { - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); if (symbol) { - var type = classifySymbol(symbol, getMeaningFromLocation(node)); + let type = classifySymbol(symbol, getMeaningFromLocation(node)); if (type) { result.push({ textSpan: createTextSpan(node.getStart(), node.getWidth()), @@ -5198,19 +5203,19 @@ module ts { function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); // Make a scanner we can get trivia from. - var triviaScanner = createScanner(ScriptTarget.Latest, /*skipTrivia:*/ false, sourceFile.text); - var mergeConflictScanner = createScanner(ScriptTarget.Latest, /*skipTrivia:*/ false, sourceFile.text); + let triviaScanner = createScanner(ScriptTarget.Latest, /*skipTrivia:*/ false, sourceFile.text); + let mergeConflictScanner = createScanner(ScriptTarget.Latest, /*skipTrivia:*/ false, sourceFile.text); - var result: ClassifiedSpan[] = []; + let result: ClassifiedSpan[] = []; processElement(sourceFile); return result; function classifyLeadingTrivia(token: Node): void { - var tokenStart = skipTrivia(sourceFile.text, token.pos, /*stopAfterLineBreak:*/ false); + let tokenStart = skipTrivia(sourceFile.text, token.pos, /*stopAfterLineBreak:*/ false); if (tokenStart === token.pos) { return; } @@ -5218,10 +5223,10 @@ module ts { // token has trivia. Classify them appropriately. triviaScanner.setTextPos(token.pos); while (true) { - var start = triviaScanner.getTextPos(); - var kind = triviaScanner.scan(); - var end = triviaScanner.getTextPos(); - var width = end - start; + let start = triviaScanner.getTextPos(); + let kind = triviaScanner.scan(); + let end = triviaScanner.getTextPos(); + let width = end - start; if (textSpanIntersectsWith(span, start, width)) { if (!isTrivia(kind)) { @@ -5238,8 +5243,8 @@ module ts { } if (kind === SyntaxKind.ConflictMarkerTrivia) { - var text = sourceFile.text; - var ch = text.charCodeAt(start); + let text = sourceFile.text; + let ch = text.charCodeAt(start); // for the <<<<<<< and >>>>>>> markers, we just add them in as comments // in the classification stream. @@ -5281,11 +5286,11 @@ module ts { } function classifyDisabledCodeToken() { - var start = mergeConflictScanner.getTextPos(); - var tokenKind = mergeConflictScanner.scan(); - var end = mergeConflictScanner.getTextPos(); + let start = mergeConflictScanner.getTextPos(); + let tokenKind = mergeConflictScanner.scan(); + let end = mergeConflictScanner.getTextPos(); - var type = classifyTokenType(tokenKind); + let type = classifyTokenType(tokenKind); if (type) { result.push({ textSpan: createTextSpanFromBounds(start, end), @@ -5298,7 +5303,7 @@ module ts { classifyLeadingTrivia(token); if (token.getWidth() > 0) { - var type = classifyTokenType(token.kind, token); + let type = classifyTokenType(token.kind, token); if (type) { result.push({ textSpan: createTextSpan(token.getStart(), token.getWidth()), @@ -5399,9 +5404,8 @@ module ts { function processElement(element: Node) { // Ignore nodes that don't intersect the original span to classify. if (textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { - var children = element.getChildren(); - for (var i = 0, n = children.length; i < n; i++) { - var child = children[i]; + let children = element.getChildren(); + for (let child of children) { if (isToken(child)) { classifyToken(child); } @@ -5416,30 +5420,28 @@ module ts { function getOutliningSpans(fileName: string): OutliningSpan[] { // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); return OutliningElementsCollector.collectElements(sourceFile); } function getBraceMatchingAtPosition(fileName: string, position: number) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - var result: TextSpan[] = []; + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let result: TextSpan[] = []; - var token = getTouchingToken(sourceFile, position); + let token = getTouchingToken(sourceFile, position); if (token.getStart(sourceFile) === position) { - var matchKind = getMatchingTokenKind(token); + let matchKind = getMatchingTokenKind(token); // Ensure that there is a corresponding token to match ours. if (matchKind) { - var parentElement = token.parent; - - var childNodes = parentElement.getChildren(sourceFile); - for (var i = 0, n = childNodes.length; i < n; i++) { - var current = childNodes[i]; + let parentElement = token.parent; + let childNodes = parentElement.getChildren(sourceFile); + for (let current of childNodes) { if (current.kind === matchKind) { - var range1 = createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); - var range2 = createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); + let range1 = createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); + let range2 = createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); // We want to order the braces when we return the result. if (range1.start < range2.start) { @@ -5474,30 +5476,30 @@ module ts { } function getIndentationAtPosition(fileName: string, position: number, editorOptions: EditorOptions) { - var start = new Date().getTime(); - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let start = new Date().getTime(); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - var start = new Date().getTime(); + start = new Date().getTime(); - var result = formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); + let result = formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; } function getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[] { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); return formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); } function getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[] { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); return formatting.formatDocument(sourceFile, getRuleProvider(options), options); } function getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[] { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); if (key === "}") { return formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); @@ -5521,17 +5523,17 @@ module ts { // anything away. synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); cancellationToken.throwIfCancellationRequested(); - var fileContents = sourceFile.text; - var result: TodoComment[] = []; + let fileContents = sourceFile.text; + let result: TodoComment[] = []; if (descriptors.length > 0) { - var regExp = getTodoCommentsRegExp(); + let regExp = getTodoCommentsRegExp(); - var matchArray: RegExpExecArray; + let matchArray: RegExpExecArray; while (matchArray = regExp.exec(fileContents)) { cancellationToken.throwIfCancellationRequested(); @@ -5552,21 +5554,21 @@ module ts { // // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. // "hack" in position 4 means HACK did match. - var firstDescriptorCaptureIndex = 3; + let firstDescriptorCaptureIndex = 3; Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); - var preamble = matchArray[1]; - var matchPosition = matchArray.index + preamble.length; + let preamble = matchArray[1]; + let matchPosition = matchArray.index + preamble.length; // OK, we have found a match in the file. This is only an acceptable match if // it is contained within a comment. - var token = getTokenAtPosition(sourceFile, matchPosition); + let token = getTokenAtPosition(sourceFile, matchPosition); if (!isInsideComment(sourceFile, token, matchPosition)) { continue; } - var descriptor: TodoCommentDescriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { + let descriptor: TodoCommentDescriptor = undefined; + for (let i = 0, n = descriptors.length; i < n; i++) { if (matchArray[i + firstDescriptorCaptureIndex]) { descriptor = descriptors[i]; } @@ -5579,7 +5581,7 @@ module ts { continue; } - var message = matchArray[2]; + let message = matchArray[2]; result.push({ descriptor: descriptor, message: message, @@ -5610,14 +5612,14 @@ module ts { // // The following three regexps are used to match the start of the text up to the TODO // comment portion. - var singleLineCommentStart = /(?:\/\/+\s*)/.source; - var multiLineCommentStart = /(?:\/\*+\s*)/.source; - var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; + let singleLineCommentStart = /(?:\/\/+\s*)/.source; + let multiLineCommentStart = /(?:\/\*+\s*)/.source; + let anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; // Match any of the above three TODO comment start regexps. // Note that the outermost group *is* a capture group. We want to capture the preamble // so that we can determine the starting position of the TODO comment match. - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; + let preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: @@ -5627,17 +5629,17 @@ module ts { // Note that the outermost group is *not* a capture group, but the innermost groups // *are* capture groups. By capturing the inner literals we can determine after // matching which descriptor we are dealing with. - var literals = "(?:" + map(descriptors, d => "(" + escapeRegExp(d.text) + ")").join("|") + ")"; + let literals = "(?:" + map(descriptors, d => "(" + escapeRegExp(d.text) + ")").join("|") + ")"; // After matching a descriptor literal, the following regexp matches the rest of the // text up to the end of the line (or */). - var endOfLineOrEndOfComment = /(?:$|\*\/)/.source - var messageRemainder = /(?:.*?)/.source + let endOfLineOrEndOfComment = /(?:$|\*\/)/.source + let messageRemainder = /(?:.*?)/.source // This is the portion of the match we'll return as part of the TODO comment result. We // match the literal portion up to the end of the line or end of comment. - var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; + let messagePortion = "(" + literals + messageRemainder + ")"; + let regExpString = preamble + messagePortion + endOfLineOrEndOfComment; // The final regexp will look like this: // /((?:\/\/+\s*)|(?:\/\*+\s*)|(?:^(?:\s|\*)*))((?:(TODO\(jason\))|(HACK))(?:.*?))(?:$|\*\/)/gim @@ -5663,30 +5665,30 @@ module ts { function getRenameInfo(fileName: string, position: number): RenameInfo { synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); + let sourceFile = getValidSourceFile(fileName); - var node = getTouchingWord(sourceFile, position); + let node = getTouchingWord(sourceFile, position); // Can only rename an identifier. if (node && node.kind === SyntaxKind.Identifier) { - var symbol = typeInfoResolver.getSymbolAtLocation(node); + let symbol = typeInfoResolver.getSymbolAtLocation(node); // Only allow a symbol to be renamed if it actually has at least one declaration. if (symbol) { - var declarations = symbol.getDeclarations(); + let declarations = symbol.getDeclarations(); if (declarations && declarations.length > 0) { // Disallow rename for elements that are defined in the standard TypeScript library. - var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); + let defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); if (defaultLibFileName) { - for (var i = 0; i < declarations.length; i++) { - var sourceFile = declarations[i].getSourceFile(); + for (let current of declarations) { + let sourceFile = current.getSourceFile(); if (sourceFile && getCanonicalFileName(ts.normalizePath(sourceFile.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { return getRenameInfoError(getLocaleSpecificMessage(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); } } } - var kind = getSymbolKind(symbol, typeInfoResolver, node); + let kind = getSymbolKind(symbol, typeInfoResolver, node); if (kind) { return { canRename: true, @@ -5761,7 +5763,7 @@ module ts { } function initializeNameTable(sourceFile: SourceFile): void { - var nameTable: Map = {}; + let nameTable: Map = {}; walk(sourceFile); sourceFile.nameTable = nameTable; @@ -5799,13 +5801,13 @@ module ts { /// Classifier export function createClassifier(): Classifier { - var scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); + let scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); /// We do not have a full parser support to know when we should parse a regex or not /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where /// we have a series of divide operator. this list allows us to be more accurate by ruling out /// locations where a regexp cannot exist. - var noRegexTable: boolean[] = []; + let noRegexTable: boolean[] = []; noRegexTable[SyntaxKind.Identifier] = true; noRegexTable[SyntaxKind.StringLiteral] = true; noRegexTable[SyntaxKind.NumericLiteral] = true; @@ -5839,7 +5841,7 @@ module ts { // // Where on the second line, you will get the 'return' keyword, // a string literal, and a template end consisting of '} } `'. - var templateStack: SyntaxKind[] = []; + let templateStack: SyntaxKind[] = []; function isAccessibilityModifier(kind: SyntaxKind) { switch (kind) { @@ -5878,9 +5880,9 @@ module ts { // If there is a syntactic classifier ('syntacticClassifierAbsent' is false), // we will be more conservative in order to avoid conflicting with the syntactic classifier. function getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult { - var offset = 0; - var token = SyntaxKind.Unknown; - var lastNonTriviaToken = SyntaxKind.Unknown; + let offset = 0; + let token = SyntaxKind.Unknown; + let lastNonTriviaToken = SyntaxKind.Unknown; // Empty out the template stack for reuse. while (templateStack.length > 0) { @@ -5920,7 +5922,7 @@ module ts { scanner.setText(text); - var result: ClassificationResult = { + let result: ClassificationResult = { finalLexState: EndOfLineState.Start, entries: [] }; @@ -5944,7 +5946,7 @@ module ts { // In order to determine if the user is potentially typing something generic, we use a // weak heuristic where we track < and > tokens. It's a weak heuristic, but should // work well enough in practice. - var angleBracketStack = 0; + let angleBracketStack = 0; do { token = scanner.scan(); @@ -6002,7 +6004,7 @@ module ts { // If we don't have anything on the template stack, // then we aren't trying to keep track of a previously scanned template head. if (templateStack.length > 0) { - var lastTemplateStackToken = lastOrUndefined(templateStack); + let lastTemplateStackToken = lastOrUndefined(templateStack); if (lastTemplateStackToken === SyntaxKind.TemplateHead) { token = scanner.reScanTemplateToken(); @@ -6032,26 +6034,26 @@ module ts { return result; function processToken(): void { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); + let start = scanner.getTokenPos(); + let end = scanner.getTextPos(); addResult(end - start, classFromKind(token)); if (end >= text.length) { if (token === SyntaxKind.StringLiteral) { // Check to see if we finished up on a multiline string literal. - var tokenText = scanner.getTokenText(); + let tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { - var lastCharIndex = tokenText.length - 1; + let lastCharIndex = tokenText.length - 1; - var numBackslashes = 0; + let numBackslashes = 0; while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === CharacterCodes.backslash) { numBackslashes++; } // If we have an odd number of backslashes, then the multiline string is unclosed if (numBackslashes & 1) { - var quoteChar = tokenText.charCodeAt(0); + let quoteChar = tokenText.charCodeAt(0); result.finalLexState = quoteChar === CharacterCodes.doubleQuote ? EndOfLineState.InDoubleQuoteStringLiteral : EndOfLineState.InSingleQuoteStringLiteral; @@ -6196,7 +6198,7 @@ module ts { } /// getDefaultLibraryFilePath - declare var __dirname: string; + declare let __dirname: string; /** * Get the path of the default library file (lib.d.ts) as distributed with the typescript @@ -6217,7 +6219,7 @@ module ts { getNodeConstructor: kind => { function Node() { } - var proto = kind === SyntaxKind.SourceFile ? new SourceFileObject() : new NodeObject(); + let proto = kind === SyntaxKind.SourceFile ? new SourceFileObject() : new NodeObject(); proto.kind = kind; proto.pos = 0; proto.end = 0; diff --git a/src/services/shims.ts b/src/services/shims.ts index fc47ff95280..63e3c9e23ae 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -833,3 +833,5 @@ module ts { module TypeScript.Services { export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory; } + +let toolsVersion = "1.4"; diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index 5c35f87fb20..419d4819ba6 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -8,15 +8,15 @@ module ts.SignatureHelp { // will return the generic identifier that started the expression (e.g. "foo" in "foo[]; - var resolvedSignature = typeInfoResolver.getResolvedSignature(call, candidates); + let call = argumentInfo.invocation; + let candidates = []; + let resolvedSignature = typeInfoResolver.getResolvedSignature(call, candidates); cancellationToken.throwIfCancellationRequested(); if (!candidates.length) { @@ -211,7 +211,7 @@ module ts.SignatureHelp { */ function getImmediatelyContainingArgumentInfo(node: Node): ArgumentListInfo { if (node.parent.kind === SyntaxKind.CallExpression || node.parent.kind === SyntaxKind.NewExpression) { - var callExpression = node.parent; + let callExpression = node.parent; // There are 3 cases to handle: // 1. The token introduces a list, and should begin a sig help session // 2. The token is either not associated with a list, or ends a list, so the session should end @@ -230,15 +230,15 @@ module ts.SignatureHelp { node.kind === SyntaxKind.OpenParenToken) { // Find the list that starts right *after* the < or ( token. // If the user has just opened a list, consider this item 0. - var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; + let list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); + let isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; Debug.assert(list !== undefined); return { kind: isTypeArgList ? ArgumentListKind.TypeArguments : ArgumentListKind.CallArguments, invocation: callExpression, argumentsSpan: getApplicableSpanForArguments(list), argumentIndex: 0, - argumentCount: getCommaBasedArgCount(list) + argumentCount: getArgumentCount(list) }; } @@ -248,28 +248,23 @@ module ts.SignatureHelp { // - Between the type arguments and the arguments (greater than token) // - On the target of the call (parent.func) // - On the 'new' keyword in a 'new' expression - var listItemInfo = findListItemInfo(node); + let listItemInfo = findListItemInfo(node); if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; + let list = listItemInfo.list; + let isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - // The listItemIndex we got back includes commas. Our goal is to return the index of the proper - // item (not including commas). Here are some examples: - // 1. foo(a, b, c #) -> the listItemIndex is 4, we want to return 2 - // 2. foo(a, b, # c) -> listItemIndex is 3, we want to return 2 - // 3. foo(#a) -> listItemIndex is 0, we want to return 0 - // - // In general, we want to subtract the number of commas before the current index. - // But if we are on a comma, we also want to pretend we are on the argument *following* - // the comma. That amounts to taking the ceiling of half the index. - var argumentIndex = (listItemInfo.listItemIndex + 1) >> 1; + let argumentIndex = getArgumentIndex(list, node); + let argumentCount = getArgumentCount(list); + + Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, + `argumentCount < argumentIndex, ${argumentCount} < ${argumentIndex}`); return { kind: isTypeArgList ? ArgumentListKind.TypeArguments : ArgumentListKind.CallArguments, invocation: callExpression, argumentsSpan: getApplicableSpanForArguments(list), argumentIndex: argumentIndex, - argumentCount: getCommaBasedArgCount(list) + argumentCount: argumentCount }; } } @@ -281,18 +276,18 @@ module ts.SignatureHelp { } } else if (node.kind === SyntaxKind.TemplateHead && node.parent.parent.kind === SyntaxKind.TaggedTemplateExpression) { - var templateExpression = node.parent; - var tagExpression = templateExpression.parent; + let templateExpression = node.parent; + let tagExpression = templateExpression.parent; Debug.assert(templateExpression.kind === SyntaxKind.TemplateExpression); - var argumentIndex = isInsideTemplateLiteral(node, position) ? 0 : 1; + let argumentIndex = isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex); } else if (node.parent.kind === SyntaxKind.TemplateSpan && node.parent.parent.parent.kind === SyntaxKind.TaggedTemplateExpression) { - var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; + let templateSpan = node.parent; + let templateExpression = templateSpan.parent; + let tagExpression = templateExpression.parent; Debug.assert(templateExpression.kind === SyntaxKind.TemplateExpression); // If we're just after a template tail, don't show signature help. @@ -300,8 +295,8 @@ module ts.SignatureHelp { return undefined; } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); + let spanIndex = templateExpression.templateSpans.indexOf(templateSpan); + let argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); return getArgumentListInfoForTemplate(tagExpression, argumentIndex); } @@ -309,12 +304,52 @@ module ts.SignatureHelp { return undefined; } - function getCommaBasedArgCount(argumentsList: Node) { - // The number of arguments is the number of commas plus one, unless the list - // is completely empty, in which case there are 0 arguments. - return argumentsList.getChildCount() === 0 - ? 0 - : 1 + countWhere(argumentsList.getChildren(), arg => arg.kind === SyntaxKind.CommaToken); + function getArgumentIndex(argumentsList: Node, node: Node) { + // The list we got back can include commas. In the presence of errors it may + // also just have nodes without commas. For example "Foo(a b c)" will have 3 + // args without commas. We want to find what index we're at. So we count + // forward until we hit ourselves, only incrementing the index if it isn't a + // comma. + // + // Note: the subtlety around trailing commas (in getArgumentCount) does not apply + // here. That's because we're only walking forward until we hit the node we're + // on. In that case, even if we're after the trailing comma, we'll still see + // that trailing comma in the list, and we'll have generated the appropriate + // arg index. + let argumentIndex = 0; + let listChildren = argumentsList.getChildren(); + for (let child of listChildren) { + if (child === node) { + break; + } + if (child.kind !== SyntaxKind.CommaToken) { + argumentIndex++; + } + } + + return argumentIndex; + } + + function getArgumentCount(argumentsList: Node) { + // The argument count for a list is normally the number of non-comma children it has. + // For example, if you have "Foo(a,b)" then there will be three children of the arg + // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there + // is a small subtlety. If you have "Foo(a,)", then the child list will just have + // 'a' ''. So, in the case where the last child is a comma, we increase the + // arg count by one to compensate. + // + // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then + // we'll have: 'a' '' '' + // That will give us 2 non-commas. We then add one for the last comma, givin us an + // arg count of 3. + let listChildren = argumentsList.getChildren(); + + let argumentCount = countWhere(listChildren, arg => arg.kind !== SyntaxKind.CommaToken); + if (listChildren.length > 0 && lastOrUndefined(listChildren).kind === SyntaxKind.CommaToken) { + argumentCount++; + } + + return argumentCount; } // spanIndex is either the index for a given template span. @@ -343,10 +378,12 @@ module ts.SignatureHelp { function getArgumentListInfoForTemplate(tagExpression: TaggedTemplateExpression, argumentIndex: number): ArgumentListInfo { // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === SyntaxKind.NoSubstitutionTemplateLiteral + let argumentCount = tagExpression.template.kind === SyntaxKind.NoSubstitutionTemplateLiteral ? 1 : (tagExpression.template).templateSpans.length + 1; + Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, `argumentCount < argumentIndex, ${argumentCount} < ${argumentIndex}`); + return { kind: ArgumentListKind.TaggedTemplateArguments, invocation: tagExpression, @@ -365,15 +402,15 @@ module ts.SignatureHelp { // // The applicable span is from the first bar to the second bar (inclusive, // but not including parentheses) - var applicableSpanStart = argumentsList.getFullStart(); - var applicableSpanEnd = skipTrivia(sourceFile.text, argumentsList.getEnd(), /*stopAfterLineBreak*/ false); + let applicableSpanStart = argumentsList.getFullStart(); + let applicableSpanEnd = skipTrivia(sourceFile.text, argumentsList.getEnd(), /*stopAfterLineBreak*/ false); return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getApplicableSpanForTaggedTemplate(taggedTemplate: TaggedTemplateExpression): TextSpan { - var template = taggedTemplate.template; - var applicableSpanStart = template.getStart(); - var applicableSpanEnd = template.getEnd(); + let template = taggedTemplate.template; + let applicableSpanStart = template.getStart(); + let applicableSpanEnd = template.getEnd(); // We need to adjust the end position for the case where the template does not have a tail. // Otherwise, we will not show signature help past the expression. @@ -385,7 +422,7 @@ module ts.SignatureHelp { // This is because a Missing node has no width. However, what we actually want is to include trivia // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. if (template.kind === SyntaxKind.TemplateExpression) { - var lastSpan = lastOrUndefined((template).templateSpans); + let lastSpan = lastOrUndefined((template).templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); } @@ -395,7 +432,7 @@ module ts.SignatureHelp { } function getContainingArgumentInfo(node: Node): ArgumentListInfo { - for (var n = node; n.kind !== SyntaxKind.SourceFile; n = n.parent) { + for (let n = node; n.kind !== SyntaxKind.SourceFile; n = n.parent) { if (isFunctionBlock(n)) { return undefined; } @@ -406,7 +443,7 @@ module ts.SignatureHelp { Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); } - var argumentInfo = getImmediatelyContainingArgumentInfo(n); + let argumentInfo = getImmediatelyContainingArgumentInfo(n); if (argumentInfo) { return argumentInfo; } @@ -418,8 +455,8 @@ module ts.SignatureHelp { } function getChildListThatStartsWithOpenerToken(parent: Node, openerToken: Node, sourceFile: SourceFile): Node { - var children = parent.getChildren(sourceFile); - var indexOfOpenerToken = children.indexOf(openerToken); + let children = parent.getChildren(sourceFile); + let indexOfOpenerToken = children.indexOf(openerToken); Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); return children[indexOfOpenerToken + 1]; } @@ -433,10 +470,10 @@ module ts.SignatureHelp { * or the one with the most parameters. */ function selectBestInvalidOverloadIndex(candidates: Signature[], argumentCount: number): number { - var maxParamsSignatureIndex = -1; - var maxParams = -1; - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; + let maxParamsSignatureIndex = -1; + let maxParams = -1; + for (let i = 0; i < candidates.length; i++) { + let candidate = candidates[i]; if (candidate.hasRestParameter || candidate.parameters.length >= argumentCount) { return i; @@ -452,17 +489,17 @@ module ts.SignatureHelp { } function createSignatureHelpItems(candidates: Signature[], bestSignature: Signature, argumentListInfo: ArgumentListInfo): SignatureHelpItems { - var applicableSpan = argumentListInfo.argumentsSpan; - var isTypeParameterList = argumentListInfo.kind === ArgumentListKind.TypeArguments; + let applicableSpan = argumentListInfo.argumentsSpan; + let isTypeParameterList = argumentListInfo.kind === ArgumentListKind.TypeArguments; - var invocation = argumentListInfo.invocation; - var callTarget = getInvokedExpression(invocation) - var callTargetSymbol = typeInfoResolver.getSymbolAtLocation(callTarget); - var callTargetDisplayParts = callTargetSymbol && symbolToDisplayParts(typeInfoResolver, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined); - var items: SignatureHelpItem[] = map(candidates, candidateSignature => { - var signatureHelpParameters: SignatureHelpParameter[]; - var prefixDisplayParts: SymbolDisplayPart[] = []; - var suffixDisplayParts: SymbolDisplayPart[] = []; + let invocation = argumentListInfo.invocation; + let callTarget = getInvokedExpression(invocation) + let callTargetSymbol = typeInfoResolver.getSymbolAtLocation(callTarget); + let callTargetDisplayParts = callTargetSymbol && symbolToDisplayParts(typeInfoResolver, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined); + let items: SignatureHelpItem[] = map(candidates, candidateSignature => { + let signatureHelpParameters: SignatureHelpParameter[]; + let prefixDisplayParts: SymbolDisplayPart[] = []; + let suffixDisplayParts: SymbolDisplayPart[] = []; if (callTargetDisplayParts) { prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts); @@ -470,25 +507,25 @@ module ts.SignatureHelp { if (isTypeParameterList) { prefixDisplayParts.push(punctuationPart(SyntaxKind.LessThanToken)); - var typeParameters = candidateSignature.typeParameters; + let typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; suffixDisplayParts.push(punctuationPart(SyntaxKind.GreaterThanToken)); - var parameterParts = mapToDisplayParts(writer => + let parameterParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, invocation)); suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts); } else { - var typeParameterParts = mapToDisplayParts(writer => + let typeParameterParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation)); prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts); prefixDisplayParts.push(punctuationPart(SyntaxKind.OpenParenToken)); - var parameters = candidateSignature.parameters; + let parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? map(parameters, createSignatureHelpParameterForParameter) : emptyArray; suffixDisplayParts.push(punctuationPart(SyntaxKind.CloseParenToken)); } - var returnTypeParts = mapToDisplayParts(writer => + let returnTypeParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation)); suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts); @@ -502,16 +539,18 @@ module ts.SignatureHelp { }; }); - var argumentIndex = argumentListInfo.argumentIndex; + let argumentIndex = argumentListInfo.argumentIndex; // argumentCount is the *apparent* number of arguments. - var argumentCount = argumentListInfo.argumentCount; + let argumentCount = argumentListInfo.argumentCount; - var selectedItemIndex = candidates.indexOf(bestSignature); + let selectedItemIndex = candidates.indexOf(bestSignature); if (selectedItemIndex < 0) { selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); } + Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, `argumentCount < argumentIndex, ${argumentCount} < ${argumentIndex}`); + return { items, applicableSpan, @@ -521,10 +560,10 @@ module ts.SignatureHelp { }; function createSignatureHelpParameterForParameter(parameter: Symbol): SignatureHelpParameter { - var displayParts = mapToDisplayParts(writer => + let displayParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildParameterDisplay(parameter, writer, invocation)); - var isOptional = hasQuestionToken(parameter.valueDeclaration); + let isOptional = hasQuestionToken(parameter.valueDeclaration); return { name: parameter.name, @@ -535,7 +574,7 @@ module ts.SignatureHelp { } function createSignatureHelpParameterForTypeParameter(typeParameter: TypeParameter): SignatureHelpParameter { - var displayParts = mapToDisplayParts(writer => + let displayParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildTypeParameterDisplay(typeParameter, writer, invocation)); return { diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 13156523045..7671ee3f88d 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -7,18 +7,18 @@ module ts { export function getEndLinePosition(line: number, sourceFile: SourceFile): number { Debug.assert(line >= 0); - var lineStarts = sourceFile.getLineStarts(); + let lineStarts = sourceFile.getLineStarts(); - var lineIndex = line; + let lineIndex = line; if (lineIndex + 1 === lineStarts.length) { // last line - return EOF return sourceFile.text.length - 1; } else { // current line start - var start = lineStarts[lineIndex]; + let start = lineStarts[lineIndex]; // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[lineIndex + 1] - 1; + let pos = lineStarts[lineIndex + 1] - 1; Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); // walk backwards skipping line breaks, stop the the beginning of current line. // i.e: @@ -32,8 +32,8 @@ module ts { } export function getLineStartPositionForPosition(position: number, sourceFile: SourceFile): number { - var lineStarts = sourceFile.getLineStarts(); - var line = sourceFile.getLineAndCharacterOfPosition(position).line; + let lineStarts = sourceFile.getLineStarts(); + let line = sourceFile.getLineAndCharacterOfPosition(position).line; return lineStarts[line]; } @@ -54,13 +54,13 @@ module ts { } export function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number) { - var start = Math.max(start1, start2); - var end = Math.min(end1, end2); + let start = Math.max(start1, start2); + let end = Math.min(end1, end2); return start < end; } export function findListItemInfo(node: Node): ListItemInfo { - var list = findContainingList(node); + let list = findContainingList(node); // It is possible at this point for syntaxList to be undefined, either if // node.parent had no list child, or if none of its list children contained @@ -70,8 +70,8 @@ module ts { return undefined; } - var children = list.getChildren(); - var listItemIndex = indexOf(children, node); + let children = list.getChildren(); + let listItemIndex = indexOf(children, node); return { listItemIndex, @@ -79,6 +79,10 @@ module ts { }; } + export function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean { + return !!findChildOfKind(n, kind, sourceFile); + } + export function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node { return forEach(n.getChildren(sourceFile), c => c.kind === kind && c); } @@ -88,13 +92,15 @@ module ts { // be parented by the container of the SyntaxList, not the SyntaxList itself. // In order to find the list item index, we first need to locate SyntaxList itself and then search // for the position of the relevant node (or comma). - var syntaxList = forEach(node.parent.getChildren(), c => { + let syntaxList = forEach(node.parent.getChildren(), c => { // find syntax list that covers the span of the node if (c.kind === SyntaxKind.SyntaxList && c.pos <= node.pos && c.end >= node.end) { return c; } }); + // Either we didn't find an appropriate list, or the list must contain us. + Debug.assert(!syntaxList || contains(syntaxList.getChildren(), node)); return syntaxList; } @@ -124,7 +130,7 @@ module ts { /** Get the token whose text contains the position */ function getTokenAtPositionWorker(sourceFile: SourceFile, position: number, allowPositionInLeadingTrivia: boolean, includeItemAtEndPosition: (n: Node) => boolean): Node { - var current: Node = sourceFile; + let current: Node = sourceFile; outer: while (true) { if (isToken(current)) { // exit early @@ -132,17 +138,17 @@ module ts { } // find the child that contains 'position' - for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) { - var child = current.getChildAt(i); - var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile); + for (let i = 0, n = current.getChildCount(sourceFile); i < n; i++) { + let child = current.getChildAt(i); + let start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile); if (start <= position) { - var end = child.getEnd(); + let end = child.getEnd(); if (position < end || (position === end && child.kind === SyntaxKind.EndOfFileToken)) { current = child; continue outer; } else if (includeItemAtEndPosition && end === position) { - var previousToken = findPrecedingToken(position, sourceFile, child); + let previousToken = findPrecedingToken(position, sourceFile, child); if (previousToken && includeItemAtEndPosition(previousToken)) { return previousToken; } @@ -164,7 +170,7 @@ module ts { export function findTokenOnLeftOfPosition(file: SourceFile, position: number): Node { // Ideally, getTokenAtPosition should return a token. However, it is currently // broken, so we do a check to make sure the result was indeed a token. - var tokenAtPosition = getTokenAtPosition(file, position); + let tokenAtPosition = getTokenAtPosition(file, position); if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) { return tokenAtPosition; } @@ -181,10 +187,9 @@ module ts { return n; } - var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; - var shouldDiveInChildNode = + let children = n.getChildren(); + for (let child of children) { + let shouldDiveInChildNode = // previous token is enclosed somewhere in the child (child.pos <= previousToken.pos && child.end > previousToken.end) || // previous token ends exactly at the beginning of child @@ -207,8 +212,8 @@ module ts { return n; } - var children = n.getChildren(); - var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length); + let children = n.getChildren(); + let candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length); return candidate && findRightmostToken(candidate); } @@ -218,14 +223,14 @@ module ts { return n; } - var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; + let children = n.getChildren(); + for (let i = 0, len = children.length; i < len; i++) { + let child = children[i]; if (nodeHasTokens(child)) { if (position <= child.end) { if (child.getStart(sourceFile) >= position) { // actual start of the node is past the position - previous token should be at the end of previous child - var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); + let candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); return candidate && findRightmostToken(candidate) } else { @@ -243,14 +248,14 @@ module ts { // Try to find the rightmost token in the file without filtering. // Namely we are skipping the check: 'position < node.end' if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length); + let candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length); return candidate && findRightmostToken(candidate); } } /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' function findRightmostChildNodeWithTokens(children: Node[], exclusiveStartPosition: number): Node { - for (var i = exclusiveStartPosition - 1; i >= 0; --i) { + for (let i = exclusiveStartPosition - 1; i >= 0; --i) { if (nodeHasTokens(children[i])) { return children[i]; } @@ -265,8 +270,8 @@ module ts { } export function getNodeModifiers(node: Node): string { - var flags = getCombinedNodeFlags(node); - var result: string[] = []; + let flags = getCombinedNodeFlags(node); + let result: string[] = []; if (flags & NodeFlags.Private) result.push(ScriptElementKindModifier.privateMemberModifier); if (flags & NodeFlags.Protected) result.push(ScriptElementKindModifier.protectedMemberModifier); @@ -283,7 +288,7 @@ module ts { return (node).typeArguments; } - if (isAnyFunction(node) || node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.InterfaceDeclaration) { + if (isFunctionLike(node) || node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.InterfaceDeclaration) { return (node).typeParameters; } @@ -316,7 +321,7 @@ module ts { } export function compareDataObjects(dst: any, src: any): boolean { - for (var e in dst) { + for (let e in dst) { if (typeof dst[e] === "object") { if (!compareDataObjects(dst[e], src[e])) { return false; @@ -338,11 +343,11 @@ module ts { return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter; } - var displayPartWriter = getDisplayPartWriter(); + let displayPartWriter = getDisplayPartWriter(); function getDisplayPartWriter(): DisplayPartsSymbolWriter { - var displayParts: SymbolDisplayPart[]; - var lineStart: boolean; - var indent: number; + let displayParts: SymbolDisplayPart[]; + let lineStart: boolean; + let indent: number; resetWriter(); return { @@ -363,7 +368,7 @@ module ts { function writeIndent() { if (lineStart) { - var indentString = getIndentString(indent); + let indentString = getIndentString(indent); if (indentString) { displayParts.push(displayPart(indentString, SymbolDisplayPartKind.space)); } @@ -397,7 +402,7 @@ module ts { return displayPart(text, displayPartKind(symbol), symbol); function displayPartKind(symbol: Symbol): SymbolDisplayPartKind { - var flags = symbol.flags; + let flags = symbol.flags; if (flags & SymbolFlags.Variable) { return isFirstDeclarationOfSymbolParameter(symbol) ? SymbolDisplayPartKind.parameterName : SymbolDisplayPartKind.localName; @@ -414,7 +419,7 @@ module ts { else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; } else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; } else if (flags & SymbolFlags.TypeAlias) { return SymbolDisplayPartKind.aliasName; } - else if (flags & SymbolFlags.Import) { return SymbolDisplayPartKind.aliasName; } + else if (flags & SymbolFlags.Alias) { return SymbolDisplayPartKind.aliasName; } return SymbolDisplayPartKind.text; @@ -454,7 +459,7 @@ module ts { export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] { writeDisplayParts(displayPartWriter); - var result = displayPartWriter.displayParts(); + let result = displayPartWriter.displayParts(); displayPartWriter.clear(); return result; } diff --git a/tests/baselines/reference/2dArrays.js b/tests/baselines/reference/2dArrays.js index fe8ab380ba7..7840f3d8c54 100644 --- a/tests/baselines/reference/2dArrays.js +++ b/tests/baselines/reference/2dArrays.js @@ -30,7 +30,9 @@ var Board = (function () { function Board() { } Board.prototype.allShipsSunk = function () { - return this.ships.every(function (val) { return val.isSunk; }); + return this.ships.every(function (val) { + return val.isSunk; + }); }; return Board; })(); diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 30fe1d09060..575c2bdaf36 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -261,27 +261,28 @@ declare module "typescript" { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -313,15 +314,16 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -449,7 +451,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -542,13 +544,18 @@ declare module "typescript" { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; body: Block | Expression; } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; @@ -579,6 +586,7 @@ declare module "typescript" { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -652,6 +660,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -682,7 +693,7 @@ declare module "typescript" { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -712,10 +723,7 @@ declare module "typescript" { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -740,7 +748,7 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -755,8 +763,10 @@ declare module "typescript" { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression?: Expression; + type?: TypeNode; } interface FileReference extends TextRange { fileName: string; @@ -764,7 +774,7 @@ declare module "typescript" { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -927,10 +937,10 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -967,13 +977,14 @@ declare module "typescript" { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -998,7 +1009,7 @@ declare module "typescript" { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -1027,10 +1038,9 @@ declare module "typescript" { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1166,17 +1176,6 @@ declare module "typescript" { interface TypeMapper { (t: Type): Type; } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -1231,7 +1230,6 @@ declare module "typescript" { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1472,13 +1470,16 @@ declare module "typescript" { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1965,7 +1966,7 @@ declare module "typescript" { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; @@ -2001,6 +2002,8 @@ function compile(fileNames, options) { } exports.compile = compile; compile(process.argv.slice(2), { - noEmitOnError: true, noImplicitAny: true, - target: 1 /* ES5 */, module: 1 /* CommonJS */ + noEmitOnError: true, + noImplicitAny: true, + target: 1 /* ES5 */, + module: 1 /* CommonJS */ }); diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 81b98949c7b..336d70aa1a1 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -801,67 +801,70 @@ declare module "typescript" { ModuleBlock = 201, >ModuleBlock : SyntaxKind - ImportEqualsDeclaration = 202, + CaseBlock = 202, +>CaseBlock : SyntaxKind + + ImportEqualsDeclaration = 203, >ImportEqualsDeclaration : SyntaxKind - ImportDeclaration = 203, + ImportDeclaration = 204, >ImportDeclaration : SyntaxKind - ImportClause = 204, + ImportClause = 205, >ImportClause : SyntaxKind - NamespaceImport = 205, + NamespaceImport = 206, >NamespaceImport : SyntaxKind - NamedImports = 206, + NamedImports = 207, >NamedImports : SyntaxKind - ImportSpecifier = 207, + ImportSpecifier = 208, >ImportSpecifier : SyntaxKind - ExportAssignment = 208, + ExportAssignment = 209, >ExportAssignment : SyntaxKind - ExportDeclaration = 209, + ExportDeclaration = 210, >ExportDeclaration : SyntaxKind - NamedExports = 210, + NamedExports = 211, >NamedExports : SyntaxKind - ExportSpecifier = 211, + ExportSpecifier = 212, >ExportSpecifier : SyntaxKind - ExternalModuleReference = 212, + ExternalModuleReference = 213, >ExternalModuleReference : SyntaxKind - CaseClause = 213, + CaseClause = 214, >CaseClause : SyntaxKind - DefaultClause = 214, + DefaultClause = 215, >DefaultClause : SyntaxKind - HeritageClause = 215, + HeritageClause = 216, >HeritageClause : SyntaxKind - CatchClause = 216, + CatchClause = 217, >CatchClause : SyntaxKind - PropertyAssignment = 217, + PropertyAssignment = 218, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 218, + ShorthandPropertyAssignment = 219, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 219, + EnumMember = 220, >EnumMember : SyntaxKind - SourceFile = 220, + SourceFile = 221, >SourceFile : SyntaxKind - SyntaxList = 221, + SyntaxList = 222, >SyntaxList : SyntaxKind - Count = 222, + Count = 223, >Count : SyntaxKind FirstAssignment = 52, @@ -954,31 +957,34 @@ declare module "typescript" { Static = 128, >Static : NodeFlags - MultiLine = 256, + Default = 256, +>Default : NodeFlags + + MultiLine = 512, >MultiLine : NodeFlags - Synthetic = 512, + Synthetic = 1024, >Synthetic : NodeFlags - DeclarationFile = 1024, + DeclarationFile = 2048, >DeclarationFile : NodeFlags - Let = 2048, + Let = 4096, >Let : NodeFlags - Const = 4096, + Const = 8192, >Const : NodeFlags - OctalLiteral = 8192, + OctalLiteral = 16384, >OctalLiteral : NodeFlags - Modifier = 243, + Modifier = 499, >Modifier : NodeFlags AccessibilityModifier = 112, >AccessibilityModifier : NodeFlags - BlockScoped = 6144, + BlockScoped = 12288, >BlockScoped : NodeFlags } const enum ParserContextFlags { @@ -1370,7 +1376,7 @@ declare module "typescript" { >FunctionLikeDeclaration : FunctionLikeDeclaration >Statement : Statement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -1633,10 +1639,18 @@ declare module "typescript" { >condition : Expression >Expression : Expression + questionToken: Node; +>questionToken : Node +>Node : Node + whenTrue: Expression; >whenTrue : Expression >Expression : Expression + colonToken: Node; +>colonToken : Node +>Node : Node + whenFalse: Expression; >whenFalse : Expression >Expression : Expression @@ -1654,6 +1668,15 @@ declare module "typescript" { >body : Expression | Block >Block : Block >Expression : Expression + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { +>ArrowFunction : ArrowFunction +>Expression : Expression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + equalsGreaterThanToken: Node; +>equalsGreaterThanToken : Node +>Node : Node } interface LiteralExpression extends PrimaryExpression { >LiteralExpression : LiteralExpression @@ -1743,6 +1766,10 @@ declare module "typescript" { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression + dotToken: Node; +>dotToken : Node +>Node : Node + name: Identifier; >name : Identifier >Identifier : Identifier @@ -1965,6 +1992,14 @@ declare module "typescript" { >expression : Expression >Expression : Expression + caseBlock: CaseBlock; +>caseBlock : CaseBlock +>CaseBlock : CaseBlock + } + interface CaseBlock extends Node { +>CaseBlock : CaseBlock +>Node : Node + clauses: NodeArray; >clauses : NodeArray >NodeArray : NodeArray @@ -2057,7 +2092,7 @@ declare module "typescript" { >Declaration : Declaration >ModuleElement : ModuleElement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -2159,18 +2194,10 @@ declare module "typescript" { >NodeArray : NodeArray >EnumMember : EnumMember } - interface ExportContainer { ->ExportContainer : ExportContainer - - exportStars?: ExportDeclaration[]; ->exportStars : ExportDeclaration[] ->ExportDeclaration : ExportDeclaration - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { >ModuleDeclaration : ModuleDeclaration >Declaration : Declaration >ModuleElement : ModuleElement ->ExportContainer : ExportContainer name: Identifier | LiteralExpression; >name : Identifier | LiteralExpression @@ -2248,9 +2275,9 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { >ExportDeclaration : ExportDeclaration ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement exportClause?: NamedExports; @@ -2298,14 +2325,21 @@ declare module "typescript" { >ExportSpecifier : ImportOrExportSpecifier >ImportOrExportSpecifier : ImportOrExportSpecifier - interface ExportAssignment extends Statement, ModuleElement { + interface ExportAssignment extends Declaration, ModuleElement { >ExportAssignment : ExportAssignment ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier + isExportEquals?: boolean; +>isExportEquals : boolean + + expression?: Expression; +>expression : Expression +>Expression : Expression + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface FileReference extends TextRange { >FileReference : FileReference @@ -2321,10 +2355,9 @@ declare module "typescript" { hasTrailingNewLine?: boolean; >hasTrailingNewLine : boolean } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { >SourceFile : SourceFile >Declaration : Declaration ->ExportContainer : ExportContainer statements: NodeArray; >statements : NodeArray @@ -2965,26 +2998,23 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration ->ImportDeclaration : ImportDeclaration ->ExportDeclaration : ExportDeclaration + getGeneratedNameForNode(node: Node): string; +>getGeneratedNameForNode : (node: Node) => string +>node : Node +>Node : Node getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string + hasExportDefaultValue(node: SourceFile): boolean; +>hasExportDefaultValue : (node: SourceFile) => boolean >node : SourceFile >SourceFile : SourceFile - isReferencedImportDeclaration(node: Node): boolean; ->isReferencedImportDeclaration : (node: Node) => boolean + isReferencedAliasDeclaration(node: Node): boolean; +>isReferencedAliasDeclaration : (node: Node) => boolean >node : Node >Node : Node @@ -3140,8 +3170,8 @@ declare module "typescript" { ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 8388608, ->Import : SymbolFlags + Alias = 8388608, +>Alias : SymbolFlags Instantiated = 16777216, >Instantiated : SymbolFlags @@ -3161,6 +3191,9 @@ declare module "typescript" { Optional = 536870912, >Optional : SymbolFlags + ExportStar = 1073741824, +>ExportStar : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -3233,8 +3266,8 @@ declare module "typescript" { TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 8388608, ->ImportExcludes : SymbolFlags + AliasExcludes = 8388608, +>AliasExcludes : SymbolFlags ModuleMember = 8914931, >ModuleMember : SymbolFlags @@ -3325,13 +3358,6 @@ declare module "typescript" { referenced?: boolean; >referenced : boolean - exportAssignmentChecked?: boolean; ->exportAssignmentChecked : boolean - - exportAssignmentSymbol?: Symbol; ->exportAssignmentSymbol : Symbol ->Symbol : Symbol - unionType?: UnionType; >unionType : UnionType >UnionType : UnionType @@ -3339,6 +3365,9 @@ declare module "typescript" { resolvedExports?: SymbolTable; >resolvedExports : SymbolTable >SymbolTable : SymbolTable + + exportsChecked?: boolean; +>exportsChecked : boolean } interface TransientSymbol extends Symbol, SymbolLinks { >TransientSymbol : TransientSymbol @@ -3740,38 +3769,6 @@ declare module "typescript" { >t : Type >Type : Type >Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number } interface DiagnosticMessage { >DiagnosticMessage : DiagnosticMessage @@ -3931,9 +3928,6 @@ declare module "typescript" { watch?: boolean; >watch : boolean - stripInternal?: boolean; ->stripInternal : boolean - [option: string]: string | number | boolean; >option : string } @@ -4716,6 +4710,10 @@ declare module "typescript" { >TypeChecker : TypeChecker } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; +>version : string + function createCompilerHost(options: CompilerOptions): CompilerHost; >createCompilerHost : (options: CompilerOptions) => CompilerHost >options : CompilerOptions @@ -4744,7 +4742,8 @@ declare module "typescript" { >Program : Program } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; >servicesVersion : string interface Node { @@ -6094,7 +6093,7 @@ declare module "typescript" { >setNodeParents : boolean >SourceFile : SourceFile - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index b7a67081440..e7145e24070 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -292,27 +292,28 @@ declare module "typescript" { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -344,15 +345,16 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -480,7 +482,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -573,13 +575,18 @@ declare module "typescript" { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; body: Block | Expression; } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; @@ -610,6 +617,7 @@ declare module "typescript" { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -683,6 +691,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -713,7 +724,7 @@ declare module "typescript" { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -743,10 +754,7 @@ declare module "typescript" { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -771,7 +779,7 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -786,8 +794,10 @@ declare module "typescript" { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression?: Expression; + type?: TypeNode; } interface FileReference extends TextRange { fileName: string; @@ -795,7 +805,7 @@ declare module "typescript" { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -958,10 +968,10 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -998,13 +1008,14 @@ declare module "typescript" { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -1029,7 +1040,7 @@ declare module "typescript" { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -1058,10 +1069,9 @@ declare module "typescript" { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1197,17 +1207,6 @@ declare module "typescript" { interface TypeMapper { (t: Type): Type; } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -1262,7 +1261,6 @@ declare module "typescript" { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1503,13 +1501,16 @@ declare module "typescript" { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1996,7 +1997,7 @@ declare module "typescript" { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; @@ -2035,8 +2036,7 @@ function delint(sourceFile) { if (ifStatement.thenStatement.kind !== 174 /* Block */) { report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); } - if (ifStatement.elseStatement && - ifStatement.elseStatement.kind !== 174 /* Block */ && ifStatement.elseStatement.kind !== 178 /* IfStatement */) { + if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 174 /* Block */ && ifStatement.elseStatement.kind !== 178 /* IfStatement */) { report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); } break; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 6da030e8617..a40848b9e4c 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -947,67 +947,70 @@ declare module "typescript" { ModuleBlock = 201, >ModuleBlock : SyntaxKind - ImportEqualsDeclaration = 202, + CaseBlock = 202, +>CaseBlock : SyntaxKind + + ImportEqualsDeclaration = 203, >ImportEqualsDeclaration : SyntaxKind - ImportDeclaration = 203, + ImportDeclaration = 204, >ImportDeclaration : SyntaxKind - ImportClause = 204, + ImportClause = 205, >ImportClause : SyntaxKind - NamespaceImport = 205, + NamespaceImport = 206, >NamespaceImport : SyntaxKind - NamedImports = 206, + NamedImports = 207, >NamedImports : SyntaxKind - ImportSpecifier = 207, + ImportSpecifier = 208, >ImportSpecifier : SyntaxKind - ExportAssignment = 208, + ExportAssignment = 209, >ExportAssignment : SyntaxKind - ExportDeclaration = 209, + ExportDeclaration = 210, >ExportDeclaration : SyntaxKind - NamedExports = 210, + NamedExports = 211, >NamedExports : SyntaxKind - ExportSpecifier = 211, + ExportSpecifier = 212, >ExportSpecifier : SyntaxKind - ExternalModuleReference = 212, + ExternalModuleReference = 213, >ExternalModuleReference : SyntaxKind - CaseClause = 213, + CaseClause = 214, >CaseClause : SyntaxKind - DefaultClause = 214, + DefaultClause = 215, >DefaultClause : SyntaxKind - HeritageClause = 215, + HeritageClause = 216, >HeritageClause : SyntaxKind - CatchClause = 216, + CatchClause = 217, >CatchClause : SyntaxKind - PropertyAssignment = 217, + PropertyAssignment = 218, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 218, + ShorthandPropertyAssignment = 219, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 219, + EnumMember = 220, >EnumMember : SyntaxKind - SourceFile = 220, + SourceFile = 221, >SourceFile : SyntaxKind - SyntaxList = 221, + SyntaxList = 222, >SyntaxList : SyntaxKind - Count = 222, + Count = 223, >Count : SyntaxKind FirstAssignment = 52, @@ -1100,31 +1103,34 @@ declare module "typescript" { Static = 128, >Static : NodeFlags - MultiLine = 256, + Default = 256, +>Default : NodeFlags + + MultiLine = 512, >MultiLine : NodeFlags - Synthetic = 512, + Synthetic = 1024, >Synthetic : NodeFlags - DeclarationFile = 1024, + DeclarationFile = 2048, >DeclarationFile : NodeFlags - Let = 2048, + Let = 4096, >Let : NodeFlags - Const = 4096, + Const = 8192, >Const : NodeFlags - OctalLiteral = 8192, + OctalLiteral = 16384, >OctalLiteral : NodeFlags - Modifier = 243, + Modifier = 499, >Modifier : NodeFlags AccessibilityModifier = 112, >AccessibilityModifier : NodeFlags - BlockScoped = 6144, + BlockScoped = 12288, >BlockScoped : NodeFlags } const enum ParserContextFlags { @@ -1516,7 +1522,7 @@ declare module "typescript" { >FunctionLikeDeclaration : FunctionLikeDeclaration >Statement : Statement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -1779,10 +1785,18 @@ declare module "typescript" { >condition : Expression >Expression : Expression + questionToken: Node; +>questionToken : Node +>Node : Node + whenTrue: Expression; >whenTrue : Expression >Expression : Expression + colonToken: Node; +>colonToken : Node +>Node : Node + whenFalse: Expression; >whenFalse : Expression >Expression : Expression @@ -1800,6 +1814,15 @@ declare module "typescript" { >body : Expression | Block >Block : Block >Expression : Expression + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { +>ArrowFunction : ArrowFunction +>Expression : Expression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + equalsGreaterThanToken: Node; +>equalsGreaterThanToken : Node +>Node : Node } interface LiteralExpression extends PrimaryExpression { >LiteralExpression : LiteralExpression @@ -1889,6 +1912,10 @@ declare module "typescript" { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression + dotToken: Node; +>dotToken : Node +>Node : Node + name: Identifier; >name : Identifier >Identifier : Identifier @@ -2111,6 +2138,14 @@ declare module "typescript" { >expression : Expression >Expression : Expression + caseBlock: CaseBlock; +>caseBlock : CaseBlock +>CaseBlock : CaseBlock + } + interface CaseBlock extends Node { +>CaseBlock : CaseBlock +>Node : Node + clauses: NodeArray; >clauses : NodeArray >NodeArray : NodeArray @@ -2203,7 +2238,7 @@ declare module "typescript" { >Declaration : Declaration >ModuleElement : ModuleElement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -2305,18 +2340,10 @@ declare module "typescript" { >NodeArray : NodeArray >EnumMember : EnumMember } - interface ExportContainer { ->ExportContainer : ExportContainer - - exportStars?: ExportDeclaration[]; ->exportStars : ExportDeclaration[] ->ExportDeclaration : ExportDeclaration - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { >ModuleDeclaration : ModuleDeclaration >Declaration : Declaration >ModuleElement : ModuleElement ->ExportContainer : ExportContainer name: Identifier | LiteralExpression; >name : Identifier | LiteralExpression @@ -2394,9 +2421,9 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { >ExportDeclaration : ExportDeclaration ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement exportClause?: NamedExports; @@ -2444,14 +2471,21 @@ declare module "typescript" { >ExportSpecifier : ImportOrExportSpecifier >ImportOrExportSpecifier : ImportOrExportSpecifier - interface ExportAssignment extends Statement, ModuleElement { + interface ExportAssignment extends Declaration, ModuleElement { >ExportAssignment : ExportAssignment ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier + isExportEquals?: boolean; +>isExportEquals : boolean + + expression?: Expression; +>expression : Expression +>Expression : Expression + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface FileReference extends TextRange { >FileReference : FileReference @@ -2467,10 +2501,9 @@ declare module "typescript" { hasTrailingNewLine?: boolean; >hasTrailingNewLine : boolean } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { >SourceFile : SourceFile >Declaration : Declaration ->ExportContainer : ExportContainer statements: NodeArray; >statements : NodeArray @@ -3111,26 +3144,23 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration ->ImportDeclaration : ImportDeclaration ->ExportDeclaration : ExportDeclaration + getGeneratedNameForNode(node: Node): string; +>getGeneratedNameForNode : (node: Node) => string +>node : Node +>Node : Node getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string + hasExportDefaultValue(node: SourceFile): boolean; +>hasExportDefaultValue : (node: SourceFile) => boolean >node : SourceFile >SourceFile : SourceFile - isReferencedImportDeclaration(node: Node): boolean; ->isReferencedImportDeclaration : (node: Node) => boolean + isReferencedAliasDeclaration(node: Node): boolean; +>isReferencedAliasDeclaration : (node: Node) => boolean >node : Node >Node : Node @@ -3286,8 +3316,8 @@ declare module "typescript" { ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 8388608, ->Import : SymbolFlags + Alias = 8388608, +>Alias : SymbolFlags Instantiated = 16777216, >Instantiated : SymbolFlags @@ -3307,6 +3337,9 @@ declare module "typescript" { Optional = 536870912, >Optional : SymbolFlags + ExportStar = 1073741824, +>ExportStar : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -3379,8 +3412,8 @@ declare module "typescript" { TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 8388608, ->ImportExcludes : SymbolFlags + AliasExcludes = 8388608, +>AliasExcludes : SymbolFlags ModuleMember = 8914931, >ModuleMember : SymbolFlags @@ -3471,13 +3504,6 @@ declare module "typescript" { referenced?: boolean; >referenced : boolean - exportAssignmentChecked?: boolean; ->exportAssignmentChecked : boolean - - exportAssignmentSymbol?: Symbol; ->exportAssignmentSymbol : Symbol ->Symbol : Symbol - unionType?: UnionType; >unionType : UnionType >UnionType : UnionType @@ -3485,6 +3511,9 @@ declare module "typescript" { resolvedExports?: SymbolTable; >resolvedExports : SymbolTable >SymbolTable : SymbolTable + + exportsChecked?: boolean; +>exportsChecked : boolean } interface TransientSymbol extends Symbol, SymbolLinks { >TransientSymbol : TransientSymbol @@ -3886,38 +3915,6 @@ declare module "typescript" { >t : Type >Type : Type >Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number } interface DiagnosticMessage { >DiagnosticMessage : DiagnosticMessage @@ -4077,9 +4074,6 @@ declare module "typescript" { watch?: boolean; >watch : boolean - stripInternal?: boolean; ->stripInternal : boolean - [option: string]: string | number | boolean; >option : string } @@ -4862,6 +4856,10 @@ declare module "typescript" { >TypeChecker : TypeChecker } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; +>version : string + function createCompilerHost(options: CompilerOptions): CompilerHost; >createCompilerHost : (options: CompilerOptions) => CompilerHost >options : CompilerOptions @@ -4890,7 +4888,8 @@ declare module "typescript" { >Program : Program } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; >servicesVersion : string interface Node { @@ -6240,7 +6239,7 @@ declare module "typescript" { >setNodeParents : boolean >SourceFile : SourceFile - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index c30d4f03456..da8fe979d17 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -293,27 +293,28 @@ declare module "typescript" { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -345,15 +346,16 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -481,7 +483,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -574,13 +576,18 @@ declare module "typescript" { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; body: Block | Expression; } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; @@ -611,6 +618,7 @@ declare module "typescript" { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -684,6 +692,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -714,7 +725,7 @@ declare module "typescript" { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -744,10 +755,7 @@ declare module "typescript" { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -772,7 +780,7 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -787,8 +795,10 @@ declare module "typescript" { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression?: Expression; + type?: TypeNode; } interface FileReference extends TextRange { fileName: string; @@ -796,7 +806,7 @@ declare module "typescript" { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -959,10 +969,10 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -999,13 +1009,14 @@ declare module "typescript" { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -1030,7 +1041,7 @@ declare module "typescript" { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -1059,10 +1070,9 @@ declare module "typescript" { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1198,17 +1208,6 @@ declare module "typescript" { interface TypeMapper { (t: Type): Type; } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -1263,7 +1262,6 @@ declare module "typescript" { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1504,13 +1502,16 @@ declare module "typescript" { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1997,7 +1998,7 @@ declare module "typescript" { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; @@ -2034,16 +2035,32 @@ function transform(contents, compilerOptions) { return files[fileName] !== undefined ? ts.createSourceFile(fileName, files[fileName], target) : undefined; }, writeFile: function (name, text, writeByteOrderMark) { - outputs.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); + outputs.push({ + name: name, + text: text, + writeByteOrderMark: writeByteOrderMark + }); }, - getDefaultLibFileName: function () { return "lib.d.ts"; }, - useCaseSensitiveFileNames: function () { return false; }, - getCanonicalFileName: function (fileName) { return fileName; }, - getCurrentDirectory: function () { return ""; }, - getNewLine: function () { return "\n"; } + getDefaultLibFileName: function () { + return "lib.d.ts"; + }, + useCaseSensitiveFileNames: function () { + return false; + }, + getCanonicalFileName: function (fileName) { + return fileName; + }, + getCurrentDirectory: function () { + return ""; + }, + getNewLine: function () { + return "\n"; + } }; // Create a program from inputs - var program = ts.createProgram(["file.ts"], compilerOptions, compilerHost); + var program = ts.createProgram([ + "file.ts" + ], compilerOptions, compilerHost); // Query for early errors var errors = ts.getPreEmitDiagnostics(program); var emitResult = program.emit(); diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 42862def15f..b694678d4cb 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -897,67 +897,70 @@ declare module "typescript" { ModuleBlock = 201, >ModuleBlock : SyntaxKind - ImportEqualsDeclaration = 202, + CaseBlock = 202, +>CaseBlock : SyntaxKind + + ImportEqualsDeclaration = 203, >ImportEqualsDeclaration : SyntaxKind - ImportDeclaration = 203, + ImportDeclaration = 204, >ImportDeclaration : SyntaxKind - ImportClause = 204, + ImportClause = 205, >ImportClause : SyntaxKind - NamespaceImport = 205, + NamespaceImport = 206, >NamespaceImport : SyntaxKind - NamedImports = 206, + NamedImports = 207, >NamedImports : SyntaxKind - ImportSpecifier = 207, + ImportSpecifier = 208, >ImportSpecifier : SyntaxKind - ExportAssignment = 208, + ExportAssignment = 209, >ExportAssignment : SyntaxKind - ExportDeclaration = 209, + ExportDeclaration = 210, >ExportDeclaration : SyntaxKind - NamedExports = 210, + NamedExports = 211, >NamedExports : SyntaxKind - ExportSpecifier = 211, + ExportSpecifier = 212, >ExportSpecifier : SyntaxKind - ExternalModuleReference = 212, + ExternalModuleReference = 213, >ExternalModuleReference : SyntaxKind - CaseClause = 213, + CaseClause = 214, >CaseClause : SyntaxKind - DefaultClause = 214, + DefaultClause = 215, >DefaultClause : SyntaxKind - HeritageClause = 215, + HeritageClause = 216, >HeritageClause : SyntaxKind - CatchClause = 216, + CatchClause = 217, >CatchClause : SyntaxKind - PropertyAssignment = 217, + PropertyAssignment = 218, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 218, + ShorthandPropertyAssignment = 219, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 219, + EnumMember = 220, >EnumMember : SyntaxKind - SourceFile = 220, + SourceFile = 221, >SourceFile : SyntaxKind - SyntaxList = 221, + SyntaxList = 222, >SyntaxList : SyntaxKind - Count = 222, + Count = 223, >Count : SyntaxKind FirstAssignment = 52, @@ -1050,31 +1053,34 @@ declare module "typescript" { Static = 128, >Static : NodeFlags - MultiLine = 256, + Default = 256, +>Default : NodeFlags + + MultiLine = 512, >MultiLine : NodeFlags - Synthetic = 512, + Synthetic = 1024, >Synthetic : NodeFlags - DeclarationFile = 1024, + DeclarationFile = 2048, >DeclarationFile : NodeFlags - Let = 2048, + Let = 4096, >Let : NodeFlags - Const = 4096, + Const = 8192, >Const : NodeFlags - OctalLiteral = 8192, + OctalLiteral = 16384, >OctalLiteral : NodeFlags - Modifier = 243, + Modifier = 499, >Modifier : NodeFlags AccessibilityModifier = 112, >AccessibilityModifier : NodeFlags - BlockScoped = 6144, + BlockScoped = 12288, >BlockScoped : NodeFlags } const enum ParserContextFlags { @@ -1466,7 +1472,7 @@ declare module "typescript" { >FunctionLikeDeclaration : FunctionLikeDeclaration >Statement : Statement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -1729,10 +1735,18 @@ declare module "typescript" { >condition : Expression >Expression : Expression + questionToken: Node; +>questionToken : Node +>Node : Node + whenTrue: Expression; >whenTrue : Expression >Expression : Expression + colonToken: Node; +>colonToken : Node +>Node : Node + whenFalse: Expression; >whenFalse : Expression >Expression : Expression @@ -1750,6 +1764,15 @@ declare module "typescript" { >body : Expression | Block >Block : Block >Expression : Expression + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { +>ArrowFunction : ArrowFunction +>Expression : Expression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + equalsGreaterThanToken: Node; +>equalsGreaterThanToken : Node +>Node : Node } interface LiteralExpression extends PrimaryExpression { >LiteralExpression : LiteralExpression @@ -1839,6 +1862,10 @@ declare module "typescript" { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression + dotToken: Node; +>dotToken : Node +>Node : Node + name: Identifier; >name : Identifier >Identifier : Identifier @@ -2061,6 +2088,14 @@ declare module "typescript" { >expression : Expression >Expression : Expression + caseBlock: CaseBlock; +>caseBlock : CaseBlock +>CaseBlock : CaseBlock + } + interface CaseBlock extends Node { +>CaseBlock : CaseBlock +>Node : Node + clauses: NodeArray; >clauses : NodeArray >NodeArray : NodeArray @@ -2153,7 +2188,7 @@ declare module "typescript" { >Declaration : Declaration >ModuleElement : ModuleElement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -2255,18 +2290,10 @@ declare module "typescript" { >NodeArray : NodeArray >EnumMember : EnumMember } - interface ExportContainer { ->ExportContainer : ExportContainer - - exportStars?: ExportDeclaration[]; ->exportStars : ExportDeclaration[] ->ExportDeclaration : ExportDeclaration - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { >ModuleDeclaration : ModuleDeclaration >Declaration : Declaration >ModuleElement : ModuleElement ->ExportContainer : ExportContainer name: Identifier | LiteralExpression; >name : Identifier | LiteralExpression @@ -2344,9 +2371,9 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { >ExportDeclaration : ExportDeclaration ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement exportClause?: NamedExports; @@ -2394,14 +2421,21 @@ declare module "typescript" { >ExportSpecifier : ImportOrExportSpecifier >ImportOrExportSpecifier : ImportOrExportSpecifier - interface ExportAssignment extends Statement, ModuleElement { + interface ExportAssignment extends Declaration, ModuleElement { >ExportAssignment : ExportAssignment ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier + isExportEquals?: boolean; +>isExportEquals : boolean + + expression?: Expression; +>expression : Expression +>Expression : Expression + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface FileReference extends TextRange { >FileReference : FileReference @@ -2417,10 +2451,9 @@ declare module "typescript" { hasTrailingNewLine?: boolean; >hasTrailingNewLine : boolean } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { >SourceFile : SourceFile >Declaration : Declaration ->ExportContainer : ExportContainer statements: NodeArray; >statements : NodeArray @@ -3061,26 +3094,23 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration ->ImportDeclaration : ImportDeclaration ->ExportDeclaration : ExportDeclaration + getGeneratedNameForNode(node: Node): string; +>getGeneratedNameForNode : (node: Node) => string +>node : Node +>Node : Node getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string + hasExportDefaultValue(node: SourceFile): boolean; +>hasExportDefaultValue : (node: SourceFile) => boolean >node : SourceFile >SourceFile : SourceFile - isReferencedImportDeclaration(node: Node): boolean; ->isReferencedImportDeclaration : (node: Node) => boolean + isReferencedAliasDeclaration(node: Node): boolean; +>isReferencedAliasDeclaration : (node: Node) => boolean >node : Node >Node : Node @@ -3236,8 +3266,8 @@ declare module "typescript" { ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 8388608, ->Import : SymbolFlags + Alias = 8388608, +>Alias : SymbolFlags Instantiated = 16777216, >Instantiated : SymbolFlags @@ -3257,6 +3287,9 @@ declare module "typescript" { Optional = 536870912, >Optional : SymbolFlags + ExportStar = 1073741824, +>ExportStar : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -3329,8 +3362,8 @@ declare module "typescript" { TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 8388608, ->ImportExcludes : SymbolFlags + AliasExcludes = 8388608, +>AliasExcludes : SymbolFlags ModuleMember = 8914931, >ModuleMember : SymbolFlags @@ -3421,13 +3454,6 @@ declare module "typescript" { referenced?: boolean; >referenced : boolean - exportAssignmentChecked?: boolean; ->exportAssignmentChecked : boolean - - exportAssignmentSymbol?: Symbol; ->exportAssignmentSymbol : Symbol ->Symbol : Symbol - unionType?: UnionType; >unionType : UnionType >UnionType : UnionType @@ -3435,6 +3461,9 @@ declare module "typescript" { resolvedExports?: SymbolTable; >resolvedExports : SymbolTable >SymbolTable : SymbolTable + + exportsChecked?: boolean; +>exportsChecked : boolean } interface TransientSymbol extends Symbol, SymbolLinks { >TransientSymbol : TransientSymbol @@ -3836,38 +3865,6 @@ declare module "typescript" { >t : Type >Type : Type >Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number } interface DiagnosticMessage { >DiagnosticMessage : DiagnosticMessage @@ -4027,9 +4024,6 @@ declare module "typescript" { watch?: boolean; >watch : boolean - stripInternal?: boolean; ->stripInternal : boolean - [option: string]: string | number | boolean; >option : string } @@ -4812,6 +4806,10 @@ declare module "typescript" { >TypeChecker : TypeChecker } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; +>version : string + function createCompilerHost(options: CompilerOptions): CompilerHost; >createCompilerHost : (options: CompilerOptions) => CompilerHost >options : CompilerOptions @@ -4840,7 +4838,8 @@ declare module "typescript" { >Program : Program } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; >servicesVersion : string interface Node { @@ -6190,7 +6189,7 @@ declare module "typescript" { >setNodeParents : boolean >SourceFile : SourceFile - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index a9ed17e924d..f380994eba8 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -330,27 +330,28 @@ declare module "typescript" { EnumDeclaration = 199, ModuleDeclaration = 200, ModuleBlock = 201, - ImportEqualsDeclaration = 202, - ImportDeclaration = 203, - ImportClause = 204, - NamespaceImport = 205, - NamedImports = 206, - ImportSpecifier = 207, - ExportAssignment = 208, - ExportDeclaration = 209, - NamedExports = 210, - ExportSpecifier = 211, - ExternalModuleReference = 212, - CaseClause = 213, - DefaultClause = 214, - HeritageClause = 215, - CatchClause = 216, - PropertyAssignment = 217, - ShorthandPropertyAssignment = 218, - EnumMember = 219, - SourceFile = 220, - SyntaxList = 221, - Count = 222, + CaseBlock = 202, + ImportEqualsDeclaration = 203, + ImportDeclaration = 204, + ImportClause = 205, + NamespaceImport = 206, + NamedImports = 207, + ImportSpecifier = 208, + ExportAssignment = 209, + ExportDeclaration = 210, + NamedExports = 211, + ExportSpecifier = 212, + ExternalModuleReference = 213, + CaseClause = 214, + DefaultClause = 215, + HeritageClause = 216, + CatchClause = 217, + PropertyAssignment = 218, + ShorthandPropertyAssignment = 219, + EnumMember = 220, + SourceFile = 221, + SyntaxList = 222, + Count = 223, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -382,15 +383,16 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Default = 256, + MultiLine = 512, + Synthetic = 1024, + DeclarationFile = 2048, + Let = 4096, + Const = 8192, + OctalLiteral = 16384, + Modifier = 499, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 12288, } const enum ParserContextFlags { StrictMode = 1, @@ -518,7 +520,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -611,13 +613,18 @@ declare module "typescript" { } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; body: Block | Expression; } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; @@ -648,6 +655,7 @@ declare module "typescript" { } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -721,6 +729,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -751,7 +762,7 @@ declare module "typescript" { _moduleElementBrand: any; } interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; @@ -781,10 +792,7 @@ declare module "typescript" { name: Identifier; members: NodeArray; } - interface ExportContainer { - exportStars?: ExportDeclaration[]; - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } @@ -809,7 +817,7 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { exportClause?: NamedExports; moduleSpecifier?: Expression; } @@ -824,8 +832,10 @@ declare module "typescript" { } type ImportSpecifier = ImportOrExportSpecifier; type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ExportAssignment extends Declaration, ModuleElement { + isExportEquals?: boolean; + expression?: Expression; + type?: TypeNode; } interface FileReference extends TextRange { fileName: string; @@ -833,7 +843,7 @@ declare module "typescript" { interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { statements: NodeArray; endOfFileToken: Node; fileName: string; @@ -996,10 +1006,10 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; + getGeneratedNameForNode(node: Node): string; getExpressionNameSubstitution(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: Node): boolean; + hasExportDefaultValue(node: SourceFile): boolean; + isReferencedAliasDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; isDeclarationVisible(node: Declaration): boolean; @@ -1036,13 +1046,14 @@ declare module "typescript" { ExportValue = 1048576, ExportType = 2097152, ExportNamespace = 4194304, - Import = 8388608, + Alias = 8388608, Instantiated = 16777216, Merged = 33554432, Transient = 67108864, Prototype = 134217728, UnionProperty = 268435456, Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, @@ -1067,7 +1078,7 @@ declare module "typescript" { SetAccessorExcludes = 74687, TypeParameterExcludes = 530912, TypeAliasExcludes = 793056, - ImportExcludes = 8388608, + AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, HasLocals = 255504, @@ -1096,10 +1107,9 @@ declare module "typescript" { declaredType?: Type; mapper?: TypeMapper; referenced?: boolean; - exportAssignmentChecked?: boolean; - exportAssignmentSymbol?: Symbol; unionType?: UnionType; resolvedExports?: SymbolTable; + exportsChecked?: boolean; } interface TransientSymbol extends Symbol, SymbolLinks { } @@ -1235,17 +1245,6 @@ declare module "typescript" { interface TypeMapper { (t: Type): Type; } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -1300,7 +1299,6 @@ declare module "typescript" { target?: ScriptTarget; version?: boolean; watch?: boolean; - stripInternal?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1541,13 +1539,16 @@ declare module "typescript" { function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; function createCompilerHost(options: CompilerOptions): CompilerHost; function getPreEmitDiagnostics(program: Program): Diagnostic[]; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -2034,7 +2035,7 @@ declare module "typescript" { throwIfCancellationRequested(): void; } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; @@ -2060,21 +2061,33 @@ function watch(rootFileNames, options) { var files = {}; // initialize the list of files rootFileNames.forEach(function (fileName) { - files[fileName] = { version: 0 }; + files[fileName] = { + version: 0 + }; }); // Create the language service host to allow the LS to communicate with the host var servicesHost = { - getScriptFileNames: function () { return rootFileNames; }, - getScriptVersion: function (fileName) { return files[fileName] && files[fileName].version.toString(); }, + getScriptFileNames: function () { + return rootFileNames; + }, + getScriptVersion: function (fileName) { + return files[fileName] && files[fileName].version.toString(); + }, getScriptSnapshot: function (fileName) { if (!fs.existsSync(fileName)) { return undefined; } return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()); }, - getCurrentDirectory: function () { return process.cwd(); }, - getCompilationSettings: function () { return options; }, - getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); } + getCurrentDirectory: function () { + return process.cwd(); + }, + getCompilationSettings: function () { + return options; + }, + getDefaultLibFileName: function (options) { + return ts.getDefaultLibFilePath(options); + } }; // Create the language service files var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()); @@ -2083,7 +2096,10 @@ function watch(rootFileNames, options) { // First time around, emit all files emitFile(fileName); // Add a watch on the file to handle next change - fs.watchFile(fileName, { persistent: true, interval: 250 }, function (curr, prev) { + fs.watchFile(fileName, { + persistent: true, + interval: 250 + }, function (curr, prev) { // Check timestamp if (+curr.mtime <= +prev.mtime) { return; @@ -2121,6 +2137,10 @@ function watch(rootFileNames, options) { } } // Initialize files constituting the program as all .ts files in the current directory -var currentDirectoryFiles = fs.readdirSync(process.cwd()).filter(function (fileName) { return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; }); +var currentDirectoryFiles = fs.readdirSync(process.cwd()).filter(function (fileName) { + return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; +}); // Start the watcher -watch(currentDirectoryFiles, { module: 1 /* CommonJS */ }); +watch(currentDirectoryFiles, { + module: 1 /* CommonJS */ +}); diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 3dd324c421e..06329de5c96 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -1070,67 +1070,70 @@ declare module "typescript" { ModuleBlock = 201, >ModuleBlock : SyntaxKind - ImportEqualsDeclaration = 202, + CaseBlock = 202, +>CaseBlock : SyntaxKind + + ImportEqualsDeclaration = 203, >ImportEqualsDeclaration : SyntaxKind - ImportDeclaration = 203, + ImportDeclaration = 204, >ImportDeclaration : SyntaxKind - ImportClause = 204, + ImportClause = 205, >ImportClause : SyntaxKind - NamespaceImport = 205, + NamespaceImport = 206, >NamespaceImport : SyntaxKind - NamedImports = 206, + NamedImports = 207, >NamedImports : SyntaxKind - ImportSpecifier = 207, + ImportSpecifier = 208, >ImportSpecifier : SyntaxKind - ExportAssignment = 208, + ExportAssignment = 209, >ExportAssignment : SyntaxKind - ExportDeclaration = 209, + ExportDeclaration = 210, >ExportDeclaration : SyntaxKind - NamedExports = 210, + NamedExports = 211, >NamedExports : SyntaxKind - ExportSpecifier = 211, + ExportSpecifier = 212, >ExportSpecifier : SyntaxKind - ExternalModuleReference = 212, + ExternalModuleReference = 213, >ExternalModuleReference : SyntaxKind - CaseClause = 213, + CaseClause = 214, >CaseClause : SyntaxKind - DefaultClause = 214, + DefaultClause = 215, >DefaultClause : SyntaxKind - HeritageClause = 215, + HeritageClause = 216, >HeritageClause : SyntaxKind - CatchClause = 216, + CatchClause = 217, >CatchClause : SyntaxKind - PropertyAssignment = 217, + PropertyAssignment = 218, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 218, + ShorthandPropertyAssignment = 219, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 219, + EnumMember = 220, >EnumMember : SyntaxKind - SourceFile = 220, + SourceFile = 221, >SourceFile : SyntaxKind - SyntaxList = 221, + SyntaxList = 222, >SyntaxList : SyntaxKind - Count = 222, + Count = 223, >Count : SyntaxKind FirstAssignment = 52, @@ -1223,31 +1226,34 @@ declare module "typescript" { Static = 128, >Static : NodeFlags - MultiLine = 256, + Default = 256, +>Default : NodeFlags + + MultiLine = 512, >MultiLine : NodeFlags - Synthetic = 512, + Synthetic = 1024, >Synthetic : NodeFlags - DeclarationFile = 1024, + DeclarationFile = 2048, >DeclarationFile : NodeFlags - Let = 2048, + Let = 4096, >Let : NodeFlags - Const = 4096, + Const = 8192, >Const : NodeFlags - OctalLiteral = 8192, + OctalLiteral = 16384, >OctalLiteral : NodeFlags - Modifier = 243, + Modifier = 499, >Modifier : NodeFlags AccessibilityModifier = 112, >AccessibilityModifier : NodeFlags - BlockScoped = 6144, + BlockScoped = 12288, >BlockScoped : NodeFlags } const enum ParserContextFlags { @@ -1639,7 +1645,7 @@ declare module "typescript" { >FunctionLikeDeclaration : FunctionLikeDeclaration >Statement : Statement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -1902,10 +1908,18 @@ declare module "typescript" { >condition : Expression >Expression : Expression + questionToken: Node; +>questionToken : Node +>Node : Node + whenTrue: Expression; >whenTrue : Expression >Expression : Expression + colonToken: Node; +>colonToken : Node +>Node : Node + whenFalse: Expression; >whenFalse : Expression >Expression : Expression @@ -1923,6 +1937,15 @@ declare module "typescript" { >body : Expression | Block >Block : Block >Expression : Expression + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { +>ArrowFunction : ArrowFunction +>Expression : Expression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + equalsGreaterThanToken: Node; +>equalsGreaterThanToken : Node +>Node : Node } interface LiteralExpression extends PrimaryExpression { >LiteralExpression : LiteralExpression @@ -2012,6 +2035,10 @@ declare module "typescript" { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression + dotToken: Node; +>dotToken : Node +>Node : Node + name: Identifier; >name : Identifier >Identifier : Identifier @@ -2234,6 +2261,14 @@ declare module "typescript" { >expression : Expression >Expression : Expression + caseBlock: CaseBlock; +>caseBlock : CaseBlock +>CaseBlock : CaseBlock + } + interface CaseBlock extends Node { +>CaseBlock : CaseBlock +>Node : Node + clauses: NodeArray; >clauses : NodeArray >NodeArray : NodeArray @@ -2326,7 +2361,7 @@ declare module "typescript" { >Declaration : Declaration >ModuleElement : ModuleElement - name: Identifier; + name?: Identifier; >name : Identifier >Identifier : Identifier @@ -2428,18 +2463,10 @@ declare module "typescript" { >NodeArray : NodeArray >EnumMember : EnumMember } - interface ExportContainer { ->ExportContainer : ExportContainer - - exportStars?: ExportDeclaration[]; ->exportStars : ExportDeclaration[] ->ExportDeclaration : ExportDeclaration - } - interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer { + interface ModuleDeclaration extends Declaration, ModuleElement { >ModuleDeclaration : ModuleDeclaration >Declaration : Declaration >ModuleElement : ModuleElement ->ExportContainer : ExportContainer name: Identifier | LiteralExpression; >name : Identifier | LiteralExpression @@ -2517,9 +2544,9 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface ExportDeclaration extends Statement, ModuleElement { + interface ExportDeclaration extends Declaration, ModuleElement { >ExportDeclaration : ExportDeclaration ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement exportClause?: NamedExports; @@ -2567,14 +2594,21 @@ declare module "typescript" { >ExportSpecifier : ImportOrExportSpecifier >ImportOrExportSpecifier : ImportOrExportSpecifier - interface ExportAssignment extends Statement, ModuleElement { + interface ExportAssignment extends Declaration, ModuleElement { >ExportAssignment : ExportAssignment ->Statement : Statement +>Declaration : Declaration >ModuleElement : ModuleElement - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier + isExportEquals?: boolean; +>isExportEquals : boolean + + expression?: Expression; +>expression : Expression +>Expression : Expression + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface FileReference extends TextRange { >FileReference : FileReference @@ -2590,10 +2624,9 @@ declare module "typescript" { hasTrailingNewLine?: boolean; >hasTrailingNewLine : boolean } - interface SourceFile extends Declaration, ExportContainer { + interface SourceFile extends Declaration { >SourceFile : SourceFile >Declaration : Declaration ->ExportContainer : ExportContainer statements: NodeArray; >statements : NodeArray @@ -3234,26 +3267,23 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ExportDeclaration | ModuleDeclaration | ImportDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration ->ImportDeclaration : ImportDeclaration ->ExportDeclaration : ExportDeclaration + getGeneratedNameForNode(node: Node): string; +>getGeneratedNameForNode : (node: Node) => string +>node : Node +>Node : Node getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string + hasExportDefaultValue(node: SourceFile): boolean; +>hasExportDefaultValue : (node: SourceFile) => boolean >node : SourceFile >SourceFile : SourceFile - isReferencedImportDeclaration(node: Node): boolean; ->isReferencedImportDeclaration : (node: Node) => boolean + isReferencedAliasDeclaration(node: Node): boolean; +>isReferencedAliasDeclaration : (node: Node) => boolean >node : Node >Node : Node @@ -3409,8 +3439,8 @@ declare module "typescript" { ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 8388608, ->Import : SymbolFlags + Alias = 8388608, +>Alias : SymbolFlags Instantiated = 16777216, >Instantiated : SymbolFlags @@ -3430,6 +3460,9 @@ declare module "typescript" { Optional = 536870912, >Optional : SymbolFlags + ExportStar = 1073741824, +>ExportStar : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -3502,8 +3535,8 @@ declare module "typescript" { TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 8388608, ->ImportExcludes : SymbolFlags + AliasExcludes = 8388608, +>AliasExcludes : SymbolFlags ModuleMember = 8914931, >ModuleMember : SymbolFlags @@ -3594,13 +3627,6 @@ declare module "typescript" { referenced?: boolean; >referenced : boolean - exportAssignmentChecked?: boolean; ->exportAssignmentChecked : boolean - - exportAssignmentSymbol?: Symbol; ->exportAssignmentSymbol : Symbol ->Symbol : Symbol - unionType?: UnionType; >unionType : UnionType >UnionType : UnionType @@ -3608,6 +3634,9 @@ declare module "typescript" { resolvedExports?: SymbolTable; >resolvedExports : SymbolTable >SymbolTable : SymbolTable + + exportsChecked?: boolean; +>exportsChecked : boolean } interface TransientSymbol extends Symbol, SymbolLinks { >TransientSymbol : TransientSymbol @@ -4009,38 +4038,6 @@ declare module "typescript" { >t : Type >Type : Type >Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number } interface DiagnosticMessage { >DiagnosticMessage : DiagnosticMessage @@ -4200,9 +4197,6 @@ declare module "typescript" { watch?: boolean; >watch : boolean - stripInternal?: boolean; ->stripInternal : boolean - [option: string]: string | number | boolean; >option : string } @@ -4985,6 +4979,10 @@ declare module "typescript" { >TypeChecker : TypeChecker } declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; +>version : string + function createCompilerHost(options: CompilerOptions): CompilerHost; >createCompilerHost : (options: CompilerOptions) => CompilerHost >options : CompilerOptions @@ -5013,7 +5011,8 @@ declare module "typescript" { >Program : Program } declare module "typescript" { - var servicesVersion: string; + /** The version of the language service API */ + let servicesVersion: string; >servicesVersion : string interface Node { @@ -6363,7 +6362,7 @@ declare module "typescript" { >setNodeParents : boolean >SourceFile : SourceFile - var disableIncrementalParsing: boolean; + let disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js index 90bed5cfd91..74a8a66a8bc 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js @@ -17,7 +17,10 @@ var cl = Point.Origin; //// [function.js] function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } //// [test.js] var cl; diff --git a/tests/baselines/reference/ArrowFunctionExpression1.js b/tests/baselines/reference/ArrowFunctionExpression1.js index 21c71af243c..baa75809f65 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.js +++ b/tests/baselines/reference/ArrowFunctionExpression1.js @@ -2,4 +2,5 @@ var v = (public x: string) => { }; //// [ArrowFunctionExpression1.js] -var v = function (x) { }; +var v = function (x) { +}; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js index b27c2ce5a30..a3ccfbe2f41 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js @@ -58,7 +58,8 @@ var clodule1 = (function () { })(); var clodule1; (function (clodule1) { - function f(x) { } + function f(x) { + } })(clodule1 || (clodule1 = {})); var clodule2 = (function () { function clodule2() { @@ -81,7 +82,9 @@ var clodule3 = (function () { })(); var clodule3; (function (clodule3) { - clodule3.y = { id: T }; + clodule3.y = { + id: T + }; })(clodule3 || (clodule3 = {})); var clodule4 = (function () { function clodule4() { diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js index 255e74631a3..cf39aa6c11b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js @@ -19,7 +19,8 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { }; + clodule.fn = function (id) { + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js index 76ba858306c..69f72e3b4a7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js @@ -19,7 +19,8 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { }; + clodule.fn = function (id) { + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js index 5f01b6acff1..827557bdbad 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js @@ -19,7 +19,9 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.sfn = function (id) { return 42; }; + clodule.sfn = function (id) { + return 42; + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js index a86bc7d2e90..13483b591d9 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js @@ -28,12 +28,19 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246 + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; // unexpected error here bug 840246 return Point; })(); var Point; (function (Point) { - function Origin() { return null; } + function Origin() { + return null; + } Point.Origin = Origin; //expected duplicate identifier error })(Point || (Point = {})); var A; @@ -43,13 +50,20 @@ var A; this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246 + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; // unexpected error here bug 840246 return Point; })(); A.Point = Point; var Point; (function (Point) { - function Origin() { return ""; } + function Origin() { + return ""; + } Point.Origin = Origin; //expected duplicate identifier error })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js index f462ea9eaa9..188a69a18f7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js @@ -28,12 +28,19 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; return Point; })(); var Point; (function (Point) { - function Origin() { return ""; } // not an error, since not exported + function Origin() { + return ""; + } // not an error, since not exported })(Point || (Point = {})); var A; (function (A) { @@ -42,12 +49,19 @@ var A; this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; return Point; })(); A.Point = Point; var Point; (function (Point) { - function Origin() { return ""; } // not an error since not exported + function Origin() { + return ""; + } // not an error since not exported })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index 45958ad62d4..c2c20f7f7ff 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -28,7 +28,10 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); var Point; @@ -42,7 +45,10 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); A.Point = Point; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index ae56fd1acdc..241e1db7b0d 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -28,7 +28,10 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); var Point; @@ -42,7 +45,10 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); A.Point = Point; diff --git a/tests/baselines/reference/ClassDeclaration11.js b/tests/baselines/reference/ClassDeclaration11.js index 6284af07676..6c4ba4ac6ec 100644 --- a/tests/baselines/reference/ClassDeclaration11.js +++ b/tests/baselines/reference/ClassDeclaration11.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration13.js b/tests/baselines/reference/ClassDeclaration13.js index 7791b77eae6..4c4324eb1e1 100644 --- a/tests/baselines/reference/ClassDeclaration13.js +++ b/tests/baselines/reference/ClassDeclaration13.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration21.js b/tests/baselines/reference/ClassDeclaration21.js index b5144b607d1..94cf3587c8d 100644 --- a/tests/baselines/reference/ClassDeclaration21.js +++ b/tests/baselines/reference/ClassDeclaration21.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { }; + C.prototype[1] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration22.js b/tests/baselines/reference/ClassDeclaration22.js index 0074813e77e..c44ba4ba43b 100644 --- a/tests/baselines/reference/ClassDeclaration22.js +++ b/tests/baselines/reference/ClassDeclaration22.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { }; + C.prototype["bar"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt new file mode 100644 index 00000000000..6437cfbc73d --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts(1,15): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. + + +==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts (1 errors) ==== + for (var v of "") { } + ~~ +!!! error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.js b/tests/baselines/reference/ES3For-ofTypeCheck1.js new file mode 100644 index 00000000000..19efa96808b --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.js @@ -0,0 +1,7 @@ +//// [ES3For-ofTypeCheck1.ts] +for (var v of "") { } + +//// [ES3For-ofTypeCheck1.js] +for (var _i = 0, _a = ""; _i < _a.length; _i++) { + var v = _a[_i]; +} diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.js b/tests/baselines/reference/ES3For-ofTypeCheck2.js new file mode 100644 index 00000000000..952eade6cfb --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.js @@ -0,0 +1,9 @@ +//// [ES3For-ofTypeCheck2.ts] +for (var v of [true]) { } + +//// [ES3For-ofTypeCheck2.js] +for (var _i = 0, _a = [ + true +]; _i < _a.length; _i++) { + var v = _a[_i]; +} diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.types b/tests/baselines/reference/ES3For-ofTypeCheck2.types new file mode 100644 index 00000000000..f5ca0ab17e8 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts === +for (var v of [true]) { } +>v : boolean +>[true] : boolean[] + diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt new file mode 100644 index 00000000000..80e60008da4 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts(2,17): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. + + +==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts (1 errors) ==== + var union: string | string[]; + for (const v of union) { } + ~~~~~ +!!! error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.js b/tests/baselines/reference/ES3For-ofTypeCheck4.js new file mode 100644 index 00000000000..7386a1967eb --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.js @@ -0,0 +1,9 @@ +//// [ES3For-ofTypeCheck4.ts] +var union: string | string[]; +for (const v of union) { } + +//// [ES3For-ofTypeCheck4.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.js b/tests/baselines/reference/ES3For-ofTypeCheck6.js new file mode 100644 index 00000000000..ddc11808b18 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.js @@ -0,0 +1,9 @@ +//// [ES3For-ofTypeCheck6.ts] +var union: string[] | number[]; +for (var v of union) { } + +//// [ES3For-ofTypeCheck6.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.types b/tests/baselines/reference/ES3For-ofTypeCheck6.types new file mode 100644 index 00000000000..d7e6045b029 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts === +var union: string[] | number[]; +>union : string[] | number[] + +for (var v of union) { } +>v : string | number +>union : string[] | number[] + diff --git a/tests/baselines/reference/ES5For-of1.errors.txt b/tests/baselines/reference/ES5For-of1.errors.txt new file mode 100644 index 00000000000..16222725b3d --- /dev/null +++ b/tests/baselines/reference/ES5For-of1.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts(2,5): error TS2304: Cannot find name 'console'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts (1 errors) ==== + for (var v of ['a', 'b', 'c']) { + console.log(v); + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of1.js b/tests/baselines/reference/ES5For-of1.js new file mode 100644 index 00000000000..afdded3418c --- /dev/null +++ b/tests/baselines/reference/ES5For-of1.js @@ -0,0 +1,15 @@ +//// [ES5For-of1.ts] +for (var v of ['a', 'b', 'c']) { + console.log(v); +} + +//// [ES5For-of1.js] +for (var _i = 0, _a = [ + 'a', + 'b', + 'c' +]; _i < _a.length; _i++) { + var v = _a[_i]; + console.log(v); +} +//# sourceMappingURL=ES5For-of1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of1.js.map b/tests/baselines/reference/ES5For-of1.js.map new file mode 100644 index 00000000000..4fa49b0f02b --- /dev/null +++ b/tests/baselines/reference/ES5For-of1.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of1.js.map] +{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of1.sourcemap.txt b/tests/baselines/reference/ES5For-of1.sourcemap.txt new file mode 100644 index 00000000000..c07414d1d85 --- /dev/null +++ b/tests/baselines/reference/ES5For-of1.sourcemap.txt @@ -0,0 +1,127 @@ +=================================================================== +JsFile: ES5For-of1.js +mapUrl: ES5For-of1.js.map +sourceRoot: +sources: ES5For-of1.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of1.js +sourceFile:ES5For-of1.ts +------------------------------------------------------------------- +>>>for (var _i = 0, _a = [ +1 > +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +1 > +2 >for +3 > +4 > (var v of +5 > ['a', 'b', 'c'] +6 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) +3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) +4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0) +5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0) +6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0) +--- +>>> 'a', +1 >^^^^ +2 > ^^^ +3 > ^^-> +1 >[ +2 > 'a' +1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0) +2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0) +--- +>>> 'b', +1->^^^^ +2 > ^^^ +3 > ^-> +1->, +2 > 'b' +1->Emitted(3, 5) Source(1, 21) + SourceIndex(0) +2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0) +--- +>>> 'c' +1->^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1->, +2 > 'c' +1->Emitted(4, 5) Source(1, 26) + SourceIndex(0) +2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0) +--- +>>>]; _i < _a.length; _i++) { +1->^ +2 > ^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^ +1->] +2 > +3 > var v +4 > +5 > var v of ['a', 'b', 'c'] +6 > ) +1->Emitted(5, 2) Source(1, 30) + SourceIndex(0) +2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0) +3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0) +4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0) +5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0) +6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0) +--- +>>> var v = _a[_i]; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^^^^^^ +5 > ^^-> +1 > +2 > var +3 > v +4 > +1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0) +2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0) +3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0) +4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0) +--- +>>> console.log(v); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^ +8 > ^ +1-> of ['a', 'b', 'c']) { + > +2 > console +3 > . +4 > log +5 > ( +6 > v +7 > ) +8 > ; +1->Emitted(7, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(7, 12) Source(2, 12) + SourceIndex(0) +3 >Emitted(7, 13) Source(2, 13) + SourceIndex(0) +4 >Emitted(7, 16) Source(2, 16) + SourceIndex(0) +5 >Emitted(7, 17) Source(2, 17) + SourceIndex(0) +6 >Emitted(7, 18) Source(2, 18) + SourceIndex(0) +7 >Emitted(7, 19) Source(2, 19) + SourceIndex(0) +8 >Emitted(7, 20) Source(2, 20) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of10.js b/tests/baselines/reference/ES5For-of10.js new file mode 100644 index 00000000000..673e2ae0f77 --- /dev/null +++ b/tests/baselines/reference/ES5For-of10.js @@ -0,0 +1,22 @@ +//// [ES5For-of10.ts] +function foo() { + return { x: 0 }; +} +for (foo().x of []) { + for (foo().x of []) + var p = foo().x; +} + +//// [ES5For-of10.js] +function foo() { + return { + x: 0 + }; +} +for (var _i = 0, _a = []; _i < _a.length; _i++) { + foo().x = _a[_i]; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + foo().x = _c[_b]; + var p = foo().x; + } +} diff --git a/tests/baselines/reference/ES5For-of10.types b/tests/baselines/reference/ES5For-of10.types new file mode 100644 index 00000000000..32a2adcf3da --- /dev/null +++ b/tests/baselines/reference/ES5For-of10.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts === +function foo() { +>foo : () => { x: number; } + + return { x: 0 }; +>{ x: 0 } : { x: number; } +>x : number +} +for (foo().x of []) { +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number +>[] : undefined[] + + for (foo().x of []) +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number +>[] : undefined[] + + var p = foo().x; +>p : number +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number +} diff --git a/tests/baselines/reference/ES5For-of11.js b/tests/baselines/reference/ES5For-of11.js new file mode 100644 index 00000000000..dc1268524f1 --- /dev/null +++ b/tests/baselines/reference/ES5For-of11.js @@ -0,0 +1,9 @@ +//// [ES5For-of11.ts] +var v; +for (v of []) { } + +//// [ES5For-of11.js] +var v; +for (var _i = 0, _a = []; _i < _a.length; _i++) { + v = _a[_i]; +} diff --git a/tests/baselines/reference/ES5For-of11.types b/tests/baselines/reference/ES5For-of11.types new file mode 100644 index 00000000000..e51bc46f157 --- /dev/null +++ b/tests/baselines/reference/ES5For-of11.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts === +var v; +>v : any + +for (v of []) { } +>v : any +>[] : undefined[] + diff --git a/tests/baselines/reference/ES5For-of12.errors.txt b/tests/baselines/reference/ES5For-of12.errors.txt new file mode 100644 index 00000000000..02ed4c335a6 --- /dev/null +++ b/tests/baselines/reference/ES5For-of12.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,7): error TS2364: Invalid left-hand side of assignment expression. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts (1 errors) ==== + for ([""] of [[""]]) { } + ~~ +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of12.js b/tests/baselines/reference/ES5For-of12.js new file mode 100644 index 00000000000..7a5534f4aa1 --- /dev/null +++ b/tests/baselines/reference/ES5For-of12.js @@ -0,0 +1,11 @@ +//// [ES5For-of12.ts] +for ([""] of [[""]]) { } + +//// [ES5For-of12.js] +for (var _i = 0, _a = [ + [ + "" + ] +]; _i < _a.length; _i++) { + "" = _a[_i][0]; +} diff --git a/tests/baselines/reference/ES5For-of13.js b/tests/baselines/reference/ES5For-of13.js new file mode 100644 index 00000000000..ba9c24eebfe --- /dev/null +++ b/tests/baselines/reference/ES5For-of13.js @@ -0,0 +1,15 @@ +//// [ES5For-of13.ts] +for (let v of ['a', 'b', 'c']) { + var x = v; +} + +//// [ES5For-of13.js] +for (var _i = 0, _a = [ + 'a', + 'b', + 'c' +]; _i < _a.length; _i++) { + var v = _a[_i]; + var x = v; +} +//# sourceMappingURL=ES5For-of13.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of13.js.map b/tests/baselines/reference/ES5For-of13.js.map new file mode 100644 index 00000000000..3027624c54d --- /dev/null +++ b/tests/baselines/reference/ES5For-of13.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of13.js.map] +{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of13.sourcemap.txt b/tests/baselines/reference/ES5For-of13.sourcemap.txt new file mode 100644 index 00000000000..d2c3b6847e6 --- /dev/null +++ b/tests/baselines/reference/ES5For-of13.sourcemap.txt @@ -0,0 +1,120 @@ +=================================================================== +JsFile: ES5For-of13.js +mapUrl: ES5For-of13.js.map +sourceRoot: +sources: ES5For-of13.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of13.js +sourceFile:ES5For-of13.ts +------------------------------------------------------------------- +>>>for (var _i = 0, _a = [ +1 > +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +1 > +2 >for +3 > +4 > (let v of +5 > ['a', 'b', 'c'] +6 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) +3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) +4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0) +5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0) +6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0) +--- +>>> 'a', +1 >^^^^ +2 > ^^^ +3 > ^^-> +1 >[ +2 > 'a' +1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0) +2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0) +--- +>>> 'b', +1->^^^^ +2 > ^^^ +3 > ^-> +1->, +2 > 'b' +1->Emitted(3, 5) Source(1, 21) + SourceIndex(0) +2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0) +--- +>>> 'c' +1->^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1->, +2 > 'c' +1->Emitted(4, 5) Source(1, 26) + SourceIndex(0) +2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0) +--- +>>>]; _i < _a.length; _i++) { +1->^ +2 > ^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^ +1->] +2 > +3 > let v +4 > +5 > let v of ['a', 'b', 'c'] +6 > ) +1->Emitted(5, 2) Source(1, 30) + SourceIndex(0) +2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0) +3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0) +4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0) +5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0) +6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0) +--- +>>> var v = _a[_i]; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^^^^^^ +1 > +2 > let +3 > v +4 > +1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0) +2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0) +3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0) +4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0) +--- +>>> var x = v; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +1 > of ['a', 'b', 'c']) { + > +2 > var +3 > x +4 > = +5 > v +6 > ; +1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0) +5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0) +6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of13.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of13.types b/tests/baselines/reference/ES5For-of13.types new file mode 100644 index 00000000000..64aac2ae4b2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of13.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts === +for (let v of ['a', 'b', 'c']) { +>v : string +>['a', 'b', 'c'] : string[] + + var x = v; +>x : string +>v : string +} diff --git a/tests/baselines/reference/ES5For-of14.js b/tests/baselines/reference/ES5For-of14.js new file mode 100644 index 00000000000..1011bc3558c --- /dev/null +++ b/tests/baselines/reference/ES5For-of14.js @@ -0,0 +1,10 @@ +//// [ES5For-of14.ts] +for (const v of []) { + var x = v; +} + +//// [ES5For-of14.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + var x = v; +} diff --git a/tests/baselines/reference/ES5For-of14.types b/tests/baselines/reference/ES5For-of14.types new file mode 100644 index 00000000000..0a4f9a78453 --- /dev/null +++ b/tests/baselines/reference/ES5For-of14.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts === +for (const v of []) { +>v : any +>[] : undefined[] + + var x = v; +>x : any +>v : any +} diff --git a/tests/baselines/reference/ES5For-of15.js b/tests/baselines/reference/ES5For-of15.js new file mode 100644 index 00000000000..46d3dbd1d6e --- /dev/null +++ b/tests/baselines/reference/ES5For-of15.js @@ -0,0 +1,17 @@ +//// [ES5For-of15.ts] +for (let v of []) { + v; + for (const v of []) { + var x = v; + } +} + +//// [ES5For-of15.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + var _v = _c[_b]; + var x = _v; + } +} diff --git a/tests/baselines/reference/ES5For-of15.types b/tests/baselines/reference/ES5For-of15.types new file mode 100644 index 00000000000..90409b8b167 --- /dev/null +++ b/tests/baselines/reference/ES5For-of15.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts === +for (let v of []) { +>v : any +>[] : undefined[] + + v; +>v : any + + for (const v of []) { +>v : any +>[] : undefined[] + + var x = v; +>x : any +>v : any + } +} diff --git a/tests/baselines/reference/ES5For-of16.js b/tests/baselines/reference/ES5For-of16.js new file mode 100644 index 00000000000..1649e4481f2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of16.js @@ -0,0 +1,19 @@ +//// [ES5For-of16.ts] +for (let v of []) { + v; + for (let v of []) { + var x = v; + v++; + } +} + +//// [ES5For-of16.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + var _v = _c[_b]; + var x = _v; + _v++; + } +} diff --git a/tests/baselines/reference/ES5For-of16.types b/tests/baselines/reference/ES5For-of16.types new file mode 100644 index 00000000000..94f01509711 --- /dev/null +++ b/tests/baselines/reference/ES5For-of16.types @@ -0,0 +1,21 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts === +for (let v of []) { +>v : any +>[] : undefined[] + + v; +>v : any + + for (let v of []) { +>v : any +>[] : undefined[] + + var x = v; +>x : any +>v : any + + v++; +>v++ : number +>v : any + } +} diff --git a/tests/baselines/reference/ES5For-of17.errors.txt b/tests/baselines/reference/ES5For-of17.errors.txt new file mode 100644 index 00000000000..3b9ab93a565 --- /dev/null +++ b/tests/baselines/reference/ES5For-of17.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts (1 errors) ==== + for (let v of []) { + v; + for (let v of [v]) { + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + var x = v; + v++; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of17.js b/tests/baselines/reference/ES5For-of17.js new file mode 100644 index 00000000000..b728074ae93 --- /dev/null +++ b/tests/baselines/reference/ES5For-of17.js @@ -0,0 +1,21 @@ +//// [ES5For-of17.ts] +for (let v of []) { + v; + for (let v of [v]) { + var x = v; + v++; + } +} + +//// [ES5For-of17.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + for (var _b = 0, _c = [ + v + ]; _b < _c.length; _b++) { + var _v = _c[_b]; + var x = _v; + _v++; + } +} diff --git a/tests/baselines/reference/ES5For-of18.js b/tests/baselines/reference/ES5For-of18.js new file mode 100644 index 00000000000..a135b8b0463 --- /dev/null +++ b/tests/baselines/reference/ES5For-of18.js @@ -0,0 +1,18 @@ +//// [ES5For-of18.ts] +for (let v of []) { + v; +} +for (let v of []) { + v; +} + + +//// [ES5For-of18.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; +} +for (var _b = 0, _c = []; _b < _c.length; _b++) { + var _v = _c[_b]; + _v; +} diff --git a/tests/baselines/reference/ES5For-of18.types b/tests/baselines/reference/ES5For-of18.types new file mode 100644 index 00000000000..e78bc846df6 --- /dev/null +++ b/tests/baselines/reference/ES5For-of18.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts === +for (let v of []) { +>v : any +>[] : undefined[] + + v; +>v : any +} +for (let v of []) { +>v : any +>[] : undefined[] + + v; +>v : any +} + diff --git a/tests/baselines/reference/ES5For-of19.js b/tests/baselines/reference/ES5For-of19.js new file mode 100644 index 00000000000..7af9418f04f --- /dev/null +++ b/tests/baselines/reference/ES5For-of19.js @@ -0,0 +1,22 @@ +//// [ES5For-of19.ts] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} + + +//// [ES5For-of19.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + function foo() { + for (var _b = 0, _c = []; _b < _c.length; _b++) { + var _v = _c[_b]; + _v; + } + } +} diff --git a/tests/baselines/reference/ES5For-of19.types b/tests/baselines/reference/ES5For-of19.types new file mode 100644 index 00000000000..d95dc63d262 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19.types @@ -0,0 +1,21 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts === +for (let v of []) { +>v : any +>[] : undefined[] + + v; +>v : any + + function foo() { +>foo : () => void + + for (const v of []) { +>v : any +>[] : undefined[] + + v; +>v : any + } + } +} + diff --git a/tests/baselines/reference/ES5For-of2.js b/tests/baselines/reference/ES5For-of2.js new file mode 100644 index 00000000000..3d83df36c76 --- /dev/null +++ b/tests/baselines/reference/ES5For-of2.js @@ -0,0 +1,10 @@ +//// [ES5For-of2.ts] +for (var v of []) { + var x = v; +} + +//// [ES5For-of2.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + var x = v; +} diff --git a/tests/baselines/reference/ES5For-of2.types b/tests/baselines/reference/ES5For-of2.types new file mode 100644 index 00000000000..3e680c44bc8 --- /dev/null +++ b/tests/baselines/reference/ES5For-of2.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts === +for (var v of []) { +>v : any +>[] : undefined[] + + var x = v; +>x : any +>v : any +} diff --git a/tests/baselines/reference/ES5For-of20.errors.txt b/tests/baselines/reference/ES5For-of20.errors.txt new file mode 100644 index 00000000000..772d5143a04 --- /dev/null +++ b/tests/baselines/reference/ES5For-of20.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (2 errors) ==== + for (let v of []) { + let v; + for (let v of [v]) { + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + const v; + ~ +!!! error TS1155: 'const' declarations must be initialized + } + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of20.js b/tests/baselines/reference/ES5For-of20.js new file mode 100644 index 00000000000..3dd707805d8 --- /dev/null +++ b/tests/baselines/reference/ES5For-of20.js @@ -0,0 +1,19 @@ +//// [ES5For-of20.ts] +for (let v of []) { + let v; + for (let v of [v]) { + const v; + } +} + +//// [ES5For-of20.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + var _v; + for (var _b = 0, _c = [ + v + ]; _b < _c.length; _b++) { + var _v_1 = _c[_b]; + var _v_2; + } +} diff --git a/tests/baselines/reference/ES5For-of21.js b/tests/baselines/reference/ES5For-of21.js new file mode 100644 index 00000000000..9356514ea6b --- /dev/null +++ b/tests/baselines/reference/ES5For-of21.js @@ -0,0 +1,12 @@ +//// [ES5For-of21.ts] +for (let v of []) { + for (let _i of []) { } +} + +//// [ES5For-of21.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + var _i_1 = _c[_b]; + } +} diff --git a/tests/baselines/reference/ES5For-of21.types b/tests/baselines/reference/ES5For-of21.types new file mode 100644 index 00000000000..a15942fd013 --- /dev/null +++ b/tests/baselines/reference/ES5For-of21.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts === +for (let v of []) { +>v : any +>[] : undefined[] + + for (let _i of []) { } +>_i : any +>[] : undefined[] +} diff --git a/tests/baselines/reference/ES5For-of22.errors.txt b/tests/baselines/reference/ES5For-of22.errors.txt new file mode 100644 index 00000000000..914be13c63c --- /dev/null +++ b/tests/baselines/reference/ES5For-of22.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts(3,5): error TS2304: Cannot find name 'console'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts (1 errors) ==== + for (var x of [1, 2, 3]) { + let _a = 0; + console.log(x); + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of22.js b/tests/baselines/reference/ES5For-of22.js new file mode 100644 index 00000000000..63608f36e51 --- /dev/null +++ b/tests/baselines/reference/ES5For-of22.js @@ -0,0 +1,16 @@ +//// [ES5For-of22.ts] +for (var x of [1, 2, 3]) { + let _a = 0; + console.log(x); +} + +//// [ES5For-of22.js] +for (var _i = 0, _a = [ + 1, + 2, + 3 +]; _i < _a.length; _i++) { + var x = _a[_i]; + var _a_1 = 0; + console.log(x); +} diff --git a/tests/baselines/reference/ES5For-of23.errors.txt b/tests/baselines/reference/ES5For-of23.errors.txt new file mode 100644 index 00000000000..cbc043e32d2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of23.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts(3,5): error TS2304: Cannot find name 'console'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts (1 errors) ==== + for (var x of [1, 2, 3]) { + var _a = 0; + console.log(x); + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of23.js b/tests/baselines/reference/ES5For-of23.js new file mode 100644 index 00000000000..dcecfac69df --- /dev/null +++ b/tests/baselines/reference/ES5For-of23.js @@ -0,0 +1,16 @@ +//// [ES5For-of23.ts] +for (var x of [1, 2, 3]) { + var _a = 0; + console.log(x); +} + +//// [ES5For-of23.js] +for (var _i = 0, _b = [ + 1, + 2, + 3 +]; _i < _b.length; _i++) { + var x = _b[_i]; + var _a = 0; + console.log(x); +} diff --git a/tests/baselines/reference/ES5For-of24.js b/tests/baselines/reference/ES5For-of24.js new file mode 100644 index 00000000000..418ccc2005c --- /dev/null +++ b/tests/baselines/reference/ES5For-of24.js @@ -0,0 +1,16 @@ +//// [ES5For-of24.ts] +var a = [1, 2, 3]; +for (var v of a) { + let a = 0; +} + +//// [ES5For-of24.js] +var a = [ + 1, + 2, + 3 +]; +for (var _i = 0; _i < a.length; _i++) { + var v = a[_i]; + var _a = 0; +} diff --git a/tests/baselines/reference/ES5For-of24.types b/tests/baselines/reference/ES5For-of24.types new file mode 100644 index 00000000000..7170073b5d9 --- /dev/null +++ b/tests/baselines/reference/ES5For-of24.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts === +var a = [1, 2, 3]; +>a : number[] +>[1, 2, 3] : number[] + +for (var v of a) { +>v : number +>a : number[] + + let a = 0; +>a : number +} diff --git a/tests/baselines/reference/ES5For-of25.js b/tests/baselines/reference/ES5For-of25.js new file mode 100644 index 00000000000..14e59a472fc --- /dev/null +++ b/tests/baselines/reference/ES5For-of25.js @@ -0,0 +1,19 @@ +//// [ES5For-of25.ts] +var a = [1, 2, 3]; +for (var v of a) { + v; + a; +} + +//// [ES5For-of25.js] +var a = [ + 1, + 2, + 3 +]; +for (var _i = 0; _i < a.length; _i++) { + var v = a[_i]; + v; + a; +} +//# sourceMappingURL=ES5For-of25.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of25.js.map b/tests/baselines/reference/ES5For-of25.js.map new file mode 100644 index 00000000000..90f1b9c0750 --- /dev/null +++ b/tests/baselines/reference/ES5For-of25.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of25.js.map] +{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAC,CAAC;IAAE,CAAC;IAAE,CAAC;CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of25.sourcemap.txt b/tests/baselines/reference/ES5For-of25.sourcemap.txt new file mode 100644 index 00000000000..1031764b03a --- /dev/null +++ b/tests/baselines/reference/ES5For-of25.sourcemap.txt @@ -0,0 +1,145 @@ +=================================================================== +JsFile: ES5For-of25.js +mapUrl: ES5For-of25.js.map +sourceRoot: +sources: ES5For-of25.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of25.js +sourceFile:ES5For-of25.ts +------------------------------------------------------------------- +>>>var a = [ +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +1 > +2 >var +3 > a +4 > = +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) +--- +>>> 1, +1 >^^^^ +2 > ^ +3 > ^^-> +1 >[ +2 > 1 +1 >Emitted(2, 5) Source(1, 10) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 11) + SourceIndex(0) +--- +>>> 2, +1->^^^^ +2 > ^ +3 > ^-> +1->, +2 > 2 +1->Emitted(3, 5) Source(1, 13) + SourceIndex(0) +2 >Emitted(3, 6) Source(1, 14) + SourceIndex(0) +--- +>>> 3 +1->^^^^ +2 > ^ +1->, +2 > 3 +1->Emitted(4, 5) Source(1, 16) + SourceIndex(0) +2 >Emitted(4, 6) Source(1, 17) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(5, 2) Source(1, 18) + SourceIndex(0) +2 >Emitted(5, 3) Source(1, 19) + SourceIndex(0) +--- +>>>for (var _i = 0; _i < a.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^ +1-> + > +2 >for +3 > +4 > (var v of +5 > a +6 > +7 > var v +8 > +9 > var v of a +10> ) +1->Emitted(6, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(6, 4) Source(2, 4) + SourceIndex(0) +3 >Emitted(6, 5) Source(2, 5) + SourceIndex(0) +4 >Emitted(6, 6) Source(2, 15) + SourceIndex(0) +5 >Emitted(6, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(6, 18) Source(2, 6) + SourceIndex(0) +7 >Emitted(6, 31) Source(2, 11) + SourceIndex(0) +8 >Emitted(6, 33) Source(2, 6) + SourceIndex(0) +9 >Emitted(6, 37) Source(2, 16) + SourceIndex(0) +10>Emitted(6, 38) Source(2, 17) + SourceIndex(0) +--- +>>> var v = a[_i]; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^ +1 > +2 > var +3 > v +4 > of +5 > a +6 > +1 >Emitted(7, 5) Source(2, 6) + SourceIndex(0) +2 >Emitted(7, 9) Source(2, 10) + SourceIndex(0) +3 >Emitted(7, 10) Source(2, 11) + SourceIndex(0) +4 >Emitted(7, 13) Source(2, 15) + SourceIndex(0) +5 >Emitted(7, 14) Source(2, 16) + SourceIndex(0) +6 >Emitted(7, 18) Source(2, 11) + SourceIndex(0) +--- +>>> v; +1 >^^^^ +2 > ^ +3 > ^ +4 > ^-> +1 > of a) { + > +2 > v +3 > ; +1 >Emitted(8, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(8, 7) Source(3, 7) + SourceIndex(0) +--- +>>> a; +1->^^^^ +2 > ^ +3 > ^ +1-> + > +2 > a +3 > ; +1->Emitted(9, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(9, 6) Source(4, 6) + SourceIndex(0) +3 >Emitted(9, 7) Source(4, 7) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(10, 2) Source(5, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of25.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of25.types b/tests/baselines/reference/ES5For-of25.types new file mode 100644 index 00000000000..7b306ee9a26 --- /dev/null +++ b/tests/baselines/reference/ES5For-of25.types @@ -0,0 +1,15 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts === +var a = [1, 2, 3]; +>a : number[] +>[1, 2, 3] : number[] + +for (var v of a) { +>v : number +>a : number[] + + v; +>v : number + + a; +>a : number[] +} diff --git a/tests/baselines/reference/ES5For-of26.errors.txt b/tests/baselines/reference/ES5For-of26.errors.txt new file mode 100644 index 00000000000..324ded25b4f --- /dev/null +++ b/tests/baselines/reference/ES5For-of26.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts(1,10): error TS2461: Type 'number' is not an array type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts (1 errors) ==== + for (var [a = 0, b = 1] of [2, 3]) { + ~~~~~~~~~~~~~~ +!!! error TS2461: Type 'number' is not an array type. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26.js b/tests/baselines/reference/ES5For-of26.js new file mode 100644 index 00000000000..2cbb65ad790 --- /dev/null +++ b/tests/baselines/reference/ES5For-of26.js @@ -0,0 +1,16 @@ +//// [ES5For-of26.ts] +for (var [a = 0, b = 1] of [2, 3]) { + a; + b; +} + +//// [ES5For-of26.js] +for (var _i = 0, _a = [ + 2, + 3 +]; _i < _a.length; _i++) { + var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; + a; + b; +} +//# sourceMappingURL=ES5For-of26.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26.js.map b/tests/baselines/reference/ES5For-of26.js.map new file mode 100644 index 00000000000..d80a8a75951 --- /dev/null +++ b/tests/baselines/reference/ES5For-of26.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of26.js.map] +{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN;IAAC,CAAC;IAAE,CAAC;CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26.sourcemap.txt b/tests/baselines/reference/ES5For-of26.sourcemap.txt new file mode 100644 index 00000000000..4fcc759dca8 --- /dev/null +++ b/tests/baselines/reference/ES5For-of26.sourcemap.txt @@ -0,0 +1,134 @@ +=================================================================== +JsFile: ES5For-of26.js +mapUrl: ES5For-of26.js.map +sourceRoot: +sources: ES5For-of26.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of26.js +sourceFile:ES5For-of26.ts +------------------------------------------------------------------- +>>>for (var _i = 0, _a = [ +1 > +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +1 > +2 >for +3 > +4 > (var [a = 0, b = 1] of +5 > [2, 3] +6 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) +3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) +4 >Emitted(1, 6) Source(1, 28) + SourceIndex(0) +5 >Emitted(1, 16) Source(1, 34) + SourceIndex(0) +6 >Emitted(1, 18) Source(1, 28) + SourceIndex(0) +--- +>>> 2, +1 >^^^^ +2 > ^ +3 > ^-> +1 >[ +2 > 2 +1 >Emitted(2, 5) Source(1, 29) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 30) + SourceIndex(0) +--- +>>> 3 +1->^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^-> +1->, +2 > 3 +1->Emitted(3, 5) Source(1, 32) + SourceIndex(0) +2 >Emitted(3, 6) Source(1, 33) + SourceIndex(0) +--- +>>>]; _i < _a.length; _i++) { +1->^ +2 > ^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->] +2 > +3 > var [a = 0, b = 1] +4 > +5 > var [a = 0, b = 1] of [2, 3] +6 > ) +1->Emitted(4, 2) Source(1, 34) + SourceIndex(0) +2 >Emitted(4, 4) Source(1, 6) + SourceIndex(0) +3 >Emitted(4, 18) Source(1, 24) + SourceIndex(0) +4 >Emitted(4, 20) Source(1, 6) + SourceIndex(0) +5 >Emitted(4, 24) Source(1, 34) + SourceIndex(0) +6 >Emitted(4, 25) Source(1, 35) + SourceIndex(0) +--- +>>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^ +1-> +2 > var [ +3 > a +4 > = +5 > 0 +6 > , +7 > b +8 > = +9 > 1 +10> ] +1->Emitted(5, 5) Source(1, 6) + SourceIndex(0) +2 >Emitted(5, 34) Source(1, 11) + SourceIndex(0) +3 >Emitted(5, 35) Source(1, 12) + SourceIndex(0) +4 >Emitted(5, 54) Source(1, 15) + SourceIndex(0) +5 >Emitted(5, 55) Source(1, 16) + SourceIndex(0) +6 >Emitted(5, 74) Source(1, 18) + SourceIndex(0) +7 >Emitted(5, 75) Source(1, 19) + SourceIndex(0) +8 >Emitted(5, 94) Source(1, 22) + SourceIndex(0) +9 >Emitted(5, 95) Source(1, 23) + SourceIndex(0) +10>Emitted(5, 100) Source(1, 24) + SourceIndex(0) +--- +>>> a; +1 >^^^^ +2 > ^ +3 > ^ +4 > ^-> +1 > of [2, 3]) { + > +2 > a +3 > ; +1 >Emitted(6, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(2, 6) + SourceIndex(0) +3 >Emitted(6, 7) Source(2, 7) + SourceIndex(0) +--- +>>> b; +1->^^^^ +2 > ^ +3 > ^ +1-> + > +2 > b +3 > ; +1->Emitted(7, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(7, 7) Source(3, 7) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(8, 2) Source(4, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of26.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of27.errors.txt b/tests/baselines/reference/ES5For-of27.errors.txt new file mode 100644 index 00000000000..0c839859930 --- /dev/null +++ b/tests/baselines/reference/ES5For-of27.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,11): error TS2459: Type 'number' has no property 'x' and no string index signature. +tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,21): error TS2459: Type 'number' has no property 'y' and no string index signature. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts (2 errors) ==== + for (var {x: a = 0, y: b = 1} of [2, 3]) { + ~ +!!! error TS2459: Type 'number' has no property 'x' and no string index signature. + ~ +!!! error TS2459: Type 'number' has no property 'y' and no string index signature. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of27.js b/tests/baselines/reference/ES5For-of27.js new file mode 100644 index 00000000000..c3993f6da52 --- /dev/null +++ b/tests/baselines/reference/ES5For-of27.js @@ -0,0 +1,15 @@ +//// [ES5For-of27.ts] +for (var {x: a = 0, y: b = 1} of [2, 3]) { + a; + b; +} + +//// [ES5For-of27.js] +for (var _i = 0, _a = [ + 2, + 3 +]; _i < _a.length; _i++) { + var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d; + a; + b; +} diff --git a/tests/baselines/reference/ES5For-of28.errors.txt b/tests/baselines/reference/ES5For-of28.errors.txt new file mode 100644 index 00000000000..81398fa5a9b --- /dev/null +++ b/tests/baselines/reference/ES5For-of28.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts(1,10): error TS2461: Type 'number' is not an array type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts (1 errors) ==== + for (let [a = 0, b = 1] of [2, 3]) { + ~~~~~~~~~~~~~~ +!!! error TS2461: Type 'number' is not an array type. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of28.js b/tests/baselines/reference/ES5For-of28.js new file mode 100644 index 00000000000..f1fa44a8453 --- /dev/null +++ b/tests/baselines/reference/ES5For-of28.js @@ -0,0 +1,15 @@ +//// [ES5For-of28.ts] +for (let [a = 0, b = 1] of [2, 3]) { + a; + b; +} + +//// [ES5For-of28.js] +for (var _i = 0, _a = [ + 2, + 3 +]; _i < _a.length; _i++) { + var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; + a; + b; +} diff --git a/tests/baselines/reference/ES5For-of29.errors.txt b/tests/baselines/reference/ES5For-of29.errors.txt new file mode 100644 index 00000000000..e669b070222 --- /dev/null +++ b/tests/baselines/reference/ES5For-of29.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,13): error TS2459: Type 'number' has no property 'x' and no string index signature. +tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,23): error TS2459: Type 'number' has no property 'y' and no string index signature. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts (2 errors) ==== + for (const {x: a = 0, y: b = 1} of [2, 3]) { + ~ +!!! error TS2459: Type 'number' has no property 'x' and no string index signature. + ~ +!!! error TS2459: Type 'number' has no property 'y' and no string index signature. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of29.js b/tests/baselines/reference/ES5For-of29.js new file mode 100644 index 00000000000..11f847262e9 --- /dev/null +++ b/tests/baselines/reference/ES5For-of29.js @@ -0,0 +1,15 @@ +//// [ES5For-of29.ts] +for (const {x: a = 0, y: b = 1} of [2, 3]) { + a; + b; +} + +//// [ES5For-of29.js] +for (var _i = 0, _a = [ + 2, + 3 +]; _i < _a.length; _i++) { + var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d; + a; + b; +} diff --git a/tests/baselines/reference/ES5For-of3.js b/tests/baselines/reference/ES5For-of3.js new file mode 100644 index 00000000000..9c2808edbba --- /dev/null +++ b/tests/baselines/reference/ES5For-of3.js @@ -0,0 +1,14 @@ +//// [ES5For-of3.ts] +for (var v of ['a', 'b', 'c']) + var x = v; + +//// [ES5For-of3.js] +for (var _i = 0, _a = [ + 'a', + 'b', + 'c' +]; _i < _a.length; _i++) { + var v = _a[_i]; + var x = v; +} +//# sourceMappingURL=ES5For-of3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of3.js.map b/tests/baselines/reference/ES5For-of3.js.map new file mode 100644 index 00000000000..bfc09619d8e --- /dev/null +++ b/tests/baselines/reference/ES5For-of3.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of3.js.map] +{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of3.sourcemap.txt b/tests/baselines/reference/ES5For-of3.sourcemap.txt new file mode 100644 index 00000000000..252a4a7414c --- /dev/null +++ b/tests/baselines/reference/ES5For-of3.sourcemap.txt @@ -0,0 +1,119 @@ +=================================================================== +JsFile: ES5For-of3.js +mapUrl: ES5For-of3.js.map +sourceRoot: +sources: ES5For-of3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of3.js +sourceFile:ES5For-of3.ts +------------------------------------------------------------------- +>>>for (var _i = 0, _a = [ +1 > +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +1 > +2 >for +3 > +4 > (var v of +5 > ['a', 'b', 'c'] +6 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) +3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) +4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0) +5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0) +6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0) +--- +>>> 'a', +1 >^^^^ +2 > ^^^ +3 > ^^-> +1 >[ +2 > 'a' +1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0) +2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0) +--- +>>> 'b', +1->^^^^ +2 > ^^^ +3 > ^-> +1->, +2 > 'b' +1->Emitted(3, 5) Source(1, 21) + SourceIndex(0) +2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0) +--- +>>> 'c' +1->^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1->, +2 > 'c' +1->Emitted(4, 5) Source(1, 26) + SourceIndex(0) +2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0) +--- +>>>]; _i < _a.length; _i++) { +1->^ +2 > ^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^ +1->] +2 > +3 > var v +4 > +5 > var v of ['a', 'b', 'c'] +6 > ) +1->Emitted(5, 2) Source(1, 30) + SourceIndex(0) +2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0) +3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0) +4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0) +5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0) +6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0) +--- +>>> var v = _a[_i]; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^^^^^^ +1 > +2 > var +3 > v +4 > +1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0) +2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0) +3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0) +4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0) +--- +>>> var x = v; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +1 > of ['a', 'b', 'c']) + > +2 > var +3 > x +4 > = +5 > v +6 > ; +1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0) +5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0) +6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +1 >Emitted(8, 2) Source(2, 15) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of3.types b/tests/baselines/reference/ES5For-of3.types new file mode 100644 index 00000000000..c47328816e8 --- /dev/null +++ b/tests/baselines/reference/ES5For-of3.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts === +for (var v of ['a', 'b', 'c']) +>v : string +>['a', 'b', 'c'] : string[] + + var x = v; +>x : string +>v : string + diff --git a/tests/baselines/reference/ES5For-of30.errors.txt b/tests/baselines/reference/ES5For-of30.errors.txt new file mode 100644 index 00000000000..0b02a55ba3f --- /dev/null +++ b/tests/baselines/reference/ES5For-of30.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,6): error TS2461: Type 'string | number' is not an array type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts (1 errors) ==== + var a: string, b: number; + var tuple: [number, string] = [2, "3"]; + for ([a = 1, b = ""] of tuple) { + ~~~~~~~~~~~~~~~ +!!! error TS2461: Type 'string | number' is not an array type. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of30.js b/tests/baselines/reference/ES5For-of30.js new file mode 100644 index 00000000000..f76a7938dcb --- /dev/null +++ b/tests/baselines/reference/ES5For-of30.js @@ -0,0 +1,20 @@ +//// [ES5For-of30.ts] +var a: string, b: number; +var tuple: [number, string] = [2, "3"]; +for ([a = 1, b = ""] of tuple) { + a; + b; +} + +//// [ES5For-of30.js] +var a, b; +var tuple = [ + 2, + "3" +]; +for (var _i = 0; _i < tuple.length; _i++) { + _a = tuple[_i], _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? "" : _c; + a; + b; +} +var _a, _b, _c; diff --git a/tests/baselines/reference/ES5For-of31.errors.txt b/tests/baselines/reference/ES5For-of31.errors.txt new file mode 100644 index 00000000000..4a49e1fdf92 --- /dev/null +++ b/tests/baselines/reference/ES5For-of31.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,8): error TS2459: Type 'undefined' has no property 'a' and no string index signature. +tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,18): error TS2459: Type 'undefined' has no property 'b' and no string index signature. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts (2 errors) ==== + var a: string, b: number; + + for ({ a: b = 1, b: a = ""} of []) { + ~ +!!! error TS2459: Type 'undefined' has no property 'a' and no string index signature. + ~ +!!! error TS2459: Type 'undefined' has no property 'b' and no string index signature. + a; + b; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of31.js b/tests/baselines/reference/ES5For-of31.js new file mode 100644 index 00000000000..6b038e377cb --- /dev/null +++ b/tests/baselines/reference/ES5For-of31.js @@ -0,0 +1,16 @@ +//// [ES5For-of31.ts] +var a: string, b: number; + +for ({ a: b = 1, b: a = ""} of []) { + a; + b; +} + +//// [ES5For-of31.js] +var a, b; +for (var _i = 0, _a = []; _i < _a.length; _i++) { + _b = _a[_i], _c = _b.a, b = _c === void 0 ? 1 : _c, _d = _b.b, a = _d === void 0 ? "" : _d; + a; + b; +} +var _b, _c, _d; diff --git a/tests/baselines/reference/ES5For-of4.js b/tests/baselines/reference/ES5For-of4.js new file mode 100644 index 00000000000..44d486dddf0 --- /dev/null +++ b/tests/baselines/reference/ES5For-of4.js @@ -0,0 +1,11 @@ +//// [ES5For-of4.ts] +for (var v of []) + var x = v; +var y = v; + +//// [ES5For-of4.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + var x = v; +} +var y = v; diff --git a/tests/baselines/reference/ES5For-of4.types b/tests/baselines/reference/ES5For-of4.types new file mode 100644 index 00000000000..9396096746c --- /dev/null +++ b/tests/baselines/reference/ES5For-of4.types @@ -0,0 +1,13 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts === +for (var v of []) +>v : any +>[] : undefined[] + + var x = v; +>x : any +>v : any + +var y = v; +>y : any +>v : any + diff --git a/tests/baselines/reference/ES5For-of5.js b/tests/baselines/reference/ES5For-of5.js new file mode 100644 index 00000000000..8e1a37db061 --- /dev/null +++ b/tests/baselines/reference/ES5For-of5.js @@ -0,0 +1,10 @@ +//// [ES5For-of5.ts] +for (var _a of []) { + var x = _a; +} + +//// [ES5For-of5.js] +for (var _i = 0, _b = []; _i < _b.length; _i++) { + var _a = _b[_i]; + var x = _a; +} diff --git a/tests/baselines/reference/ES5For-of5.types b/tests/baselines/reference/ES5For-of5.types new file mode 100644 index 00000000000..dd9aa285edb --- /dev/null +++ b/tests/baselines/reference/ES5For-of5.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts === +for (var _a of []) { +>_a : any +>[] : undefined[] + + var x = _a; +>x : any +>_a : any +} diff --git a/tests/baselines/reference/ES5For-of6.js b/tests/baselines/reference/ES5For-of6.js new file mode 100644 index 00000000000..ac740814d80 --- /dev/null +++ b/tests/baselines/reference/ES5For-of6.js @@ -0,0 +1,18 @@ +//// [ES5For-of6.ts] +for (var w of []) { + for (var v of []) { + var x = [w, v]; + } +} + +//// [ES5For-of6.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var w = _a[_i]; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + var v = _c[_b]; + var x = [ + w, + v + ]; + } +} diff --git a/tests/baselines/reference/ES5For-of6.types b/tests/baselines/reference/ES5For-of6.types new file mode 100644 index 00000000000..e2d2f872809 --- /dev/null +++ b/tests/baselines/reference/ES5For-of6.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts === +for (var w of []) { +>w : any +>[] : undefined[] + + for (var v of []) { +>v : any +>[] : undefined[] + + var x = [w, v]; +>x : any[] +>[w, v] : any[] +>w : any +>v : any + } +} diff --git a/tests/baselines/reference/ES5For-of7.errors.txt b/tests/baselines/reference/ES5For-of7.errors.txt new file mode 100644 index 00000000000..a3d40f38814 --- /dev/null +++ b/tests/baselines/reference/ES5For-of7.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(6,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts (1 errors) ==== + for (var w of []) { + var x = w; + } + + for (var v of []) { + var x = [w, v]; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'. + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of7.js b/tests/baselines/reference/ES5For-of7.js new file mode 100644 index 00000000000..b88b6c055ac --- /dev/null +++ b/tests/baselines/reference/ES5For-of7.js @@ -0,0 +1,21 @@ +//// [ES5For-of7.ts] +for (var w of []) { + var x = w; +} + +for (var v of []) { + var x = [w, v]; +} + +//// [ES5For-of7.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var w = _a[_i]; + var x = w; +} +for (var _b = 0, _c = []; _b < _c.length; _b++) { + var v = _c[_b]; + var x = [ + w, + v + ]; +} diff --git a/tests/baselines/reference/ES5For-of8.errors.txt b/tests/baselines/reference/ES5For-of8.errors.txt new file mode 100644 index 00000000000..7cc3c871277 --- /dev/null +++ b/tests/baselines/reference/ES5For-of8.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts (1 errors) ==== + function foo() { + return { x: 0 }; + } + for (foo().x of ['a', 'b', 'c']) { + ~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var p = foo().x; + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of8.js b/tests/baselines/reference/ES5For-of8.js new file mode 100644 index 00000000000..6bf7dc37d1f --- /dev/null +++ b/tests/baselines/reference/ES5For-of8.js @@ -0,0 +1,23 @@ +//// [ES5For-of8.ts] +function foo() { + return { x: 0 }; +} +for (foo().x of ['a', 'b', 'c']) { + var p = foo().x; +} + +//// [ES5For-of8.js] +function foo() { + return { + x: 0 + }; +} +for (var _i = 0, _a = [ + 'a', + 'b', + 'c' +]; _i < _a.length; _i++) { + foo().x = _a[_i]; + var p = foo().x; +} +//# sourceMappingURL=ES5For-of8.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of8.js.map b/tests/baselines/reference/ES5For-of8.js.map new file mode 100644 index 00000000000..eadf5e8430e --- /dev/null +++ b/tests/baselines/reference/ES5For-of8.js.map @@ -0,0 +1,2 @@ +//// [ES5For-of8.js.map] +{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA;QAAEA,CAACA,EAAEA,CAACA;KAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,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 new file mode 100644 index 00000000000..f4b97ebe696 --- /dev/null +++ b/tests/baselines/reference/ES5For-of8.sourcemap.txt @@ -0,0 +1,188 @@ +=================================================================== +JsFile: ES5For-of8.js +mapUrl: ES5For-of8.js.map +sourceRoot: +sources: ES5For-of8.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of8.js +sourceFile:ES5For-of8.ts +------------------------------------------------------------------- +>>>function foo() { +1 > +2 >^^^^^^^^^^^^^-> +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +--- +>>> return { +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^-> +1->function foo() { + > +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) +--- +>>> x: 0 +1->^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->{ +2 > x +3 > : +4 > 0 +1->Emitted(3, 9) Source(2, 14) + SourceIndex(0) name (foo) +2 >Emitted(3, 10) Source(2, 15) + SourceIndex(0) name (foo) +3 >Emitted(3, 12) Source(2, 17) + SourceIndex(0) name (foo) +4 >Emitted(3, 13) Source(2, 18) + SourceIndex(0) name (foo) +--- +>>> }; +1 >^^^^^ +2 > ^ +1 > } +2 > ; +1 >Emitted(4, 6) Source(2, 20) + SourceIndex(0) name (foo) +2 >Emitted(4, 7) Source(2, 21) + SourceIndex(0) name (foo) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (foo) +2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (foo) +--- +>>>for (var _i = 0, _a = [ +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +1-> + > +2 >for +3 > +4 > (foo().x of +5 > ['a', 'b', 'c'] +6 > +1->Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 4) Source(4, 4) + SourceIndex(0) +3 >Emitted(6, 5) Source(4, 5) + SourceIndex(0) +4 >Emitted(6, 6) Source(4, 17) + SourceIndex(0) +5 >Emitted(6, 16) Source(4, 32) + SourceIndex(0) +6 >Emitted(6, 18) Source(4, 17) + SourceIndex(0) +--- +>>> 'a', +1 >^^^^ +2 > ^^^ +3 > ^^-> +1 >[ +2 > 'a' +1 >Emitted(7, 5) Source(4, 18) + SourceIndex(0) +2 >Emitted(7, 8) Source(4, 21) + SourceIndex(0) +--- +>>> 'b', +1->^^^^ +2 > ^^^ +3 > ^-> +1->, +2 > 'b' +1->Emitted(8, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(8, 8) Source(4, 26) + SourceIndex(0) +--- +>>> 'c' +1->^^^^ +2 > ^^^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1->, +2 > 'c' +1->Emitted(9, 5) Source(4, 28) + SourceIndex(0) +2 >Emitted(9, 8) Source(4, 31) + SourceIndex(0) +--- +>>>]; _i < _a.length; _i++) { +1->^ +2 > ^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^ +1->] +2 > +3 > foo().x +4 > +5 > foo().x of ['a', 'b', 'c'] +6 > ) +1->Emitted(10, 2) Source(4, 32) + SourceIndex(0) +2 >Emitted(10, 4) Source(4, 6) + SourceIndex(0) +3 >Emitted(10, 18) Source(4, 13) + SourceIndex(0) +4 >Emitted(10, 20) Source(4, 6) + SourceIndex(0) +5 >Emitted(10, 24) Source(4, 32) + SourceIndex(0) +6 >Emitted(10, 25) Source(4, 33) + SourceIndex(0) +--- +>>> foo().x = _a[_i]; +1 >^^^^ +2 > ^^^ +3 > ^^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^-> +1 > +2 > foo +3 > () +4 > . +5 > x +6 > +1 >Emitted(11, 5) Source(4, 6) + SourceIndex(0) +2 >Emitted(11, 8) Source(4, 9) + SourceIndex(0) +3 >Emitted(11, 10) Source(4, 11) + SourceIndex(0) +4 >Emitted(11, 11) Source(4, 12) + SourceIndex(0) +5 >Emitted(11, 12) Source(4, 13) + SourceIndex(0) +6 >Emitted(11, 21) Source(4, 13) + SourceIndex(0) +--- +>>> var p = foo().x; +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^ +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^ +9 > ^ +1-> of ['a', 'b', 'c']) { + > +2 > var +3 > p +4 > = +5 > foo +6 > () +7 > . +8 > x +9 > ; +1->Emitted(12, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(12, 9) Source(5, 9) + SourceIndex(0) +3 >Emitted(12, 10) Source(5, 10) + SourceIndex(0) +4 >Emitted(12, 13) Source(5, 13) + SourceIndex(0) +5 >Emitted(12, 16) Source(5, 16) + SourceIndex(0) +6 >Emitted(12, 18) Source(5, 18) + SourceIndex(0) +7 >Emitted(12, 19) Source(5, 19) + SourceIndex(0) +8 >Emitted(12, 20) Source(5, 20) + SourceIndex(0) +9 >Emitted(12, 21) Source(5, 21) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(13, 2) Source(6, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=ES5For-of8.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of9.js b/tests/baselines/reference/ES5For-of9.js new file mode 100644 index 00000000000..bef83118864 --- /dev/null +++ b/tests/baselines/reference/ES5For-of9.js @@ -0,0 +1,23 @@ +//// [ES5For-of9.ts] +function foo() { + return { x: 0 }; +} +for (foo().x of []) { + for (foo().x of []) { + var p = foo().x; + } +} + +//// [ES5For-of9.js] +function foo() { + return { + x: 0 + }; +} +for (var _i = 0, _a = []; _i < _a.length; _i++) { + foo().x = _a[_i]; + for (var _b = 0, _c = []; _b < _c.length; _b++) { + foo().x = _c[_b]; + var p = foo().x; + } +} diff --git a/tests/baselines/reference/ES5For-of9.types b/tests/baselines/reference/ES5For-of9.types new file mode 100644 index 00000000000..60870c2d642 --- /dev/null +++ b/tests/baselines/reference/ES5For-of9.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts === +function foo() { +>foo : () => { x: number; } + + return { x: 0 }; +>{ x: 0 } : { x: number; } +>x : number +} +for (foo().x of []) { +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number +>[] : undefined[] + + for (foo().x of []) { +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number +>[] : undefined[] + + var p = foo().x; +>p : number +>foo().x : number +>foo() : { x: number; } +>foo : () => { x: number; } +>x : number + } +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.js b/tests/baselines/reference/ES5For-ofTypeCheck1.js new file mode 100644 index 00000000000..f1522e512b6 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.js @@ -0,0 +1,7 @@ +//// [ES5For-ofTypeCheck1.ts] +for (var v of "") { } + +//// [ES5For-ofTypeCheck1.js] +for (var _i = 0, _a = ""; _i < _a.length; _i++) { + var v = _a[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.types b/tests/baselines/reference/ES5For-ofTypeCheck1.types new file mode 100644 index 00000000000..4da0ecc0e36 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts === +for (var v of "") { } +>v : string + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt new file mode 100644 index 00000000000..9551d0467e9 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt @@ -0,0 +1,23 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(1,15): error TS2461: Type 'StringIterator' is not an array type or a string type. +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(11,6): error TS2304: Cannot find name 'Symbol'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts (2 errors) ==== + for (var v of new StringIterator) { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS2461: Type 'StringIterator' is not an array type or a string type. + + // In ES3/5, you cannot for...of over an arbitrary iterable. + class StringIterator { + next() { + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + ~~~~~~ +!!! error TS2304: Cannot find name 'Symbol'. + return this; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.js b/tests/baselines/reference/ES5For-ofTypeCheck10.js new file mode 100644 index 00000000000..ffef1fde8f8 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.js @@ -0,0 +1,35 @@ +//// [ES5For-ofTypeCheck10.ts] +for (var v of new StringIterator) { } + +// In ES3/5, you cannot for...of over an arbitrary iterable. +class StringIterator { + next() { + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + return this; + } +} + +//// [ES5For-ofTypeCheck10.js] +for (var _i = 0, _a = new StringIterator; _i < _a.length; _i++) { + var v = _a[_i]; +} +// In ES3/5, you cannot for...of over an arbitrary iterable. +var StringIterator = (function () { + function StringIterator() { + } + StringIterator.prototype.next = function () { + return { + done: true, + value: "" + }; + }; + StringIterator.prototype[Symbol.iterator] = function () { + return this; + }; + return StringIterator; +})(); diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt new file mode 100644 index 00000000000..635bb09616a --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assignable to type 'string'. + Type 'number' is not assignable to type 'string'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts (1 errors) ==== + var union: string | number[]; + var v: string; + for (v of union) { } + ~ +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.js b/tests/baselines/reference/ES5For-ofTypeCheck11.js new file mode 100644 index 00000000000..c0e46a45452 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.js @@ -0,0 +1,11 @@ +//// [ES5For-ofTypeCheck11.ts] +var union: string | number[]; +var v: string; +for (v of union) { } + +//// [ES5For-ofTypeCheck11.js] +var union; +var v; +for (var _i = 0; _i < union.length; _i++) { + v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt new file mode 100644 index 00000000000..b726aaad6c7 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts(1,17): error TS2461: Type 'number' is not an array type or a string type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts (1 errors) ==== + for (const v of 0) { } + ~ +!!! error TS2461: Type 'number' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.js b/tests/baselines/reference/ES5For-ofTypeCheck12.js new file mode 100644 index 00000000000..6004990f6dc --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.js @@ -0,0 +1,7 @@ +//// [ES5For-ofTypeCheck12.ts] +for (const v of 0) { } + +//// [ES5For-ofTypeCheck12.js] +for (var _i = 0, _a = 0; _i < _a.length; _i++) { + var v = _a[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2.js b/tests/baselines/reference/ES5For-ofTypeCheck2.js new file mode 100644 index 00000000000..2c79054affc --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck2.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck2.ts] +for (var v of [true]) { } + +//// [ES5For-ofTypeCheck2.js] +for (var _i = 0, _a = [ + true +]; _i < _a.length; _i++) { + var v = _a[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2.types b/tests/baselines/reference/ES5For-ofTypeCheck2.types new file mode 100644 index 00000000000..e6b86ce1d81 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck2.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts === +for (var v of [true]) { } +>v : boolean +>[true] : boolean[] + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.js b/tests/baselines/reference/ES5For-ofTypeCheck3.js new file mode 100644 index 00000000000..b398f04e0ce --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.js @@ -0,0 +1,12 @@ +//// [ES5For-ofTypeCheck3.ts] +var tuple: [string, number] = ["", 0]; +for (var v of tuple) { } + +//// [ES5For-ofTypeCheck3.js] +var tuple = [ + "", + 0 +]; +for (var _i = 0; _i < tuple.length; _i++) { + var v = tuple[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.types b/tests/baselines/reference/ES5For-ofTypeCheck3.types new file mode 100644 index 00000000000..5293634c6c5 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts === +var tuple: [string, number] = ["", 0]; +>tuple : [string, number] +>["", 0] : [string, number] + +for (var v of tuple) { } +>v : string | number +>tuple : [string, number] + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4.js b/tests/baselines/reference/ES5For-ofTypeCheck4.js new file mode 100644 index 00000000000..630bc869c58 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck4.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck4.ts] +var union: string | string[]; +for (const v of union) { } + +//// [ES5For-ofTypeCheck4.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4.types b/tests/baselines/reference/ES5For-ofTypeCheck4.types new file mode 100644 index 00000000000..4f5721a0604 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck4.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts === +var union: string | string[]; +>union : string | string[] + +for (const v of union) { } +>v : string +>union : string | string[] + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5.js b/tests/baselines/reference/ES5For-ofTypeCheck5.js new file mode 100644 index 00000000000..2e6b47f779d --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck5.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck5.ts] +var union: string | number[]; +for (var v of union) { } + +//// [ES5For-ofTypeCheck5.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5.types b/tests/baselines/reference/ES5For-ofTypeCheck5.types new file mode 100644 index 00000000000..ed3d13f3918 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck5.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts === +var union: string | number[]; +>union : string | number[] + +for (var v of union) { } +>v : string | number +>union : string | number[] + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6.js b/tests/baselines/reference/ES5For-ofTypeCheck6.js new file mode 100644 index 00000000000..9249020b9d4 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck6.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck6.ts] +var union: string[] | number[]; +for (var v of union) { } + +//// [ES5For-ofTypeCheck6.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6.types b/tests/baselines/reference/ES5For-ofTypeCheck6.types new file mode 100644 index 00000000000..87999d9b0ca --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts === +var union: string[] | number[]; +>union : string[] | number[] + +for (var v of union) { } +>v : string | number +>union : string[] | number[] + diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt new file mode 100644 index 00000000000..9006b5a2779 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts (1 errors) ==== + var union: string | number; + for (var v of union) { } + ~~~~~ +!!! error TS2461: Type 'number' is not an array type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.js b/tests/baselines/reference/ES5For-ofTypeCheck7.js new file mode 100644 index 00000000000..d5b74a24728 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck7.ts] +var union: string | number; +for (var v of union) { } + +//// [ES5For-ofTypeCheck7.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt new file mode 100644 index 00000000000..0cb52dbb21b --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is not assignable to type 'symbol'. + Type 'string' is not assignable to type 'symbol'. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts (1 errors) ==== + var union: string | string[]| number[]| symbol[]; + var v: symbol; + for (v of union) { } + ~ +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'symbol'. +!!! error TS2322: Type 'string' is not assignable to type 'symbol'. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.js b/tests/baselines/reference/ES5For-ofTypeCheck8.js new file mode 100644 index 00000000000..d73aea1cb7b --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.js @@ -0,0 +1,11 @@ +//// [ES5For-ofTypeCheck8.ts] +var union: string | string[]| number[]| symbol[]; +var v: symbol; +for (v of union) { } + +//// [ES5For-ofTypeCheck8.js] +var union; +var v; +for (var _i = 0; _i < union.length; _i++) { + v = union[_i]; +} diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt new file mode 100644 index 00000000000..156eb188803 --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is not an array type. + + +==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts (1 errors) ==== + var union: string | string[] | number | symbol; + for (let v of union) { } + ~~~~~ +!!! error TS2461: Type 'number | symbol | string[]' is not an array type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.js b/tests/baselines/reference/ES5For-ofTypeCheck9.js new file mode 100644 index 00000000000..6c7465d10ec --- /dev/null +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.js @@ -0,0 +1,9 @@ +//// [ES5For-ofTypeCheck9.ts] +var union: string | string[] | number | symbol; +for (let v of union) { } + +//// [ES5For-ofTypeCheck9.js] +var union; +for (var _i = 0; _i < union.length; _i++) { + var v = union[_i]; +} diff --git a/tests/baselines/reference/ES5SymbolProperty2.js b/tests/baselines/reference/ES5SymbolProperty2.js index effd1e610f4..a1efd6ae7ba 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.js +++ b/tests/baselines/reference/ES5SymbolProperty2.js @@ -17,7 +17,8 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/ES5SymbolProperty3.js b/tests/baselines/reference/ES5SymbolProperty3.js index 52ea7e091ee..7ef892cb3c4 100644 --- a/tests/baselines/reference/ES5SymbolProperty3.js +++ b/tests/baselines/reference/ES5SymbolProperty3.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty4.js b/tests/baselines/reference/ES5SymbolProperty4.js index ae8a539f351..d4022066bb8 100644 --- a/tests/baselines/reference/ES5SymbolProperty4.js +++ b/tests/baselines/reference/ES5SymbolProperty4.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty5.js b/tests/baselines/reference/ES5SymbolProperty5.js index 63b12667d0f..c433b0ab443 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.js +++ b/tests/baselines/reference/ES5SymbolProperty5.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator](0); // Should error diff --git a/tests/baselines/reference/ES5SymbolProperty6.js b/tests/baselines/reference/ES5SymbolProperty6.js index 10eda091e5e..949ce722aa7 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.js +++ b/tests/baselines/reference/ES5SymbolProperty6.js @@ -9,7 +9,8 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty7.js b/tests/baselines/reference/ES5SymbolProperty7.js index d3f796ce758..f98e792e8cd 100644 --- a/tests/baselines/reference/ES5SymbolProperty7.js +++ b/tests/baselines/reference/ES5SymbolProperty7.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ExportAssignment7.errors.txt b/tests/baselines/reference/ExportAssignment7.errors.txt index 6ba0f480e7f..b72ca2d4a72 100644 --- a/tests/baselines/reference/ExportAssignment7.errors.txt +++ b/tests/baselines/reference/ExportAssignment7.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2304: Cannot find name 'B'. tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. ==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignme export = B; ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'B'. - ~~~~~~~~~~~ -!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + ~ +!!! error TS2304: Cannot find name 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/ExportAssignment8.errors.txt b/tests/baselines/reference/ExportAssignment8.errors.txt index 4dc35a9f0b7..4536f37bb81 100644 --- a/tests/baselines/reference/ExportAssignment8.errors.txt +++ b/tests/baselines/reference/ExportAssignment8.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2304: Cannot find name 'B'. tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. ==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ==== @@ -8,9 +8,9 @@ tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignme ~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'B'. - ~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. + ~ +!!! error TS2304: Cannot find name 'B'. export class C { } \ No newline at end of file diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index bfa243937d6..8fa04691498 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -35,7 +35,10 @@ var A; return Point; })(); A.Point = Point; - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { @@ -44,7 +47,11 @@ var A; return Point3d; })(Point); A.Point3d = Point3d; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; var Line = (function () { function Line(start, end) { this.start = start; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 71a43788c55..9c7e3d5db2b 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -38,7 +38,10 @@ var A; } return Point; })(); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { @@ -47,7 +50,11 @@ var A; return Point3d; })(Point); A.Point3d = Point3d; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; var Line = (function () { function Line(start, end) { this.start = start; diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js index 21d969d242c..56f50afa97b 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js @@ -33,7 +33,10 @@ var A; })(); A.Line = Line; function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js index 99831f10629..d669ce248d7 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js @@ -32,7 +32,10 @@ var A; })(); A.Line = Line; function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js index 3037e33d880..a7ad139f68e 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js @@ -32,7 +32,10 @@ var A; return Line; })(); function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index e2b32a3bca4..a5ce37fb363 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -25,6 +25,13 @@ module A { //// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin = { + x: 0, + y: 0 + }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js index 7625500a1d0..77db9879e3b 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,6 +26,13 @@ module A { //// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin = { + x: 0, + y: 0 + }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js index df6645df3b3..c2c4b64ece6 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js @@ -38,7 +38,10 @@ var A; function Line(start, end) { } Line.fromOrigin = function (p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); }; return Line; })(); diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js index 46361dd41bb..50da60f7113 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js @@ -21,6 +21,12 @@ var A; } return Point; })(); - A.Origin = { x: 0, y: 0 }; - A.Unity = { start: new Point(0, 0), end: new Point(1, 0) }; + A.Origin = { + x: 0, + y: 0 + }; + A.Unity = { + start: new Point(0, 0), + end: new Point(1, 0) + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js index 591845b627e..a4d203cc363 100644 --- a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js @@ -15,5 +15,8 @@ module A { var A; (function (A) { // valid since Point is exported - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js index d63edb65569..de0b6e706ad 100644 --- a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js @@ -22,7 +22,14 @@ module A { var A; (function (A) { // valid since Point is exported - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; // invalid Point3d is not exported - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js index 369a5b4dd52..26b2b17de38 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js @@ -47,7 +47,10 @@ var cl = B.Point.Origin; var A; (function (A) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -56,7 +59,10 @@ var A; (function (A) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [test.js] @@ -69,12 +75,18 @@ var cl = A.Point.Origin; // not expected to be an error. var B; (function (B) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } B.Point = Point; var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); })(B || (B = {})); var fn; diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js index 13302ea391a..8c84896b926 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js @@ -26,7 +26,10 @@ var cl = B.Point.Origin; var A; (function (A) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -35,7 +38,10 @@ var B; (function (B) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); })(B || (B = {})); //// [test.js] diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.js b/tests/baselines/reference/FunctionDeclaration10_es6.js index 51694533964..96d32200564 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.js +++ b/tests/baselines/reference/FunctionDeclaration10_es6.js @@ -4,5 +4,7 @@ function * foo(a = yield => yield) { //// [FunctionDeclaration10_es6.js] function foo(a) { - if (a === void 0) { a = function (yield) { return yield; }; } + if (a === void 0) { a = function (yield) { + return yield; + }; } } diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.js b/tests/baselines/reference/FunctionDeclaration12_es6.js index d9c1739cb49..da9cea3f9c6 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.js +++ b/tests/baselines/reference/FunctionDeclaration12_es6.js @@ -2,4 +2,5 @@ var v = function * yield() { } //// [FunctionDeclaration12_es6.js] -var v = , yield = function () { }; +var v = , yield = function () { +}; diff --git a/tests/baselines/reference/FunctionDeclaration4.js b/tests/baselines/reference/FunctionDeclaration4.js index b50970965f0..53e040b28fc 100644 --- a/tests/baselines/reference/FunctionDeclaration4.js +++ b/tests/baselines/reference/FunctionDeclaration4.js @@ -3,4 +3,5 @@ function foo(); function bar() { } //// [FunctionDeclaration4.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/FunctionDeclaration6.js b/tests/baselines/reference/FunctionDeclaration6.js index 721d4d80b6d..093fac7ed7c 100644 --- a/tests/baselines/reference/FunctionDeclaration6.js +++ b/tests/baselines/reference/FunctionDeclaration6.js @@ -6,5 +6,6 @@ //// [FunctionDeclaration6.js] { - function bar() { } + function bar() { + } } diff --git a/tests/baselines/reference/FunctionExpression1_es6.js b/tests/baselines/reference/FunctionExpression1_es6.js index 97e5d28887d..7c8d82f4ca8 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.js +++ b/tests/baselines/reference/FunctionExpression1_es6.js @@ -2,4 +2,5 @@ var v = function * () { } //// [FunctionExpression1_es6.js] -var v = function () { }; +var v = function () { +}; diff --git a/tests/baselines/reference/FunctionExpression2_es6.js b/tests/baselines/reference/FunctionExpression2_es6.js index 87960e37128..0a2468bcb8c 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.js +++ b/tests/baselines/reference/FunctionExpression2_es6.js @@ -2,4 +2,5 @@ var v = function * foo() { } //// [FunctionExpression2_es6.js] -var v = function foo() { }; +var v = function foo() { +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js index 0176b412713..49c2605e177 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js @@ -2,4 +2,7 @@ var v = { *foo() { } } //// [FunctionPropertyAssignments1_es6.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js index fc86a6a48d6..996bd08af0b 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js @@ -2,4 +2,7 @@ var v = { *() { } } //// [FunctionPropertyAssignments2_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js index 89963edbc6e..64edd61828c 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js @@ -2,4 +2,7 @@ var v = { *{ } } //// [FunctionPropertyAssignments3_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js index 71076523414..ee6e35defe8 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js @@ -2,4 +2,6 @@ var v = { * } //// [FunctionPropertyAssignments4_es6.js] -var v = { : function () { } }; +var v = { + : function () { } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js index 51e5d0000e4..f41bd0d3ffa 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js @@ -3,6 +3,7 @@ var v = { *[foo()]() { } } //// [FunctionPropertyAssignments5_es6.js] var v = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js index 60f3677f108..f7e9576c7a0 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js @@ -2,4 +2,7 @@ var v = { *() { } } //// [FunctionPropertyAssignments6_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.js b/tests/baselines/reference/MemberAccessorDeclaration15.js index 85bbfa62238..41ed265a878 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.js +++ b/tests/baselines/reference/MemberAccessorDeclaration15.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js index 121376d5265..86e7c9d418a 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js index dcb494b3d13..efd60844dc7 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js index e858ab15582..357f9175b42 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[foo] = function () { }; + C.prototype[foo] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js index 26b08681441..9c6d76bfca5 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype. = function () { }; + C.prototype. = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js index 8f942d87f9f..211713c6e14 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js index e9b8f44f895..6b110cbb0f2 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js @@ -34,7 +34,10 @@ var A; (function (A) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [function.js] @@ -42,7 +45,10 @@ var A; (function (A) { // duplicate identifier error function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -51,11 +57,17 @@ var B; (function (B) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); // duplicate identifier error function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } B.Point = Point; })(B || (B = {})); diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js index e31ca5d5885..0211c85af9d 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js @@ -54,9 +54,15 @@ var B; var Geometry; (function (Geometry) { var Lines = B; - Geometry.Origin = { x: 0, y: 0 }; + Geometry.Origin = { + x: 0, + y: 0 + }; // this is valid since B.Line _is_ visible outside Geometry - Geometry.Unit = new Lines.Line(Geometry.Origin, { x: 1, y: 0 }); + Geometry.Unit = new Lines.Line(Geometry.Origin, { + x: 1, + y: 0 + }); })(Geometry || (Geometry = {})); // expected to work since all are exported var p; diff --git a/tests/baselines/reference/Protected4.js b/tests/baselines/reference/Protected4.js index 9c23a1be884..665a182ef33 100644 --- a/tests/baselines/reference/Protected4.js +++ b/tests/baselines/reference/Protected4.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { }; + C.prototype.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected5.js b/tests/baselines/reference/Protected5.js index 8426a8765d7..8834cc488cb 100644 --- a/tests/baselines/reference/Protected5.js +++ b/tests/baselines/reference/Protected5.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.m = function () { }; + C.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected6.js b/tests/baselines/reference/Protected6.js index 10b59551737..004f30b27f8 100644 --- a/tests/baselines/reference/Protected6.js +++ b/tests/baselines/reference/Protected6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.m = function () { }; + C.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected7.js b/tests/baselines/reference/Protected7.js index 16c24edb8cb..466f6909d67 100644 --- a/tests/baselines/reference/Protected7.js +++ b/tests/baselines/reference/Protected7.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { }; + C.prototype.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js index deb2f3aa59d..52810fa0178 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js @@ -56,7 +56,10 @@ var A; function Point() { } Point.prototype.fromCarthesian = function (p) { - return { x: p.x, y: p.y }; + return { + x: p.x, + y: p.y + }; }; return Point; })(); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js index 125a803ff39..227b28f44db 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js @@ -47,11 +47,17 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A || (A = {})); //// [part2.js] var A; @@ -78,4 +84,7 @@ var o = A.Origin; var o = A.Utils.mirror(o); var p; var p; -var p = new A.Utils.Plane(o, { x: 1, y: 1 }); +var p = new A.Utils.Plane(o, { + x: 1, + y: 1 +}); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js index c7f55d0a2df..3f5f3bd8986 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js @@ -35,17 +35,26 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A = exports.A || (exports.A = {})); //// [part2.js] var A; (function (A) { // collision with 'Origin' var in other part of merged module - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js index a854dff15c6..32b5ed538d8 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js @@ -38,7 +38,10 @@ var Root; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); @@ -50,7 +53,10 @@ var otherRoot; var A; (function (A) { // have to be fully qualified since in different root - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js index 82c9afd0787..ba77d51ef69 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js @@ -45,7 +45,10 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); @@ -53,7 +56,10 @@ var A; //// [part2.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { @@ -74,4 +80,7 @@ var o = A.Origin; var o = A.Utils.mirror(o); var p; var p; -var p = new A.Utils.Plane(o, { x: 1, y: 1 }); +var p = new A.Utils.Plane(o, { + x: 1, + y: 1 +}); diff --git a/tests/baselines/reference/YieldExpression10_es6.js b/tests/baselines/reference/YieldExpression10_es6.js index 3bae1b645fe..345f76fc190 100644 --- a/tests/baselines/reference/YieldExpression10_es6.js +++ b/tests/baselines/reference/YieldExpression10_es6.js @@ -6,7 +6,8 @@ var v = { * foo() { //// [YieldExpression10_es6.js] -var v = { foo: function () { +var v = { + foo: function () { ; } }; diff --git a/tests/baselines/reference/YieldExpression13_es6.js b/tests/baselines/reference/YieldExpression13_es6.js index 093759e6bd9..328fc80dbdd 100644 --- a/tests/baselines/reference/YieldExpression13_es6.js +++ b/tests/baselines/reference/YieldExpression13_es6.js @@ -2,4 +2,6 @@ function* foo() { yield } //// [YieldExpression13_es6.js] -function foo() { ; } +function foo() { + ; +} diff --git a/tests/baselines/reference/YieldExpression17_es6.js b/tests/baselines/reference/YieldExpression17_es6.js index cefe4ca28df..5ac8093395a 100644 --- a/tests/baselines/reference/YieldExpression17_es6.js +++ b/tests/baselines/reference/YieldExpression17_es6.js @@ -2,4 +2,8 @@ var v = { get foo() { yield foo; } } //// [YieldExpression17_es6.js] -var v = { get foo() { ; } }; +var v = { + get foo() { + ; + } +}; diff --git a/tests/baselines/reference/accessibilityModifiers.js b/tests/baselines/reference/accessibilityModifiers.js index ebc801ac136..901b3a29c2e 100644 --- a/tests/baselines/reference/accessibilityModifiers.js +++ b/tests/baselines/reference/accessibilityModifiers.js @@ -50,36 +50,48 @@ class E { var C = (function () { function C() { } - C.privateMethod = function () { }; + C.privateMethod = function () { + }; Object.defineProperty(C, "privateGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "privateSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - C.protectedMethod = function () { }; + C.protectedMethod = function () { + }; Object.defineProperty(C, "protectedGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "protectedSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - C.publicMethod = function () { }; + C.publicMethod = function () { + }; Object.defineProperty(C, "publicGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "publicSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -89,36 +101,48 @@ var C = (function () { var D = (function () { function D() { } - D.privateMethod = function () { }; + D.privateMethod = function () { + }; Object.defineProperty(D, "privateGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "privateSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - D.protectedMethod = function () { }; + D.protectedMethod = function () { + }; Object.defineProperty(D, "protectedGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "protectedSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - D.publicMethod = function () { }; + D.publicMethod = function () { + }; Object.defineProperty(D, "publicGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "publicSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -128,14 +152,18 @@ var D = (function () { var E = (function () { function E() { } - E.prototype.method = function () { }; + E.prototype.method = function () { + }; Object.defineProperty(E.prototype, "getter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(E.prototype, "setter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.js b/tests/baselines/reference/accessorParameterAccessibilityModifier.js index 8b5ee6196e0..89a511e6c5c 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.js @@ -10,12 +10,14 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "X", { - set: function (v2) { }, + set: function (v2) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorWithES3.js b/tests/baselines/reference/accessorWithES3.js index 1eecaa68d64..6eba5238a91 100644 --- a/tests/baselines/reference/accessorWithES3.js +++ b/tests/baselines/reference/accessorWithES3.js @@ -47,8 +47,11 @@ var D = (function () { return D; })(); var x = { - get a() { return 1; } + get a() { + return 1; + } }; var y = { - set b(v) { } + set b(v) { + } }; diff --git a/tests/baselines/reference/accessorWithES5.js b/tests/baselines/reference/accessorWithES5.js index 746703bce52..1a3690556e0 100644 --- a/tests/baselines/reference/accessorWithES5.js +++ b/tests/baselines/reference/accessorWithES5.js @@ -44,8 +44,11 @@ var D = (function () { return D; })(); var x = { - get a() { return 1; } + get a() { + return 1; + } }; var y = { - set b(v) { } + set b(v) { + } }; diff --git a/tests/baselines/reference/accessorWithoutBody1.js b/tests/baselines/reference/accessorWithoutBody1.js index e06e305e161..8f357b89490 100644 --- a/tests/baselines/reference/accessorWithoutBody1.js +++ b/tests/baselines/reference/accessorWithoutBody1.js @@ -2,4 +2,6 @@ var v = { get foo() } //// [accessorWithoutBody1.js] -var v = { get foo() { } }; +var v = { + get foo() { } +}; diff --git a/tests/baselines/reference/accessorWithoutBody2.js b/tests/baselines/reference/accessorWithoutBody2.js index 3b5a821d580..d9405daeb93 100644 --- a/tests/baselines/reference/accessorWithoutBody2.js +++ b/tests/baselines/reference/accessorWithoutBody2.js @@ -2,4 +2,6 @@ var v = { set foo(a) } //// [accessorWithoutBody2.js] -var v = { set foo(a) { } }; +var v = { + set foo(a) { } +}; diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js index 8c01173a13c..d8cb761bb9b 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js @@ -20,7 +20,9 @@ var C = (function () { } Object.defineProperty(C.prototype, "x", { get: function () { - return function (x) { return ""; }; + return function (x) { + return ""; + }; }, set: function (v) { }, diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.js b/tests/baselines/reference/accessorsNotAllowedInES3.js index 0843a39191c..7dab1283e84 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.js +++ b/tests/baselines/reference/accessorsNotAllowedInES3.js @@ -11,10 +11,16 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); return C; })(); -var y = { get foo() { return 3; } }; +var y = { + get foo() { + return 3; + } +}; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js index 5e527aef3e9..6a3b3773aa6 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js @@ -18,26 +18,40 @@ var LanguageSpec_section_4_5_error_cases = (function () { function LanguageSpec_section_4_5_error_cases() { } Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterFirst", { - get: function () { return ""; }, - set: function (a) { }, + get: function () { + return ""; + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterLast", { - get: function () { return ""; }, - set: function (a) { }, + get: function () { + return ""; + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterFirst", { - get: function () { return ""; }, - set: function (aStr) { aStr = 0; }, + get: function () { + return ""; + }, + set: function (aStr) { + aStr = 0; + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterLast", { - get: function () { return ""; }, - set: function (aStr) { aStr = 0; }, + get: function () { + return ""; + }, + set: function (aStr) { + aStr = 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index 9aa7ce2f408..b140e565b29 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -47,38 +47,56 @@ var LanguageSpec_section_4_5_inference = (function () { function LanguageSpec_section_4_5_inference() { } Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation_GetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter_SetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation_GetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js index 04fb5a143c6..d68af6c23c3 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js @@ -40,11 +40,13 @@ var r19 = a + { a: '' }; var r20 = a + ((a: string) => { return a }); //// [additionOperatorWithAnyAndEveryType.js] -function foo() { } +function foo() { +} var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var E; @@ -83,5 +85,9 @@ var r15 = a + E.a; var r16 = a + M; var r17 = a + ''; var r18 = a + 123; -var r19 = a + { a: '' }; -var r20 = a + (function (a) { return a; }); +var r19 = a + { + a: '' +}; +var r20 = a + (function (a) { + return a; +}); diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index a8edb4b1879..f2403bc1670 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -41,11 +41,13 @@ var r19 = E.a + C.foo(); var r20 = E.a + M; //// [additionOperatorWithInvalidOperands.js] -function foo() { } +function foo() { +} var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var E; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js index 79d3c0b9b8d..5ec03e15b6c 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js @@ -25,7 +25,9 @@ var r11 = null + (() => { }); //// [additionOperatorWithNullValueAndInvalidOperator.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. -function foo() { return undefined; } +function foo() { + return undefined; +} var a; var b; var c; @@ -40,6 +42,9 @@ var r6 = null + c; // other cases var r7 = null + d; var r8 = null + true; -var r9 = null + { a: '' }; +var r9 = null + { + a: '' +}; var r10 = null + foo(); -var r11 = null + (function () { }); +var r11 = null + (function () { +}); diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js index 03456020c80..56949533e09 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js @@ -75,5 +75,7 @@ var r15 = x + E; var r16 = x + E.a; var r17 = x + ''; var r18 = x + 0; -var r19 = x + { a: '' }; +var r19 = x + { + a: '' +}; var r20 = x + []; diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index a568f420a32..23a6b95b147 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -74,6 +74,7 @@ function foo(t, u) { var r16 = t + undefined; var r17 = t + t; var r18 = t + u; - var r19 = t + (function () { }); + var r19 = t + (function () { + }); var r20 = t + []; } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js index 98935db2b86..6bf55f351a5 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js @@ -25,7 +25,9 @@ var r11 = undefined + (() => { }); //// [additionOperatorWithUndefinedValueAndInvalidOperands.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. -function foo() { return undefined; } +function foo() { + return undefined; +} var a; var b; var c; @@ -40,6 +42,9 @@ var r6 = undefined + c; // other cases var r7 = undefined + d; var r8 = undefined + true; -var r9 = undefined + { a: '' }; +var r9 = undefined + { + a: '' +}; var r10 = undefined + foo(); -var r11 = undefined + (function () { }); +var r11 = undefined + (function () { +}); diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 92b63e41b68..398b093aa88 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/aliasBug.ts(17,10): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. +tests/cases/compiler/aliasBug.ts(17,15): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. ==== tests/cases/compiler/aliasBug.ts (1 errors) ==== @@ -19,7 +19,7 @@ tests/cases/compiler/aliasBug.ts(17,10): error TS2305: Module 'foo.bar.baz' has var p1: provide.Provide; // error here, but should be okay var p2: foo.Provide; var p3:booz.bar; - ~~~~~~~~ + ~~~ !!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index a4c71fa9c5a..ffc114f80e3 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasErrors.ts(11,1): error TS2304: Cannot find name 'no'. -tests/cases/compiler/aliasErrors.ts(12,1): error TS2304: Cannot find name 'no'. +tests/cases/compiler/aliasErrors.ts(11,12): error TS2304: Cannot find name 'no'. +tests/cases/compiler/aliasErrors.ts(12,13): error TS2304: Cannot find name 'no'. tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected. tests/cases/compiler/aliasErrors.ts(14,12): error TS1003: Identifier expected. tests/cases/compiler/aliasErrors.ts(15,12): error TS1003: Identifier expected. -tests/cases/compiler/aliasErrors.ts(16,1): error TS2304: Cannot find name 'undefined'. -tests/cases/compiler/aliasErrors.ts(26,10): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. +tests/cases/compiler/aliasErrors.ts(16,12): error TS2304: Cannot find name 'undefined'. +tests/cases/compiler/aliasErrors.ts(26,15): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. ==== tests/cases/compiler/aliasErrors.ts (7 errors) ==== @@ -19,10 +19,10 @@ tests/cases/compiler/aliasErrors.ts(26,10): error TS2305: Module 'foo.bar.baz' h import beez = foo.bar; import m = no; - ~~~~~~~~~~~~~~ + ~~ !!! error TS2304: Cannot find name 'no'. import m2 = no.mod; - ~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2304: Cannot find name 'no'. import n = 5; ~ @@ -34,7 +34,7 @@ tests/cases/compiler/aliasErrors.ts(26,10): error TS2305: Module 'foo.bar.baz' h ~~~~ !!! error TS1003: Identifier expected. import r = undefined; - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2304: Cannot find name 'undefined'. @@ -46,7 +46,7 @@ tests/cases/compiler/aliasErrors.ts(26,10): error TS2305: Module 'foo.bar.baz' h var p1: provide.Provide; var p2: foo.Provide; var p3:booz.bar; - ~~~~~~~~ + ~~~ !!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 5712abf3443..1c7f8381be0 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -46,5 +46,9 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInArray_main.js] var moduleA = require("aliasUsageInArray_moduleA"); -var xs = [moduleA]; -var xs2 = [moduleA]; +var xs = [ + moduleA +]; +var xs2 = [ + moduleA +]; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 661c8fd91e7..e101cd49aba 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -45,5 +45,9 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInFunctionExpression_main.js] var moduleA = require("aliasUsageInFunctionExpression_moduleA"); -var f = function (x) { return x; }; -f = function (x) { return 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 1070036adea..fc0cd51be50 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -52,5 +52,9 @@ var moduleA = require("aliasUsageInGenericFunction_moduleA"); function foo(x) { return x; } -var r = foo({ a: moduleA }); -var r2 = foo({ a: null }); +var r = foo({ + a: moduleA +}); +var r2 = foo({ + a: null +}); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 50ccfaf944d..7e6cc1340e8 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -46,6 +46,14 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInObjectLiteral_main.js] var moduleA = require("aliasUsageInObjectLiteral_moduleA"); -var a = { x: moduleA }; -var b = { x: moduleA }; -var c = { y: { z: moduleA } }; +var a = { + x: moduleA +}; +var b = { + x: moduleA +}; +var c = { + y: { + z: moduleA + } +}; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 07a382ebca1..8a29a7f998b 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -53,5 +53,9 @@ var i; var d1 = i || moduleA; var d2 = i || moduleA; var d2 = moduleA || i; -var e = null || { x: moduleA }; -var f = null ? { x: moduleA } : null; +var e = null || { + x: moduleA +}; +var f = null ? { + x: moduleA +} : null; diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index fb909181529..4b6debf4c98 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -21,7 +21,9 @@ export var a = function () { //// [aliasUsedAsNameValue_0.js] exports.id; //// [aliasUsedAsNameValue_1.js] -function b(a) { return null; } +function b(a) { + return null; +} exports.b = b; //// [aliasUsedAsNameValue_2.js] /// diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.js b/tests/baselines/reference/ambientClassOverloadForFunction.js index 402eca63381..cf3a59a465d 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.js +++ b/tests/baselines/reference/ambientClassOverloadForFunction.js @@ -5,4 +5,6 @@ function foo() { return null; } //// [ambientClassOverloadForFunction.js] ; -function foo() { return null; } +function foo() { + return null; +} diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index c8159708dd8..a741536e078 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/ambient/ambientErrors.ts(2,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/ambient/ambientErrors.ts(6,18): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(24,5): error TS1066: Ambient enum elements can only have integer literal initializers. @@ -25,7 +25,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export // Ambient functions with invalid overloads declare function fn(x: number): string; declare function fn(x: 'foo'): number; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. // Ambient functions with duplicate signatures diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.js b/tests/baselines/reference/ambiguousGenericAssertion1.js index 8d40873036c..06804387585 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.js +++ b/tests/baselines/reference/ambiguousGenericAssertion1.js @@ -6,8 +6,12 @@ var r3 = <(x: T) => T>f; // ambiguous, appears to the parser as a << operatio //// [ambiguousGenericAssertion1.js] -function f(x) { return null; } -var r = function (x) { return x; }; +function f(x) { + return null; +} +var r = function (x) { + return x; +}; var r2 = f; // valid var r3 = << T > (x), T; T > f; // ambiguous, appears to the parser as a << operation diff --git a/tests/baselines/reference/ambiguousOverload.js b/tests/baselines/reference/ambiguousOverload.js index 642f09dca16..fd373c075a2 100644 --- a/tests/baselines/reference/ambiguousOverload.js +++ b/tests/baselines/reference/ambiguousOverload.js @@ -12,11 +12,15 @@ var x2: string = foof2("s", null); var y2: number = foof2("s", null); //// [ambiguousOverload.js] -function foof(bar) { return bar; } +function foof(bar) { + return bar; +} ; var x = foof("s", null); var y = foof("s", null); -function foof2(bar) { return bar; } +function foof2(bar) { + return bar; +} ; var x2 = foof2("s", null); var y2 = foof2("s", null); diff --git a/tests/baselines/reference/anonterface.js b/tests/baselines/reference/anonterface.js index 12bfbc4ec9d..59d055b29d7 100644 --- a/tests/baselines/reference/anonterface.js +++ b/tests/baselines/reference/anonterface.js @@ -28,4 +28,6 @@ var M; M.C = C; })(M || (M = {})); var c = new M.C(); -c.m(function (n) { return "hello: " + n; }, 18); +c.m(function (n) { + return "hello: " + n; +}, 18); diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index 04e3e91761d..bc9ebb02f42 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -118,7 +118,8 @@ var E; E[E["A"] = 0] = "A"; })(E || (E = {})); var r3 = foo3(a); // any -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyAssignableToEveryType2.js b/tests/baselines/reference/anyAssignableToEveryType2.js index 530d8eb0439..41cedb73215 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.js +++ b/tests/baselines/reference/anyAssignableToEveryType2.js @@ -146,7 +146,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyDeclare.js b/tests/baselines/reference/anyDeclare.js index 8bb2f55eb84..a46a2529491 100644 --- a/tests/baselines/reference/anyDeclare.js +++ b/tests/baselines/reference/anyDeclare.js @@ -10,5 +10,6 @@ module myMod { var myMod; (function (myMod) { var myFn; - function myFn() { } + function myFn() { + } })(myMod || (myMod = {})); diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index 6b82f3af73c..bcd3b52daef 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/anyIdenticalToItself.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/anyIdenticalToItself.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/anyIdenticalToItself.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ==== tests/cases/compiler/anyIdenticalToItself.ts (3 errors) ==== function foo(x: any); - ~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(x: any); function foo(x: any, y: number) { } diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index b7b9b25e418..dc221b69aa7 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -13,7 +13,8 @@ class C { } //// [anyIdenticalToItself.js] -function foo(x, y) { } +function foo(x, y) { +} var C = (function () { function C() { } diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.js b/tests/baselines/reference/anyInferenceAnonymousFunctions.js index df921965994..03e45113b26 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.js +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.js @@ -25,6 +25,12 @@ paired.reduce(function (a1, a2) { paired.reduce(function (b1, b2) { return b1.concat({}); }, []); -paired.reduce(function (b3, b4) { return b3.concat({}); }, []); -paired.map(function (c1) { return c1.count; }); -paired.map(function (c2) { return c2.count; }); +paired.reduce(function (b3, b4) { + return b3.concat({}); +}, []); +paired.map(function (c1) { + return c1.count; +}); +paired.map(function (c2) { + return c2.count; +}); diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt new file mode 100644 index 00000000000..391fbf42384 --- /dev/null +++ b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt @@ -0,0 +1,147 @@ +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(13,12): error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(14,12): error TS2460: Type 'StrNum' has no property '2'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(15,5): error TS2461: Type '{ 0: string; 1: number; }' is not an array type. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(16,5): error TS2322: Type '[string, number]' is not assignable to type '[number, number, number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(17,5): error TS2322: Type 'StrNum' is not assignable to type '[number, number, number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(18,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number, number, number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(19,5): error TS2322: Type '[string, number]' is not assignable to type '[string, number, number]'. + Property '2' is missing in type '[string, number]'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(20,5): error TS2322: Type 'StrNum' is not assignable to type '[string, number, number]'. + Property '2' is missing in type 'StrNum'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(21,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string, number, number]'. + Property '2' is missing in type '{ 0: string; 1: number; }'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(22,5): error TS2322: Type '[string, number]' is not assignable to type '[number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(23,5): error TS2322: Type 'StrNum' is not assignable to type '[number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(24,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(25,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'. + Types of property 'pop' are incompatible. + Type '() => string | number' is not assignable to type '() => string'. + Type 'string | number' is not assignable to type 'string'. + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'. + Types of property 'pop' are incompatible. + Type '() => string | number' is not assignable to type '() => string'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string]'. + Property 'length' is missing in type '{ 0: string; 1: number; }'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(28,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(29,5): error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number, string]'. + Types of property '0' are incompatible. + Type 'string' is not assignable to type 'number'. + + +==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (18 errors) ==== + interface StrNum extends Array { + 0: string; + 1: number; + } + + var x: [string, number]; + var y: StrNum + var z: { + 0: string; + 1: number; + } + + var [a, b, c] = x; + ~ +!!! error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. + var [d, e, f] = y; + ~ +!!! error TS2460: Type 'StrNum' has no property '2'. + var [g, h, i] = z; + ~~~~~~~~~ +!!! error TS2461: Type '{ 0: string; 1: number; }' is not an array type. + var j1: [number, number, number] = x; + ~~ +!!! error TS2322: Type '[string, number]' is not assignable to type '[number, number, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var j2: [number, number, number] = y; + ~~ +!!! error TS2322: Type 'StrNum' is not assignable to type '[number, number, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var j3: [number, number, number] = z; + ~~ +!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number, number, number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var k1: [string, number, number] = x; + ~~ +!!! error TS2322: Type '[string, number]' is not assignable to type '[string, number, number]'. +!!! error TS2322: Property '2' is missing in type '[string, number]'. + var k2: [string, number, number] = y; + ~~ +!!! error TS2322: Type 'StrNum' is not assignable to type '[string, number, number]'. +!!! error TS2322: Property '2' is missing in type 'StrNum'. + var k3: [string, number, number] = z; + ~~ +!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string, number, number]'. +!!! error TS2322: Property '2' is missing in type '{ 0: string; 1: number; }'. + var l1: [number] = x; + ~~ +!!! error TS2322: Type '[string, number]' is not assignable to type '[number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var l2: [number] = y; + ~~ +!!! error TS2322: Type 'StrNum' is not assignable to type '[number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var l3: [number] = z; + ~~ +!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var m1: [string] = x; + ~~ +!!! error TS2322: Type '[string, number]' is not assignable to type '[string]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'. +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + var m2: [string] = y; + ~~ +!!! error TS2322: Type 'StrNum' is not assignable to type '[string]'. +!!! error TS2322: Types of property 'pop' are incompatible. +!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'. + var m3: [string] = z; + ~~ +!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string]'. +!!! error TS2322: Property 'length' is missing in type '{ 0: string; 1: number; }'. + var n1: [number, string] = x; + ~~ +!!! error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var n2: [number, string] = y; + ~~ +!!! error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var n3: [number, string] = z; + ~~ +!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[number, string]'. +!!! error TS2322: Types of property '0' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + var o1: [string, number] = x; + var o2: [string, number] = y; + var o3: [string, number] = y; + \ No newline at end of file diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.js b/tests/baselines/reference/arityAndOrderCompatibility01.js new file mode 100644 index 00000000000..2eb1bcf8bd8 --- /dev/null +++ b/tests/baselines/reference/arityAndOrderCompatibility01.js @@ -0,0 +1,61 @@ +//// [arityAndOrderCompatibility01.ts] +interface StrNum extends Array { + 0: string; + 1: number; +} + +var x: [string, number]; +var y: StrNum +var z: { + 0: string; + 1: number; +} + +var [a, b, c] = x; +var [d, e, f] = y; +var [g, h, i] = z; +var j1: [number, number, number] = x; +var j2: [number, number, number] = y; +var j3: [number, number, number] = z; +var k1: [string, number, number] = x; +var k2: [string, number, number] = y; +var k3: [string, number, number] = z; +var l1: [number] = x; +var l2: [number] = y; +var l3: [number] = z; +var m1: [string] = x; +var m2: [string] = y; +var m3: [string] = z; +var n1: [number, string] = x; +var n2: [number, string] = y; +var n3: [number, string] = z; +var o1: [string, number] = x; +var o2: [string, number] = y; +var o3: [string, number] = y; + + +//// [arityAndOrderCompatibility01.js] +var x; +var y; +var z; +var a = x[0], b = x[1], c = x[2]; +var d = y[0], e = y[1], f = y[2]; +var g = z[0], h = z[1], i = z[2]; +var j1 = x; +var j2 = y; +var j3 = z; +var k1 = x; +var k2 = y; +var k3 = z; +var l1 = x; +var l2 = y; +var l3 = z; +var m1 = x; +var m2 = y; +var m3 = z; +var n1 = x; +var n2 = y; +var n3 = z; +var o1 = x; +var o2 = y; +var o3 = y; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 0abfa889bed..aed3d0cdf06 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -95,8 +95,12 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.IM1 = function () { return null; }; - C1.prototype.C1M1 = function () { return null; }; + C1.prototype.IM1 = function () { + return null; + }; + C1.prototype.C1M1 = function () { + return null; + }; return C1; })(); var C2 = (function (_super) { @@ -104,13 +108,17 @@ var C2 = (function (_super) { function C2() { _super.apply(this, arguments); } - C2.prototype.C2M1 = function () { return null; }; + C2.prototype.C2M1 = function () { + return null; + }; return C2; })(C1); var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -129,8 +137,12 @@ var c1 = new C1(); var i1 = c1; var c2 = new C2(); var c3 = new C3(); -var o1 = { one: 1 }; -var f1 = function () { return new C1(); }; +var o1 = { + one: 1 +}; +var f1 = function () { + return new C1(); +}; var arr_any = []; var arr_i1 = []; var arr_c1 = []; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 977862866ed..0e6a9837573 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -69,8 +69,12 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.IM1 = function () { return null; }; - C1.prototype.C1M1 = function () { return null; }; + C1.prototype.IM1 = function () { + return null; + }; + C1.prototype.C1M1 = function () { + return null; + }; return C1; })(); var C2 = (function (_super) { @@ -78,13 +82,17 @@ var C2 = (function (_super) { function C2() { _super.apply(this, arguments); } - C2.prototype.C2M1 = function () { return null; }; + C2.prototype.C2M1 = function () { + return null; + }; return C2; })(C1); var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -103,8 +111,12 @@ var c1 = new C1(); var i1 = c1; var c2 = new C2(); var c3 = new C3(); -var o1 = { one: 1 }; -var f1 = function () { return new C1(); }; +var o1 = { + one: 1 +}; +var f1 = function () { + return new C1(); +}; var arr_any = []; var arr_i1 = []; var arr_c1 = []; @@ -118,7 +130,9 @@ arr_c3 = arr_c2_2; // should be an error - is arr_c3 = arr_c1_2; // should be an error - is arr_c3 = arr_i1_2; // should be an error - is arr_any = f1; // should be an error - is -arr_any = function () { return null; }; // should be an error - is +arr_any = function () { + return null; +}; // should be an error - is arr_any = o1; // should be an error - is arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is diff --git a/tests/baselines/reference/arrayAssignmentTest4.js b/tests/baselines/reference/arrayAssignmentTest4.js index c38cdebc06c..43c7f2f4144 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.js +++ b/tests/baselines/reference/arrayAssignmentTest4.js @@ -30,7 +30,9 @@ arr_any = c3; // should be an error - is var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -45,7 +47,11 @@ Type 1 of any[]: */ var c3 = new C3(); -var o1 = { one: 1 }; +var o1 = { + one: 1 +}; var arr_any = []; -arr_any = function () { return null; }; // should be an error - is +arr_any = function () { + return null; +}; // should be an error - is arr_any = c3; // should be an error - is diff --git a/tests/baselines/reference/arrayAugment.js b/tests/baselines/reference/arrayAugment.js index 20cf510712a..fcd2ee6987b 100644 --- a/tests/baselines/reference/arrayAugment.js +++ b/tests/baselines/reference/arrayAugment.js @@ -9,6 +9,8 @@ var y: string[][]; // Expect no error here //// [arrayAugment.js] -var x = ['']; +var x = [ + '' +]; var y = x.split(4); var y; // Expect no error here diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index f8e158e5b02..29da9f0737d 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -141,34 +141,170 @@ var EmptyTypes; return null; }; f.prototype.x = function () { - (this.voidIfAny([4, 2][0])); - (this.voidIfAny([4, 2, undefined][0])); - (this.voidIfAny([undefined, 2, 4][0])); - (this.voidIfAny([null, 2, 4][0])); - (this.voidIfAny([2, 4, null][0])); - (this.voidIfAny([undefined, 4, null][0])); - (this.voidIfAny(['', "q"][0])); - (this.voidIfAny(['', "q", undefined][0])); - (this.voidIfAny([undefined, "q", ''][0])); - (this.voidIfAny([null, "q", ''][0])); - (this.voidIfAny(["q", '', null][0])); - (this.voidIfAny([undefined, '', null][0])); - (this.voidIfAny([[3, 4], [null]][0][0])); - var t1 = [{ x: 7, y: new derived() }, { x: 5, y: new base() }]; - var t2 = [{ x: true, y: new derived() }, { x: false, y: new base() }]; - var t3 = [{ x: undefined, y: new base() }, { x: '', y: new derived() }]; + (this.voidIfAny([ + 4, + 2 + ][0])); + (this.voidIfAny([ + 4, + 2, + undefined + ][0])); + (this.voidIfAny([ + undefined, + 2, + 4 + ][0])); + (this.voidIfAny([ + null, + 2, + 4 + ][0])); + (this.voidIfAny([ + 2, + 4, + null + ][0])); + (this.voidIfAny([ + undefined, + 4, + null + ][0])); + (this.voidIfAny([ + '', + "q" + ][0])); + (this.voidIfAny([ + '', + "q", + undefined + ][0])); + (this.voidIfAny([ + undefined, + "q", + '' + ][0])); + (this.voidIfAny([ + null, + "q", + '' + ][0])); + (this.voidIfAny([ + "q", + '', + null + ][0])); + (this.voidIfAny([ + undefined, + '', + null + ][0])); + (this.voidIfAny([ + [ + 3, + 4 + ], + [ + null + ] + ][0][0])); + var t1 = [ + { + x: 7, + y: new derived() + }, + { + x: 5, + y: new base() + } + ]; + var t2 = [ + { + x: true, + y: new derived() + }, + { + x: false, + y: new base() + } + ]; + var t3 = [ + { + x: undefined, + y: new base() + }, + { + x: '', + y: new derived() + } + ]; var anyObj = null; // Order matters here so test all the variants - var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; - var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; - var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; + var a1 = [ + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + }, + { + x: anyObj, + y: 'a' + } + ]; + var a2 = [ + { + x: anyObj, + y: 'a' + }, + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; + var a3 = [ + { + x: 0, + y: 'a' + }, + { + x: anyObj, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; var ifaceObj = null; var baseObj = new base(); var base2Obj = new base2(); - var b1 = [baseObj, base2Obj, ifaceObj]; - var b2 = [base2Obj, baseObj, ifaceObj]; - var b3 = [baseObj, ifaceObj, base2Obj]; - var b4 = [ifaceObj, baseObj, base2Obj]; + var b1 = [ + baseObj, + base2Obj, + ifaceObj + ]; + var b2 = [ + base2Obj, + baseObj, + ifaceObj + ]; + var b3 = [ + baseObj, + ifaceObj, + base2Obj + ]; + var b4 = [ + ifaceObj, + baseObj, + base2Obj + ]; }; return f; })(); @@ -200,34 +336,170 @@ var NonEmptyTypes; return null; }; f.prototype.x = function () { - (this.voidIfAny([4, 2][0])); - (this.voidIfAny([4, 2, undefined][0])); - (this.voidIfAny([undefined, 2, 4][0])); - (this.voidIfAny([null, 2, 4][0])); - (this.voidIfAny([2, 4, null][0])); - (this.voidIfAny([undefined, 4, null][0])); - (this.voidIfAny(['', "q"][0])); - (this.voidIfAny(['', "q", undefined][0])); - (this.voidIfAny([undefined, "q", ''][0])); - (this.voidIfAny([null, "q", ''][0])); - (this.voidIfAny(["q", '', null][0])); - (this.voidIfAny([undefined, '', null][0])); - (this.voidIfAny([[3, 4], [null]][0][0])); - var t1 = [{ x: 7, y: new derived() }, { x: 5, y: new base() }]; - var t2 = [{ x: true, y: new derived() }, { x: false, y: new base() }]; - var t3 = [{ x: undefined, y: new base() }, { x: '', y: new derived() }]; + (this.voidIfAny([ + 4, + 2 + ][0])); + (this.voidIfAny([ + 4, + 2, + undefined + ][0])); + (this.voidIfAny([ + undefined, + 2, + 4 + ][0])); + (this.voidIfAny([ + null, + 2, + 4 + ][0])); + (this.voidIfAny([ + 2, + 4, + null + ][0])); + (this.voidIfAny([ + undefined, + 4, + null + ][0])); + (this.voidIfAny([ + '', + "q" + ][0])); + (this.voidIfAny([ + '', + "q", + undefined + ][0])); + (this.voidIfAny([ + undefined, + "q", + '' + ][0])); + (this.voidIfAny([ + null, + "q", + '' + ][0])); + (this.voidIfAny([ + "q", + '', + null + ][0])); + (this.voidIfAny([ + undefined, + '', + null + ][0])); + (this.voidIfAny([ + [ + 3, + 4 + ], + [ + null + ] + ][0][0])); + var t1 = [ + { + x: 7, + y: new derived() + }, + { + x: 5, + y: new base() + } + ]; + var t2 = [ + { + x: true, + y: new derived() + }, + { + x: false, + y: new base() + } + ]; + var t3 = [ + { + x: undefined, + y: new base() + }, + { + x: '', + y: new derived() + } + ]; var anyObj = null; // Order matters here so test all the variants - var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; - var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; - var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; + var a1 = [ + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + }, + { + x: anyObj, + y: 'a' + } + ]; + var a2 = [ + { + x: anyObj, + y: 'a' + }, + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; + var a3 = [ + { + x: 0, + y: 'a' + }, + { + x: anyObj, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; var ifaceObj = null; var baseObj = new base(); var base2Obj = new base2(); - var b1 = [baseObj, base2Obj, ifaceObj]; - var b2 = [base2Obj, baseObj, ifaceObj]; - var b3 = [baseObj, ifaceObj, base2Obj]; - var b4 = [ifaceObj, baseObj, base2Obj]; + var b1 = [ + baseObj, + base2Obj, + ifaceObj + ]; + var b2 = [ + base2Obj, + baseObj, + ifaceObj + ]; + var b3 = [ + baseObj, + ifaceObj, + base2Obj + ]; + var b4 = [ + ifaceObj, + baseObj, + base2Obj + ]; }; return f; })(); diff --git a/tests/baselines/reference/arrayCast.js b/tests/baselines/reference/arrayCast.js index 214bf642250..7a6482fb39b 100644 --- a/tests/baselines/reference/arrayCast.js +++ b/tests/baselines/reference/arrayCast.js @@ -9,6 +9,15 @@ //// [arrayCast.js] // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. -[{ foo: "s" }]; +[ + { + foo: "s" + } +]; // Should succeed, as the {} element causes the type of the array to be {}[] -[{ foo: "s" }, {}]; +[ + { + foo: "s" + }, + {} +]; diff --git a/tests/baselines/reference/arrayConcatMap.js b/tests/baselines/reference/arrayConcatMap.js index dc7272b7223..992c8eb7ce3 100644 --- a/tests/baselines/reference/arrayConcatMap.js +++ b/tests/baselines/reference/arrayConcatMap.js @@ -3,4 +3,14 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a); //// [arrayConcatMap.js] -var x = [].concat([{ a: 1 }], [{ a: 2 }]).map(function (b) { return b.a; }); +var x = [].concat([ + { + a: 1 + } +], [ + { + a: 2 + } +]).map(function (b) { + return b.a; +}); diff --git a/tests/baselines/reference/arrayLiteral.js b/tests/baselines/reference/arrayLiteral.js index ae210aabd42..f2d6c998175 100644 --- a/tests/baselines/reference/arrayLiteral.js +++ b/tests/baselines/reference/arrayLiteral.js @@ -19,11 +19,21 @@ var y2: number[] = new Array(); // valid uses of array literals var x = []; var x = new Array(1); -var y = [1]; -var y = [1, 2]; +var y = [ + 1 +]; +var y = [ + 1, + 2 +]; var y = new Array(); var x2 = []; var x2 = new Array(1); -var y2 = [1]; -var y2 = [1, 2]; +var y2 = [ + 1 +]; +var y2 = [ + 1, + 2 +]; var y2 = new Array(); diff --git a/tests/baselines/reference/arrayLiteral1.js b/tests/baselines/reference/arrayLiteral1.js index b84e7414f24..8949ae684f0 100644 --- a/tests/baselines/reference/arrayLiteral1.js +++ b/tests/baselines/reference/arrayLiteral1.js @@ -2,4 +2,7 @@ var v30 = [1, 2]; //// [arrayLiteral1.js] -var v30 = [1, 2]; +var v30 = [ + 1, + 2 +]; diff --git a/tests/baselines/reference/arrayLiteral2.js b/tests/baselines/reference/arrayLiteral2.js index fb1b8059305..42d05fe9169 100644 --- a/tests/baselines/reference/arrayLiteral2.js +++ b/tests/baselines/reference/arrayLiteral2.js @@ -2,4 +2,7 @@ var v30 = [1, 2], v31; //// [arrayLiteral2.js] -var v30 = [1, 2], v31; +var v30 = [ + 1, + 2 +], v31; diff --git a/tests/baselines/reference/arrayLiteralContextualType.js b/tests/baselines/reference/arrayLiteralContextualType.js index 0edf5c45164..c86347cb028 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.js +++ b/tests/baselines/reference/arrayLiteralContextualType.js @@ -44,8 +44,10 @@ var Elephant = (function () { } return Elephant; })(); -function foo(animals) { } -function bar(animals) { } +function foo(animals) { +} +function bar(animals) { +} foo([ new Giraffe(), new Elephant() @@ -54,6 +56,9 @@ bar([ new Giraffe(), new Elephant() ]); // Legal because of the contextual type IAnimal provided by the parameter -var arr = [new Giraffe(), new Elephant()]; +var arr = [ + new Giraffe(), + new Elephant() +]; foo(arr); // ok because arr is Array not {}[] bar(arr); // ok because arr is Array not {}[] diff --git a/tests/baselines/reference/arrayLiteralSpread.js b/tests/baselines/reference/arrayLiteralSpread.js index 73a60714526..6cb0335e55d 100644 --- a/tests/baselines/reference/arrayLiteralSpread.js +++ b/tests/baselines/reference/arrayLiteralSpread.js @@ -25,7 +25,11 @@ function f2() { //// [arrayLiteralSpread.js] function f0() { - var a = [1, 2, 3]; + var a = [ + 1, + 2, + 3 + ]; var a1 = a; var a2 = [1].concat(a); var a3 = [1, 2].concat(a); @@ -36,11 +40,17 @@ function f0() { var a8 = a.concat(a, a); } function f1() { - var a = [1, 2, 3]; + var a = [ + 1, + 2, + 3 + ]; var b = ["hello"].concat(a, [true]); var b; } function f2() { var a = []; - var b = [5]; + var b = [ + 5 + ]; } diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 28aa143fa61..8d74e6f1444 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -78,8 +78,14 @@ var ActionB = (function (_super) { return ActionB; })(Action); var x1 = [ - { id: 2, trueness: false }, - { id: 3, name: "three" } + { + id: 2, + trueness: false + }, + { + id: 3, + name: "three" + } ]; var x2 = [ new ActionA(), @@ -91,8 +97,14 @@ var x3 = [ new ActionB() ]; var z1 = [ - { id: 2, trueness: false }, - { id: 3, name: "three" } + { + id: 2, + trueness: false + }, + { + id: 3, + name: "three" + } ]; var z2 = [ new ActionA(), diff --git a/tests/baselines/reference/arrayLiteralWidened.js b/tests/baselines/reference/arrayLiteralWidened.js index a250c47849d..02f9e0c6544 100644 --- a/tests/baselines/reference/arrayLiteralWidened.js +++ b/tests/baselines/reference/arrayLiteralWidened.js @@ -17,10 +17,43 @@ var c = [[[null]],[undefined]] //// [arrayLiteralWidened.js] // array literals are widened upon assignment according to their element type var a = []; // any[] -var a = [null, null]; -var a = [undefined, undefined]; -var b = [[], [null, null]]; // any[][] -var b = [[], []]; -var b = [[undefined, undefined]]; -var c = [[[]]]; // any[][][] -var c = [[[null]], [undefined]]; +var a = [ + null, + null +]; +var a = [ + undefined, + undefined +]; +var b = [ + [], + [ + null, + null + ] +]; // any[][] +var b = [ + [], + [] +]; +var b = [ + [ + undefined, + undefined + ] +]; +var c = [ + [ + [] + ] +]; // any[][][] +var c = [ + [ + [ + null + ] + ], + [ + undefined + ] +]; diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js index b4f869d499e..9855abefb2c 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js @@ -20,10 +20,48 @@ var gs = [(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => var a; var b; var c; -var as = [a, b]; // { x: number; y?: number };[] -var bs = [b, a]; // { x: number; z?: number };[] -var cs = [a, b, c]; // { x: number; y?: number };[] -var ds = [function (x) { return 1; }, function (x) { return 2; }]; // { (x:Object) => number }[] -var es = [function (x) { return 2; }, function (x) { return 1; }]; // { (x:string) => number }[] -var fs = [function (a) { return 1; }, function (b) { return 2; }]; // (a: { x: number; y?: number }) => number[] -var gs = [function (b) { return 2; }, function (a) { return 1; }]; // (b: { x: number; z?: number }) => number[] +var as = [ + a, + b +]; // { x: number; y?: number };[] +var bs = [ + b, + a +]; // { x: number; z?: number };[] +var cs = [ + a, + b, + c +]; // { x: number; y?: number };[] +var ds = [ + function (x) { + return 1; + }, + function (x) { + return 2; + } +]; // { (x:Object) => number }[] +var es = [ + function (x) { + return 2; + }, + function (x) { + return 1; + } +]; // { (x:string) => number }[] +var fs = [ + function (a) { + return 1; + }, + function (b) { + return 2; + } +]; // (a: { x: number; y?: number }) => number[] +var gs = [ + function (b) { + return 2; + }, + function (a) { + return 1; + } +]; // (b: { x: number; z?: number }) => number[] diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 16e5ec7eee4..e55d14e2994 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -44,24 +44,91 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var arr1 = [[], [1], ['']]; -var arr2 = [[null], [1], ['']]; +var arr1 = [ + [], + [ + 1 + ], + [ + '' + ] +]; +var arr2 = [ + [ + null + ], + [ + 1 + ], + [ + '' + ] +]; // Array literal with elements of only EveryType E has type E[] -var stringArrArr = [[''], [""]]; -var stringArr = ['', ""]; -var numberArr = [0, 0.0, 0x00, 1e1]; -var boolArr = [false, true, false, true]; +var stringArrArr = [ + [ + '' + ], + [ + "" + ] +]; +var stringArr = [ + '', + "" +]; +var numberArr = [ + 0, + 0.0, + 0x00, + 1e1 +]; +var boolArr = [ + false, + true, + false, + true +]; var C = (function () { function C() { } return C; })(); -var classArr = [new C(), new C()]; -var classTypeArray = [C, C, C]; +var classArr = [ + new C(), + new C() +]; +var classTypeArray = [ + C, + C, + C +]; var classTypeArray; // Should OK, not be a parse error // Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] -var context1 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; -var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; +var context1 = [ + { + a: '', + b: 0, + c: '' + }, + { + a: "", + b: 3, + c: 0 + } +]; +var context2 = [ + { + a: '', + b: 0, + c: '' + }, + { + a: "", + b: 3, + c: 0 + } +]; // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] var Base = (function () { function Base() { @@ -84,6 +151,12 @@ var Derived2 = (function (_super) { return Derived2; })(Base); ; -var context3 = [new Derived1(), new Derived2()]; +var context3 = [ + new Derived1(), + new Derived2() +]; // Contextual type C with numeric index signature of type Base makes array literal of Derived1 and Derived2 have type Base[] -var context4 = [new Derived1(), new Derived1()]; +var context4 = [ + new Derived1(), + new Derived1() +]; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index f15215a88eb..cce02199052 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -52,8 +52,20 @@ var MyList = (function () { var list; var list2; var myList; -var xs = [list, myList]; // {}[] -var ys = [list, list2]; // {}[] -var zs = [list, null]; // List[] +var xs = [ + list, + myList +]; // {}[] +var ys = [ + list, + list2 +]; // {}[] +var zs = [ + list, + null +]; // List[] var myDerivedList; -var as = [list, myDerivedList]; // List[] +var as = [ + list, + myDerivedList +]; // List[] diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.js b/tests/baselines/reference/arrayOfFunctionTypes3.js index c0829418dd7..036fc2d85ae 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.js +++ b/tests/baselines/reference/arrayOfFunctionTypes3.js @@ -28,25 +28,42 @@ var r7 = r6(''); // any not string //// [arrayOfFunctionTypes3.js] // valid uses of arrays of function types -var x = [function () { return 1; }, function () { }]; +var x = [ + function () { + return 1; + }, + function () { + } +]; var r2 = x[0](); var C = (function () { function C() { } return C; })(); -var y = [C, C]; +var y = [ + C, + C +]; var r3 = new y[0](); var a; var b; var c; -var z = [a, b, c]; +var z = [ + a, + b, + c +]; var r4 = z[0]; var r5 = r4(''); // any not string var r5b = r4(1); var a2; var b2; var c2; -var z2 = [a2, b2, c2]; +var z2 = [ + a2, + b2, + c2 +]; var r6 = z2[0]; var r7 = r6(''); // any not string diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js index 6fcdae657e9..3b0f2c11aa7 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js @@ -7,6 +7,7 @@ class X { var X = (function () { function X() { } - X.prototype.f = function (a) { }; + X.prototype.f = function (a) { + }; return X; })(); diff --git a/tests/baselines/reference/arraySigChecking.js b/tests/baselines/reference/arraySigChecking.js index 16189305ead..82ef3d059ef 100644 --- a/tests/baselines/reference/arraySigChecking.js +++ b/tests/baselines/reference/arraySigChecking.js @@ -34,13 +34,22 @@ isEmpty(['a']); //// [arraySigChecking.js] var myVar; -var strArray = [myVar.voidFn()]; +var strArray = [ + myVar.voidFn() +]; var myArray; -myArray = [[1, 2]]; +myArray = [ + [ + 1, + 2 + ] +]; function isEmpty(l) { return l.length === 0; } isEmpty([]); isEmpty(new Array(3)); isEmpty(new Array(3)); -isEmpty(['a']); +isEmpty([ + 'a' +]); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index a10e3955ae0..3a47b787418 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -105,7 +105,9 @@ var __extends = this.__extends || function (d, b) { }; // Arrow function used in with statement with (window) { - var p = function () { return this; }; + var p = function () { + return this; + }; } // Arrow function as argument to super call var Base = (function () { @@ -117,35 +119,55 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this = this; - _super.call(this, function () { return _this; }); + _super.call(this, function () { + return _this; + }); } return Derived; })(Base); // Arrow function as function argument -window.setTimeout(function () { return null; }, 100); +window.setTimeout(function () { + return null; +}, 100); // Arrow function as value in array literal -var obj = function (n) { return ''; }; +var obj = function (n) { + return ''; +}; var obj; // OK -var arr = [function (n) { return ''; }]; +var arr = [ + function (n) { + return ''; + } +]; var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { - E[E["x"] = function () { return 4; }] = "x"; - E[E["y"] = (function () { return _this; }).length] = "y"; // error, can't use this in enum + E[E["x"] = function () { + return 4; + }] = "x"; + E[E["y"] = (function () { + return _this; + }).length] = "y"; // error, can't use this in enum })(E || (E = {})); // Arrow function as module variable initializer var M; (function (M) { - M.a = function (s) { return ''; }; - var b = function (s) { return s; }; + M.a = function (s) { + return ''; + }; + var b = function (s) { + return s; + }; })(M || (M = {})); // Repeat above for module members that are functions? (necessary to redo all of them?) var M2; (function (M2) { // Arrow function used in with statement with (window) { - var p = function () { return this; }; + var p = function () { + return this; + }; } // Arrow function as argument to super call var Base = (function () { @@ -157,37 +179,69 @@ var M2; __extends(Derived, _super); function Derived() { var _this = this; - _super.call(this, function () { return _this; }); + _super.call(this, function () { + return _this; + }); } return Derived; })(Base); // Arrow function as function argument - window.setTimeout(function () { return null; }, 100); + window.setTimeout(function () { + return null; + }, 100); // Arrow function as value in array literal - var obj = function (n) { return ''; }; + var obj = function (n) { + return ''; + }; var obj; // OK - var arr = [function (n) { return ''; }]; + var arr = [ + function (n) { + return ''; + } + ]; var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { - E[E["x"] = function () { return 4; }] = "x"; - E[E["y"] = (function () { return _this; }).length] = "y"; + E[E["x"] = function () { + return 4; + }] = "x"; + E[E["y"] = (function () { + return _this; + }).length] = "y"; })(E || (E = {})); // Arrow function as module variable initializer var M; (function (M) { - M.a = function (s) { return ''; }; - var b = function (s) { return s; }; + M.a = function (s) { + return ''; + }; + var b = function (s) { + return s; + }; })(M || (M = {})); })(M2 || (M2 = {})); // (ParamList) => { ... } is a generic arrow function -var generic1 = function (n) { return [n]; }; +var generic1 = function (n) { + return [ + n + ]; +}; var generic1; // Incorrect error, Bug 829597 -var generic2 = function (n) { return [n]; }; +var generic2 = function (n) { + return [ + n + ]; +}; var generic2; // ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = (function (n) { return [n]; }); +var asserted1 = (function (n) { + return [ + n + ]; +}); var asserted1; -var asserted2 = (function (n) { return n; }); +var asserted2 = (function (n) { + return n; +}); var asserted2; diff --git a/tests/baselines/reference/arrowFunctionExpressions.js b/tests/baselines/reference/arrowFunctionExpressions.js index 68516b52cb2..760ba23627b 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.js +++ b/tests/baselines/reference/arrowFunctionExpressions.js @@ -90,49 +90,84 @@ function tryCatchFn() { //// [arrowFunctionExpressions.js] // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } -var a = function (p) { return p.length; }; -var a = function (p) { return p.length; }; +var a = function (p) { + return p.length; +}; +var a = function (p) { + return p.length; +}; // Identifier => Block is equivalent to(Identifier) => Block -var b = function (j) { return 0; }; -var b = function (j) { return 0; }; +var b = function (j) { + return 0; +}; +var b = function (j) { + return 0; +}; // Identifier => AssignmentExpression is equivalent to(Identifier) => AssignmentExpression var c; -var d = function (n) { return c = n; }; -var d = function (n) { return c = n; }; +var d = function (n) { + return c = n; +}; +var d = function (n) { + return c = n; +}; var d; // Arrow function used in class member initializer // Arrow function used in class member function var MyClass = (function () { function MyClass() { var _this = this; - this.m = function (n) { return n + 1; }; - this.p = function (n) { return n && _this; }; + this.m = function (n) { + return n + 1; + }; + this.p = function (n) { + return n && _this; + }; } MyClass.prototype.fn = function () { var _this = this; - var m = function (n) { return n + 1; }; - var p = function (n) { return n && _this; }; + var m = function (n) { + return n + 1; + }; + var p = function (n) { + return n && _this; + }; }; return MyClass; })(); // Arrow function used in arrow function -var arrrr = function () { return function (m) { return function () { return function (n) { return m + n; }; }; }; }; +var arrrr = function () { + return function (m) { + return function () { + return function (n) { + return m + n; + }; + }; + }; +}; var e = arrrr()(3)()(4); var e; // Arrow function used in arrow function used in function function someFn() { - var arr = function (n) { return function (p) { return p * n; }; }; + var arr = function (n) { + return function (p) { + return p * n; + }; + }; arr(3)(4).toExponential(); } // Arrow function used in function function someOtherFn() { - var arr = function (n) { return '' + n; }; + var arr = function (n) { + return '' + n; + }; arr(4).charAt(0); } // Arrow function used in nested function in function function outerFn() { function innerFn() { - var arrowFn = function () { }; + var arrowFn = function () { + }; var p = arrowFn(); var p; } @@ -140,7 +175,9 @@ function outerFn() { // Arrow function used in nested function in arrow function var f = function (n) { function fn(x) { - return function () { return n + x; }; + return function () { + return n + x; + }; } return fn(4); }; @@ -150,7 +187,9 @@ var g; function someOuterFn() { var arr = function (n) { function innerFn() { - return function () { return n.length; }; + return function () { + return n.length; + }; } return innerFn; }; @@ -162,12 +201,18 @@ h.toExponential(); function tryCatchFn() { var _this = this; try { - var x = function () { return _this; }; + var x = function () { + return _this; + }; } catch (e) { - var t = function () { return e + _this; }; + var t = function () { + return e + _this; + }; } finally { - var m = function () { return _this + ''; }; + var m = function () { + return _this + ''; + }; } } diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js index 0f9c3f81b3b..3cfc18d2cf7 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js @@ -11,4 +11,6 @@ var C = (function () { } return C; })(); -var c = new C(function () { return asdf; }); // should error +var c = new C(function () { + return asdf; +}); // should error diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js index 9969a28b6ce..55a6d2781fb 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js @@ -2,4 +2,6 @@ () => 0; //// [arrowFunctionInExpressionStatement1.js] -(function () { return 0; }); +(function () { + return 0; +}); diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js index 2cc6aca998e..63f3facd858 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js @@ -6,5 +6,7 @@ module M { //// [arrowFunctionInExpressionStatement2.js] var M; (function (M) { - (function () { return 0; }); + (function () { + return 0; + }); })(M || (M = {})); diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js index 931520294e9..51ddc0f6dac 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js @@ -8,4 +8,6 @@ var square = (x: number) => x * x; // Should error at semicolon. var f = ; var b = 1 * 2 * 3 * 4; -var square = function (x) { return x * x; }; +var square = function (x) { + return x * x; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js new file mode 100644 index 00000000000..e3ff7583448 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js @@ -0,0 +1,7 @@ +//// [arrowFunctionWithObjectLiteralBody1.ts] +var v = a => {} + +//// [arrowFunctionWithObjectLiteralBody1.js] +var v = function (a) { + return {}; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types new file mode 100644 index 00000000000..2446c97d4ce --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts === +var v = a => {} +>v : (a: any) => any +>a => {} : (a: any) => any +>a : any +>{} : any +>{} : {} + diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js new file mode 100644 index 00000000000..384cdc2d48b --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js @@ -0,0 +1,7 @@ +//// [arrowFunctionWithObjectLiteralBody2.ts] +var v = a => {} + +//// [arrowFunctionWithObjectLiteralBody2.js] +var v = function (a) { + return {}; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types new file mode 100644 index 00000000000..df8e87e82ea --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts === +var v = a => {} +>v : (a: any) => any +>a => {} : (a: any) => any +>a : any +>{} : any +>{} : any +>{} : {} + diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js new file mode 100644 index 00000000000..91a699dfc4b --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js @@ -0,0 +1,5 @@ +//// [arrowFunctionWithObjectLiteralBody3.ts] +var v = a => {} + +//// [arrowFunctionWithObjectLiteralBody3.js] +var v = a => ({}); diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types new file mode 100644 index 00000000000..91e11ab9104 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts === +var v = a => {} +>v : (a: any) => any +>a => {} : (a: any) => any +>a : any +>{} : any +>{} : {} + diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js new file mode 100644 index 00000000000..83bc0c878ca --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js @@ -0,0 +1,5 @@ +//// [arrowFunctionWithObjectLiteralBody4.ts] +var v = a => {} + +//// [arrowFunctionWithObjectLiteralBody4.js] +var v = a => ({}); diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types new file mode 100644 index 00000000000..400a91b459d --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts === +var v = a => {} +>v : (a: any) => any +>a => {} : (a: any) => any +>a : any +>{} : any +>{} : any +>{} : {} + diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js new file mode 100644 index 00000000000..f2d27ea4a63 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js @@ -0,0 +1,34 @@ +//// [arrowFunctionWithObjectLiteralBody5.ts] +var a = () => { name: "foo", message: "bar" }; + +var b = () => ({ name: "foo", message: "bar" }); + +var c = () => ({ name: "foo", message: "bar" }); + +var d = () => ((({ name: "foo", message: "bar" }))); + +//// [arrowFunctionWithObjectLiteralBody5.js] +var a = function () { + return { + name: "foo", + message: "bar" + }; +}; +var b = function () { + return ({ + name: "foo", + message: "bar" + }); +}; +var c = function () { + return ({ + name: "foo", + message: "bar" + }); +}; +var d = function () { + return (({ + name: "foo", + message: "bar" + })); +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types new file mode 100644 index 00000000000..15b3697732a --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts === +var a = () => { name: "foo", message: "bar" }; +>a : () => Error +>() => { name: "foo", message: "bar" } : () => Error +>{ name: "foo", message: "bar" } : Error +>Error : Error +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var b = () => ({ name: "foo", message: "bar" }); +>b : () => Error +>() => ({ name: "foo", message: "bar" }) : () => Error +>({ name: "foo", message: "bar" }) : Error +>{ name: "foo", message: "bar" } : Error +>Error : Error +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var c = () => ({ name: "foo", message: "bar" }); +>c : () => { name: string; message: string; } +>() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } +>({ name: "foo", message: "bar" }) : { name: string; message: string; } +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var d = () => ((({ name: "foo", message: "bar" }))); +>d : () => Error +>() => ((({ name: "foo", message: "bar" }))) : () => Error +>((({ name: "foo", message: "bar" }))) : Error +>(({ name: "foo", message: "bar" })) : Error +>({ name: "foo", message: "bar" }) : Error +>Error : Error +>({ name: "foo", message: "bar" }) : { name: string; message: string; } +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js new file mode 100644 index 00000000000..ac2af4046eb --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js @@ -0,0 +1,26 @@ +//// [arrowFunctionWithObjectLiteralBody6.ts] +var a = () => { name: "foo", message: "bar" }; + +var b = () => ({ name: "foo", message: "bar" }); + +var c = () => ({ name: "foo", message: "bar" }); + +var d = () => ((({ name: "foo", message: "bar" }))); + +//// [arrowFunctionWithObjectLiteralBody6.js] +var a = () => ({ + name: "foo", + message: "bar" +}); +var b = () => ({ + name: "foo", + message: "bar" +}); +var c = () => ({ + name: "foo", + message: "bar" +}); +var d = () => (({ + name: "foo", + message: "bar" +})); diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types new file mode 100644 index 00000000000..14a45dca213 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts === +var a = () => { name: "foo", message: "bar" }; +>a : () => Error +>() => { name: "foo", message: "bar" } : () => Error +>{ name: "foo", message: "bar" } : Error +>Error : Error +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var b = () => ({ name: "foo", message: "bar" }); +>b : () => Error +>() => ({ name: "foo", message: "bar" }) : () => Error +>({ name: "foo", message: "bar" }) : Error +>{ name: "foo", message: "bar" } : Error +>Error : Error +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var c = () => ({ name: "foo", message: "bar" }); +>c : () => { name: string; message: string; } +>() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; } +>({ name: "foo", message: "bar" }) : { name: string; message: string; } +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + +var d = () => ((({ name: "foo", message: "bar" }))); +>d : () => Error +>() => ((({ name: "foo", message: "bar" }))) : () => Error +>((({ name: "foo", message: "bar" }))) : Error +>(({ name: "foo", message: "bar" })) : Error +>({ name: "foo", message: "bar" }) : Error +>Error : Error +>({ name: "foo", message: "bar" }) : { name: string; message: string; } +>{ name: "foo", message: "bar" } : { name: string; message: string; } +>name : string +>message : string + diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.js b/tests/baselines/reference/arrowFunctionsMissingTokens.js index e0e22578ac6..7bd24f07577 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.js +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.js @@ -69,22 +69,39 @@ module okay { //// [arrowFunctionsMissingTokens.js] var missingArrowsWithCurly; (function (missingArrowsWithCurly) { - var a = function () { }; - var b = function () { }; - var c = function (x) { }; - var d = function (x, y) { }; - var e = function (x, y) { }; + var a = function () { + }; + var b = function () { + }; + var c = function (x) { + }; + var d = function (x, y) { + }; + var e = function (x, y) { + }; })(missingArrowsWithCurly || (missingArrowsWithCurly = {})); var missingCurliesWithArrow; (function (missingCurliesWithArrow) { var withStatement; (function (withStatement) { - var a = function () { var k = 10; }; - var b = function () { var k = 10; }; - var c = function (x) { var k = 10; }; - var d = function (x, y) { var k = 10; }; - var e = function (x, y) { var k = 10; }; - var f = function () { var k = 10; }; + var a = function () { + var k = 10; + }; + var b = function () { + var k = 10; + }; + var c = function (x) { + var k = 10; + }; + var d = function (x, y) { + var k = 10; + }; + var e = function (x, y) { + var k = 10; + }; + var f = function () { + var k = 10; + }; })(withStatement || (withStatement = {})); var withoutStatement; (function (withoutStatement) { @@ -110,9 +127,14 @@ var ce_nEst_pas_une_arrow_function; })(ce_nEst_pas_une_arrow_function || (ce_nEst_pas_une_arrow_function = {})); var okay; (function (okay) { - var a = function () { }; - var b = function () { }; - var c = function (x) { }; - var d = function (x, y) { }; - var e = function (x, y) { }; + var a = function () { + }; + var b = function () { + }; + var c = function (x) { + }; + var d = function (x, y) { + }; + var e = function (x, y) { + }; })(okay || (okay = {})); diff --git a/tests/baselines/reference/asiArith.js b/tests/baselines/reference/asiArith.js index 8e957aae332..6d7b964c8d0 100644 --- a/tests/baselines/reference/asiArith.js +++ b/tests/baselines/reference/asiArith.js @@ -37,9 +37,7 @@ y //// [asiArith.js] var x = 1; var y = 1; -var z = x + - + +y; +var z = x + + +y; var a = 1; var b = 1; -var c = x - - - -y; +var c = x - - -y; diff --git a/tests/baselines/reference/assign1.js b/tests/baselines/reference/assign1.js index fa18c8f287b..f29f5a2a9de 100644 --- a/tests/baselines/reference/assign1.js +++ b/tests/baselines/reference/assign1.js @@ -12,5 +12,8 @@ module M { //// [assign1.js] var M; (function (M) { - var x = { salt: 2, pepper: 0 }; + var x = { + salt: 2, + pepper: 0 + }; })(M || (M = {})); diff --git a/tests/baselines/reference/assignEveryTypeToAny.js b/tests/baselines/reference/assignEveryTypeToAny.js index bbe622b3300..ed1911ef995 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.js +++ b/tests/baselines/reference/assignEveryTypeToAny.js @@ -91,8 +91,16 @@ var h; x = h; var i; x = i; -x = { f: function () { return 1; } }; -x = { f: function (x) { return x; } }; +x = { + f: function () { + return 1; + } +}; +x = { + f: function (x) { + return x; + } +}; function j(a) { x = a; } diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index fa53d8facdf..85639cdeeaf 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2322: Type 'Number' is not assignable to type 'number'. -tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2322: Type 'Number' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(25,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'. ==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts (2 errors) ==== @@ -12,6 +12,7 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24 toFixed(fractionDigits?: number): string; toExponential(fractionDigits?: number): string; toPrecision(precision?: number): string; + valueOf(): number; doStuff(): string; } diff --git a/tests/baselines/reference/assignFromNumberInterface2.js b/tests/baselines/reference/assignFromNumberInterface2.js index 74384d42302..25262bf27f0 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.js +++ b/tests/baselines/reference/assignFromNumberInterface2.js @@ -8,6 +8,7 @@ interface NotNumber { toFixed(fractionDigits?: number): string; toExponential(fractionDigits?: number): string; toPrecision(precision?: number): string; + valueOf(): number; doStuff(): string; } diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 2e3e518f75b..4e09eb6eacb 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2322: Type 'String' is not assignable to type 'string'. -tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2322: Type 'NotString' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2322: Type 'String' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assignable to type 'string'. ==== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts (2 errors) ==== @@ -35,6 +35,7 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47 trim(): string; length: number; substr(from: number, length?: number): string; + valueOf(): string; [index: number]: string; } diff --git a/tests/baselines/reference/assignFromStringInterface2.js b/tests/baselines/reference/assignFromStringInterface2.js index 7e4821ac2a7..5636a4806cc 100644 --- a/tests/baselines/reference/assignFromStringInterface2.js +++ b/tests/baselines/reference/assignFromStringInterface2.js @@ -31,6 +31,7 @@ interface NotString { trim(): string; length: number; substr(from: number, length?: number): string; + valueOf(): string; [index: number]: string; } diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index 580c6fa3c45..f462fd347e6 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -16,7 +16,7 @@ tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(8,4): error TS234 !!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. !!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. fn(function (a, b) { return true; }) - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. !!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js index fe6142cafe0..182ceec9821 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js @@ -10,6 +10,11 @@ fn(function (a, b) { return true; }) //// [assignLambdaToNominalSubtypeOfFunction.js] -function fn(cb) { } -fn(function (a, b) { return true; }); -fn(function (a, b) { return true; }); +function fn(cb) { +} +fn(function (a, b) { + return true; +}); +fn(function (a, b) { + return true; +}); diff --git a/tests/baselines/reference/assignToExistingClass.js b/tests/baselines/reference/assignToExistingClass.js index f12979f3142..c739279c85b 100644 --- a/tests/baselines/reference/assignToExistingClass.js +++ b/tests/baselines/reference/assignToExistingClass.js @@ -28,7 +28,9 @@ var Test; } Tester.prototype.willThrowError = function () { Mocked = Mocked || function () { - return { myProp: "test" }; + return { + myProp: "test" + }; }; }; return Tester; diff --git a/tests/baselines/reference/assignToFn.js b/tests/baselines/reference/assignToFn.js index 2ff8ceedfa6..a565b9ab1ad 100644 --- a/tests/baselines/reference/assignToFn.js +++ b/tests/baselines/reference/assignToFn.js @@ -13,6 +13,10 @@ module M { //// [assignToFn.js] var M; (function (M) { - var x = { f: function (n) { return true; } }; + var x = { + f: function (n) { + return true; + } + }; x.f = "hello"; })(M || (M = {})); diff --git a/tests/baselines/reference/assignmentCompat1.js b/tests/baselines/reference/assignmentCompat1.js index 09546b7165e..99b6d592afd 100644 --- a/tests/baselines/reference/assignmentCompat1.js +++ b/tests/baselines/reference/assignmentCompat1.js @@ -6,7 +6,9 @@ x = y; y = x; //// [assignmentCompat1.js] -var x = { one: 1 }; +var x = { + one: 1 +}; var y; x = y; y = x; diff --git a/tests/baselines/reference/assignmentCompatBug2.js b/tests/baselines/reference/assignmentCompatBug2.js index 5545cc7d19c..6f4ebd585ed 100644 --- a/tests/baselines/reference/assignmentCompatBug2.js +++ b/tests/baselines/reference/assignmentCompatBug2.js @@ -39,33 +39,62 @@ b3 = { }; // error //// [assignmentCompatBug2.js] -var b2 = { a: 0 }; // error -b2 = { a: 0 }; // error -b2 = { b: 0, a: 0 }; +var b2 = { + a: 0 +}; // error +b2 = { + a: 0 +}; // error +b2 = { + b: 0, + a: 0 +}; var b3; b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, m: 0 }; // ok b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; } + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + } }; // error b3 = { - f: function (n) { return 0; }, + f: function (n) { + return 0; + }, m: 0 }; // error b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, m: 0, n: 0, - k: function (a) { return null; } + k: function (a) { + return null; + } }; // ok b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, n: 0, - k: function (a) { return null; } + k: function (a) { + return null; + } }; // error diff --git a/tests/baselines/reference/assignmentCompatBug3.js b/tests/baselines/reference/assignmentCompatBug3.js index 049e7090335..6d3deedc5b8 100644 --- a/tests/baselines/reference/assignmentCompatBug3.js +++ b/tests/baselines/reference/assignmentCompatBug3.js @@ -28,8 +28,12 @@ foo(x + y); //// [assignmentCompatBug3.js] function makePoint(x, y) { return { - get x() { return x; }, - get y() { return y; }, + get x() { + return x; + }, + get y() { + return y; + }, //x: "yo", //y: "boo", dist: function () { @@ -49,7 +53,8 @@ var C = (function () { }); return C; })(); -function foo(test) { } +function foo(test) { +} var x; var y; foo(x); diff --git a/tests/baselines/reference/assignmentCompatBug5.js b/tests/baselines/reference/assignmentCompatBug5.js index ae444c3dad6..d769e9afd25 100644 --- a/tests/baselines/reference/assignmentCompatBug5.js +++ b/tests/baselines/reference/assignmentCompatBug5.js @@ -12,11 +12,22 @@ foo3((n) => { return; }); //// [assignmentCompatBug5.js] -function foo1(x) { } -foo1({ b: 5 }); -function foo2(x) { } -foo2(["s", "t"]); -function foo3(x) { } +function foo1(x) { +} +foo1({ + b: 5 +}); +function foo2(x) { +} +foo2([ + "s", + "t" +]); +function foo3(x) { +} ; -foo3(function (s) { }); -foo3(function (n) { return; }); +foo3(function (s) { +}); +foo3(function (n) { + return; +}); diff --git a/tests/baselines/reference/assignmentCompatForEnums.js b/tests/baselines/reference/assignmentCompatForEnums.js index 8db85399fa8..4bca6a514d2 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.js +++ b/tests/baselines/reference/assignmentCompatForEnums.js @@ -22,7 +22,9 @@ var TokenType; })(TokenType || (TokenType = {})); ; var list = {}; -function returnType() { return null; } +function returnType() { + return null; +} function foo() { var x = returnType(); var x = list['one']; diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js index c96c739bf3c..b56a09ff7e7 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js @@ -6,7 +6,17 @@ foo({ id: 1234, name: false }); // Error, name of wrong type foo({ name: "hello" }); // Error, id required but missing //// [assignmentCompatFunctionsWithOptionalArgs.js] -foo({ id: 1234 }); // Ok -foo({ id: 1234, name: "hello" }); // Ok -foo({ id: 1234, name: false }); // Error, name of wrong type -foo({ name: "hello" }); // Error, id required but missing +foo({ + id: 1234 +}); // Ok +foo({ + id: 1234, + name: "hello" +}); // Ok +foo({ + id: 1234, + name: false +}); // Error, name of wrong type +foo({ + name: "hello" +}); // Error, id required but missing diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js index bb6817bb60e..2eac9cdb476 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js @@ -20,8 +20,10 @@ Biz(new Foo()); var Foo = (function () { function Foo() { } - Foo.prototype.Boz = function () { }; + Foo.prototype.Boz = function () { + }; return Foo; })(); -function Biz(map) { } +function Biz(map) { +} Biz(new Foo()); diff --git a/tests/baselines/reference/assignmentCompatOnNew.js b/tests/baselines/reference/assignmentCompatOnNew.js index 1b8cfdcc3bf..bc3b7e6ba96 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.js +++ b/tests/baselines/reference/assignmentCompatOnNew.js @@ -13,5 +13,6 @@ var Foo = (function () { return Foo; })(); ; -function bar(x) { } +function bar(x) { +} bar(Foo); // Error, but should be allowed diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.js b/tests/baselines/reference/assignmentCompatWithCallSignatures.js index 12fc6159fac..9cd0a8c8bac 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.js @@ -55,20 +55,40 @@ t = s; t = a2; a = s; a = a2; -t = function (x) { return 1; }; -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function (x) { return 1; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function (x) { + return 1; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js index 6bfc1b6c0d6..288a2bdf435 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js @@ -62,26 +62,70 @@ t = s; t = a2; a = s; a = a2; -t = { f: function () { return 1; } }; -t = { f: function (x) { return 1; } }; -t = { f: function f() { return 1; } }; -t = { f: function (x) { return ''; } }; -a = { f: function () { return 1; } }; -a = { f: function (x) { return 1; } }; -a = { f: function (x) { return ''; } }; +t = { + f: function () { + return 1; + } +}; +t = { + f: function (x) { + return 1; + } +}; +t = { + f: function f() { + return 1; + } +}; +t = { + f: function (x) { + return ''; + } +}; +a = { + f: function () { + return 1; + } +}; +a = { + f: function (x) { + return 1; + } +}; +a = { + f: function (x) { + return ''; + } +}; // errors -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js index e12a741cd0f..3aa9d5a9a9e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js @@ -73,9 +73,15 @@ var a5: (x?: number, y?: number) => number; // call signatures in derived types must have the same or fewer optional parameters as the base type var b; var a; -a = function () { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // error, too many required params +a = function () { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // error, too many required params a = b.a; // ok a = b.a2; // ok a = b.a3; // error @@ -83,9 +89,15 @@ a = b.a4; // error a = b.a5; // ok a = b.a6; // error var a2; -a2 = function () { return 1; }; // ok, same number of required params -a2 = function (x) { return 1; }; // ok, same number of required params -a2 = function (x) { return 1; }; // ok, same number of params +a2 = function () { + return 1; +}; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, same number of params a2 = b.a; // ok a2 = b.a2; // ok a2 = b.a3; // ok, same number of params @@ -93,10 +105,18 @@ a2 = b.a4; // ok, excess params are optional in b.a3 a2 = b.a5; // ok a2 = b.a6; // error var a3; -a3 = function () { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, same number of required params -a3 = function (x, y) { return 1; }; // error, too many required params +a3 = function () { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, same number of required params +a3 = function (x, y) { + return 1; +}; // error, too many required params a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -104,10 +124,18 @@ a3 = b.a4; // ok a3 = b.a5; // ok a3 = b.a6; // error var a4; -a4 = function () { return 1; }; // ok, fewer required params -a4 = function (x, y) { return 1; }; // ok, fewer required params -a4 = function (x) { return 1; }; // ok, same number of required params -a4 = function (x, y) { return 1; }; // ok, same number of params +a4 = function () { + return 1; +}; // ok, fewer required params +a4 = function (x, y) { + return 1; +}; // ok, fewer required params +a4 = function (x) { + return 1; +}; // ok, same number of required params +a4 = function (x, y) { + return 1; +}; // ok, same number of params a4 = b.a; // ok a4 = b.a2; // ok a4 = b.a3; // ok @@ -115,10 +143,18 @@ a4 = b.a4; // ok a4 = b.a5; // ok a4 = b.a6; // ok, same number of params var a5; -a5 = function () { return 1; }; // ok, fewer required params -a5 = function (x, y) { return 1; }; // ok, fewer required params -a5 = function (x) { return 1; }; // ok, fewer params in lambda -a5 = function (x, y) { return 1; }; // ok, same number of params +a5 = function () { + return 1; +}; // ok, fewer required params +a5 = function (x, y) { + return 1; +}; // ok, fewer required params +a5 = function (x) { + return 1; +}; // ok, fewer params in lambda +a5 = function (x, y) { + return 1; +}; // ok, same number of params a5 = b.a; // ok a5 = b.a2; // ok a5 = b.a3; // ok, fewer params in b.a3 diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js index f4cf5cc79e2..054e865eb45 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js @@ -48,7 +48,9 @@ var a4: (x?: number, y?: string, ...z: number[]) => number; //// [assignmentCompatWithCallSignaturesWithRestParameters.js] // call signatures in derived types must have the same or fewer optional parameters as the target for assignment var a; // ok, same number of required params -a = function () { return 1; }; // ok, same number of required params +a = function () { + return 1; +}; // ok, same number of required params a = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -63,12 +65,22 @@ a = function () { } return 1; }; // error, type mismatch -a = function (x) { return 1; }; // ok, same number of required params -a = function (x, y, z) { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // ok, rest param corresponds to infinite number of params -a = function (x) { return 1; }; // error, incompatible type +a = function (x) { + return 1; +}; // ok, same number of required params +a = function (x, y, z) { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // ok, rest param corresponds to infinite number of params +a = function (x) { + return 1; +}; // error, incompatible type var a2; -a2 = function () { return 1; }; // ok, fewer required params +a2 = function () { + return 1; +}; // ok, fewer required params a2 = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -76,8 +88,12 @@ a2 = function () { } return 1; }; // ok, fewer required params -a2 = function (x) { return 1; }; // ok, fewer required params -a2 = function (x) { return 1; }; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, fewer required params +a2 = function (x) { + return 1; +}; // ok, same number of required params a2 = function (x) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -92,14 +108,28 @@ a2 = function (x) { } return 1; }; // should be type mismatch error -a2 = function (x, y) { return 1; }; // ok, rest param corresponds to infinite number of params -a2 = function (x, y) { return 1; }; // ok, same number of required params +a2 = function (x, y) { + return 1; +}; // ok, rest param corresponds to infinite number of params +a2 = function (x, y) { + return 1; +}; // ok, same number of required params var a3; -a3 = function () { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, same number of required params -a3 = function (x, y) { return 1; }; // ok, all present params match -a3 = function (x, y, z) { return 1; }; // error +a3 = function () { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, same number of required params +a3 = function (x, y) { + return 1; +}; // ok, all present params match +a3 = function (x, y, z) { + return 1; +}; // error a3 = function (x) { var z = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -107,13 +137,25 @@ a3 = function (x) { } return 1; }; // error -a3 = function (x, y, z) { return 1; }; // error +a3 = function (x, y, z) { + return 1; +}; // error var a4; -a4 = function () { return 1; }; // ok, fewer required params -a4 = function (x, y) { return 1; }; // error, type mismatch -a4 = function (x) { return 1; }; // ok, all present params match -a4 = function (x, y) { return 1; }; // error, second param has type mismatch -a4 = function (x, y) { return 1; }; // ok, same number of required params with matching types +a4 = function () { + return 1; +}; // ok, fewer required params +a4 = function (x, y) { + return 1; +}; // error, type mismatch +a4 = function (x) { + return 1; +}; // ok, all present params match +a4 = function (x, y) { + return 1; +}; // error, second param has type mismatch +a4 = function (x, y) { + return 1; +}; // ok, same number of required params with matching types a4 = function (x) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js index c00aa121712..3b38bce1590 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js @@ -53,9 +53,17 @@ var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js index d00762aa1c5..ac3accc6b5b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js @@ -55,18 +55,34 @@ t = a2; a = s; a = a2; // errors -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js index f5a3499c8cc..1a5efce1ac8 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js @@ -138,24 +138,60 @@ var ClassTypeParam; function Base() { var _this = this; this.init = function () { - _this.a = function () { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // error, too many required params - _this.a2 = function () { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same number of params - _this.a3 = function () { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, same T of required params - _this.a3 = function (x, y) { return null; }; // error, too many required params - _this.a4 = function () { return null; }; // ok, fewer required params - _this.a4 = function (x, y) { return null; }; // ok, fewer required params - _this.a4 = function (x) { return null; }; // ok, same T of required params - _this.a4 = function (x, y) { return null; }; // ok, same number of params - _this.a5 = function () { return null; }; // ok, fewer required params - _this.a5 = function (x, y) { return null; }; // ok, fewer required params - _this.a5 = function (x) { return null; }; // ok, all present params match - _this.a5 = function (x, y) { return null; }; // ok, same number of params + _this.a = function () { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // error, too many required params + _this.a2 = function () { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same number of params + _this.a3 = function () { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, same T of required params + _this.a3 = function (x, y) { + return null; + }; // error, too many required params + _this.a4 = function () { + return null; + }; // ok, fewer required params + _this.a4 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a4 = function (x) { + return null; + }; // ok, same T of required params + _this.a4 = function (x, y) { + return null; + }; // ok, same number of params + _this.a5 = function () { + return null; + }; // ok, fewer required params + _this.a5 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a5 = function (x) { + return null; + }; // ok, all present params match + _this.a5 = function (x, y) { + return null; + }; // ok, same number of params }; } return Base; @@ -210,24 +246,60 @@ var GenericSignaturesValid; function Base2() { var _this = this; this.init = function () { - _this.a = function () { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // error, too many required params - _this.a2 = function () { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same number of params - _this.a3 = function () { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, same T of required params - _this.a3 = function (x, y) { return null; }; // error, too many required params - _this.a4 = function () { return null; }; // ok, fewer required params - _this.a4 = function (x, y) { return null; }; // ok, fewer required params - _this.a4 = function (x) { return null; }; // ok, same T of required params - _this.a4 = function (x, y) { return null; }; // ok, same number of params - _this.a5 = function () { return null; }; // ok, fewer required params - _this.a5 = function (x, y) { return null; }; // ok, fewer required params - _this.a5 = function (x) { return null; }; // ok, all present params match - _this.a5 = function (x, y) { return null; }; // ok, same number of params + _this.a = function () { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // error, too many required params + _this.a2 = function () { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same number of params + _this.a3 = function () { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, same T of required params + _this.a3 = function (x, y) { + return null; + }; // error, too many required params + _this.a4 = function () { + return null; + }; // ok, fewer required params + _this.a4 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a4 = function (x) { + return null; + }; // ok, same T of required params + _this.a4 = function (x, y) { + return null; + }; // ok, same number of params + _this.a5 = function () { + return null; + }; // ok, fewer required params + _this.a5 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a5 = function (x) { + return null; + }; // ok, all present params match + _this.a5 = function (x, y) { + return null; + }; // ok, same number of params }; } return Base2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.js b/tests/baselines/reference/assignmentCompatWithObjectMembers.js index 3bd457f19d3..d3dfe7f93fc 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.js @@ -106,8 +106,12 @@ var SimpleTypes; var t2; var a; var b; - var a2 = { foo: '' }; - var b2 = { foo: '' }; + var a2 = { + foo: '' + }; + var b2 = { + foo: '' + }; s = t; t = s; s = s2; @@ -146,8 +150,12 @@ var ObjectTypes; var t2; var a; var b; - var a2 = { foo: a2 }; - var b2 = { foo: b2 }; + var a2 = { + foo: a2 + }; + var b2 = { + foo: b2 + }; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js index ea565e9545c..5eb2a07ac11 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { foo: '' }; -var b2 = { foo: '' }; +var a2 = { + foo: '' +}; +var b2 = { + foo: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js index 091a1e53d15..f65b06931c0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { foo: '' }; -var b2 = { foo: '' }; +var a2 = { + foo: '' +}; +var b2 = { + foo: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 0d535cbb20d..f9933a3e04f 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -136,8 +136,12 @@ var OnlyDerived; var t2; var a; var b; - var a2 = { foo: new Derived() }; - var b2 = { foo: new Derived2() }; + var a2 = { + foo: new Derived() + }; + var b2 = { + foo: new Derived2() + }; s = t; // error t = s; // error s = s2; // ok @@ -195,8 +199,12 @@ var WithBase; var t2; var a; var b; - var a2 = { foo: new Base() }; - var b2 = { foo: new Derived2() }; + var a2 = { + foo: new Base() + }; + var b2 = { + foo: new Derived2() + }; s = t; // ok t = s; // error s = s2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js index 2a1a08a97ed..dc2e1244ef5 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { 1.0: '' }; -var b2 = { 1: '' }; +var a2 = { + 1.0: '' +}; +var b2 = { + 1: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 5525b623ecc..ca3ada064f8 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -119,7 +119,9 @@ var TargetHasOptional; (function (TargetHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; @@ -142,7 +144,9 @@ var SourceHasOptional; (function (SourceHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 8859a4c9ab0..cf65e181cb9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -121,7 +121,9 @@ var TargetHasOptional; (function (TargetHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; @@ -144,7 +146,9 @@ var SourceHasOptional; (function (SourceHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js index a042897ba57..06f398401ca 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js @@ -106,8 +106,12 @@ var JustStrings; var t2; var a; var b; - var a2 = { '1.0': '' }; - var b2 = { '1': '' }; + var a2 = { + '1.0': '' + }; + var b2 = { + '1': '' + }; s = t; t = s; s = s2; // ok @@ -146,8 +150,12 @@ var NumbersAndStrings; var t2; var a; var b; - var a2 = { '1.0': '' }; - var b2 = { 1.: '' }; + var a2 = { + '1.0': '' + }; + var b2 = { + 1.: '' + }; s = t; // ok t = s; // ok s = s2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.js b/tests/baselines/reference/assignmentCompatWithOverloads.js index ca3dc0e2294..472ebec2967 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.js +++ b/tests/baselines/reference/assignmentCompatWithOverloads.js @@ -31,10 +31,18 @@ var d: new(x: number) => void; d = C; // Error //// [assignmentCompatWithOverloads.js] -function f1(x) { return null; } -function f2(x) { return null; } -function f3(x) { return null; } -function f4(x) { return undefined; } +function f1(x) { + return null; +} +function f2(x) { + return null; +} +function f3(x) { + return null; +} +function f4(x) { + return undefined; +} var g; g = f1; // OK g = f2; // Error diff --git a/tests/baselines/reference/assignmentCompatability1.js b/tests/baselines/reference/assignmentCompatability1.js index f629d5eba27..61ac5d22058 100644 --- a/tests/baselines/reference/assignmentCompatability1.js +++ b/tests/baselines/reference/assignmentCompatability1.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability10.js b/tests/baselines/reference/assignmentCompatability10.js index bbcc8e879e3..a494e30f6cf 100644 --- a/tests/baselines/reference/assignmentCompatability10.js +++ b/tests/baselines/reference/assignmentCompatability10.js @@ -13,7 +13,9 @@ __test2__.__val__x4 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability11.js b/tests/baselines/reference/assignmentCompatability11.js index 992e38f7726..929a8f1bca3 100644 --- a/tests/baselines/reference/assignmentCompatability11.js +++ b/tests/baselines/reference/assignmentCompatability11.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: 1 }; + __test2__.obj = { + two: 1 + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability12.js b/tests/baselines/reference/assignmentCompatability12.js index 3c802aab6e3..f0ccb00833d 100644 --- a/tests/baselines/reference/assignmentCompatability12.js +++ b/tests/baselines/reference/assignmentCompatability12.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: "1" }; + __test2__.obj = { + one: "1" + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability13.js b/tests/baselines/reference/assignmentCompatability13.js index ef4f24f7100..084ef7ebeb1 100644 --- a/tests/baselines/reference/assignmentCompatability13.js +++ b/tests/baselines/reference/assignmentCompatability13.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: "1" }; + __test2__.obj = { + two: "1" + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability14.js b/tests/baselines/reference/assignmentCompatability14.js index bd4445cb515..4bfe397bc60 100644 --- a/tests/baselines/reference/assignmentCompatability14.js +++ b/tests/baselines/reference/assignmentCompatability14.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: true }; + __test2__.obj = { + one: true + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability15.js b/tests/baselines/reference/assignmentCompatability15.js index 37f1be4bc99..0fffe4bd539 100644 --- a/tests/baselines/reference/assignmentCompatability15.js +++ b/tests/baselines/reference/assignmentCompatability15.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: true }; + __test2__.obj = { + two: true + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability16.js b/tests/baselines/reference/assignmentCompatability16.js index 43c832016b0..6b20f1be30b 100644 --- a/tests/baselines/reference/assignmentCompatability16.js +++ b/tests/baselines/reference/assignmentCompatability16.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [1] }; + __test2__.obj = { + one: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability17.js b/tests/baselines/reference/assignmentCompatability17.js index 09ce24b8f5d..b44ce12bb12 100644 --- a/tests/baselines/reference/assignmentCompatability17.js +++ b/tests/baselines/reference/assignmentCompatability17.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [1] }; + __test2__.obj = { + two: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability18.js b/tests/baselines/reference/assignmentCompatability18.js index ad93e96303f..1120d349d0b 100644 --- a/tests/baselines/reference/assignmentCompatability18.js +++ b/tests/baselines/reference/assignmentCompatability18.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [1] }; + __test2__.obj = { + one: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability19.js b/tests/baselines/reference/assignmentCompatability19.js index f330f94e81c..6bc4c762ee6 100644 --- a/tests/baselines/reference/assignmentCompatability19.js +++ b/tests/baselines/reference/assignmentCompatability19.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [1] }; + __test2__.obj = { + two: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability2.js b/tests/baselines/reference/assignmentCompatability2.js index 207942875bf..b280ce83c2c 100644 --- a/tests/baselines/reference/assignmentCompatability2.js +++ b/tests/baselines/reference/assignmentCompatability2.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability20.js b/tests/baselines/reference/assignmentCompatability20.js index 321ec78ee17..aed14360279 100644 --- a/tests/baselines/reference/assignmentCompatability20.js +++ b/tests/baselines/reference/assignmentCompatability20.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: ["1"] }; + __test2__.obj = { + one: [ + "1" + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability21.js b/tests/baselines/reference/assignmentCompatability21.js index 215ab5dc397..6ede7ac66eb 100644 --- a/tests/baselines/reference/assignmentCompatability21.js +++ b/tests/baselines/reference/assignmentCompatability21.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: ["1"] }; + __test2__.obj = { + two: [ + "1" + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability22.js b/tests/baselines/reference/assignmentCompatability22.js index 04cc2a2d0ab..41d60442790 100644 --- a/tests/baselines/reference/assignmentCompatability22.js +++ b/tests/baselines/reference/assignmentCompatability22.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [true] }; + __test2__.obj = { + one: [ + true + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability23.js b/tests/baselines/reference/assignmentCompatability23.js index 1d032364360..4604fd2ba41 100644 --- a/tests/baselines/reference/assignmentCompatability23.js +++ b/tests/baselines/reference/assignmentCompatability23.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [true] }; + __test2__.obj = { + two: [ + true + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability24.js b/tests/baselines/reference/assignmentCompatability24.js index e6961264de8..5fa5e612d05 100644 --- a/tests/baselines/reference/assignmentCompatability24.js +++ b/tests/baselines/reference/assignmentCompatability24.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = function f(a) { return a; }; + __test2__.obj = function f(a) { + return a; + }; ; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability25.js b/tests/baselines/reference/assignmentCompatability25.js index 4f365e9049c..7bc941c3450 100644 --- a/tests/baselines/reference/assignmentCompatability25.js +++ b/tests/baselines/reference/assignmentCompatability25.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability26.js b/tests/baselines/reference/assignmentCompatability26.js index e2ae6b766df..b01d3e19a0e 100644 --- a/tests/baselines/reference/assignmentCompatability26.js +++ b/tests/baselines/reference/assignmentCompatability26.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability27.js b/tests/baselines/reference/assignmentCompatability27.js index be5b06dab7c..5460ed7f6c5 100644 --- a/tests/baselines/reference/assignmentCompatability27.js +++ b/tests/baselines/reference/assignmentCompatability27.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability28.js b/tests/baselines/reference/assignmentCompatability28.js index eef6f0a5ef0..6358375ed3a 100644 --- a/tests/baselines/reference/assignmentCompatability28.js +++ b/tests/baselines/reference/assignmentCompatability28.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability29.js b/tests/baselines/reference/assignmentCompatability29.js index c3410a943ca..251a580015d 100644 --- a/tests/baselines/reference/assignmentCompatability29.js +++ b/tests/baselines/reference/assignmentCompatability29.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability3.js b/tests/baselines/reference/assignmentCompatability3.js index 7120e6ce3e2..e32ae5da7ba 100644 --- a/tests/baselines/reference/assignmentCompatability3.js +++ b/tests/baselines/reference/assignmentCompatability3.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: 1 }; + __test2__.obj = { + one: 1 + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability30.js b/tests/baselines/reference/assignmentCompatability30.js index 261c86ad584..3d519971fa8 100644 --- a/tests/baselines/reference/assignmentCompatability30.js +++ b/tests/baselines/reference/assignmentCompatability30.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability31.js b/tests/baselines/reference/assignmentCompatability31.js index 152b588b72c..ad0954e2dc8 100644 --- a/tests/baselines/reference/assignmentCompatability31.js +++ b/tests/baselines/reference/assignmentCompatability31.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability32.js b/tests/baselines/reference/assignmentCompatability32.js index b9ddacff90c..e321f02c649 100644 --- a/tests/baselines/reference/assignmentCompatability32.js +++ b/tests/baselines/reference/assignmentCompatability32.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability33.js b/tests/baselines/reference/assignmentCompatability33.js index 80dfcfc4f7a..44d42b4bd49 100644 --- a/tests/baselines/reference/assignmentCompatability33.js +++ b/tests/baselines/reference/assignmentCompatability33.js @@ -13,7 +13,9 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability34.js b/tests/baselines/reference/assignmentCompatability34.js index ab324a10396..67167192653 100644 --- a/tests/baselines/reference/assignmentCompatability34.js +++ b/tests/baselines/reference/assignmentCompatability34.js @@ -13,7 +13,9 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability35.js b/tests/baselines/reference/assignmentCompatability35.js index 1b79a83146b..f01c63390ed 100644 --- a/tests/baselines/reference/assignmentCompatability35.js +++ b/tests/baselines/reference/assignmentCompatability35.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability36.js b/tests/baselines/reference/assignmentCompatability36.js index 62332f741d4..7c939ceb282 100644 --- a/tests/baselines/reference/assignmentCompatability36.js +++ b/tests/baselines/reference/assignmentCompatability36.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability37.js b/tests/baselines/reference/assignmentCompatability37.js index 8625cae42e5..5741b181151 100644 --- a/tests/baselines/reference/assignmentCompatability37.js +++ b/tests/baselines/reference/assignmentCompatability37.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability38.js b/tests/baselines/reference/assignmentCompatability38.js index 22096b68f25..81a7692f62f 100644 --- a/tests/baselines/reference/assignmentCompatability38.js +++ b/tests/baselines/reference/assignmentCompatability38.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability39.js b/tests/baselines/reference/assignmentCompatability39.js index 70e8a692290..fe2f499270a 100644 --- a/tests/baselines/reference/assignmentCompatability39.js +++ b/tests/baselines/reference/assignmentCompatability39.js @@ -13,7 +13,9 @@ __test2__.__val__x2 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability4.js b/tests/baselines/reference/assignmentCompatability4.js index 2f7d33b8d55..853164790ce 100644 --- a/tests/baselines/reference/assignmentCompatability4.js +++ b/tests/baselines/reference/assignmentCompatability4.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability40.js b/tests/baselines/reference/assignmentCompatability40.js index 801ddfe7596..26923029392 100644 --- a/tests/baselines/reference/assignmentCompatability40.js +++ b/tests/baselines/reference/assignmentCompatability40.js @@ -13,7 +13,9 @@ __test2__.__val__x5 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability41.js b/tests/baselines/reference/assignmentCompatability41.js index 2ebd35a6caa..101eee5ae3c 100644 --- a/tests/baselines/reference/assignmentCompatability41.js +++ b/tests/baselines/reference/assignmentCompatability41.js @@ -13,7 +13,9 @@ __test2__.__val__x6 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability42.js b/tests/baselines/reference/assignmentCompatability42.js index 39dab170d35..d819f748af4 100644 --- a/tests/baselines/reference/assignmentCompatability42.js +++ b/tests/baselines/reference/assignmentCompatability42.js @@ -13,7 +13,9 @@ __test2__.__val__x7 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability43.js b/tests/baselines/reference/assignmentCompatability43.js index 0ff9bdb4819..5c13de6fa53 100644 --- a/tests/baselines/reference/assignmentCompatability43.js +++ b/tests/baselines/reference/assignmentCompatability43.js @@ -13,14 +13,19 @@ __test2__.__val__obj2 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj2 = { one: 1, two: "a" }; + var obj2 = { + one: 1, + two: "a" + }; ; __test2__.__val__obj2 = obj2; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability5.js b/tests/baselines/reference/assignmentCompatability5.js index ef38b738ad3..b94a00de732 100644 --- a/tests/baselines/reference/assignmentCompatability5.js +++ b/tests/baselines/reference/assignmentCompatability5.js @@ -13,14 +13,18 @@ __test2__.__val__obj1 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj1 = { one: 1 }; + var obj1 = { + one: 1 + }; ; __test2__.__val__obj1 = obj1; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability6.js b/tests/baselines/reference/assignmentCompatability6.js index 7b1e2bb65d6..cd87bd10641 100644 --- a/tests/baselines/reference/assignmentCompatability6.js +++ b/tests/baselines/reference/assignmentCompatability6.js @@ -13,7 +13,9 @@ __test2__.__val__obj3 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability7.js b/tests/baselines/reference/assignmentCompatability7.js index c6bf8e53bc1..a668bc34906 100644 --- a/tests/baselines/reference/assignmentCompatability7.js +++ b/tests/baselines/reference/assignmentCompatability7.js @@ -13,14 +13,18 @@ __test2__.__val__obj4 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test2__.__val__obj4 = obj4; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability8.js b/tests/baselines/reference/assignmentCompatability8.js index 65e4240aac5..e022ddf7bdd 100644 --- a/tests/baselines/reference/assignmentCompatability8.js +++ b/tests/baselines/reference/assignmentCompatability8.js @@ -13,7 +13,9 @@ __test2__.__val__x1 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability9.js b/tests/baselines/reference/assignmentCompatability9.js index 98932380b3e..cbc34de158b 100644 --- a/tests/baselines/reference/assignmentCompatability9.js +++ b/tests/baselines/reference/assignmentCompatability9.js @@ -13,7 +13,9 @@ __test2__.__val__x3 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js index 760631ffbb5..7346f601dac 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js @@ -35,18 +35,25 @@ fn(a => { }); var x; // Should fail x = ''; -x = ['']; +x = [ + '' +]; x = 4; x = {}; // Should work -function f() { } +function f() { +} ; x = f; -function fn(c) { } +function fn(c) { +} // Should Fail fn(''); -fn(['']); +fn([ + '' +]); fn(4); fn({}); // Should work -fn(function (a) { }); +fn(function (a) { +}); diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js index 2e61521eefb..4e5ed88699c 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js @@ -35,18 +35,25 @@ fn(a => { }); var x; // Should fail x = ''; -x = ['']; +x = [ + '' +]; x = 4; x = {}; // Should work -function f() { } +function f() { +} ; x = f; -function fn(c) { } +function fn(c) { +} // Should Fail fn(''); -fn(['']); +fn([ + '' +]); fn(4); fn({}); // Should work -fn(function (a) { }); +fn(function (a) { +}); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 4b17f855171..e6975e70146 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -84,11 +84,17 @@ var C = (function () { function C() { this = value; } - C.prototype.foo = function () { this = value; }; - C.sfoo = function () { this = value; }; + C.prototype.foo = function () { + this = value; + }; + C.sfoo = function () { + this = value; + }; return C; })(); -function foo() { this = value; } +function foo() { + this = value; +} this = value; // identifiers: module, class, enum, function var M; @@ -123,14 +129,20 @@ var Derived = (function (_super) { _super.call(this); _super.prototype. = value; } - Derived.prototype.foo = function () { _super.prototype. = value; }; - Derived.sfoo = function () { _super. = value; }; + Derived.prototype.foo = function () { + _super.prototype. = value; + }; + Derived.sfoo = function () { + _super. = value; + }; return Derived; })(C); // function expression -function bar() { } +function bar() { +} value; -(function () { }); +(function () { +}); value; // function calls foo() = value; @@ -147,5 +159,6 @@ foo() = value; (/d+/) = value; ({}) = value; ([]) = value; -(function baz() { }) = value; +(function baz() { +}) = value; (foo()) = value; diff --git a/tests/baselines/reference/assignmentStricterConstraints.js b/tests/baselines/reference/assignmentStricterConstraints.js index a7f554ade7d..f8f4ce6d1b6 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.js +++ b/tests/baselines/reference/assignmentStricterConstraints.js @@ -13,6 +13,7 @@ g(1, "") var f = function (x, y) { x = y; }; -var g = function (x, y) { }; +var g = function (x, y) { +}; g = f; g(1, ""); diff --git a/tests/baselines/reference/assignmentToFunction.js b/tests/baselines/reference/assignmentToFunction.js index 7462fdfcf3f..275107e05b0 100644 --- a/tests/baselines/reference/assignmentToFunction.js +++ b/tests/baselines/reference/assignmentToFunction.js @@ -11,8 +11,11 @@ module foo { } //// [assignmentToFunction.js] -function fn() { } -fn = function () { return 3; }; +function fn() { +} +fn = function () { + return 3; +}; var foo; (function (foo) { function xyz() { diff --git a/tests/baselines/reference/assignmentToObject.js b/tests/baselines/reference/assignmentToObject.js index d8134080c6a..666350b50ee 100644 --- a/tests/baselines/reference/assignmentToObject.js +++ b/tests/baselines/reference/assignmentToObject.js @@ -5,6 +5,8 @@ var c: Object = a; // should be error //// [assignmentToObject.js] -var a = { toString: 5 }; +var a = { + toString: 5 +}; var b = a; // ok var c = a; // should be error diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index a3c4785b18b..bd09a7a8e16 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -30,27 +30,33 @@ module bad { var badFundule: Function = bad; // error //// [assignmentToObjectAndFunction.js] -var errObj = { toString: 0 }; // Error, incompatible toString +var errObj = { + toString: 0 +}; // Error, incompatible toString var goodObj = { toString: function (x) { return ""; } }; // Ok, because toString is a subtype of Object's toString var errFun = {}; // Error for no call signature -function foo() { } +function foo() { +} var foo; (function (foo) { foo.boom = 0; })(foo || (foo = {})); var goodFundule = foo; // ok -function bar() { } +function bar() { +} var bar; (function (bar) { - function apply(thisArg, argArray) { } + function apply(thisArg, argArray) { + } bar.apply = apply; })(bar || (bar = {})); var goodFundule2 = bar; // ok -function bad() { } +function bad() { +} var bad; (function (bad) { bad.apply = 0; diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js index 9526cb08bef..584934ea774 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js @@ -87,25 +87,48 @@ M.y = 3; // OK M.y = ''; // Error (M).y = ''; // Error (M.y) = ''; // Error -M = { y: 3 }; // Error -(M) = { y: 3 }; // Error +M = { + y: 3 +}; // Error +(M) = { + y: 3 +}; // Error var M2; (function (M2) { var M3; (function (M3) { M3.x; })(M3 = M2.M3 || (M2.M3 = {})); - M3 = { x: 3 }; // Error + M3 = { + x: 3 + }; // Error })(M2 || (M2 = {})); -M2.M3 = { x: 3 }; // OK -(M2).M3 = { x: 3 }; // OK -(M2.M3) = { x: 3 }; // OK -M2.M3 = { x: '' }; // Error -(M2).M3 = { x: '' }; // Error -(M2.M3) = { x: '' }; // Error -function fn() { } -fn = function () { return 3; }; // Bug 823548: Should be error (fn is not a reference) -(fn) = function () { return 3; }; // Should be error +M2.M3 = { + x: 3 +}; // OK +(M2).M3 = { + x: 3 +}; // OK +(M2.M3) = { + x: 3 +}; // OK +M2.M3 = { + x: '' +}; // Error +(M2).M3 = { + x: '' +}; // Error +(M2.M3) = { + x: '' +}; // Error +function fn() { +} +fn = function () { + return 3; +}; // Bug 823548: Should be error (fn is not a reference) +(fn) = function () { + return 3; +}; // Should be error function fn2(x, y) { x = 3; (x) = 3; // OK diff --git a/tests/baselines/reference/assignmentToReferenceTypes.js b/tests/baselines/reference/assignmentToReferenceTypes.js index 1aec3c2051d..214e10b9c6c 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.js +++ b/tests/baselines/reference/assignmentToReferenceTypes.js @@ -36,7 +36,8 @@ var E; (function (E) { })(E || (E = {})); E = null; -function f() { } +function f() { +} f = null; var x = 1; x = null; diff --git a/tests/baselines/reference/assignments.js b/tests/baselines/reference/assignments.js index e2c9c90d375..f6ca508384b 100644 --- a/tests/baselines/reference/assignments.js +++ b/tests/baselines/reference/assignments.js @@ -53,7 +53,8 @@ var E; })(E || (E = {})); E = null; // Error E.A = null; // OK per spec, Error per implementation (509581) -function fn() { } +function fn() { +} fn = null; // Should be error var v; v = null; // OK diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index 32fed237a2e..88996de1553 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -23,6 +23,7 @@ var v2: { //// [augmentedTypeAssignmentCompatIndexSignature.js] var o = {}; -var f = function () { }; +var f = function () { +}; var v1 = o; // Should be allowed var v2 = f; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index 8d2c94899dc..a1b6bf6805c 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -15,4 +15,5 @@ var b = (() => { })[0]; // Should be Bar //// [augmentedTypeBracketAccessIndexSignature.js] var a = {}[0]; // Should be Foo -var b = (function () { })[0]; // Should be Bar +var b = (function () { +})[0]; // Should be Bar diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 6ec653c69b5..5bc184df667 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -15,7 +15,8 @@ var r4 = f['data']; // Should be number //// [augmentedTypeBracketNamedPropertyAccess.js] var o = {}; -var f = function () { }; +var f = function () { +}; var r1 = o['data']; // Should be number var r2 = o['functionData']; // Should be any (no property found) var r3 = f['functionData']; // Should be string diff --git a/tests/baselines/reference/augmentedTypesClass.js b/tests/baselines/reference/augmentedTypesClass.js index 30b75483d80..5d0d8ab75d6 100644 --- a/tests/baselines/reference/augmentedTypesClass.js +++ b/tests/baselines/reference/augmentedTypesClass.js @@ -12,7 +12,8 @@ enum c4 { One } // error var c1 = (function () { function c1() { } - c1.prototype.foo = function () { }; + c1.prototype.foo = function () { + }; return c1; })(); var c1 = 1; // error @@ -20,7 +21,8 @@ var c1 = 1; // error var c4 = (function () { function c4() { } - c4.prototype.foo = function () { }; + c4.prototype.foo = function () { + }; return c4; })(); var c4; diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index b2c6fa1e373..fe31f0964c2 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -9,8 +9,11 @@ var c2 = () => { } var c2 = (function () { function c2() { } - c2.prototype.foo = function () { }; + c2.prototype.foo = function () { + }; return c2; })(); // error -function c2() { } // error -var c2 = function () { }; +function c2() { +} // error +var c2 = function () { +}; diff --git a/tests/baselines/reference/augmentedTypesClass3.js b/tests/baselines/reference/augmentedTypesClass3.js index 11d3f0a0d9f..b42d9dda356 100644 --- a/tests/baselines/reference/augmentedTypesClass3.js +++ b/tests/baselines/reference/augmentedTypesClass3.js @@ -18,13 +18,15 @@ class c5c { public foo() { } } var c5 = (function () { function c5() { } - c5.prototype.foo = function () { }; + c5.prototype.foo = function () { + }; return c5; })(); var c5a = (function () { function c5a() { } - c5a.prototype.foo = function () { }; + c5a.prototype.foo = function () { + }; return c5a; })(); var c5a; @@ -34,7 +36,8 @@ var c5a; var c5b = (function () { function c5b() { } - c5b.prototype.foo = function () { }; + c5b.prototype.foo = function () { + }; return c5b; })(); var c5b; @@ -45,7 +48,8 @@ var c5b; var c5c = (function () { function c5c() { } - c5c.prototype.foo = function () { }; + c5c.prototype.foo = function () { + }; return c5c; })(); //import c5c = require(''); diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index f178567d843..71fc61d6659 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -9,12 +9,14 @@ class c3 { public bar() { } } // error var c3 = (function () { function c3() { } - c3.prototype.foo = function () { }; + c3.prototype.foo = function () { + }; return c3; })(); // error var c3 = (function () { function c3() { } - c3.prototype.bar = function () { }; + c3.prototype.bar = function () { + }; return c3; })(); // error diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index cb1ec3e844f..484b0addd58 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -47,12 +47,14 @@ var e2; (function (e2) { e2[e2["One"] = 0] = "One"; })(e2 || (e2 = {})); // error -function e2() { } // error +function e2() { +} // error var e3; (function (e3) { e3[e3["One"] = 0] = "One"; })(e3 || (e3 = {})); // error -var e3 = function () { }; // error +var e3 = function () { +}; // error // enum then class var e4; (function (e4) { @@ -61,7 +63,8 @@ var e4; var e4 = (function () { function e4() { } - e4.prototype.foo = function () { }; + e4.prototype.foo = function () { + }; return e4; })(); // error // enum then enum diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 104559396cc..69cc810668c 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -9,7 +9,8 @@ define(["require", "exports"], function (require, exports) { var c5 = (function () { function c5() { } - c5.prototype.foo = function () { }; + c5.prototype.foo = function () { + }; return c5; })(); }); diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index 1cd1423b7c4..34567c77e8c 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -40,46 +40,59 @@ module y5c { export interface I { foo(): void } } // should be an error //// [augmentedTypesFunction.js] // function then var -function y1() { } // error +function y1() { +} // error var y1 = 1; // error // function then function -function y2() { } // error -function y2() { } // error -function y2a() { } // error -var y2a = function () { }; // error +function y2() { +} // error +function y2() { +} // error +function y2a() { +} // error +var y2a = function () { +}; // error // function then class -function y3() { } // error +function y3() { +} // error var y3 = (function () { function y3() { } return y3; })(); // error -function y3a() { } // error +function y3a() { +} // error var y3a = (function () { function y3a() { } - y3a.prototype.foo = function () { }; + y3a.prototype.foo = function () { + }; return y3a; })(); // error // function then enum -function y4() { } // error +function y4() { +} // error var y4; (function (y4) { y4[y4["One"] = 0] = "One"; })(y4 || (y4 = {})); // error // function then internal module -function y5() { } -function y5a() { } +function y5() { +} +function y5a() { +} var y5a; (function (y5a) { var y = 2; })(y5a || (y5a = {})); // should be an error -function y5b() { } +function y5b() { +} var y5b; (function (y5b) { y5b.y = 3; })(y5b || (y5b = {})); // should be an error -function y5c() { } +function y5c() { +} // function then import, messes with other errors //function y6() { } //import y6 = require(''); diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index 558ea6609f5..3b7544996a1 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -115,43 +115,51 @@ var m1d; var I = (function () { function I() { } - I.prototype.foo = function () { }; + I.prototype.foo = function () { + }; return I; })(); m1d.I = I; })(m1d || (m1d = {})); var m1d = 1; // error -function m2() { } +function m2() { +} ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { } +function m2a() { +} ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { } +function m2b() { +} ; // error since the module is instantiated // should be errors to have function first -function m2c() { } +function m2c() { +} ; var m2c; (function (m2c) { m2c.y = 2; })(m2c || (m2c = {})); -function m2f() { } +function m2f() { +} ; -function m2g() { } +function m2g() { +} ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m2g.C = C; @@ -168,13 +176,15 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { }; + m3a.prototype.foo = function () { + }; return m3a; })(); // error, class isn't ambient or declared before the module var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { }; + m3b.prototype.foo = function () { + }; return m3b; })(); var m3b; @@ -184,7 +194,8 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { }; + m3c.prototype.foo = function () { + }; return m3c; })(); var m3c; @@ -204,7 +215,8 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m3g.C = C; @@ -237,7 +249,8 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesModules2.js b/tests/baselines/reference/augmentedTypesModules2.js index 5cc805a848f..70fd31f03e0 100644 --- a/tests/baselines/reference/augmentedTypesModules2.js +++ b/tests/baselines/reference/augmentedTypesModules2.js @@ -29,21 +29,25 @@ module m2g { export class C { foo() { } } } //// [augmentedTypesModules2.js] -function m2() { } +function m2() { +} ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { } +function m2a() { +} ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { } +function m2b() { +} ; // error since the module is instantiated -function m2c() { } +function m2c() { +} ; var m2c; (function (m2c) { @@ -53,18 +57,22 @@ var m2cc; (function (m2cc) { m2cc.y = 2; })(m2cc || (m2cc = {})); -function m2cc() { } +function m2cc() { +} ; // error to have module first -function m2f() { } +function m2f() { +} ; -function m2g() { } +function m2g() { +} ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m2g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules3.js b/tests/baselines/reference/augmentedTypesModules3.js index fb1c7ef6e70..7f5c390ea3a 100644 --- a/tests/baselines/reference/augmentedTypesModules3.js +++ b/tests/baselines/reference/augmentedTypesModules3.js @@ -19,6 +19,7 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { }; + m3a.prototype.foo = function () { + }; return m3a; })(); // error, class isn't ambient or declared before the module diff --git a/tests/baselines/reference/augmentedTypesModules3b.js b/tests/baselines/reference/augmentedTypesModules3b.js index 080a5e72ada..2d250ab2822 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.js +++ b/tests/baselines/reference/augmentedTypesModules3b.js @@ -22,7 +22,8 @@ module m3g { export class C { foo() { } } } var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { }; + m3b.prototype.foo = function () { + }; return m3b; })(); var m3b; @@ -32,7 +33,8 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { }; + m3c.prototype.foo = function () { + }; return m3c; })(); var m3c; @@ -52,7 +54,8 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m3g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules4.js b/tests/baselines/reference/augmentedTypesModules4.js index 82f08851efd..f8407e2e36f 100644 --- a/tests/baselines/reference/augmentedTypesModules4.js +++ b/tests/baselines/reference/augmentedTypesModules4.js @@ -51,7 +51,8 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index b4e412acc05..f4404cecb3d 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -42,9 +42,11 @@ var x1 = 1; var x1 = 2; // var then function var x2 = 1; // error -function x2() { } // error +function x2() { +} // error var x3 = 1; -var x3 = function () { }; // error +var x3 = function () { +}; // error // var then class var x4 = 1; // error var x4 = (function () { @@ -56,7 +58,8 @@ var x4a = 1; // error var x4a = (function () { function x4a() { } - x4a.prototype.foo = function () { }; + x4a.prototype.foo = function () { + }; return x4a; })(); // error // var then enum diff --git a/tests/baselines/reference/autoLift2.js b/tests/baselines/reference/autoLift2.js index cf840277d70..45790dc2f6e 100644 --- a/tests/baselines/reference/autoLift2.js +++ b/tests/baselines/reference/autoLift2.js @@ -43,8 +43,18 @@ var A = (function () { var _this = this; this.foo = "foo"; this.bar = "bar"; - [1, 2].forEach(function (p) { return _this.foo; }); - [1, 2].forEach(function (p) { return _this.bar; }); + [ + 1, + 2 + ].forEach(function (p) { + return _this.foo; + }); + [ + 1, + 2 + ].forEach(function (p) { + return _this.bar; + }); }; return A; })(); diff --git a/tests/baselines/reference/autolift3.js b/tests/baselines/reference/autolift3.js index e04501daf46..cc3bcaaae97 100644 --- a/tests/baselines/reference/autolift3.js +++ b/tests/baselines/reference/autolift3.js @@ -33,7 +33,8 @@ b.foo(); //// [autolift3.js] var B = (function () { function B() { - function foo() { } + function foo() { + } foo(); var a = 0; var inner = (function () { diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 49bc535dbfe..69fe778c047 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -63,9 +63,15 @@ var r = true ? 1 : 2; var r3 = true ? 1 : {}; var r4 = true ? a : b; // typeof a var r5 = true ? b : a; // typeof b -var r6 = true ? function (x) { } : function (x) { }; // returns number => void -var r7 = true ? function (x) { } : function (x) { }; -var r8 = true ? function (x) { } : function (x) { }; // returns Object => void +var r6 = true ? function (x) { +} : function (x) { +}; // returns number => void +var r7 = true ? function (x) { +} : function (x) { +}; +var r8 = true ? function (x) { +} : function (x) { +}; // returns Object => void var r10 = true ? derived : derived2; // no error since we use the contextual type in BCT var r11 = true ? base : derived2; function foo5(t, u) { diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.js b/tests/baselines/reference/bestCommonTypeOfTuple.js index 81cfa752f5d..d5cbe7e67c8 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple.js @@ -26,9 +26,15 @@ var e3 = t3[2]; // any var e4 = t4[3]; // number //// [bestCommonTypeOfTuple.js] -function f1(x) { return "foo"; } -function f2(x) { return 10; } -function f3(x) { return true; } +function f1(x) { + return "foo"; +} +function f2(x) { + return 10; +} +function f3(x) { + return true; +} var E1; (function (E1) { E1[E1["one"] = 0] = "one"; @@ -42,10 +48,23 @@ var t2; var t3; var t4; // no error -t1 = [f1, f2]; -t2 = [E1.one, E2.two]; -t3 = [5, undefined]; -t4 = [E1.one, E2.two, 20]; +t1 = [ + f1, + f2 +]; +t2 = [ + E1.one, + E2.two +]; +t3 = [ + 5, + undefined +]; +t4 = [ + E1.one, + E2.two, + 20 +]; var e1 = t1[2]; // {} var e2 = t2[2]; // {} var e3 = t3[2]; // any diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.js b/tests/baselines/reference/bestCommonTypeReturnStatement.js index f4ab98ed1c6..232ffc07c54 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.js +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.js @@ -18,5 +18,9 @@ function f() { return b(); return d(); } -function b() { return null; } -function d() { return null; } +function b() { + return null; +} +function d() { + return null; +} diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index c45ae88458f..afe18e3f282 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -25,7 +25,11 @@ var e; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable // to Contextual, no errors. -var arr = [e]; // Ellement[] -var obj = { s: e }; // { s: Ellement; [s: string]: Ellement } +var arr = [ + e +]; // Ellement[] +var obj = { + s: e +}; // { s: Ellement; [s: string]: Ellement } var conditional = null ? e : e; // Ellement var contextualOr = e || e; // Ellement diff --git a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js index 25622c3d4f3..6a8741097aa 100644 --- a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js +++ b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js @@ -20,9 +20,33 @@ var x; var y; var z; // All these arrays should be X[] -var b1 = [x, y, z]; -var b2 = [x, z, y]; -var b3 = [y, x, z]; -var b4 = [y, z, x]; -var b5 = [z, x, y]; -var b6 = [z, y, x]; +var b1 = [ + x, + y, + z +]; +var b2 = [ + x, + z, + y +]; +var b3 = [ + y, + x, + z +]; +var b4 = [ + y, + z, + x +]; +var b5 = [ + z, + x, + y +]; +var b6 = [ + z, + y, + x +]; diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js index 1b64091c048..b730569bd6a 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js @@ -18,7 +18,11 @@ var q; var a = q; ~; //expect error // multiple operands after ~ -var mul = ~[1, 2, "abc"]; +var mul = ~[ + 1, + 2, + "abc" +]; ""; //expect error // miss an operand var b = ~; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index 3ee3f28ad9e..a73d851668e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -66,9 +66,16 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); // ~ operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js index fb573a7523f..1b2c93307d8 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js @@ -41,11 +41,15 @@ var ResultIsNumber8 = ~~BOOLEAN; //// [bitwiseNotOperatorWithBooleanType.js] // ~ operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsNumber1 = ~BOOLEAN; // boolean type literal var ResultIsNumber2 = ~true; -var ResultIsNumber3 = ~{ x: true, y: false }; +var ResultIsNumber3 = ~{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = ~objA.a; var ResultIsNumber5 = ~M.n; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js index ac439f02903..ac274bf8c18 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js @@ -47,12 +47,19 @@ var ResultIsNumber13 = ~~~(NUMBER + NUMBER); //// [bitwiseNotOperatorWithNumberType.js] // ~ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsNumber1 = ~NUMBER; var ResultIsNumber2 = ~NUMBER1; // number type literal var ResultIsNumber3 = ~1; -var ResultIsNumber4 = ~{ x: 1, y: 2 }; -var ResultIsNumber5 = ~{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = ~{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = ~{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = ~objA.a; var ResultIsNumber7 = ~M.n; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js index a553712e16b..f13cf39bd6f 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js @@ -46,12 +46,19 @@ var ResultIsNumber14 = ~~~(STRING + STRING); //// [bitwiseNotOperatorWithStringType.js] // ~ operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -64,8 +71,16 @@ var ResultIsNumber1 = ~STRING; var ResultIsNumber2 = ~STRING1; // string type literal var ResultIsNumber3 = ~""; -var ResultIsNumber4 = ~{ x: "", y: "" }; -var ResultIsNumber5 = ~{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = ~{ + x: "", + y: "" +}; +var ResultIsNumber5 = ~{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = ~objA.a; var ResultIsNumber7 = ~M.n; diff --git a/tests/baselines/reference/booleanAssignment.errors.txt b/tests/baselines/reference/booleanAssignment.errors.txt index 2d6c6b045ea..454bd7ef707 100644 --- a/tests/baselines/reference/booleanAssignment.errors.txt +++ b/tests/baselines/reference/booleanAssignment.errors.txt @@ -1,13 +1,15 @@ tests/cases/compiler/booleanAssignment.ts(2,1): error TS2322: Type 'number' is not assignable to type 'Boolean'. Types of property 'valueOf' are incompatible. - Type '() => Object' is not assignable to type '() => boolean'. - Type 'Object' is not assignable to type 'boolean'. + Type '() => number' is not assignable to type '() => boolean'. + Type 'number' is not assignable to type 'boolean'. tests/cases/compiler/booleanAssignment.ts(3,1): error TS2322: Type 'string' is not assignable to type 'Boolean'. Types of property 'valueOf' are incompatible. - Type '() => Object' is not assignable to type '() => boolean'. + Type '() => string' is not assignable to type '() => boolean'. + Type 'string' is not assignable to type 'boolean'. tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Boolean'. Types of property 'valueOf' are incompatible. Type '() => Object' is not assignable to type '() => boolean'. + Type 'Object' is not assignable to type 'boolean'. ==== tests/cases/compiler/booleanAssignment.ts (3 errors) ==== @@ -16,18 +18,20 @@ tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not a ~ !!! error TS2322: Type 'number' is not assignable to type 'Boolean'. !!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'. -!!! error TS2322: Type 'Object' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => number' is not assignable to type '() => boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. b = "a"; // Error ~ !!! error TS2322: Type 'string' is not assignable to type 'Boolean'. !!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'. +!!! error TS2322: Type '() => string' is not assignable to type '() => boolean'. +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. b = {}; // Error ~ !!! error TS2322: Type '{}' is not assignable to type 'Boolean'. !!! error TS2322: Types of property 'valueOf' are incompatible. !!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'. +!!! error TS2322: Type 'Object' is not assignable to type 'boolean'. var o = {}; o = b; // OK diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js index f1028956e16..59bfabd21d6 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js @@ -47,10 +47,14 @@ var r7b = i2.f(1, ''); //// [callGenericFunctionWithIncorrectNumberOfTypeArguments.js] // type parameter lists must exactly match type argument lists // all of these invocations are errors -function f(x, y) { return null; } +function f(x, y) { + return null; +} var r1 = f(1, ''); var r1b = f(1, ''); -var f2 = function (x, y) { return null; }; +var f2 = function (x, y) { + return null; +}; var r2 = f2(1, ''); var r2b = f2(1, ''); var f3; diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js index 26b9d33a55d..04edc93f5d9 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js @@ -38,9 +38,13 @@ var r7 = i2.f(1); //// [callGenericFunctionWithZeroTypeArguments.js] // valid invocations of generic functions with no explicit type arguments provided -function f(x) { return null; } +function f(x) { + return null; +} var r = f(1); -var f2 = function (x) { return null; }; +var f2 = function (x) { + return null; +}; var r2 = f2(1); var f3; var r3 = f3(1); diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js index 7b0355533e3..306b4c70362 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js @@ -46,9 +46,13 @@ var r8 = a2(); //// [callNonGenericFunctionWithTypeArguments.js] // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal -function f(x) { return null; } +function f(x) { + return null; +} var r = f(1); -var f2 = function (x) { return null; }; +var f2 = function (x) { + return null; +}; var r2 = f2(1); var f3; var r3 = f3(1); diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index b1148c12420..86cb951f853 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -22,10 +22,13 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); -function F1(a) { return a; } +function F1(a) { + return a; +} var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index b336911eeb0..e3cbceb177a 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -30,11 +30,16 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); -function F1(s) { return s; } // error -function F1(a) { return a; } // error +function F1(s) { + return s; +} // error +function F1(a) { + return a; +} // error var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callOverloads3.js b/tests/baselines/reference/callOverloads3.js index 3b615438ccd..85c16fe85a6 100644 --- a/tests/baselines/reference/callOverloads3.js +++ b/tests/baselines/reference/callOverloads3.js @@ -23,7 +23,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callOverloads4.js b/tests/baselines/reference/callOverloads4.js index 529b63ad3b8..6aab555b721 100644 --- a/tests/baselines/reference/callOverloads4.js +++ b/tests/baselines/reference/callOverloads4.js @@ -23,7 +23,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index dc508b3b8ed..2220568e4c2 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -24,7 +24,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function (a) { }; + Foo.prototype.bar1 = function (a) { + }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 24c71c98505..6daa62f83a8 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -21,7 +21,8 @@ var r5 = a.f(); //// [callSignatureWithoutAnnotationsOrBody.js] // Call signatures without a return type annotation and function body return 'any' -function foo(x) { } +function foo(x) { +} var r = foo(1); // void since there's a body var i; var r2 = i(); diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js index 0e78aac2b1b..f37d4c06861 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js @@ -165,7 +165,9 @@ function foo7(x) { var r7 = foo7(1); // object types function foo8(x) { - return { x: x }; + return { + x: x + }; } var r8 = foo8(1); function foo9(x) { @@ -202,7 +204,9 @@ function foo12() { return i2; } var r12 = foo12(); -function m1() { return 1; } +function m1() { + return 1; +} var m1; (function (m1) { m1.y = 2; diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js index 5584dd7b216..22b312e2570 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js @@ -40,27 +40,43 @@ var b = { //// [callSignaturesWithAccessibilityModifiersOnParameters.js] // Call signature parameters do not allow accessibility modifiers -function foo(x, y) { } -var f = function foo(x, y) { }; -var f2 = function (x, y) { }; -var f3 = function (x, y) { }; -var f4 = function (x, y) { }; -function foo2(x, y) { } -var f5 = function foo(x, y) { }; -var f6 = function (x, y) { }; -var f7 = function (x, y) { }; -var f8 = function (x, y) { }; +function foo(x, y) { +} +var f = function foo(x, y) { +}; +var f2 = function (x, y) { +}; +var f3 = function (x, y) { +}; +var f4 = function (x, y) { +}; +function foo2(x, y) { +} +var f5 = function foo(x, y) { +}; +var f6 = function (x, y) { +}; +var f7 = function (x, y) { +}; +var f8 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.foo2 = function (x, y) { }; - C.prototype.foo3 = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.foo2 = function (x, y) { + }; + C.prototype.foo3 = function (x, y) { + }; return C; })(); var a; var b = { - foo: function (x, y) { }, - a: function foo(x, y) { }, - b: function (x, y) { } + foo: function (x, y) { + }, + a: function foo(x, y) { + }, + b: function (x, y) { + } }; diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js index 6ed7f6f7fe5..49e20266dad 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js @@ -40,27 +40,43 @@ var b = { //// [callSignaturesWithDuplicateParameters.js] // Duplicate parameter names are always an error -function foo(x, x) { } -var f = function foo(x, x) { }; -var f2 = function (x, x) { }; -var f3 = function (x, x) { }; -var f4 = function (x, x) { }; -function foo2(x, x) { } -var f5 = function foo(x, x) { }; -var f6 = function (x, x) { }; -var f7 = function (x, x) { }; -var f8 = function (x, y) { }; +function foo(x, x) { +} +var f = function foo(x, x) { +}; +var f2 = function (x, x) { +}; +var f3 = function (x, x) { +}; +var f4 = function (x, x) { +}; +function foo2(x, x) { +} +var f5 = function foo(x, x) { +}; +var f6 = function (x, x) { +}; +var f7 = function (x, x) { +}; +var f8 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x, x) { }; - C.prototype.foo2 = function (x, x) { }; - C.prototype.foo3 = function (x, x) { }; + C.prototype.foo = function (x, x) { + }; + C.prototype.foo2 = function (x, x) { + }; + C.prototype.foo3 = function (x, x) { + }; return C; })(); var a; var b = { - foo: function (x, x) { }, - a: function foo(x, x) { }, - b: function (x, x) { } + foo: function (x, x) { + }, + a: function foo(x, x) { + }, + b: function (x, x) { + } }; diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.js b/tests/baselines/reference/callSignaturesWithOptionalParameters.js index 2f4876fb2de..fa2126fb6c5 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.js @@ -57,9 +57,12 @@ b.b(1); //// [callSignaturesWithOptionalParameters.js] // Optional parameters should be valid in all the below casts -function foo(x) { } -var f = function foo(x) { }; -var f2 = function (x, y) { }; +function foo(x) { +} +var f = function foo(x) { +}; +var f2 = function (x, y) { +}; foo(1); foo(); f(1); @@ -69,7 +72,8 @@ f2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var c; @@ -86,9 +90,12 @@ a(1); a.foo(); a.foo(1); var b = { - foo: function (x) { }, - a: function foo(x, y) { }, - b: function (x) { } + foo: function (x) { + }, + a: function foo(x, y) { + }, + b: function (x) { + } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js index a3fb2fe7a85..95ecb3a0e9c 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js @@ -61,17 +61,21 @@ a.foo(1, 2, 3); //// [callSignaturesWithOptionalParameters2.js] // Optional parameters should be valid in all the below casts -function foo(x) { } +function foo(x) { +} foo(1); foo(); -function foo2(x, y) { } +function foo2(x, y) { +} foo2(1); foo2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { }; - C.prototype.foo2 = function (x, y) { }; + C.prototype.foo = function (x) { + }; + C.prototype.foo2 = function (x, y) { + }; return C; })(); var c; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index d676c0f2a33..4cb52f41d3c 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -82,7 +82,11 @@ obj.foo.apply(obj, [1, 2].concat(a, ["abc"])); xa[1].foo(1, 2, "abc"); (_a = xa[1]).foo.apply(_a, [1, 2].concat(a)); (_b = xa[1]).foo.apply(_b, [1, 2].concat(a, ["abc"])); -(_c = xa[1]).foo.apply(_c, [1, 2, "abc"]); +(_c = xa[1]).foo.apply(_c, [ + 1, + 2, + "abc" +]); var C = (function () { function C(x, y) { var z = []; diff --git a/tests/baselines/reference/callWithSpreadES6.js b/tests/baselines/reference/callWithSpreadES6.js index bdb5aab33ec..d1589d7f6fa 100644 --- a/tests/baselines/reference/callWithSpreadES6.js +++ b/tests/baselines/reference/callWithSpreadES6.js @@ -55,12 +55,6 @@ var c = new C(1, 2, ...a); //// [callWithSpreadES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; function foo(x, y, ...z) { } var a; @@ -79,27 +73,28 @@ obj.foo(1, 2, ...a, "abc"); xa[1].foo(1, 2, "abc"); xa[1].foo(1, 2, ...a); xa[1].foo(1, 2, ...a, "abc"); -xa[1].foo(...[1, 2, "abc"]); -var C = (function () { - function C(x, y, ...z) { +xa[1].foo(...[ + 1, + 2, + "abc" +]); +class C { + constructor(x, y, ...z) { this.foo(x, y); this.foo(x, y, ...z); } - C.prototype.foo = function (x, y, ...z) { - }; - return C; -})(); -var D = (function (_super) { - __extends(D, _super); - function D() { - _super.call(this, 1, 2); - _super.call(this, 1, 2, ...a); + foo(x, y, ...z) { } - D.prototype.foo = function () { - _super.prototype.foo.call(this, 1, 2); - _super.prototype.foo.call(this, 1, 2, ...a); - }; - return D; -})(C); +} +class D extends C { + constructor() { + super(1, 2); + super(1, 2, ...a); + } + foo() { + super.foo(1, 2); + super.foo(1, 2, ...a); + } +} // Only supported in when target is ES6 var c = new C(1, 2, ...a); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js index 74ea401ae3b..f7bc46a7724 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js @@ -6,7 +6,8 @@ f(); f(); //// [callWithWrongNumberOfTypeArguments.js] -function f() { } +function f() { +} f(); f(); f(); diff --git a/tests/baselines/reference/callbacksDontShareTypes.js b/tests/baselines/reference/callbacksDontShareTypes.js index e6483638058..649ed1cb6ca 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.js +++ b/tests/baselines/reference/callbacksDontShareTypes.js @@ -21,8 +21,14 @@ var r5b = _.map(c2, rf1); //// [callbacksDontShareTypes.js] var _; var c2; -var rf1 = function (x) { return x.toFixed(); }; -var r1a = _.map(c2, function (x) { return x.toFixed(); }); +var rf1 = function (x) { + return x.toFixed(); +}; +var r1a = _.map(c2, function (x) { + return x.toFixed(); +}); var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors -var r5a = _.map(c2, function (x) { return x.toFixed(); }); +var r5a = _.map(c2, function (x) { + return x.toFixed(); +}); var r5b = _.map(c2, rf1); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 7200fabd8c4..cbb41afea3b 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -24,8 +24,13 @@ var B = (function (_super) { __extends(B, _super); function B() { var _this = this; - _super.call(this, { test: function () { return _this.someMethod(); } }); + _super.call(this, { + test: function () { + return _this.someMethod(); + } + }); } - B.prototype.someMethod = function () { }; + B.prototype.someMethod = function () { + }; return B; })(A); diff --git a/tests/baselines/reference/castExpressionParentheses.js b/tests/baselines/reference/castExpressionParentheses.js index ec18d6e373e..c217b5e7b2f 100644 --- a/tests/baselines/reference/castExpressionParentheses.js +++ b/tests/baselines/reference/castExpressionParentheses.js @@ -42,8 +42,13 @@ new (A()); //// [castExpressionParentheses.js] // parentheses should be omitted // literals -{ a: 0 }; -[1, 3,]; +{ + a: 0 +}; +[ + 1, + 3, +]; "string"; 23.0; /regexp/g; @@ -63,8 +68,10 @@ a().x; (typeof A).x; (-A).x; new (A()); -(function () { })(); -(function foo() { })(); +(function () { +})(); +(function foo() { +})(); (-A).x; // nested cast, should keep one pair of parenthese (-A).x; diff --git a/tests/baselines/reference/castTest.js b/tests/baselines/reference/castTest.js index ef9ef084d98..5afa67026b9 100644 --- a/tests/baselines/reference/castTest.js +++ b/tests/baselines/reference/castTest.js @@ -47,5 +47,7 @@ var p_cast = ({ add: function (dx, dy) { return new Point(this.x + dx, this.y + dy); }, - mult: function (p) { return p; } + mult: function (p) { + return p; + } }); diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 2c41d81cd6a..e615590ea7d 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -82,20 +82,39 @@ var E2; E2[E2["one"] = 0] = "one"; })(E2 || (E2 = {})); // no error -var numStrTuple = [5, "foo"]; +var numStrTuple = [ + 5, + "foo" +]; var emptyObjTuple = numStrTuple; var numStrBoolTuple = numStrTuple; -var classCDTuple = [new C(), new D()]; +var classCDTuple = [ + new C(), + new D() +]; var interfaceIITuple = classCDTuple; var classCDATuple = classCDTuple; var eleFromCDA1 = classCDATuple[2]; // A var eleFromCDA2 = classCDATuple[5]; // C | D | A -var t10 = [E1.one, E2.one]; +var t10 = [ + E1.one, + E2.one +]; var t11 = t10; var array1 = emptyObjTuple; -var unionTuple = [new C(), "foo"]; -var unionTuple2 = [new C(), "foo", new D()]; -var unionTuple3 = [10, "foo"]; +var unionTuple = [ + new C(), + "foo" +]; +var unionTuple2 = [ + new C(), + "foo", + new D() +]; +var unionTuple3 = [ + 10, + "foo" +]; var unionTuple4 = unionTuple3; // error var t3 = numStrTuple; diff --git a/tests/baselines/reference/catch.js b/tests/baselines/reference/catch.js index d3babf1f31d..c6b13cf4d68 100644 --- a/tests/baselines/reference/catch.js +++ b/tests/baselines/reference/catch.js @@ -7,8 +7,12 @@ function f() { //// [catch.js] function f() { - try { } - catch (e) { } - try { } - catch (e) { } + try { + } + catch (e) { + } + try { + } + catch (e) { + } } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 70456b9e9d1..3795994c64c 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -55,4 +55,12 @@ var C = (function (_super) { return C; })(B); // Ok to go down the chain, but error to try to climb back up -(new Chain(new A)).then(function (a) { return new B; }).then(function (b) { return new C; }).then(function (c) { return new B; }).then(function (b) { return new A; }); +(new Chain(new A)).then(function (a) { + return new B; +}).then(function (b) { + return new C; +}).then(function (c) { + return new B; +}).then(function (b) { + return new A; +}); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js index 3b9b8b80ecf..dbf55d4ec30 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js @@ -50,12 +50,30 @@ var Chain = (function () { var t; var s; // Ok to go down the chain, but error to climb up the chain - (new Chain(t)).then(function (tt) { return s; }).then(function (ss) { return t; }); + (new Chain(t)).then(function (tt) { + return s; + }).then(function (ss) { + return t; + }); // But error to try to climb up the chain - (new Chain(s)).then(function (ss) { return t; }); + (new Chain(s)).then(function (ss) { + return t; + }); // Staying at T or S should be fine - (new Chain(t)).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }); - (new Chain(s)).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }); + (new Chain(t)).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }); + (new Chain(s)).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }); return null; }; return Chain; @@ -70,11 +88,31 @@ var Chain2 = (function () { var s; // Ok to go down the chain, check the constraint at the end. // Should get an error that we are assigning a string to a number - (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return s; }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return t; + }).then(function (tt) { + return s; + }).value.x = ""; // Staying at T or S should keep the constraint. // Get an error when we assign a string to a number in both cases - (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).value.x = ""; - (new Chain2(i)).then(function (ii) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).value.x = ""; return null; }; return Chain2; diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index 077a92d7450..f2b3c6c6cff 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -14,7 +14,8 @@ y.m.foo(); //// [chainedImportAlias_file0.js] var m; (function (m) { - function foo() { } + function foo() { + } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js index 1884967aa9e..e10a41d9fbf 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js @@ -13,5 +13,9 @@ var s3 = s2.each(x => { x.key /* Type is K, should be number */ }); //// [chainedSpecializationToObjectTypeLiteral.js] var s; -var s2 = s.groupBy(function (s) { return s.length; }); -var s3 = s2.each(function (x) { x.key; /* Type is K, should be number */ }); +var s2 = s.groupBy(function (s) { + return s.length; +}); +var s3 = s2.each(function (x) { + x.key; /* Type is K, should be number */ +}); diff --git a/tests/baselines/reference/classBodyWithStatements.js b/tests/baselines/reference/classBodyWithStatements.js index 2324fe0d791..bae4860f722 100644 --- a/tests/baselines/reference/classBodyWithStatements.js +++ b/tests/baselines/reference/classBodyWithStatements.js @@ -25,7 +25,8 @@ var C2 = (function () { } return C2; })(); -function foo() { } +function foo() { +} var x = 1; var y = 2; var C3 = (function () { diff --git a/tests/baselines/reference/classExpression.js b/tests/baselines/reference/classExpression.js index 6bcf0f46f74..9d902abbf52 100644 --- a/tests/baselines/reference/classExpression.js +++ b/tests/baselines/reference/classExpression.js @@ -20,7 +20,9 @@ var C = (function () { return C; })(); var y = { - foo: , class: C2 }, _a = void 0; + foo: , + class: C2 +}, _a = void 0; var M; (function (M) { var z = ; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 130bf5818ee..6c7d9fe679b 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -41,8 +41,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.thing = function () { }; - C.other = function () { }; + C.prototype.thing = function () { + }; + C.other = function () { + }; return C; })(); var D = (function (_super) { @@ -60,8 +62,10 @@ var r4 = D.other(); var C2 = (function () { function C2() { } - C2.prototype.thing = function (x) { }; - C2.other = function (x) { }; + C2.prototype.thing = function (x) { + }; + C2.other = function (x) { + }; return C2; })(); var D2 = (function (_super) { diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 81301818918..b69bc3403f4 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -69,7 +69,8 @@ var C5a = (function () { return C5a; })(); null; -{ } +{ +} var C6 = (function (_super) { __extends(C6, _super); function C6() { diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 06b481dbbf4..9a507934455 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -18,4 +18,5 @@ var C5a = (function () { return C5a; })(); null; -{ } +{ +} diff --git a/tests/baselines/reference/classExtendingQualifiedName.errors.txt b/tests/baselines/reference/classExtendingQualifiedName.errors.txt index 42eae691050..b63b3e23108 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.errors.txt +++ b/tests/baselines/reference/classExtendingQualifiedName.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classExtendingQualifiedName.ts(5,21): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/compiler/classExtendingQualifiedName.ts(5,23): error TS2305: Module 'M' has no exported member 'C'. ==== tests/cases/compiler/classExtendingQualifiedName.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/classExtendingQualifiedName.ts(5,21): error TS2305: Module } class D extends M.C { - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'C'. } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 2ae7ea71cea..2adb974bb28 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -35,7 +35,8 @@ var C2 = (function () { } return C2; })(); -{ } // error +{ +} // error var x; var C3 = (function (_super) { __extends(C3, _super); @@ -55,7 +56,8 @@ var C4 = (function (_super) { } return C4; })(M); // error -function foo() { } +function foo() { +} var C5 = (function (_super) { __extends(C5, _super); function C5() { @@ -69,4 +71,5 @@ var C6 = (function () { return C6; })(); []; -{ } // error +{ +} // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 7be13137766..f2bcb02fee4 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -9,11 +9,13 @@ var C2 = (function () { } return C2; })(); -{ } // error +{ +} // error var C6 = (function () { function C6() { } return C6; })(); []; -{ } // error +{ +} // error diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js index 907b6bd6fd2..ed6e3138b07 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js @@ -19,14 +19,20 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D2 = (function () { function D2() { this.x = 3; } - D2.prototype.foo = function (x) { return x; }; - D2.prototype.other = function (x) { return x; }; + D2.prototype.foo = function (x) { + return x; + }; + D2.prototype.other = function (x) { + return x; + }; return D2; })(); diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index c2f0f17e534..a0876e8f709 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -12,7 +12,8 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo() { } +function foo() { +} var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index bc4f6b6748c..98554944bc9 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 450263d00c9..9dbfc4388e9 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -24,7 +24,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index ac5c899bbbf..0e08e508fb5 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -27,7 +27,9 @@ var A = (function () { function A() { this.x = 1; } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index a0971904cc3..46e826683e7 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -28,7 +28,9 @@ var A = (function () { function A() { this.x = 1; } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 931218e2bea..386cd6685ae 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -34,7 +34,9 @@ var A = (function () { A.bar = function () { return ""; }; - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsImportedInterface.js b/tests/baselines/reference/classImplementsImportedInterface.js index a2af2083a2a..c76a026b58a 100644 --- a/tests/baselines/reference/classImplementsImportedInterface.js +++ b/tests/baselines/reference/classImplementsImportedInterface.js @@ -18,7 +18,8 @@ var M2; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js index ba5bb72632a..9b6b7595f04 100644 --- a/tests/baselines/reference/classMethodWithKeywordName1.js +++ b/tests/baselines/reference/classMethodWithKeywordName1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.try = function () { }; + C.try = function () { + }; return C; })(); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 4bc1c3f790c..179be456028 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -31,13 +31,16 @@ var A = (function (_super) { function A() { _super.apply(this, arguments); } - A.prototype.foo = function () { this.bar(); }; + A.prototype.foo = function () { + this.bar(); + }; return A; })(B); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var a = new A(); diff --git a/tests/baselines/reference/classOverloadForFunction.js b/tests/baselines/reference/classOverloadForFunction.js index 40f076b0f2c..47c787986da 100644 --- a/tests/baselines/reference/classOverloadForFunction.js +++ b/tests/baselines/reference/classOverloadForFunction.js @@ -10,4 +10,5 @@ var foo = (function () { return foo; })(); ; -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js index 51d08b48ec5..8b59dcde771 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.js +++ b/tests/baselines/reference/classPropertyAsPrivate.js @@ -28,19 +28,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js index 1cd74089816..ddb193f072a 100644 --- a/tests/baselines/reference/classPropertyAsProtected.js +++ b/tests/baselines/reference/classPropertyAsProtected.js @@ -28,19 +28,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js index a0b61a08922..db1eca56c11 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.js +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js @@ -27,19 +27,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 74df624a78c..38b84b77bd3 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -28,7 +28,9 @@ var A = (function () { A.bar = function () { return ""; }; - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C2 = (function (_super) { diff --git a/tests/baselines/reference/classWithEmptyBody.js b/tests/baselines/reference/classWithEmptyBody.js index 16c50ccec77..df9bc857106 100644 --- a/tests/baselines/reference/classWithEmptyBody.js +++ b/tests/baselines/reference/classWithEmptyBody.js @@ -29,8 +29,11 @@ var C = (function () { var c; var o = c; c = 1; -c = { foo: '' }; -c = function () { }; +c = { + foo: '' +}; +c = function () { +}; var D = (function () { function D() { return 1; @@ -40,5 +43,8 @@ var D = (function () { var d; var o = d; d = 1; -d = { foo: '' }; -d = function () { }; +d = { + foo: '' +}; +d = function () { +}; diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.js b/tests/baselines/reference/classWithMultipleBaseClasses.js index 0e101d61dc9..c6900f526cb 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.js +++ b/tests/baselines/reference/classWithMultipleBaseClasses.js @@ -28,19 +28,23 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { }; - D.prototype.bat = function () { }; + D.prototype.baz = function () { + }; + D.prototype.bat = function () { + }; return D; })(); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js index 1c07449c994..acb802d0f97 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js @@ -30,10 +30,15 @@ i = c; var C = (function () { function C() { } - C.prototype.y = function (a) { return null; }; + C.prototype.y = function (a) { + return null; + }; Object.defineProperty(C.prototype, "z", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js index 78e5cb05861..1048c2e5124 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js @@ -32,10 +32,15 @@ i = c; var C = (function () { function C() { } - C.prototype.y = function (a) { return null; }; + C.prototype.y = function (a) { + return null; + }; Object.defineProperty(C.prototype, "z", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOptionalParameter.js b/tests/baselines/reference/classWithOptionalParameter.js index 2f11f15febe..082e624916a 100644 --- a/tests/baselines/reference/classWithOptionalParameter.js +++ b/tests/baselines/reference/classWithOptionalParameter.js @@ -16,12 +16,14 @@ class C2 { var C = (function () { function C() { } - C.prototype.f = function () { }; + C.prototype.f = function () { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.f = function (x) { }; + C2.prototype.f = function (x) { + }; return C2; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js index 4ac6548483e..f8cb9bf4c5b 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js index fd28ae3d9eb..5caba8f3fd5 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/classWithPrivateProperty.js b/tests/baselines/reference/classWithPrivateProperty.js index 0529fd8d694..47ff7c91421 100644 --- a/tests/baselines/reference/classWithPrivateProperty.js +++ b/tests/baselines/reference/classWithPrivateProperty.js @@ -28,11 +28,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); var c = new C(); diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 4de87229ad0..c8b15c1396c 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -39,11 +39,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/classWithPublicProperty.js b/tests/baselines/reference/classWithPublicProperty.js index cc1b0aad64f..88dc9d8de10 100644 --- a/tests/baselines/reference/classWithPublicProperty.js +++ b/tests/baselines/reference/classWithPublicProperty.js @@ -26,11 +26,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); // all of these are valid diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 36b8bd0af64..2cded4b1f2e 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -31,10 +31,15 @@ var C = (function () { this.a = a; this.b = b; } - C.fn = function () { return this; }; + C.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index e9253b61cac..1f588b785e9 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -103,7 +103,8 @@ var __extends = this.__extends || function (d, b) { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { }; + a.prototype.pgF = function () { + }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; @@ -115,7 +116,10 @@ var a = (function () { }); Object.defineProperty(a, "p2", { get: function () { - return { x: 30, y: 40 }; + return { + x: 30, + y: 40 + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js index c877de38a00..9772af20434 100644 --- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js +++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js @@ -21,8 +21,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/cloduleTest1.js b/tests/baselines/reference/cloduleTest1.js index 9e7edc77c71..f79f1e5c46f 100644 --- a/tests/baselines/reference/cloduleTest1.js +++ b/tests/baselines/reference/cloduleTest1.js @@ -14,7 +14,8 @@ //// [cloduleTest1.js] var $; (function ($) { - function ajax(options) { } + function ajax(options) { + } $.ajax = ajax; })($ || ($ = {})); var it = $('.foo').addClass('bar'); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.js b/tests/baselines/reference/cloduleWithDuplicateMember1.js index e3cb8f83fed..ed4d69545fc 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.js @@ -20,7 +20,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -31,7 +33,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var C; @@ -40,8 +43,10 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; - function x() { } + function x() { + } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.js b/tests/baselines/reference/cloduleWithDuplicateMember2.js index c16c6c9af8a..461930c02ae 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.js @@ -16,12 +16,14 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - set: function (y) { }, + set: function (y) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "y", { - set: function (z) { }, + set: function (z) { + }, enumerable: true, configurable: true }); @@ -33,6 +35,7 @@ var C; })(C || (C = {})); var C; (function (C) { - function x() { } + function x() { + } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index b4b31e59d3e..f249a7d5589 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -38,7 +38,9 @@ var Shape; (function (Shape) { var Utils; (function (Utils) { - function convert() { return null; } + function convert() { + return null; + } Utils.convert = convert; })(Utils = Shape.Utils || (Shape.Utils = {})); })(Shape || (Shape = {})); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt index 6a459b222c7..16b4edced7b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt @@ -1,13 +1,13 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(16,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(16,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(20,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(21,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(21,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(28,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(28,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. ==== tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts (10 errors) ==== @@ -33,20 +33,18 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,13): error ~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } return 10; } set prop2(val: number) { ~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } class c extends Foo { @@ -55,10 +53,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,13): error !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } return 10; } @@ -67,10 +64,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,13): error !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt index 8fce8f63f9d..5e1ec686bfd 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(12,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(12,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. ==== tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts (2 errors) ==== @@ -15,10 +15,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,13): erro constructor() { super(); function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } class c extends Foo { @@ -26,10 +25,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,13): erro super(); var x = () => { function _super() { // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt index e45219e43c3..e899858fcc9 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(13,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(13,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. ==== tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts (2 errors) ==== @@ -16,10 +16,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,13): error TS2 class b extends Foo { public foo() { function _super() { // should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } _super() { // No Error } @@ -28,10 +27,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,13): error TS2 public foo() { var x = () => { function _super() { // should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } _super() { // No error diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt index 6313eb2d830..f5c585525e0 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts(14,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts(14,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. ==== tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts (1 errors) ==== @@ -16,10 +16,9 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts(14,13): error T public prop2 = { doStuff: () => { function _super() { // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + } } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index be9e0ce3f68..f7198dfbf04 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -75,13 +75,17 @@ var Foo = (function () { Foo.prototype.a = function () { var _this = this; var lamda = function (_super) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.b = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Object.defineProperty(Foo.prototype, "c", { @@ -104,13 +108,17 @@ var Foo2 = (function (_super) { Foo2.prototype.x = function () { var _this = this; var lamda = function (_super) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo2.prototype.y = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Object.defineProperty(Foo2.prototype, "z", { @@ -129,7 +137,9 @@ var Foo4 = (function (_super) { Foo4.prototype.y = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; return Foo4; diff --git a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js index 1f613798642..b1db7f12ea5 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js @@ -11,5 +11,7 @@ var a; (function (a) { a.b = 10; })(a || (a = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; var _this = a; // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js index b99311b0c3e..7c617b25756 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js @@ -6,5 +6,7 @@ var a = new _this(); // Error //// [collisionThisExpressionAndAmbientClassInGlobal.js] var _this = this; -var f = function () { return _this; }; +var f = function () { + return _this; +}; var a = new _this(); // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js index c6c54869056..8aec5140caf 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js @@ -5,5 +5,7 @@ _this = 10; // Error //// [collisionThisExpressionAndAmbientVarInGlobal.js] var _this = this; -var f = function () { return _this; }; +var f = function () { + return _this; +}; _this = 10; // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js index ccaa335d80e..c31d03bed9b 100644 --- a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js @@ -10,4 +10,6 @@ var _this = (function () { } return _this; })(); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js index 4ab929a3877..3de272e51a7 100644 --- a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js @@ -12,4 +12,6 @@ var _this; _this[_this["_thisVal1"] = 0] = "_thisVal1"; _this[_this["_thisVal2"] = 1] = "_thisVal2"; })(_this || (_this = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js index 3c6232ba0ba..07e2a1358f6 100644 --- a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js @@ -9,4 +9,6 @@ var _this = this; function _this() { return 10; } -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js index 53df2984544..0e3384feb29 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js @@ -51,20 +51,24 @@ var class1 = (function () { get: function () { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; return 10; }, set: function (val) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }, enumerable: true, @@ -80,9 +84,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; return 10; }, @@ -90,9 +96,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }, enumerable: true, diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js index d0ed79da530..e4c1c7ac9ba 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js @@ -26,10 +26,12 @@ var class1 = (function () { function class1() { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -39,9 +41,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return class2; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js index 879dd83d778..967d01819ec 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js @@ -12,5 +12,7 @@ var console; function x() { var _this = this; var _this = 5; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js index e8b7a0db7f3..a799ec36eae 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js @@ -12,9 +12,13 @@ alert(x.doStuff(x => alert(x))); //// [collisionThisExpressionAndLocalVarInLambda.js] var _this = this; var x = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; -alert(x.doStuff(function (x) { return alert(x); })); +alert(x.doStuff(function (x) { + return alert(x); +})); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js index 63b536bd8b6..398ed393794 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js @@ -25,19 +25,23 @@ var a = (function () { a.prototype.method1 = function () { var _this = this; return { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }; a.prototype.method2 = function () { var _this = this; var _this = 2; return { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }; return a; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js index 65d181921d5..f884c93a62e 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js @@ -24,10 +24,12 @@ var class1 = (function () { function class1() { var _this = this; this.prop1 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -36,9 +38,11 @@ var class2 = (function () { function class2() { var _this = this; this.prop1 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; var _this = 2; } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index d502fc5c03a..5ac394520e4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -40,7 +40,9 @@ var b = (function (_super) { b.prototype.foo = function () { var _this = this; var _this = 10; - var f = function () { return _super.prototype.foo.call(_this); }; + var f = function () { + return _super.prototype.foo.call(_this); + }; }; return b; })(a); diff --git a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js index 777f141451b..2bf6987c86f 100644 --- a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js @@ -15,4 +15,6 @@ var _this; return c; })(); })(_this || (_this = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js index 8b128d92946..12398920f50 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js @@ -22,7 +22,9 @@ var Foo = (function () { function inner() { var _this = this; console.log(_this); // Error as this doesnt not resolve to user defined _this - return function (x) { return _this; }; // New scope. So should inject new _this capture into function inner + return function (x) { + return _this; + }; // New scope. So should inject new _this capture into function inner } }; return Foo; diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.js b/tests/baselines/reference/collisionThisExpressionAndParameter.js index 3a19cf20d5a..95ade61d202 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.js @@ -101,19 +101,25 @@ var Foo = (function () { var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this) { var _this = this; - return function (x) { return _this; }; // New scope. So should inject new _this capture into function inner + return function (x) { + return _this; + }; // New scope. So should inject new _this capture into function inner } }; Foo.prototype.y = function () { var _this = this; var lamda = function (_this) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.z = function (_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.x1 = function () { @@ -135,35 +141,45 @@ var Foo1 = (function () { function Foo1(_this) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return Foo1; })(); function f1(_this) { var _this = this; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } var Foo3 = (function () { function Foo3(_this) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } Foo3.prototype.z = function (_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; return Foo3; })(); function f3(_this) { var _this = this; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js index a77098739ec..75e4a60bfd3 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js @@ -40,7 +40,9 @@ var Foo2 = (function () { function Foo2(_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo2; @@ -50,7 +52,9 @@ var Foo3 = (function () { var _this = this; this._this = _this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo3; @@ -59,7 +63,9 @@ var Foo4 = (function () { function Foo4(_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo4; @@ -69,7 +75,9 @@ var Foo5 = (function () { var _this = this; this._this = _this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo5; diff --git a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js index 7057ad7ac55..77a6a28e283 100644 --- a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js @@ -5,4 +5,6 @@ var f = () => this; //// [collisionThisExpressionAndVarInGlobal.js] var _this = this; var _this = 1; -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js index 522bbbe4e19..903a77c1ac4 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js @@ -59,8 +59,14 @@ var resultIsAny5 = (OBJECT, ANY); var x; 1, ANY; ++NUMBER, ANY; -"string", [null, 1]; -"string".charAt(0), [null, 1]; +"string", [ + null, + 1 +]; +"string".charAt(0), [ + null, + 1 +]; true, x("any"); !BOOLEAN, x.doSomeThing(); var resultIsAny6 = (1, ANY); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js index dfaba1a93ca..6e3df849004 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js @@ -58,11 +58,27 @@ null, BOOLEAN; ANY = undefined, BOOLEAN; 1, true; ++NUMBER, true; -[1, 2, 3], !BOOLEAN; -OBJECT = [1, 2, 3], BOOLEAN = false; +[ + 1, + 2, + 3 +], !BOOLEAN; +OBJECT = [ + 1, + 2, + 3 +], BOOLEAN = false; var resultIsBoolean6 = (null, BOOLEAN); var resultIsBoolean7 = (ANY = undefined, BOOLEAN); var resultIsBoolean8 = (1, true); var resultIsBoolean9 = (++NUMBER, true); -var resultIsBoolean10 = ([1, 2, 3], !BOOLEAN); -var resultIsBoolean11 = (OBJECT = [1, 2, 3], BOOLEAN = false); +var resultIsBoolean10 = ([ + 1, + 2, + 3 +], !BOOLEAN); +var resultIsBoolean11 = (OBJECT = [ + 1, + 2, + 3 +], BOOLEAN = false); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js index 90c16543ff2..452d74d7cf6 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js @@ -72,6 +72,9 @@ STRING.toLowerCase(), new CLASS(); var resultIsObject6 = (null, OBJECT); var resultIsObject7 = (ANY = null, OBJECT); var resultIsObject8 = (true, {}); -var resultIsObject9 = (!BOOLEAN, { a: 1, b: "s" }); +var resultIsObject9 = (!BOOLEAN, { + a: 1, + b: "s" +}); var resultIsObject10 = ("string", new Date()); var resultIsObject11 = (STRING.toLowerCase(), new CLASS()); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js index 412e9e83121..163679b3373 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js @@ -61,11 +61,17 @@ null, STRING; ANY = new Date(), STRING; true, ""; BOOLEAN == undefined, ""; -["a", "b"], NUMBER.toString(); +[ + "a", + "b" +], NUMBER.toString(); OBJECT = new Object, STRING + "string"; var resultIsString6 = (null, STRING); var resultIsString7 = (ANY = new Date(), STRING); var resultIsString8 = (true, ""); var resultIsString9 = (BOOLEAN == undefined, ""); -var resultIsString10 = (["a", "b"], NUMBER.toString()); +var resultIsString10 = ([ + "a", + "b" +], NUMBER.toString()); var resultIsString11 = (new Object, STRING + "string"); diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.js b/tests/baselines/reference/commentEmitAtEndOfFile1.js index 1be031fa84a..1a1f7cb8900 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.js +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.js @@ -16,6 +16,7 @@ var f = ''; // test #2 var foo; (function (foo) { - function bar() { } + function bar() { + } })(foo || (foo = {})); // test #4 diff --git a/tests/baselines/reference/commentInMethodCall.js b/tests/baselines/reference/commentInMethodCall.js index 4ad2fc552d7..0f304df0b35 100644 --- a/tests/baselines/reference/commentInMethodCall.js +++ b/tests/baselines/reference/commentInMethodCall.js @@ -8,4 +8,5 @@ s.map(// do something //// [commentInMethodCall.js] //commment here var s; -s.map(function () { }); +s.map(function () { +}); diff --git a/tests/baselines/reference/commentOnBlock1.js b/tests/baselines/reference/commentOnBlock1.js new file mode 100644 index 00000000000..ff557c1fc9b --- /dev/null +++ b/tests/baselines/reference/commentOnBlock1.js @@ -0,0 +1,12 @@ +//// [commentOnBlock1.ts] +// asdf +function f() { + /*asdf*/{} +} + +//// [commentOnBlock1.js] +// asdf +function f() { + /*asdf*/ { + } +} diff --git a/tests/baselines/reference/commentOnBlock1.types b/tests/baselines/reference/commentOnBlock1.types new file mode 100644 index 00000000000..cc01efddb1c --- /dev/null +++ b/tests/baselines/reference/commentOnBlock1.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/commentOnBlock1.ts === +// asdf +function f() { +>f : () => void + + /*asdf*/{} +} diff --git a/tests/baselines/reference/commentOnClassAccessor1.js b/tests/baselines/reference/commentOnClassAccessor1.js index 428e500da55..cdd14a829fc 100644 --- a/tests/baselines/reference/commentOnClassAccessor1.js +++ b/tests/baselines/reference/commentOnClassAccessor1.js @@ -14,7 +14,9 @@ var C = (function () { /** * @type {number} */ - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/commentOnClassAccessor2.js b/tests/baselines/reference/commentOnClassAccessor2.js index 22a6b69f6c3..c85d17e6e19 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.js +++ b/tests/baselines/reference/commentOnClassAccessor2.js @@ -19,11 +19,14 @@ var C = (function () { /** * Getter. */ - get: function () { return 1; }, + get: function () { + return 1; + }, /** * Setter. */ - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/commentsBeforeFunctionExpression1.js b/tests/baselines/reference/commentsBeforeFunctionExpression1.js index 0e23722faf3..bd7a1896a5d 100644 --- a/tests/baselines/reference/commentsBeforeFunctionExpression1.js +++ b/tests/baselines/reference/commentsBeforeFunctionExpression1.js @@ -6,5 +6,7 @@ var v = { //// [commentsBeforeFunctionExpression1.js] var v = { - f: function (a) { return 0; } + f: function (a) { + return 0; + } }; diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js index 0ffb2714108..f5779be524d 100644 --- a/tests/baselines/reference/commentsFunction.js +++ b/tests/baselines/reference/commentsFunction.js @@ -74,8 +74,12 @@ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b) { return b; }; /// lamdaFoo var comment -var lambdaFoo = function (/**param a*/ a, /**param b*/ b) { return a + b; }; -var lambddaNoVarComment = function (/**param a*/ a, /**param b*/ b) { return a * b; }; +var lambdaFoo = function (/**param a*/ a, /**param b*/ b) { + return a + b; +}; +var lambddaNoVarComment = function (/**param a*/ a, /**param b*/ b) { + return a * b; +}; lambdaFoo(10, 20); lambddaNoVarComment(10, 20); function blah(a /* multiline trailing comment @@ -86,9 +90,15 @@ function blah2(a /* single line multiple trailing comments */ /* second */) { function blah3(a // trailing commen single line ) { } -lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment -/*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) -/*leading comment*/ (function () { return 0; }); //trailing comment +lambdaFoo = function (a, b) { + return a * b; +}; // This is trailing comment +/*leading comment*/ (function () { + return 0; +}); // Needs to be wrapped in parens to be a valid expression (not declaration) +/*leading comment*/ (function () { + return 0; +}); //trailing comment function blah4(/*1*/ a /*2*/, /*3*/ b /*4*/) { } function foo1() { diff --git a/tests/baselines/reference/commentsInterface.js b/tests/baselines/reference/commentsInterface.js index bff79a02aa5..dfffedaea1b 100644 --- a/tests/baselines/reference/commentsInterface.js +++ b/tests/baselines/reference/commentsInterface.js @@ -89,7 +89,9 @@ var i2_i_nc_fnfoo = i2_i.nc_fnfoo; var i2_i_nc_fnfoo_r = i2_i.nc_fnfoo(10); var i3_i; i3_i = { - f: function (/**i3_i a*/ a) { return "Hello" + a; }, + f: function (/**i3_i a*/ a) { + return "Hello" + a; + }, l: this.f, /** own x*/ x: this.f(10), diff --git a/tests/baselines/reference/commentsOnObjectLiteral3.js b/tests/baselines/reference/commentsOnObjectLiteral3.js index 49f2a6ffbf9..5d57b76991e 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral3.js +++ b/tests/baselines/reference/commentsOnObjectLiteral3.js @@ -27,7 +27,8 @@ var v = { func: function () { }, //PropertyName + CallSignature - func1: function () { }, + func1: function () { + }, //getter get a() { return this.prop; diff --git a/tests/baselines/reference/commentsVarDecl.js b/tests/baselines/reference/commentsVarDecl.js index 5ff2a3c1c6a..d76b43fafb6 100644 --- a/tests/baselines/reference/commentsVarDecl.js +++ b/tests/baselines/reference/commentsVarDecl.js @@ -70,7 +70,9 @@ var yy = /// value comment 20; /** comment2 */ -var z = function (x, y) { return x + y; }; +var z = function (x, y) { + return x + y; +}; var z2; var x2 = z2; var n4; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index e8dc954e14c..a1e982e4b4d 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -68,7 +68,11 @@ var Derived = (function (_super) { })(Base); var BaseCollection = (function () { function BaseCollection(f) { - (function (item) { return [item.Components]; }); + (function (item) { + return [ + item.Components + ]; + }); } return BaseCollection; })(); @@ -81,7 +85,9 @@ var Thing = (function () { function Thing() { } Object.defineProperty(Thing.prototype, "Components", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/complicatedPrivacy.errors.txt b/tests/baselines/reference/complicatedPrivacy.errors.txt index e212ee21fb5..2ba3abbab8a 100644 --- a/tests/baselines/reference/complicatedPrivacy.errors.txt +++ b/tests/baselines/reference/complicatedPrivacy.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. tests/cases/compiler/complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol. tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2304: Cannot find name 'number'. -tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' has no exported member 'i6'. +tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2305: Module 'mglo5' has no exported member 'i6'. ==== tests/cases/compiler/complicatedPrivacy.ts (4 errors) ==== @@ -84,7 +84,7 @@ tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' export module m3 { export class c_pr implements mglo5.i5, mglo5.i6 { - ~~~~~~~~ + ~~ !!! error TS2305: Module 'mglo5' has no exported member 'i6'. f1() { return "Hello"; diff --git a/tests/baselines/reference/compositeGenericFunction.js b/tests/baselines/reference/compositeGenericFunction.js index 106c724ea24..0fe2e7d6f41 100644 --- a/tests/baselines/reference/compositeGenericFunction.js +++ b/tests/baselines/reference/compositeGenericFunction.js @@ -7,8 +7,12 @@ var z: number = h(f); var z: number = h(f); //// [compositeGenericFunction.js] -function f(value) { return value; } +function f(value) { + return value; +} ; -function h(func) { return null; } +function h(func) { + return null; +} var z = h(f); var z = h(f); diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index d85d053f8eb..40c8a3d7ad1 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -192,8 +192,14 @@ value; } value; // array literals -['', ''] *= value; -['', ''] += value; +[ + '', + '' +] *= value; +[ + '', + '' +] += value; // super var Derived = (function (_super) { __extends(Derived, _super); @@ -213,13 +219,17 @@ var Derived = (function (_super) { return Derived; })(C); // function expression -function bar1() { } +function bar1() { +} value; -function bar2() { } +function bar2() { +} value; -(function () { }); +(function () { +}); value; -(function () { }); +(function () { +}); value; // function calls foo() *= value; @@ -249,7 +259,9 @@ foo() += value; ({}) += value; ([]) *= value; ([]) += value; -(function baz1() { }) *= value; -(function baz2() { }) += value; +(function baz1() { +}) *= value; +(function baz2() { +}) += value; (foo()) *= value; (foo()) += value; diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.js b/tests/baselines/reference/computedPropertyNames10_ES5.js index 302f9355be8..5d8ff398d6c 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.js +++ b/tests/baselines/reference/computedPropertyNames10_ES5.js @@ -21,16 +21,27 @@ var s; var n; var a; var v = (_a = {}, - _a[s] = function () { }, - _a[n] = function () { }, - _a[s + s] = function () { }, - _a[s + n] = function () { }, - _a[+s] = function () { }, - _a[""] = function () { }, - _a[0] = function () { }, - _a[a] = function () { }, - _a[true] = function () { }, - _a["hello bye"] = function () { }, - _a["hello " + a + " bye"] = function () { }, + _a[s] = function () { + }, + _a[n] = function () { + }, + _a[s + s] = function () { + }, + _a[s + n] = function () { + }, + _a[+s] = function () { + }, + _a[""] = function () { + }, + _a[0] = function () { + }, + _a[a] = function () { + }, + _a[true] = function () { + }, + _a["hello bye"] = function () { + }, + _a["hello " + a + " bye"] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames10_ES6.js b/tests/baselines/reference/computedPropertyNames10_ES6.js index 0a55fabecd8..72613b5c829 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES6.js +++ b/tests/baselines/reference/computedPropertyNames10_ES6.js @@ -21,15 +21,26 @@ var s; var n; var a; var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } + [s]() { + }, + [n]() { + }, + [s + s]() { + }, + [s + n]() { + }, + [+s]() { + }, + [""]() { + }, + [0]() { + }, + [a]() { + }, + [true]() { + }, + [`hello bye`]() { + }, + [`hello ${a} bye`]() { + } }; diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index 69902003342..2b56eeb29f2 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -21,16 +21,77 @@ var s; var n; var a; var v = (_a = {}, - _a[s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[s + s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[s + n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[+s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[""] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[0] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[a] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[true] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a["hello bye"] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a["hello " + a + " bye"] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), + _a[s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[n] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[s + s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[s + n] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[+s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[""] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[0] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[a] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[true] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a["hello bye"] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a["hello " + a + " bye"] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.js b/tests/baselines/reference/computedPropertyNames11_ES6.js index f1a774b88fe..63f786e4634 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.js +++ b/tests/baselines/reference/computedPropertyNames11_ES6.js @@ -21,15 +21,32 @@ var s; var n; var a; var 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; } + 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; + } }; diff --git a/tests/baselines/reference/computedPropertyNames12_ES6.js b/tests/baselines/reference/computedPropertyNames12_ES6.js index 5ab6e4c09b3..fd6ccb6e486 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES6.js +++ b/tests/baselines/reference/computedPropertyNames12_ES6.js @@ -20,12 +20,11 @@ class C { var s; var n; var a; -var C = (function () { - function C() { +class C { + constructor() { this[n] = n; this[s + n] = 2; this[`hello bye`] = 0; } - C[`hello ${a} bye`] = 0; - return C; -})(); +} +C[`hello ${a} bye`] = 0; diff --git a/tests/baselines/reference/computedPropertyNames13_ES5.js b/tests/baselines/reference/computedPropertyNames13_ES5.js index 89562162911..7933d6f9830 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES5.js +++ b/tests/baselines/reference/computedPropertyNames13_ES5.js @@ -23,16 +23,27 @@ var a; var C = (function () { function C() { } - C.prototype[s] = function () { }; - C.prototype[n] = function () { }; - C[s + s] = function () { }; - C.prototype[s + n] = function () { }; - C.prototype[+s] = function () { }; - C[""] = function () { }; - C.prototype[0] = function () { }; - C.prototype[a] = function () { }; - C[true] = function () { }; - C.prototype["hello bye"] = function () { }; - C["hello " + a + " bye"] = function () { }; + C.prototype[s] = function () { + }; + C.prototype[n] = function () { + }; + C[s + s] = function () { + }; + C.prototype[s + n] = function () { + }; + C.prototype[+s] = function () { + }; + C[""] = function () { + }; + C.prototype[0] = function () { + }; + C.prototype[a] = function () { + }; + C[true] = function () { + }; + C.prototype["hello bye"] = function () { + }; + C["hello " + a + " bye"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames13_ES6.js b/tests/baselines/reference/computedPropertyNames13_ES6.js index b18ef3fb3e2..18d81fcec59 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES6.js +++ b/tests/baselines/reference/computedPropertyNames13_ES6.js @@ -20,19 +20,27 @@ class C { var s; var n; var a; -var C = (function () { - function C() { +class C { + [s]() { } - C.prototype[s] = function () { }; - C.prototype[n] = function () { }; - C[s + s] = function () { }; - C.prototype[s + n] = function () { }; - C.prototype[+s] = function () { }; - C[""] = function () { }; - C.prototype[0] = function () { }; - C.prototype[a] = function () { }; - C[true] = function () { }; - C.prototype[`hello bye`] = function () { }; - C[`hello ${a} bye`] = function () { }; - return C; -})(); + [n]() { + } + static [s + s]() { + } + [s + n]() { + } + [+s]() { + } + static [""]() { + } + [0]() { + } + [a]() { + } + static [true]() { + } + [`hello bye`]() { + } + static [`hello ${a} bye`]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames14_ES5.js b/tests/baselines/reference/computedPropertyNames14_ES5.js index 5db5e842a2a..3a53e4106fc 100644 --- a/tests/baselines/reference/computedPropertyNames14_ES5.js +++ b/tests/baselines/reference/computedPropertyNames14_ES5.js @@ -14,11 +14,17 @@ var b; var C = (function () { function C() { } - C.prototype[b] = function () { }; - C[true] = function () { }; - C.prototype[[]] = function () { }; - C[{}] = function () { }; - C.prototype[undefined] = function () { }; - C[null] = function () { }; + C.prototype[b] = function () { + }; + C[true] = function () { + }; + C.prototype[[]] = function () { + }; + C[{}] = function () { + }; + C.prototype[undefined] = function () { + }; + C[null] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames14_ES6.js b/tests/baselines/reference/computedPropertyNames14_ES6.js index 94b4196a606..b1b2a9bf285 100644 --- a/tests/baselines/reference/computedPropertyNames14_ES6.js +++ b/tests/baselines/reference/computedPropertyNames14_ES6.js @@ -11,14 +11,17 @@ class C { //// [computedPropertyNames14_ES6.js] var b; -var C = (function () { - function C() { +class C { + [b]() { } - C.prototype[b] = function () { }; - C[true] = function () { }; - C.prototype[[]] = function () { }; - C[{}] = function () { }; - C.prototype[undefined] = function () { }; - C[null] = function () { }; - return C; -})(); + static [true]() { + } + [[]]() { + } + static [{}]() { + } + [undefined]() { + } + static [null]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames15_ES5.js b/tests/baselines/reference/computedPropertyNames15_ES5.js index 93258b64c75..7e0db9855dd 100644 --- a/tests/baselines/reference/computedPropertyNames15_ES5.js +++ b/tests/baselines/reference/computedPropertyNames15_ES5.js @@ -15,8 +15,11 @@ var p3; var C = (function () { function C() { } - C.prototype[p1] = function () { }; - C.prototype[p2] = function () { }; - C.prototype[p3] = function () { }; + C.prototype[p1] = function () { + }; + C.prototype[p2] = function () { + }; + C.prototype[p3] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames15_ES6.js b/tests/baselines/reference/computedPropertyNames15_ES6.js index ab7bf4552d6..1a9141ab13d 100644 --- a/tests/baselines/reference/computedPropertyNames15_ES6.js +++ b/tests/baselines/reference/computedPropertyNames15_ES6.js @@ -12,11 +12,11 @@ class C { var p1; var p2; var p3; -var C = (function () { - function C() { +class C { + [p1]() { } - C.prototype[p1] = function () { }; - C.prototype[p2] = function () { }; - C.prototype[p3] = function () { }; - return C; -})(); + [p2]() { + } + [p3]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.js b/tests/baselines/reference/computedPropertyNames16_ES5.js index 2c7316e1398..b8c4991bee4 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.js +++ b/tests/baselines/reference/computedPropertyNames16_ES5.js @@ -24,57 +24,74 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, s + s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, s + n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, +s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 0, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, a, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "hello bye", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "hello " + a + " bye", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames16_ES6.js b/tests/baselines/reference/computedPropertyNames16_ES6.js index 369040e7e22..96e175976da 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES6.js +++ b/tests/baselines/reference/computedPropertyNames16_ES6.js @@ -20,63 +20,33 @@ class C { var s; var n; var a; -var C = (function () { - function C() { +class C { + get [s]() { + return 0; } - Object.defineProperty(C.prototype, s, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, n, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, s + s, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, s + n, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, +s, { - get: function () { return 0; }, - 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, - configurable: true - }); - Object.defineProperty(C, true, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, `hello bye`, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, `hello ${a} bye`, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - return C; -})(); + set [n](v) { + } + static get [s + s]() { + return 0; + } + set [s + n](v) { + } + get [+s]() { + return 0; + } + static set [""](v) { + } + get [0]() { + return 0; + } + set [a](v) { + } + static get [true]() { + return 0; + } + set [`hello bye`](v) { + } + get [`hello ${a} bye`]() { + return 0; + } +} diff --git a/tests/baselines/reference/computedPropertyNames17_ES5.js b/tests/baselines/reference/computedPropertyNames17_ES5.js index 3b5c100694d..33bc5bfd3c8 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES5.js +++ b/tests/baselines/reference/computedPropertyNames17_ES5.js @@ -15,32 +15,41 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, b, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, [], { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, {}, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, undefined, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, null, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames17_ES6.js b/tests/baselines/reference/computedPropertyNames17_ES6.js index 38012efbb14..a181a61004e 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES6.js +++ b/tests/baselines/reference/computedPropertyNames17_ES6.js @@ -11,38 +11,20 @@ class C { //// [computedPropertyNames17_ES6.js] var b; -var C = (function () { - function C() { +class C { + get [b]() { + return 0; } - Object.defineProperty(C.prototype, b, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, true, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, [], { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, {}, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, undefined, { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, null, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + static set [true](v) { + } + get [[]]() { + return 0; + } + set [{}](v) { + } + static get [undefined]() { + return 0; + } + set [null](v) { + } +} diff --git a/tests/baselines/reference/computedPropertyNames1_ES5.js b/tests/baselines/reference/computedPropertyNames1_ES5.js index 37e06616c2f..9acf507ecbc 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES5.js +++ b/tests/baselines/reference/computedPropertyNames1_ES5.js @@ -6,7 +6,18 @@ var v = { //// [computedPropertyNames1_ES5.js] var v = (_a = {}, - _a[0 + 1] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[0 + 1] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), + _a[0 + 1] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[0 + 1] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames1_ES6.js b/tests/baselines/reference/computedPropertyNames1_ES6.js index 80a7d2ecdd2..86cdd9c4333 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES6.js +++ b/tests/baselines/reference/computedPropertyNames1_ES6.js @@ -6,6 +6,9 @@ var v = { //// [computedPropertyNames1_ES6.js] var v = { - get [0 + 1]() { return 0; }, - set [0 + 1](v) { } //No error + get [0 + 1]() { + return 0; + }, + set [0 + 1](v) { + } //No error }; diff --git a/tests/baselines/reference/computedPropertyNames21_ES5.js b/tests/baselines/reference/computedPropertyNames21_ES5.js index 81f95cd824d..2678cdc2286 100644 --- a/tests/baselines/reference/computedPropertyNames21_ES5.js +++ b/tests/baselines/reference/computedPropertyNames21_ES5.js @@ -13,6 +13,7 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[this.bar()] = function () { }; + C.prototype[this.bar()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames21_ES6.js b/tests/baselines/reference/computedPropertyNames21_ES6.js index 34a1878f689..c5f6b4e22b1 100644 --- a/tests/baselines/reference/computedPropertyNames21_ES6.js +++ b/tests/baselines/reference/computedPropertyNames21_ES6.js @@ -7,12 +7,10 @@ class C { } //// [computedPropertyNames21_ES6.js] -var C = (function () { - function C() { - } - C.prototype.bar = function () { +class C { + bar() { return 0; - }; - C.prototype[this.bar()] = function () { }; - return C; -})(); + } + [this.bar()]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames22_ES5.js b/tests/baselines/reference/computedPropertyNames22_ES5.js index df12193250b..b28e0ea68e2 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES5.js +++ b/tests/baselines/reference/computedPropertyNames22_ES5.js @@ -14,7 +14,8 @@ var C = (function () { } C.prototype.bar = function () { var obj = (_a = {}, - _a[this.bar()] = function () { }, + _a[this.bar()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames22_ES6.js b/tests/baselines/reference/computedPropertyNames22_ES6.js index c5d58939fc8..c88ceb6bc8f 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES6.js +++ b/tests/baselines/reference/computedPropertyNames22_ES6.js @@ -9,14 +9,12 @@ class C { } //// [computedPropertyNames22_ES6.js] -var C = (function () { - function C() { - } - C.prototype.bar = function () { +class C { + bar() { var obj = { - [this.bar()]() { } + [this.bar()]() { + } }; return 0; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/computedPropertyNames23_ES5.js b/tests/baselines/reference/computedPropertyNames23_ES5.js index 9e02999738c..c3024a7fbbf 100644 --- a/tests/baselines/reference/computedPropertyNames23_ES5.js +++ b/tests/baselines/reference/computedPropertyNames23_ES5.js @@ -17,7 +17,8 @@ var C = (function () { }; C.prototype[(_a = {}, _a[this.bar()] = 1, - _a)[0]] = function () { }; + _a)[0]] = function () { + }; return C; })(); var _a; diff --git a/tests/baselines/reference/computedPropertyNames23_ES6.js b/tests/baselines/reference/computedPropertyNames23_ES6.js index ad3e35dbb25..0bae1abdad2 100644 --- a/tests/baselines/reference/computedPropertyNames23_ES6.js +++ b/tests/baselines/reference/computedPropertyNames23_ES6.js @@ -9,12 +9,12 @@ class C { } //// [computedPropertyNames23_ES6.js] -var C = (function () { - function C() { - } - C.prototype.bar = function () { +class C { + bar() { return 0; - }; - C.prototype[{ [this.bar()]: 1 }[0]] = function () { }; - return C; -})(); + } + [{ + [this.bar()]: 1 + }[0]]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames24_ES5.errors.txt index a1290e06956..121b39450a6 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames24_ES5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES5.ts(9,6): error TS2466: 'super' cannot be referenced in a computed property name. +tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES5.ts(7,6): error TS2466: 'super' cannot be referenced in a computed property name. ==== tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES5.ts (1 errors) ==== @@ -8,8 +8,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES5.ts(9, } } class C extends Base { - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. [super.bar()]() { } ~~~~~ !!! error TS2466: 'super' cannot be referenced in a computed property name. diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 5b9fcbca992..cea5240003b 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -5,8 +5,6 @@ class Base { } } class C extends Base { - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. [super.bar()]() { } } @@ -30,8 +28,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. - C.prototype[super.bar.call(this)] = function () { }; + C.prototype[_super.bar.call(this)] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames24_ES6.js b/tests/baselines/reference/computedPropertyNames24_ES6.js index 58eb07cfb8d..8d33db10f71 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES6.js +++ b/tests/baselines/reference/computedPropertyNames24_ES6.js @@ -11,27 +11,14 @@ class C extends Base { } //// [computedPropertyNames24_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - Base.prototype.bar = function () { +class Base { + bar() { return 0; - }; - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.apply(this, arguments); } +} +class C extends Base { // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[super.bar.call(this)] = function () { }; - return C; -})(Base); + [super.bar()]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index f8196dd1307..4bcf877c571 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -35,7 +35,8 @@ var C = (function (_super) { } C.prototype.foo = function () { var obj = (_a = {}, - _a[_super.prototype.bar.call(this)] = function () { }, + _a[_super.prototype.bar.call(this)] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames25_ES6.js b/tests/baselines/reference/computedPropertyNames25_ES6.js index 020582c9497..cc6a0670b21 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES6.js +++ b/tests/baselines/reference/computedPropertyNames25_ES6.js @@ -14,30 +14,17 @@ class C extends Base { } //// [computedPropertyNames25_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - Base.prototype.bar = function () { +class Base { + bar() { return 0; - }; - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.apply(this, arguments); } - C.prototype.foo = function () { +} +class C extends Base { + foo() { var obj = { - [_super.prototype.bar.call(this)]() { } + [super.bar()]() { + } }; return 0; - }; - return C; -})(Base); + } +} diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames26_ES5.errors.txt index 77408f0a9f8..e7039712734 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames26_ES5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES5.ts(10,12): error TS2466: 'super' cannot be referenced in a computed property name. +tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES5.ts(8,12): error TS2466: 'super' cannot be referenced in a computed property name. ==== tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES5.ts (1 errors) ==== @@ -8,8 +8,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES5.ts(10 } } class C extends Base { - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. [ { [super.bar()]: 1 }[0] ~~~~~ diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 037bd8786e6..5651ee266c9 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -5,8 +5,6 @@ class Base { } } class C extends Base { - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. [ { [super.bar()]: 1 }[0] ]() { } @@ -32,11 +30,10 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - // Gets emitted as super, not _super, which is consistent with - // use of super in static properties initializers. C.prototype[(_a = {}, - _a[super.bar.call(this)] = 1, - _a)[0]] = function () { }; + _a[_super.bar.call(this)] = 1, + _a)[0]] = function () { + }; return C; })(Base); var _a; diff --git a/tests/baselines/reference/computedPropertyNames26_ES6.js b/tests/baselines/reference/computedPropertyNames26_ES6.js index dadc6a29e80..4526368de7a 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES6.js +++ b/tests/baselines/reference/computedPropertyNames26_ES6.js @@ -13,27 +13,16 @@ class C extends Base { } //// [computedPropertyNames26_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - Base.prototype.bar = function () { +class Base { + bar() { return 0; - }; - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.apply(this, arguments); } +} +class C extends Base { // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[{ [super.bar.call(this)]: 1 }[0]] = function () { }; - return C; -})(Base); + [{ + [super.bar()]: 1 + }[0]]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index df1fed09724..2f550731dfb 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -22,6 +22,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype[(_super.call(this), "prop")] = function () { }; + C.prototype[(_super.call(this), "prop")] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames27_ES6.js b/tests/baselines/reference/computedPropertyNames27_ES6.js index a78f13cda20..57589dfcaf5 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES6.js +++ b/tests/baselines/reference/computedPropertyNames27_ES6.js @@ -6,22 +6,9 @@ class C extends Base { } //// [computedPropertyNames27_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { +class Base { +} +class C extends Base { + [(super(), "prop")]() { } - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.apply(this, arguments); - } - C.prototype[(_super.call(this), "prop")] = function () { }; - return C; -})(Base); +} diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index b88cb0dfaf9..418252784a2 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -27,7 +27,8 @@ var C = (function (_super) { function C() { _super.call(this); var obj = (_a = {}, - _a[(_super.call(this), "prop")] = function () { }, + _a[(_super.call(this), "prop")] = function () { + }, _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames28_ES6.js b/tests/baselines/reference/computedPropertyNames28_ES6.js index 5656d96de87..bc0e32593de 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES6.js +++ b/tests/baselines/reference/computedPropertyNames28_ES6.js @@ -11,24 +11,14 @@ class C extends Base { } //// [computedPropertyNames28_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.call(this); +class Base { +} +class C extends Base { + constructor() { + super(); var obj = { - [(_super.call(this), "prop")]() { } + [(super(), "prop")]() { + } }; } - return C; -})(Base); +} diff --git a/tests/baselines/reference/computedPropertyNames29_ES5.js b/tests/baselines/reference/computedPropertyNames29_ES5.js index 022c930ab67..93a80128d98 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES5.js +++ b/tests/baselines/reference/computedPropertyNames29_ES5.js @@ -18,7 +18,8 @@ var C = (function () { var _this = this; (function () { var obj = (_a = {}, - _a[_this.bar()] = function () { }, + _a[_this.bar()] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames29_ES6.js b/tests/baselines/reference/computedPropertyNames29_ES6.js index d01b6fd3b7f..35958b372b0 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES6.js +++ b/tests/baselines/reference/computedPropertyNames29_ES6.js @@ -11,16 +11,14 @@ class C { } //// [computedPropertyNames29_ES6.js] -var C = (function () { - function C() { - } - C.prototype.bar = function () { +class C { + bar() { (() => { var obj = { - [this.bar()]() { } // needs capture + [this.bar()]() { + } // needs capture }; }); return 0; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/computedPropertyNames2_ES5.js b/tests/baselines/reference/computedPropertyNames2_ES5.js index 581b581d87b..97d9a673bbb 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES5.js +++ b/tests/baselines/reference/computedPropertyNames2_ES5.js @@ -16,25 +16,31 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function () { }; - C[methodName] = function () { }; + C.prototype[methodName] = function () { + }; + C[methodName] = function () { + }; Object.defineProperty(C.prototype, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames2_ES6.js b/tests/baselines/reference/computedPropertyNames2_ES6.js index b58b1a6f077..4287cb2c4b8 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES6.js +++ b/tests/baselines/reference/computedPropertyNames2_ES6.js @@ -13,30 +13,17 @@ class C { //// [computedPropertyNames2_ES6.js] var methodName = "method"; var accessorName = "accessor"; -var C = (function () { - function C() { +class C { + [methodName]() { } - C.prototype[methodName] = function () { }; - C[methodName] = function () { }; - Object.defineProperty(C.prototype, accessorName, { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, accessorName, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, accessorName, { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, accessorName, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + static [methodName]() { + } + get [accessorName]() { + } + set [accessorName](v) { + } + static get [accessorName]() { + } + static set [accessorName](v) { + } +} diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index fd63a192d07..b11b651a0d5 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -33,7 +33,8 @@ var C = (function (_super) { _super.call(this); (function () { var obj = (_a = {}, - _a[(_super.call(this), "prop")] = function () { }, + _a[(_super.call(this), "prop")] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames30_ES6.js b/tests/baselines/reference/computedPropertyNames30_ES6.js index 0c4f259fe48..cda2a278d47 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES6.js +++ b/tests/baselines/reference/computedPropertyNames30_ES6.js @@ -16,29 +16,19 @@ class C extends Base { } //// [computedPropertyNames30_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.call(this); +class Base { +} +class C extends Base { + constructor() { + super(); (() => { var obj = { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. - [(_super.call(this), "prop")]() { } + [(super(), "prop")]() { + } }; }); } - return C; -})(Base); +} diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 8a3c1a3f6c5..a079b3fa449 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -39,7 +39,8 @@ var C = (function (_super) { var _this = this; (function () { var obj = (_a = {}, - _a[_super.prototype.bar.call(_this)] = function () { }, + _a[_super.prototype.bar.call(_this)] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames31_ES6.js b/tests/baselines/reference/computedPropertyNames31_ES6.js index 0f7d72818fe..777e03bbcac 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES6.js +++ b/tests/baselines/reference/computedPropertyNames31_ES6.js @@ -16,33 +16,20 @@ class C extends Base { } //// [computedPropertyNames31_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Base = (function () { - function Base() { - } - Base.prototype.bar = function () { +class Base { + bar() { return 0; - }; - return Base; -})(); -var C = (function (_super) { - __extends(C, _super); - function C() { - _super.apply(this, arguments); } - C.prototype.foo = function () { +} +class C extends Base { + foo() { var _this = this; (() => { var obj = { - [_super.prototype.bar.call(_this)]() { } // needs capture + [super.bar()]() { + } // needs capture }; }); return 0; - }; - return C; -})(Base); + } +} diff --git a/tests/baselines/reference/computedPropertyNames32_ES5.js b/tests/baselines/reference/computedPropertyNames32_ES5.js index a0d8b066b5c..5a541202582 100644 --- a/tests/baselines/reference/computedPropertyNames32_ES5.js +++ b/tests/baselines/reference/computedPropertyNames32_ES5.js @@ -8,13 +8,16 @@ class C { } //// [computedPropertyNames32_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { return 0; }; - C.prototype[foo()] = function () { }; + C.prototype[foo()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames32_ES6.js b/tests/baselines/reference/computedPropertyNames32_ES6.js index 69d2a40edce..198c5e9981e 100644 --- a/tests/baselines/reference/computedPropertyNames32_ES6.js +++ b/tests/baselines/reference/computedPropertyNames32_ES6.js @@ -8,13 +8,13 @@ class C { } //// [computedPropertyNames32_ES6.js] -function foo() { return ''; } -var C = (function () { - function C() { - } - C.prototype.bar = function () { +function foo() { + return ''; +} +class C { + bar() { return 0; - }; - C.prototype[foo()] = function () { }; - return C; -})(); + } + [foo()]() { + } +} diff --git a/tests/baselines/reference/computedPropertyNames33_ES5.js b/tests/baselines/reference/computedPropertyNames33_ES5.js index 3d7c70a9256..24362351196 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES5.js +++ b/tests/baselines/reference/computedPropertyNames33_ES5.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames33_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { var obj = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames33_ES6.js b/tests/baselines/reference/computedPropertyNames33_ES6.js index 768af6fd403..7fb08d2852d 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES6.js +++ b/tests/baselines/reference/computedPropertyNames33_ES6.js @@ -10,15 +10,15 @@ class C { } //// [computedPropertyNames33_ES6.js] -function foo() { return ''; } -var C = (function () { - function C() { - } - C.prototype.bar = function () { +function foo() { + return ''; +} +class C { + bar() { var obj = { - [foo()]() { } + [foo()]() { + } }; return 0; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/computedPropertyNames34_ES5.js b/tests/baselines/reference/computedPropertyNames34_ES5.js index fd46b144fa5..83e757222b0 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES5.js +++ b/tests/baselines/reference/computedPropertyNames34_ES5.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames34_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.bar = function () { var obj = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames34_ES6.js b/tests/baselines/reference/computedPropertyNames34_ES6.js index 09cccb0e7f4..e73d349bcd7 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES6.js +++ b/tests/baselines/reference/computedPropertyNames34_ES6.js @@ -10,15 +10,15 @@ class C { } //// [computedPropertyNames34_ES6.js] -function foo() { return ''; } -var C = (function () { - function C() { - } - C.bar = function () { +function foo() { + return ''; +} +class C { + static bar() { var obj = { - [foo()]() { } + [foo()]() { + } }; return 0; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/computedPropertyNames35_ES5.js b/tests/baselines/reference/computedPropertyNames35_ES5.js index 0804c946f1f..b55743a2d83 100644 --- a/tests/baselines/reference/computedPropertyNames35_ES5.js +++ b/tests/baselines/reference/computedPropertyNames35_ES5.js @@ -6,4 +6,6 @@ interface I { } //// [computedPropertyNames35_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} diff --git a/tests/baselines/reference/computedPropertyNames35_ES6.js b/tests/baselines/reference/computedPropertyNames35_ES6.js index 2d3f4088315..b08d7c0f312 100644 --- a/tests/baselines/reference/computedPropertyNames35_ES6.js +++ b/tests/baselines/reference/computedPropertyNames35_ES6.js @@ -6,4 +6,6 @@ interface I { } //// [computedPropertyNames35_ES6.js] -function foo() { return ''; } +function foo() { + return ''; +} diff --git a/tests/baselines/reference/computedPropertyNames36_ES5.js b/tests/baselines/reference/computedPropertyNames36_ES5.js index 5519a6d284c..fa92da7b7b6 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5.js +++ b/tests/baselines/reference/computedPropertyNames36_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames36_ES6.js b/tests/baselines/reference/computedPropertyNames36_ES6.js index 09bab9a2630..573b8fa0c17 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES6.js +++ b/tests/baselines/reference/computedPropertyNames36_ES6.js @@ -11,29 +11,15 @@ class C { } //// [computedPropertyNames36_ES6.js] -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + // Computed properties + get ["get1"]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { + set ["set1"](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - 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 - }); - return C; -})(); +} diff --git a/tests/baselines/reference/computedPropertyNames37_ES5.js b/tests/baselines/reference/computedPropertyNames37_ES5.js index 54a7243f3fa..f185e93db3c 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5.js +++ b/tests/baselines/reference/computedPropertyNames37_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames37_ES6.js b/tests/baselines/reference/computedPropertyNames37_ES6.js index c824f15ef54..d62c95e6f8c 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES6.js +++ b/tests/baselines/reference/computedPropertyNames37_ES6.js @@ -11,29 +11,15 @@ class C { } //// [computedPropertyNames37_ES6.js] -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + // Computed properties + get ["get1"]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { + set ["set1"](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - 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 - }); - return C; -})(); +} diff --git a/tests/baselines/reference/computedPropertyNames38_ES5.js b/tests/baselines/reference/computedPropertyNames38_ES5.js index 49af4d00d51..42115927b30 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES5.js +++ b/tests/baselines/reference/computedPropertyNames38_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames38_ES6.js b/tests/baselines/reference/computedPropertyNames38_ES6.js index 9dde7da09de..cf1d01873f2 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES6.js +++ b/tests/baselines/reference/computedPropertyNames38_ES6.js @@ -11,29 +11,15 @@ class C { } //// [computedPropertyNames38_ES6.js] -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + // Computed properties + get [1 << 6]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { + set [1 << 6](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - Object.defineProperty(C.prototype, 1 << 6, { - // Computed properties - get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, - enumerable: true, - configurable: true - }); - return C; -})(); +} diff --git a/tests/baselines/reference/computedPropertyNames39_ES5.js b/tests/baselines/reference/computedPropertyNames39_ES5.js index 1b8d3aab2ff..12cc55f1315 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES5.js +++ b/tests/baselines/reference/computedPropertyNames39_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames39_ES6.js b/tests/baselines/reference/computedPropertyNames39_ES6.js index d0d21f201bb..9afd60b6464 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES6.js +++ b/tests/baselines/reference/computedPropertyNames39_ES6.js @@ -11,29 +11,15 @@ class C { } //// [computedPropertyNames39_ES6.js] -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + // Computed properties + get [1 << 6]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { + set [1 << 6](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - Object.defineProperty(C.prototype, 1 << 6, { - // Computed properties - get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, - enumerable: true, - configurable: true - }); - return C; -})(); +} diff --git a/tests/baselines/reference/computedPropertyNames3_ES5.js b/tests/baselines/reference/computedPropertyNames3_ES5.js index f5a063f91e6..09440d5601f 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5.js +++ b/tests/baselines/reference/computedPropertyNames3_ES5.js @@ -14,25 +14,35 @@ var id; var C = (function () { function C() { } - C.prototype[0 + 1] = function () { }; - C[function () { }] = function () { }; + C.prototype[0 + 1] = function () { + }; + C[function () { + }] = function () { + }; Object.defineProperty(C.prototype, delete id, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { }, + Object.defineProperty(C.prototype, [ + 0, + 1 + ], { + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, id.toString(), { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt index 3df6d6d9744..b9009112347 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt @@ -1,12 +1,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (6 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (7 errors) ==== var id; class C { [0 + 1]() { } @@ -18,6 +19,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1 !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. set [[0, 1]](v) { } ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.js b/tests/baselines/reference/computedPropertyNames3_ES6.js index 672d90d7b45..b5fb9e88001 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.js +++ b/tests/baselines/reference/computedPropertyNames3_ES6.js @@ -11,30 +11,21 @@ class C { //// [computedPropertyNames3_ES6.js] var id; -var C = (function () { - function C() { +class C { + [0 + 1]() { } - C.prototype[0 + 1] = function () { }; - C[() => { }] = function () { }; - Object.defineProperty(C.prototype, delete id, { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, "", { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, id.toString(), { - set: function (v) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + static [() => { + }]() { + } + get [delete id]() { + } + set [[ + 0, + 1 + ]](v) { + } + static get [""]() { + } + static set [id.toString()](v) { + } +} diff --git a/tests/baselines/reference/computedPropertyNames40_ES5.js b/tests/baselines/reference/computedPropertyNames40_ES5.js index e8063762026..887c5c3847e 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES5.js +++ b/tests/baselines/reference/computedPropertyNames40_ES5.js @@ -25,7 +25,11 @@ var C = (function () { function C() { } // Computed properties - C.prototype[""] = function () { return new Foo; }; - C.prototype[""] = function () { return new Foo2; }; + C.prototype[""] = function () { + return new Foo; + }; + C.prototype[""] = function () { + return new Foo2; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames40_ES6.js b/tests/baselines/reference/computedPropertyNames40_ES6.js index 208be7760a9..c4820e0ca98 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES6.js +++ b/tests/baselines/reference/computedPropertyNames40_ES6.js @@ -11,21 +11,16 @@ class C { } //// [computedPropertyNames40_ES6.js] -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { - } - return Foo2; -})(); -var C = (function () { - function C() { - } +class Foo { +} +class Foo2 { +} +class C { // Computed properties - C.prototype[""] = function () { return new Foo; }; - C.prototype[""] = function () { return new Foo2; }; - return C; -})(); + [""]() { + return new Foo; + } + [""]() { + return new Foo2; + } +} diff --git a/tests/baselines/reference/computedPropertyNames41_ES5.js b/tests/baselines/reference/computedPropertyNames41_ES5.js index 7d7c390bf3e..b4223ec5217 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES5.js +++ b/tests/baselines/reference/computedPropertyNames41_ES5.js @@ -24,6 +24,8 @@ var C = (function () { function C() { } // Computed properties - C[""] = function () { return new Foo; }; + C[""] = function () { + return new Foo; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames41_ES6.js b/tests/baselines/reference/computedPropertyNames41_ES6.js index 050079017c0..5773f892fd5 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES6.js +++ b/tests/baselines/reference/computedPropertyNames41_ES6.js @@ -10,20 +10,13 @@ class C { } //// [computedPropertyNames41_ES6.js] -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { - } - return Foo2; -})(); -var C = (function () { - function C() { - } +class Foo { +} +class Foo2 { +} +class C { // Computed properties - C[""] = function () { return new Foo; }; - return C; -})(); + static [""]() { + return new Foo; + } +} diff --git a/tests/baselines/reference/computedPropertyNames42_ES6.js b/tests/baselines/reference/computedPropertyNames42_ES6.js index 8538088f450..b6114f06bac 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES6.js +++ b/tests/baselines/reference/computedPropertyNames42_ES6.js @@ -10,18 +10,9 @@ class C { } //// [computedPropertyNames42_ES6.js] -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { - } - return Foo2; -})(); -var C = (function () { - function C() { - } - return C; -})(); +class Foo { +} +class Foo2 { +} +class C { +} diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index b689f02ee98..f7faa347986 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -41,12 +41,15 @@ var D = (function (_super) { } Object.defineProperty(D.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames43_ES6.js b/tests/baselines/reference/computedPropertyNames43_ES6.js index 4b64a4c803b..ab9d09834d2 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES6.js +++ b/tests/baselines/reference/computedPropertyNames43_ES6.js @@ -13,42 +13,17 @@ class D extends C { } //// [computedPropertyNames43_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { +} +class D extends C { + // Computed properties + get ["get1"]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { + set ["set1"](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - return C; -})(); -var D = (function (_super) { - __extends(D, _super); - function D() { - _super.apply(this, arguments); - } - 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 - }); - return D; -})(C); +} diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 32d3505e252..072b3e90681 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -32,7 +32,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -44,7 +46,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames44_ES6.js b/tests/baselines/reference/computedPropertyNames44_ES6.js index 9cf11f3b337..13d46131e92 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES6.js +++ b/tests/baselines/reference/computedPropertyNames44_ES6.js @@ -12,41 +12,16 @@ class D extends C { } //// [computedPropertyNames44_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + get ["get1"]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { +} +class D extends C { + set ["set1"](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - return C; -})(); -var D = (function (_super) { - __extends(D, _super); - function D() { - _super.apply(this, arguments); - } - Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, - enumerable: true, - configurable: true - }); - return D; -})(C); +} diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 3d924b00b73..4389b32a835 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -33,7 +33,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -45,7 +47,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames45_ES6.js b/tests/baselines/reference/computedPropertyNames45_ES6.js index 2e7992fe260..bea5f5211ea 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES6.js +++ b/tests/baselines/reference/computedPropertyNames45_ES6.js @@ -13,41 +13,16 @@ class D extends C { } //// [computedPropertyNames45_ES6.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Foo = (function () { - function Foo() { +class Foo { +} +class Foo2 { +} +class C { + get ["get1"]() { + return new Foo; } - return Foo; -})(); -var Foo2 = (function () { - function Foo2() { +} +class D extends C { + set ["set1"](p) { } - return Foo2; -})(); -var C = (function () { - function C() { - } - Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, - enumerable: true, - configurable: true - }); - return C; -})(); -var D = (function (_super) { - __extends(D, _super); - function D() { - _super.apply(this, arguments); - } - Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, - enumerable: true, - configurable: true - }); - return D; -})(C); +} diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index 5f952c6f3f1..27730d56df8 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -30,21 +30,37 @@ var x = (_a = { p1: 10 }, _a.p1 = 10, - _a[1 + 1] = Object.defineProperty({ get: function () { + _a[1 + 1] = Object.defineProperty({ + get: function () { throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { return 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ set: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + set: function () { // just throw throw 10; - }, enumerable: true, configurable: true }), - _a.foo = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a.foo = Object.defineProperty({ + get: function () { if (1 == 1) { return 10; } - }, enumerable: true, configurable: true }), + }, + enumerable: true, + configurable: true + }), _a.p2 = 20, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index 32502d80e0a..4221a21a763 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -35,21 +35,37 @@ var x = (_a = { } }, _a.p1 = 10, - _a.foo = Object.defineProperty({ get: function () { + _a.foo = Object.defineProperty({ + get: function () { if (1 == 1) { return 10; } - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ set: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + set: function () { // just throw throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { return 10; - }, enumerable: true, configurable: true }), + }, + enumerable: true, + configurable: true + }), _a.p2 = 20, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames9_ES5.js b/tests/baselines/reference/computedPropertyNames9_ES5.js index b1ac6c9e3b6..1b4fa16de2d 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5.js +++ b/tests/baselines/reference/computedPropertyNames9_ES5.js @@ -11,7 +11,8 @@ var v = { } //// [computedPropertyNames9_ES5.js] -function f(x) { } +function f(x) { +} var v = (_a = {}, _a[f("")] = 0, _a[f(0)] = 0, diff --git a/tests/baselines/reference/computedPropertyNames9_ES6.js b/tests/baselines/reference/computedPropertyNames9_ES6.js index b0e66c81cbd..8f111935b06 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES6.js +++ b/tests/baselines/reference/computedPropertyNames9_ES6.js @@ -11,7 +11,8 @@ var v = { } //// [computedPropertyNames9_ES6.js] -function f(x) { } +function f(x) { +} var v = { [f("")]: 0, [f(0)]: 0, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js index 1ee88351154..a74e04937c0 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js @@ -11,7 +11,11 @@ var o: I = { //// [computedPropertyNamesContextualType1_ES5.js] var o = (_a = {}, - _a["" + 0] = function (y) { return y.length; }, - _a["" + 1] = function (y) { return y.length; }, + _a["" + 0] = function (y) { + return y.length; + }, + _a["" + 1] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js index 4c4dfb9f9a6..b202d656b73 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js @@ -11,6 +11,8 @@ var o: I = { //// [computedPropertyNamesContextualType1_ES6.js] var o = { - ["" + 0](y) { return y.length; }, + ["" + 0](y) { + return y.length; + }, ["" + 1]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js index 6be09e4bef3..b33ff276fcd 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js @@ -11,7 +11,11 @@ var o: I = { //// [computedPropertyNamesContextualType2_ES5.js] var o = (_a = {}, - _a[+"foo"] = function (y) { return y.length; }, - _a[+"bar"] = function (y) { return y.length; }, + _a[+"foo"] = function (y) { + return y.length; + }, + _a[+"bar"] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js index 1f0704ce8a7..6be2c11cc5e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js @@ -11,6 +11,8 @@ var o: I = { //// [computedPropertyNamesContextualType2_ES6.js] var o = { - [+"foo"](y) { return y.length; }, + [+"foo"](y) { + return y.length; + }, [+"bar"]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js index b510cda2916..c3f189a5780 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js @@ -10,7 +10,11 @@ var o: I = { //// [computedPropertyNamesContextualType3_ES5.js] var o = (_a = {}, - _a[+"foo"] = function (y) { return y.length; }, - _a[+"bar"] = function (y) { return y.length; }, + _a[+"foo"] = function (y) { + return y.length; + }, + _a[+"bar"] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js index 08d39bbeae3..6124271a576 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js @@ -10,6 +10,8 @@ var o: I = { //// [computedPropertyNamesContextualType3_ES6.js] var o = { - [+"foo"](y) { return y.length; }, + [+"foo"](y) { + return y.length; + }, [+"bar"]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js index f50231e3f0f..d60690a249e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js @@ -16,12 +16,16 @@ foo({ //// [computedPropertyNamesContextualType6_ES5.js] foo((_a = { p: "", - 0: function () { } + 0: function () { + } }, _a.p = "", - _a[0] = function () { }, + _a[0] = function () { + }, _a["hi" + "bye"] = true, _a[0 + 1] = 0, - _a[+"hi"] = [0], + _a[+"hi"] = [ + 0 + ], _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js index 1360cc20028..e7218fff232 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js @@ -16,8 +16,11 @@ foo({ //// [computedPropertyNamesContextualType6_ES6.js] foo({ p: "", - 0: () => { }, + 0: () => { + }, ["hi" + "bye"]: true, [0 + 1]: 0, - [+"hi"]: [0] + [+"hi"]: [ + 0 + ] }); diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js index e1c567c62d9..02c2ffa734a 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js @@ -16,12 +16,16 @@ foo({ //// [computedPropertyNamesContextualType7_ES5.js] foo((_a = { p: "", - 0: function () { } + 0: function () { + } }, _a.p = "", - _a[0] = function () { }, + _a[0] = function () { + }, _a["hi" + "bye"] = true, _a[0 + 1] = 0, - _a[+"hi"] = [0], + _a[+"hi"] = [ + 0 + ], _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js index 185ccd72ead..d6b50e93aeb 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js @@ -16,8 +16,11 @@ foo({ //// [computedPropertyNamesContextualType7_ES6.js] foo({ p: "", - 0: () => { }, + 0: () => { + }, ["hi" + "bye"]: true, [0 + 1]: 0, - [+"hi"]: [0] + [+"hi"]: [ + 0 + ] }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js index 84b92f6c92d..c091003735c 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C.prototype["" + ""] = function () { }; + C.prototype["" + ""] = function () { + }; Object.defineProperty(C.prototype, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js index b7505212baf..f234ae0d97e 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js @@ -6,22 +6,15 @@ class C { } //// [computedPropertyNamesDeclarationEmit1_ES6.js] -var C = (function () { - function C() { +class C { + ["" + ""]() { } - C.prototype["" + ""] = function () { }; - Object.defineProperty(C.prototype, "" + "", { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, "" + "", { - set: function (x) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + get ["" + ""]() { + return 0; + } + set ["" + ""](x) { + } +} //// [computedPropertyNamesDeclarationEmit1_ES6.d.ts] diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js index 9847ea8b7ef..22a5b0d305d 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C["" + ""] = function () { }; + C["" + ""] = function () { + }; Object.defineProperty(C, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js index 9cd90493ea6..b5e70193b0d 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js @@ -6,22 +6,15 @@ class C { } //// [computedPropertyNamesDeclarationEmit2_ES6.js] -var C = (function () { - function C() { +class C { + static ["" + ""]() { } - C["" + ""] = function () { }; - Object.defineProperty(C, "" + "", { - get: function () { return 0; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, "" + "", { - set: function (x) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + static get ["" + ""]() { + return 0; + } + static set ["" + ""](x) { + } +} //// [computedPropertyNamesDeclarationEmit2_ES6.d.ts] diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js index 58c3133e6ee..047a8cdb333 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js @@ -9,9 +9,21 @@ var v = { //// [computedPropertyNamesDeclarationEmit5_ES5.js] var v = (_a = {}, _a["" + ""] = 0, - _a["" + ""] = function () { }, - _a["" + ""] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a["" + ""] = Object.defineProperty({ set: function (x) { }, enumerable: true, configurable: true }), + _a["" + ""] = function () { + }, + _a["" + ""] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a["" + ""] = Object.defineProperty({ + set: function (x) { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js index e19ac43656e..0ae3eaf62b5 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js @@ -9,9 +9,13 @@ var v = { //// [computedPropertyNamesDeclarationEmit5_ES6.js] var v = { ["" + ""]: 0, - ["" + ""]() { }, - get ["" + ""]() { return 0; }, - set ["" + ""](x) { } + ["" + ""]() { + }, + get ["" + ""]() { + return 0; + }, + set ["" + ""](x) { + } }; diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js index 1470605413a..c922b87f470 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js @@ -13,6 +13,7 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function (v) { }; + C.prototype[methodName] = function (v) { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js index 1cbddb58dc2..ced0a8d449a 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js @@ -10,9 +10,7 @@ class C { //// [computedPropertyNamesOnOverloads_ES6.js] var methodName = "method"; var accessorName = "accessor"; -var C = (function () { - function C() { +class C { + [methodName](v) { } - C.prototype[methodName] = function (v) { }; - return C; -})(); +} diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js.map index f3881a54bd5..c47fcfcad31 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAIPC,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":["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 diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt index 607d51ca5dc..df0af71fb02 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt @@ -10,38 +10,27 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts ------------------------------------------------------------------- >>>var C = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > C 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 8) + SourceIndex(0) --- >>> function C() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > C 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (C) -3 >Emitted(2, 15) Source(1, 8) + SourceIndex(0) name (C) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +1->class C { > ["hello"]() { > debugger; > } > 2 > } -1 >Emitted(3, 5) Source(5, 1) + SourceIndex(0) name (C.constructor) +1->Emitted(3, 5) Source(5, 1) + SourceIndex(0) name (C.constructor) 2 >Emitted(3, 6) Source(5, 2) + SourceIndex(0) name (C.constructor) --- >>> C.prototype["hello"] = function () { diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js index f7dc9e17836..749ab99b18b 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js @@ -6,12 +6,9 @@ class C { } //// [computedPropertyNamesSourceMap1_ES6.js] -var C = (function () { - function C() { - } - C.prototype["hello"] = function () { +class C { + ["hello"]() { debugger; - }; - return C; -})(); + } +} //# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.js.map index 51154cc4676..9a2dd60999e 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.constructor","C[\"hello\"]"],"mappings":"AAAA,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAIPC,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_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 diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt index bb482f68cba..30493b97347 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES6.sourcemap.txt @@ -8,107 +8,61 @@ sources: computedPropertyNamesSourceMap1_ES6.ts emittedFile:tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap1_ES6.js sourceFile:computedPropertyNamesSourceMap1_ES6.ts ------------------------------------------------------------------- ->>>var C = (function () { +>>>class C { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > C 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 8) + SourceIndex(0) --- ->>> function C() { +>>> ["hello"]() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> -2 > class -3 > C -1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (C) -3 >Emitted(2, 15) Source(1, 8) + SourceIndex(0) name (C) +2 > ^ +3 > ^^^^^^^ +4 > ^ +5 > ^^^^^-> +1->class C { + > +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) +--- +>>> debugger; +1->^^^^^^^^ +2 > ^^^^^^^^ +3 > ^ +1->() { + > +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 >^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - > ["hello"]() { - > debugger; - > } - > -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) ---- ->>> C.prototype["hello"] = function () { -1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^^^ -1-> -2 > [ -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) ---- ->>> debugger; -1 >^^^^^^^^ -2 > ^^^^^^^^ -3 > ^ -1 >["hello"]() { - > -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 >^^^^ -2 > ^ -3 > ^^^^^^^^^-> 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(4, 5) Source(4, 5) + SourceIndex(0) name (C["hello"]) +2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) name (C["hello"]) --- ->>> return C; -1->^^^^ -2 > ^^^^^^^^ -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 > 2 >^ -3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > 2 >} -3 > -4 > class C { - > ["hello"]() { - > debugger; - > } - > } -1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) name (C) -2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) name (C) -3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0) +1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) name (C) +2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) name (C) --- ->>>//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map \ No newline at end of file +>>>//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +1->Emitted(6, 1) Source(5, 2) + SourceIndex(0) +--- \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map index d4df74499d0..413c98fa456 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":[],"mappings":"AAAA,IAAI,CAAC,GAAG,AADA,CAAA,EAAA,GAAA,EAAA;IAAA,EAAA,CAEA,OAAO,CAFA,GAAA;QAGA,QAAQ,CAAC;IACb,CAAC,AAJA;IAAA,EAAA,CAKA,CAAA;IALA,EAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;OACH,OAAO;QACJ,QAAQ,CAAC;IACb,CAAC;OACJ,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 e1a4f764f42..03eec606718 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt @@ -13,144 +13,56 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts 2 >^^^^ 3 > ^ 4 > ^^^ -5 > -6 > ^ -7 > ^^ -8 > ^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >var 3 > v 4 > = -5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 9) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 9) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -5 > -6 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -6 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 9) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 10) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -6 > -7 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -7 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 10) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 12) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -7 > -8 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -8 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 10) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 15) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -8 > -9 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -9 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 12) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 17) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -9 > 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) 4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 9) Source(0, NaN) + SourceIndex(0) -6 >Emitted(1, 10) Source(0, NaN) + SourceIndex(0) -7 >Emitted(1, 12) Source(0, NaN) + SourceIndex(0) -8 >Emitted(1, 15) Source(0, NaN) + SourceIndex(0) -9 >Emitted(1, 17) Source(0, NaN) + SourceIndex(0) --- >>> _a["hello"] = function () { -1->^^^^ -2 > ^^ -3 > ^ -4 > ^^^^^^^ -5 > ^ -6 > ^^^ -1->!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 12) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -1-> -2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 15) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -2 > -3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 15) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 8) Source(2, 6) + SourceIndex(0) nameIndex (-1) -3 > -4 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 17) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 15) Source(2, 13) + SourceIndex(0) nameIndex (-1) -4 > "hello" -5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 17) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 16) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -5 > -6 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -6 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 5) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 19) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -6 > -1->Emitted(2, 5) Source(0, NaN) + SourceIndex(0) -2 >Emitted(2, 7) Source(0, NaN) + SourceIndex(0) -3 >Emitted(2, 8) Source(2, 6) + SourceIndex(0) -4 >Emitted(2, 15) Source(2, 13) + SourceIndex(0) -5 >Emitted(2, 16) Source(0, NaN) + SourceIndex(0) -6 >Emitted(2, 19) Source(0, NaN) + SourceIndex(0) +1->^^^^^^^ +2 > ^^^^^^^ +3 > ^^^^-> +1->{ + > [ +2 > "hello" +1->Emitted(2, 8) Source(2, 6) + SourceIndex(0) +2 >Emitted(2, 15) Source(2, 13) + SourceIndex(0) --- >>> debugger; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^ 3 > ^ -1 >!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 5) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 9) Source(3, 9) + SourceIndex(0) nameIndex (-1) -1 > -2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 7) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 17) Source(3, 17) + SourceIndex(0) nameIndex (-1) +1->]() { + > 2 > debugger -3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 7) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 18) Source(3, 18) + SourceIndex(0) nameIndex (-1) 3 > ; -1 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) +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 >^^^^ 2 > ^ -3 > -4 > ^^^^-> -1 >!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 8) Source(2, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 5) Source(4, 5) + SourceIndex(0) nameIndex (-1) +3 > ^^^^-> 1 > > -2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 15) Source(2, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 6) Source(4, 6) + SourceIndex(0) nameIndex (-1) 2 > } -3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 16) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 6) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -3 > 1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) 2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) -3 >Emitted(4, 6) Source(0, NaN) + SourceIndex(0) --- >>> _a); -1->^^^^ -2 > ^^ -3 > ^ -4 > ^ -1->!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 16) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -1-> -2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 19) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -2 > -3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 19) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 8) Source(5, 2) + SourceIndex(0) nameIndex (-1) -3 > -4 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 9) Source(3, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 9) Source(5, 2) + SourceIndex(0) nameIndex (-1) -4 > -1->Emitted(5, 5) Source(0, NaN) + SourceIndex(0) -2 >Emitted(5, 7) Source(0, NaN) + SourceIndex(0) -3 >Emitted(5, 8) Source(5, 2) + SourceIndex(0) -4 >Emitted(5, 9) Source(5, 2) + SourceIndex(0) +1->^^^^^^^ +2 > ^ +1-> + >} +2 > +1->Emitted(5, 8) Source(5, 2) + SourceIndex(0) +2 >Emitted(5, 9) Source(5, 2) + SourceIndex(0) --- >>>var _a; -1 >^^^^ -2 > ^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 17) Source(3, 24) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(6, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -1 > -2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 18) Source(3, 25) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(6, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -2 > -1 >Emitted(6, 5) Source(0, NaN) + SourceIndex(0) -2 >Emitted(6, 7) Source(0, NaN) + SourceIndex(0) ---- -!!!! **** There are more source map entries in the sourceMap's mapping than what was encoded -!!!! **** Remaining decoded string: ;IACb,CAAC,AAJA;IAAA,EAAA,CAKA,CAAA;IALA,EAAA >>>//# sourceMappingURL=computedPropertyNamesSourceMap2_ES5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js new file mode 100644 index 00000000000..e6b7bd5aae2 --- /dev/null +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js @@ -0,0 +1,24 @@ +//// [computedPropertyNamesWithStaticProperty.ts] +class C { + static staticProp = 10; + get [C.staticProp]() { + return "hello"; + } + set [C.staticProp](x: string) { + var y = x; + } + [C.staticProp]() { } +} + +//// [computedPropertyNamesWithStaticProperty.js] +class C { + get [C.staticProp]() { + return "hello"; + } + set [C.staticProp](x) { + var y = x; + } + [C.staticProp]() { + } +} +C.staticProp = 10; diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types new file mode 100644 index 00000000000..b23d986f894 --- /dev/null +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts === +class C { +>C : C + + static staticProp = 10; +>staticProp : number + + get [C.staticProp]() { +>C.staticProp : number +>C : typeof C +>staticProp : number + + return "hello"; + } + set [C.staticProp](x: string) { +>C.staticProp : number +>C : typeof C +>staticProp : number +>x : string + + var y = x; +>y : string +>x : string + } + [C.staticProp]() { } +>C.staticProp : number +>C : typeof C +>staticProp : number +} diff --git a/tests/baselines/reference/concatError.js b/tests/baselines/reference/concatError.js index dee3d8a30e3..1b7ff27be68 100644 --- a/tests/baselines/reference/concatError.js +++ b/tests/baselines/reference/concatError.js @@ -41,7 +41,9 @@ interface Array { } */ var fa; -fa = fa.concat([0]); +fa = fa.concat([ + 0 +]); fa = fa.concat(0); /* diff --git a/tests/baselines/reference/conditionalExpressionNewLine1.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine1.errors.txt new file mode 100644 index 00000000000..504d66fe3a7 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/conditionalExpressionNewLine1.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine1.ts(1,13): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine1.ts(1,17): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine1.ts (3 errors) ==== + var v = a ? b : c; + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS2304: Cannot find name 'b'. + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine1.js b/tests/baselines/reference/conditionalExpressionNewLine1.js new file mode 100644 index 00000000000..02055e3e479 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine1.js @@ -0,0 +1,5 @@ +//// [conditionalExpressionNewLine1.ts] +var v = a ? b : c; + +//// [conditionalExpressionNewLine1.js] +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine10.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine10.errors.txt new file mode 100644 index 00000000000..a5c902361e6 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine10.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/conditionalExpressionNewLine10.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(2,5): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(3,7): error TS2304: Cannot find name 'd'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(4,7): error TS2304: Cannot find name 'e'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(5,5): error TS2304: Cannot find name 'c'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(6,7): error TS2304: Cannot find name 'f'. +tests/cases/compiler/conditionalExpressionNewLine10.ts(7,7): error TS2304: Cannot find name 'g'. + + +==== tests/cases/compiler/conditionalExpressionNewLine10.ts (7 errors) ==== + var v = a + ~ +!!! error TS2304: Cannot find name 'a'. + ? b + ~ +!!! error TS2304: Cannot find name 'b'. + ? d + ~ +!!! error TS2304: Cannot find name 'd'. + : e + ~ +!!! error TS2304: Cannot find name 'e'. + : c + ~ +!!! error TS2304: Cannot find name 'c'. + ? f + ~ +!!! error TS2304: Cannot find name 'f'. + : g; + ~ +!!! error TS2304: Cannot find name 'g'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine10.js b/tests/baselines/reference/conditionalExpressionNewLine10.js new file mode 100644 index 00000000000..bb2f3bec231 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine10.js @@ -0,0 +1,17 @@ +//// [conditionalExpressionNewLine10.ts] +var v = a + ? b + ? d + : e + : c + ? f + : g; + +//// [conditionalExpressionNewLine10.js] +var v = a + ? b + ? d + : e + : c + ? f + : g; diff --git a/tests/baselines/reference/conditionalExpressionNewLine2.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine2.errors.txt new file mode 100644 index 00000000000..5036b247304 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine2.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/conditionalExpressionNewLine2.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine2.ts(2,5): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine2.ts(2,9): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine2.ts (3 errors) ==== + var v = a + ~ +!!! error TS2304: Cannot find name 'a'. + ? b : c; + ~ +!!! error TS2304: Cannot find name 'b'. + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine2.js b/tests/baselines/reference/conditionalExpressionNewLine2.js new file mode 100644 index 00000000000..e69f2004ebc --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine2.js @@ -0,0 +1,7 @@ +//// [conditionalExpressionNewLine2.ts] +var v = a + ? b : c; + +//// [conditionalExpressionNewLine2.js] +var v = a + ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine3.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine3.errors.txt new file mode 100644 index 00000000000..34ea3d419d8 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine3.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/conditionalExpressionNewLine3.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine3.ts(2,3): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine3.ts(2,7): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine3.ts (3 errors) ==== + var v = a ? + ~ +!!! error TS2304: Cannot find name 'a'. + b : c; + ~ +!!! error TS2304: Cannot find name 'b'. + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine3.js b/tests/baselines/reference/conditionalExpressionNewLine3.js new file mode 100644 index 00000000000..4d11f45368f --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine3.js @@ -0,0 +1,7 @@ +//// [conditionalExpressionNewLine3.ts] +var v = a ? + b : c; + +//// [conditionalExpressionNewLine3.js] +var v = a ? + b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine4.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine4.errors.txt new file mode 100644 index 00000000000..74c39406c6c --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine4.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/conditionalExpressionNewLine4.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine4.ts(1,13): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine4.ts(2,3): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine4.ts (3 errors) ==== + var v = a ? b : + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS2304: Cannot find name 'b'. + c; + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine4.js b/tests/baselines/reference/conditionalExpressionNewLine4.js new file mode 100644 index 00000000000..d6532ecb15b --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine4.js @@ -0,0 +1,7 @@ +//// [conditionalExpressionNewLine4.ts] +var v = a ? b : + c; + +//// [conditionalExpressionNewLine4.js] +var v = a ? b : + c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine5.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine5.errors.txt new file mode 100644 index 00000000000..86c8890e218 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine5.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/conditionalExpressionNewLine5.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine5.ts(1,13): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine5.ts(2,5): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine5.ts (3 errors) ==== + var v = a ? b + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS2304: Cannot find name 'b'. + : c; + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine5.js b/tests/baselines/reference/conditionalExpressionNewLine5.js new file mode 100644 index 00000000000..6fdd0735bcd --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine5.js @@ -0,0 +1,7 @@ +//// [conditionalExpressionNewLine5.ts] +var v = a ? b + : c; + +//// [conditionalExpressionNewLine5.js] +var v = a ? b + : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine6.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine6.errors.txt new file mode 100644 index 00000000000..c59ea73b845 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine6.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/conditionalExpressionNewLine6.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine6.ts(2,5): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine6.ts(3,5): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine6.ts (3 errors) ==== + var v = a + ~ +!!! error TS2304: Cannot find name 'a'. + ? b + ~ +!!! error TS2304: Cannot find name 'b'. + : c; + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine6.js b/tests/baselines/reference/conditionalExpressionNewLine6.js new file mode 100644 index 00000000000..94539ab891e --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine6.js @@ -0,0 +1,9 @@ +//// [conditionalExpressionNewLine6.ts] +var v = a + ? b + : c; + +//// [conditionalExpressionNewLine6.js] +var v = a + ? b + : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine7.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine7.errors.txt new file mode 100644 index 00000000000..ff71c42ddae --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine7.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/conditionalExpressionNewLine7.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine7.ts(2,3): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine7.ts(3,3): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/conditionalExpressionNewLine7.ts (3 errors) ==== + var v = a ? + ~ +!!! error TS2304: Cannot find name 'a'. + b : + ~ +!!! error TS2304: Cannot find name 'b'. + c; + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine7.js b/tests/baselines/reference/conditionalExpressionNewLine7.js new file mode 100644 index 00000000000..5c781f7d85a --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine7.js @@ -0,0 +1,9 @@ +//// [conditionalExpressionNewLine7.ts] +var v = a ? + b : + c; + +//// [conditionalExpressionNewLine7.js] +var v = a ? + b : + c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine8.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine8.errors.txt new file mode 100644 index 00000000000..1c6a039089c --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine8.errors.txt @@ -0,0 +1,27 @@ +tests/cases/compiler/conditionalExpressionNewLine8.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(2,5): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(2,9): error TS2304: Cannot find name 'd'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(2,13): error TS2304: Cannot find name 'e'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(3,5): error TS2304: Cannot find name 'c'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(3,9): error TS2304: Cannot find name 'f'. +tests/cases/compiler/conditionalExpressionNewLine8.ts(3,13): error TS2304: Cannot find name 'g'. + + +==== tests/cases/compiler/conditionalExpressionNewLine8.ts (7 errors) ==== + var v = a + ~ +!!! error TS2304: Cannot find name 'a'. + ? b ? d : e + ~ +!!! error TS2304: Cannot find name 'b'. + ~ +!!! error TS2304: Cannot find name 'd'. + ~ +!!! error TS2304: Cannot find name 'e'. + : c ? f : g; + ~ +!!! error TS2304: Cannot find name 'c'. + ~ +!!! error TS2304: Cannot find name 'f'. + ~ +!!! error TS2304: Cannot find name 'g'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine8.js b/tests/baselines/reference/conditionalExpressionNewLine8.js new file mode 100644 index 00000000000..61372eeadbc --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine8.js @@ -0,0 +1,9 @@ +//// [conditionalExpressionNewLine8.ts] +var v = a + ? b ? d : e + : c ? f : g; + +//// [conditionalExpressionNewLine8.js] +var v = a + ? b ? d : e + : c ? f : g; diff --git a/tests/baselines/reference/conditionalExpressionNewLine9.errors.txt b/tests/baselines/reference/conditionalExpressionNewLine9.errors.txt new file mode 100644 index 00000000000..821e3ac67f4 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine9.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/conditionalExpressionNewLine9.ts(1,9): error TS2304: Cannot find name 'a'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(2,5): error TS2304: Cannot find name 'b'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(3,7): error TS2304: Cannot find name 'd'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(3,11): error TS2304: Cannot find name 'e'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(4,5): error TS2304: Cannot find name 'c'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(5,7): error TS2304: Cannot find name 'f'. +tests/cases/compiler/conditionalExpressionNewLine9.ts(5,11): error TS2304: Cannot find name 'g'. + + +==== tests/cases/compiler/conditionalExpressionNewLine9.ts (7 errors) ==== + var v = a + ~ +!!! error TS2304: Cannot find name 'a'. + ? b + ~ +!!! error TS2304: Cannot find name 'b'. + ? d : e + ~ +!!! error TS2304: Cannot find name 'd'. + ~ +!!! error TS2304: Cannot find name 'e'. + : c + ~ +!!! error TS2304: Cannot find name 'c'. + ? f : g; + ~ +!!! error TS2304: Cannot find name 'f'. + ~ +!!! error TS2304: Cannot find name 'g'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressionNewLine9.js b/tests/baselines/reference/conditionalExpressionNewLine9.js new file mode 100644 index 00000000000..79f4606754e --- /dev/null +++ b/tests/baselines/reference/conditionalExpressionNewLine9.js @@ -0,0 +1,13 @@ +//// [conditionalExpressionNewLine9.ts] +var v = a + ? b + ? d : e + : c + ? f : g; + +//// [conditionalExpressionNewLine9.js] +var v = a + ? b + ? d : e + : c + ? f : g; diff --git a/tests/baselines/reference/conditionalExpressions2.js b/tests/baselines/reference/conditionalExpressions2.js index 6749a2c0ac0..5510a78ad6e 100644 --- a/tests/baselines/reference/conditionalExpressions2.js +++ b/tests/baselines/reference/conditionalExpressions2.js @@ -16,11 +16,22 @@ var c = false ? 1 : 0; var d = false ? false : true; var e = false ? "foo" : "bar"; var f = false ? null : undefined; -var g = true ? { g: 5 } : null; -var h = [{ h: 5 }, null]; -function i() { if (true) { - return { x: 5 }; +var g = true ? { + g: 5 +} : null; +var h = [ + { + h: 5 + }, + null +]; +function i() { + if (true) { + return { + x: 5 + }; + } + else { + return null; + } } -else { - return null; -} } diff --git a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js index f8fbe708e1a..1cd71e68873 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js +++ b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js @@ -91,9 +91,15 @@ condNumber ? exprString1 : exprBoolean1; // Union 1000000000000 ? exprIsObject1 : exprIsObject2; 10000 ? exprString1 : exprBoolean1; // Union //Cond is a number type expression -function foo() { return 1; } +function foo() { + return 1; +} ; -var array = [1, 2, 3]; +var array = [ + 1, + 2, + 3 +]; 1 * 0 ? exprAny1 : exprAny2; 1 + 1 ? exprBoolean1 : exprBoolean2; "string".length ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js index b2830e4d1d6..17f64c71421 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js @@ -77,7 +77,8 @@ var exprBoolean2; var exprNumber2; var exprString2; var exprIsObject2; -function foo() { } +function foo() { +} ; var C = (function () { function C() { @@ -93,12 +94,25 @@ condObject ? exprString1 : exprString2; condObject ? exprIsObject1 : exprIsObject2; condObject ? exprString1 : exprBoolean1; // union //Cond is an object type literal -(function (a) { return a.length; }) ? exprAny1 : exprAny2; -(function (a) { return a.length; }) ? exprBoolean1 : exprBoolean2; +(function (a) { + return a.length; +}) ? exprAny1 : exprAny2; +(function (a) { + return a.length; +}) ? exprBoolean1 : exprBoolean2; ({}) ? exprNumber1 : exprNumber2; -({ a: 1, b: "s" }) ? exprString1 : exprString2; -({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; -({ a: 1, b: "s" }) ? exprString1 : exprBoolean1; // union +({ + a: 1, + b: "s" +}) ? exprString1 : exprString2; +({ + a: 1, + b: "s" +}) ? exprIsObject1 : exprIsObject2; +({ + a: 1, + b: "s" +}) ? exprString1 : exprBoolean1; // union //Cond is an object type expression foo() ? exprAny1 : exprAny2; new Date() ? exprBoolean1 : exprBoolean2; @@ -113,12 +127,25 @@ var resultIsNumber1 = condObject ? exprNumber1 : exprNumber2; var resultIsString1 = condObject ? exprString1 : exprString2; var resultIsObject1 = condObject ? exprIsObject1 : exprIsObject2; var resultIsStringOrBoolean1 = condObject ? exprString1 : exprBoolean1; // union -var resultIsAny2 = (function (a) { return a.length; }) ? exprAny1 : exprAny2; -var resultIsBoolean2 = (function (a) { return a.length; }) ? exprBoolean1 : exprBoolean2; +var resultIsAny2 = (function (a) { + return a.length; +}) ? exprAny1 : exprAny2; +var resultIsBoolean2 = (function (a) { + return a.length; +}) ? exprBoolean1 : exprBoolean2; var resultIsNumber2 = ({}) ? exprNumber1 : exprNumber2; -var resultIsString2 = ({ a: 1, b: "s" }) ? exprString1 : exprString2; -var resultIsObject2 = ({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; -var resultIsStringOrBoolean2 = ({ a: 1, b: "s" }) ? exprString1 : exprBoolean1; // union +var resultIsString2 = ({ + a: 1, + b: "s" +}) ? exprString1 : exprString2; +var resultIsObject2 = ({ + a: 1, + b: "s" +}) ? exprIsObject1 : exprIsObject2; +var resultIsStringOrBoolean2 = ({ + a: 1, + b: "s" +}) ? exprString1 : exprBoolean1; // union var resultIsAny3 = foo() ? exprAny1 : exprAny2; var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = new C() ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js index 80cfaf97f26..30d90a8b27d 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js +++ b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js @@ -88,8 +88,14 @@ condAny ? exprString1 : exprBoolean1; // union null ? exprAny1 : exprAny2; null ? exprBoolean1 : exprBoolean2; undefined ? exprNumber1 : exprNumber2; -[null, undefined] ? exprString1 : exprString2; -[null, undefined] ? exprIsObject1 : exprIsObject2; +[ + null, + undefined +] ? exprString1 : exprString2; +[ + null, + undefined +] ? exprIsObject1 : exprIsObject2; undefined ? exprString1 : exprBoolean1; // union //Cond is an any type expression x.doSomeThing() ? exprAny1 : exprAny2; @@ -108,11 +114,20 @@ var resultIsStringOrBoolean1 = condAny ? exprString1 : exprBoolean1; // union var resultIsAny2 = null ? exprAny1 : exprAny2; var resultIsBoolean2 = null ? exprBoolean1 : exprBoolean2; var resultIsNumber2 = undefined ? exprNumber1 : exprNumber2; -var resultIsString2 = [null, undefined] ? exprString1 : exprString2; -var resultIsObject2 = [null, undefined] ? exprIsObject1 : exprIsObject2; +var resultIsString2 = [ + null, + undefined +] ? exprString1 : exprString2; +var resultIsObject2 = [ + null, + undefined +] ? exprIsObject1 : exprIsObject2; var resultIsStringOrBoolean2 = null ? exprString1 : exprBoolean1; // union var resultIsStringOrBoolean3 = undefined ? exprString1 : exprBoolean1; // union -var resultIsStringOrBoolean4 = [null, undefined] ? exprString1 : exprBoolean1; // union +var resultIsStringOrBoolean4 = [ + null, + undefined +] ? exprString1 : exprBoolean1; // union var resultIsAny3 = x.doSomeThing() ? exprAny1 : exprAny2; var resultIsBoolean3 = x("x") ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = x(x) ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js index dbd68d9f009..ce4fd985235 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js @@ -92,9 +92,15 @@ condString ? exprString1 : exprBoolean1; // union " " ? exprIsObject1 : exprIsObject2; "hello " ? exprString1 : exprBoolean1; // union //Cond is a string type expression -function foo() { return "string"; } +function foo() { + return "string"; +} ; -var array = ["1", "2", "3"]; +var array = [ + "1", + "2", + "3" +]; typeof condString ? exprAny1 : exprAny2; condString.toUpperCase ? exprBoolean1 : exprBoolean2; condString + "string" ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 722310815ae..592c5a6ca10 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -86,27 +86,59 @@ true ? x : a; var result1 = true ? x : a; //Expr1 and Expr2 are literals true ? {} : 1; -true ? { a: 1 } : { a: 2, b: 'string' }; +true ? { + a: 1 +} : { + a: 2, + b: 'string' +}; var result2 = true ? {} : 1; -var result3 = true ? { a: 1 } : { a: 2, b: 'string' }; +var result3 = true ? { + a: 1 +} : { + a: 2, + b: 'string' +}; //Contextually typed var resultIsX1 = true ? x : a; -var result4 = true ? function (m) { return m.propertyX; } : function (n) { return n.propertyA; }; +var result4 = true ? function (m) { + return m.propertyX; +} : function (n) { + return n.propertyA; +}; //Cond ? Expr1 : Expr2, Expr2 is supertype //Be Not contextually typed true ? a : x; var result5 = true ? a : x; //Expr1 and Expr2 are literals true ? 1 : {}; -true ? { a: 2, b: 'string' } : { a: 1 }; +true ? { + a: 2, + b: 'string' +} : { + a: 1 +}; var result6 = true ? 1 : {}; -var result7 = true ? { a: 2, b: 'string' } : { a: 1 }; +var result7 = true ? { + a: 2, + b: 'string' +} : { + a: 1 +}; //Contextually typed var resultIsX2 = true ? x : a; -var result8 = true ? function (m) { return m.propertyA; } : function (n) { return n.propertyX; }; +var result8 = true ? function (m) { + return m.propertyA; +} : function (n) { + return n.propertyX; +}; //Result = Cond ? Expr1 : Expr2, Result is supertype //Contextually typed var resultIsX3 = true ? a : b; -var result10 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; +var result10 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; //Expr1 and Expr2 are literals var result11 = true ? 1 : 'string'; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 83262ed1301..78c7569c0fa 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -63,7 +63,23 @@ var result1 = true ? a : b; var result2 = true ? a : b; var result3 = true ? a : b; var result31 = true ? a : b; -var result4 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result5 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result6 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result61 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; +var result4 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result5 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result6 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result61 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; diff --git a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js index d8a36f9e09e..e2029d1bf37 100644 --- a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js +++ b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js @@ -22,7 +22,8 @@ var out2 = foo2((x, y) => { //// [conditionallyDuplicateOverloadsCausedByOverloadResolution.js] var out = foo(function (x, y) { - function bar() { } + function bar() { + } return bar; }); var out2 = foo2(function (x, y) { diff --git a/tests/baselines/reference/conflictMarkerTrivia2.js b/tests/baselines/reference/conflictMarkerTrivia2.js index bbf6726b994..bbb631de388 100644 --- a/tests/baselines/reference/conflictMarkerTrivia2.js +++ b/tests/baselines/reference/conflictMarkerTrivia2.js @@ -20,6 +20,7 @@ var C = (function () { C.prototype.foo = function () { a(); }; - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.js b/tests/baselines/reference/conflictingTypeAnnotatedVar.js index 283912c487b..b44dc6f1e33 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.js +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.js @@ -5,5 +5,7 @@ function foo(): number { } //// [conflictingTypeAnnotatedVar.js] var foo; -function foo() { } -function foo() { } +function foo() { +} +function foo() { +} diff --git a/tests/baselines/reference/constDeclarations-access2.js b/tests/baselines/reference/constDeclarations-access2.js index ae8dae70646..fd51c932636 100644 --- a/tests/baselines/reference/constDeclarations-access2.js +++ b/tests/baselines/reference/constDeclarations-access2.js @@ -62,9 +62,11 @@ x--; ++((x)); // OK var a = x + 1; -function f(v) { } +function f(v) { +} f(x); -if (x) { } +if (x) { +} x; (x); -x; diff --git a/tests/baselines/reference/constDeclarations-access3.js b/tests/baselines/reference/constDeclarations-access3.js index 9140da965c3..9ac4880bdd1 100644 --- a/tests/baselines/reference/constDeclarations-access3.js +++ b/tests/baselines/reference/constDeclarations-access3.js @@ -71,9 +71,11 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { } +function f(v) { +} f(M.x); -if (M.x) { } +if (M.x) { +} M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access4.js b/tests/baselines/reference/constDeclarations-access4.js index 608d950526a..b226e746bba 100644 --- a/tests/baselines/reference/constDeclarations-access4.js +++ b/tests/baselines/reference/constDeclarations-access4.js @@ -67,9 +67,11 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { } +function f(v) { +} f(M.x); -if (M.x) { } +if (M.x) { +} M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access5.errors.txt b/tests/baselines/reference/constDeclarations-access5.errors.txt index 23200e50ee4..a098b0e72c6 100644 --- a/tests/baselines/reference/constDeclarations-access5.errors.txt +++ b/tests/baselines/reference/constDeclarations-access5.errors.txt @@ -1,3 +1,5 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +tests/cases/compiler/constDeclarations_access_2.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant. tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant. tests/cases/compiler/constDeclarations_access_2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant. @@ -18,9 +20,12 @@ tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The oper tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -==== tests/cases/compiler/constDeclarations_access_2.ts (18 errors) ==== +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/constDeclarations_access_2.ts (19 errors) ==== /// import m = require('constDeclarations_access_1'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. // Errors m.x = 1; ~~~ diff --git a/tests/baselines/reference/constDeclarations-access5.js b/tests/baselines/reference/constDeclarations-access5.js index 71b8c99ae58..313ce3db21a 100644 --- a/tests/baselines/reference/constDeclarations-access5.js +++ b/tests/baselines/reference/constDeclarations-access5.js @@ -49,39 +49,37 @@ m.x.toString(); //// [constDeclarations_access_1.js] -define(["require", "exports"], function (require, exports) { - exports.x = 0; -}); +export const x = 0; //// [constDeclarations_access_2.js] -define(["require", "exports", 'constDeclarations_access_1'], function (require, exports, m) { - // Errors - m.x = 1; - m.x += 2; - m.x -= 3; - m.x *= 4; - m.x /= 5; - m.x %= 6; - m.x <<= 7; - m.x >>= 8; - m.x >>>= 9; - m.x &= 10; - m.x |= 11; - m.x ^= 12; - m; - m.x++; - m.x--; - ++m.x; - --m.x; - ++((m.x)); - m["x"] = 0; - // OK - var a = m.x + 1; - function f(v) { } - f(m.x); - if (m.x) { } - m.x; - (m.x); - -m.x; - +m.x; - m.x.toString(); -}); +// Errors +m.x = 1; +m.x += 2; +m.x -= 3; +m.x *= 4; +m.x /= 5; +m.x %= 6; +m.x <<= 7; +m.x >>= 8; +m.x >>>= 9; +m.x &= 10; +m.x |= 11; +m.x ^= 12; +m; +m.x++; +m.x--; +++m.x; +--m.x; +++((m.x)); +m["x"] = 0; +// OK +var a = m.x + 1; +function f(v) { +} +f(m.x); +if (m.x) { +} +m.x; +(m.x); +-m.x; ++m.x; +m.x.toString(); diff --git a/tests/baselines/reference/constDeclarations-errors.js b/tests/baselines/reference/constDeclarations-errors.js index e7143f2564a..e1e68032f8d 100644 --- a/tests/baselines/reference/constDeclarations-errors.js +++ b/tests/baselines/reference/constDeclarations-errors.js @@ -21,10 +21,14 @@ for(const c10 = 0, c11; c10 < 1;) { } const c1; const c2; const c3, c4, c5, c6; // error, missing initialicer -for (const c in {}) { } +for (const c in {}) { +} // error, assigning to a const -for (const c8 = 0; c8 < 1; c8++) { } +for (const c8 = 0; c8 < 1; c8++) { +} // error, can not be unintalized -for (const c9; c9 < 1;) { } +for (const c9; c9 < 1;) { +} // error, can not be unintalized -for (const c10 = 0, c11; c10 < 1;) { } +for (const c10 = 0, c11; c10 < 1;) { +} diff --git a/tests/baselines/reference/constDeclarations-scopes.js b/tests/baselines/reference/constDeclarations-scopes.js index f8fbc47312b..b144b4f83a5 100644 --- a/tests/baselines/reference/constDeclarations-scopes.js +++ b/tests/baselines/reference/constDeclarations-scopes.js @@ -242,30 +242,25 @@ var m; } })(m || (m = {})); // methods -var C = (function () { - function C() { +class C { + constructor() { const c = 0; n = c; } - C.prototype.method = function () { + method() { const c = 0; n = c; - }; - Object.defineProperty(C.prototype, "v", { - get: function () { - const c = 0; - n = c; - return n; - }, - set: function (value) { - const c = 0; - n = c; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + } + get v() { + const c = 0; + n = c; + return n; + } + set v(value) { + const c = 0; + n = c; + } +} // object literals var o = { f() { diff --git a/tests/baselines/reference/constDeclarations-validContexts.js b/tests/baselines/reference/constDeclarations-validContexts.js index 5a54e915713..7d3269c6683 100644 --- a/tests/baselines/reference/constDeclarations-validContexts.js +++ b/tests/baselines/reference/constDeclarations-validContexts.js @@ -201,26 +201,21 @@ var m; } })(m || (m = {})); // methods -var C = (function () { - function C() { +class C { + constructor() { const c24 = 0; } - C.prototype.method = function () { + method() { const c25 = 0; - }; - Object.defineProperty(C.prototype, "v", { - get: function () { - const c26 = 0; - return c26; - }, - set: function (value) { - const c27 = value; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + } + get v() { + const c26 = 0; + return c26; + } + set v(value) { + const c27 = value; + } +} // object literals var o = { f() { diff --git a/tests/baselines/reference/constEnumErrors.js b/tests/baselines/reference/constEnumErrors.js index 4afd98982f0..ca5e3f87e6e 100644 --- a/tests/baselines/reference/constEnumErrors.js +++ b/tests/baselines/reference/constEnumErrors.js @@ -52,7 +52,9 @@ var y0 = E2[1]; var name = "A"; var y1 = E2[name]; var x = E2; -var y = [E2]; +var y = [ + E2 +]; function foo(t) { } foo(E2); diff --git a/tests/baselines/reference/constEnumOnlyModuleMerging.js b/tests/baselines/reference/constEnumOnlyModuleMerging.js new file mode 100644 index 00000000000..1d32fe748ab --- /dev/null +++ b/tests/baselines/reference/constEnumOnlyModuleMerging.js @@ -0,0 +1,26 @@ +//// [constEnumOnlyModuleMerging.ts] +module Outer { + export var x = 1; +} + +module Outer { + export const enum A { X } +} + +module B { + import O = Outer; + var x = O.A.X; + var y = O.x; +} + +//// [constEnumOnlyModuleMerging.js] +var Outer; +(function (Outer) { + Outer.x = 1; +})(Outer || (Outer = {})); +var B; +(function (B) { + var O = Outer; + var x = 0 /* X */; + var y = O.x; +})(B || (B = {})); diff --git a/tests/baselines/reference/constEnumOnlyModuleMerging.types b/tests/baselines/reference/constEnumOnlyModuleMerging.types new file mode 100644 index 00000000000..30426e3fa4c --- /dev/null +++ b/tests/baselines/reference/constEnumOnlyModuleMerging.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/constEnumOnlyModuleMerging.ts === +module Outer { +>Outer : typeof Outer + + export var x = 1; +>x : number +} + +module Outer { +>Outer : typeof Outer + + export const enum A { X } +>A : A +>X : A +} + +module B { +>B : typeof B + + import O = Outer; +>O : typeof O +>Outer : typeof O + + var x = O.A.X; +>x : O.A +>O.A.X : O.A +>O.A : typeof O.A +>O : typeof O +>A : typeof O.A +>X : O.A + + var y = O.x; +>y : number +>O.x : number +>O : typeof O +>x : number +} diff --git a/tests/baselines/reference/constEnums.js b/tests/baselines/reference/constEnums.js index 4f85cc59d0e..b7077c74df1 100644 --- a/tests/baselines/reference/constEnums.js +++ b/tests/baselines/reference/constEnums.js @@ -216,8 +216,11 @@ function foo(x) { } function bar(e) { switch (e) { - case 1 /* V1 */: return 1; - case 101 /* V2 */: return 1; - case 64 /* V3 */: return 1; + case 1 /* V1 */: + return 1; + case 101 /* V2 */: + return 1; + case 64 /* V3 */: + return 1; } } diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 408b56805fb..12e84e2077f 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -31,7 +32,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -39,7 +41,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -47,7 +50,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt index b0a4a871f21..3c5e6f8efca 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(7,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ==== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts (3 errors) ==== @@ -10,13 +10,13 @@ tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,1): error TS238 class Derived3 extends Base { biz() { } } function foo(tagName: 'canvas'): Derived3; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'div'): Derived2; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'span'): Derived1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: number): Base; function foo(tagName: any): Base { diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 591d6171dbe..563b73d7e5b 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -24,7 +24,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -32,7 +33,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -40,7 +42,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -48,7 +51,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index caeb2d32ee4..3d99e07bb5e 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -30,7 +30,8 @@ var __extends = this.__extends || function (d, b) { var Constraint = (function () { function Constraint() { } - Constraint.prototype.method = function () { }; + Constraint.prototype.method = function () { + }; return Constraint; })(); var GenericBase = (function () { diff --git a/tests/baselines/reference/constraintErrors1.js b/tests/baselines/reference/constraintErrors1.js index 71723130b55..c8da89d574c 100644 --- a/tests/baselines/reference/constraintErrors1.js +++ b/tests/baselines/reference/constraintErrors1.js @@ -2,4 +2,5 @@ function foo5(test: T) { } //// [constraintErrors1.js] -function foo5(test) { } +function foo5(test) { +} diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.js b/tests/baselines/reference/constraintSatisfactionWithAny.js index 06d8b17690a..924c2ab1700 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.js +++ b/tests/baselines/reference/constraintSatisfactionWithAny.js @@ -54,10 +54,16 @@ var c8 = new C4(b); //// [constraintSatisfactionWithAny.js] // any is not a valid type argument unless there is no constraint, or the constraint is any -function foo(x) { return null; } -function foo2(x) { return null; } +function foo(x) { + return null; +} +function foo2(x) { + return null; +} //function foo3(x: T): T { return null; } -function foo4(x) { return null; } +function foo4(x) { + return null; +} var a; foo(a); foo2(a); diff --git a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js index 7850b0ebd01..5f9e902141b 100644 --- a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js +++ b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js @@ -40,7 +40,8 @@ var i2: I2<{}>; //// [constraintSatisfactionWithEmptyObject.js] // valid uses of a basic object constraint, no errors expected // Object constraint -function foo(x) { } +function foo(x) { +} var r = foo({}); var a = {}; var r = foo({}); @@ -53,7 +54,8 @@ var C = (function () { var r2 = new C({}); var i; // {} constraint -function foo2(x) { } +function foo2(x) { +} var r = foo2({}); var a = {}; var r = foo2({}); diff --git a/tests/baselines/reference/constructorArgWithGenericCallSignature.js b/tests/baselines/reference/constructorArgWithGenericCallSignature.js index ca859869850..5fa7c46124b 100644 --- a/tests/baselines/reference/constructorArgWithGenericCallSignature.js +++ b/tests/baselines/reference/constructorArgWithGenericCallSignature.js @@ -23,7 +23,8 @@ var Test; return MyClass; })(); Test.MyClass = MyClass; - function F(func) { } + function F(func) { + } Test.F = F; })(Test || (Test = {})); var func; diff --git a/tests/baselines/reference/constructorAsType.js b/tests/baselines/reference/constructorAsType.js index 9f8c14ce743..d2029e5899f 100644 --- a/tests/baselines/reference/constructorAsType.js +++ b/tests/baselines/reference/constructorAsType.js @@ -6,6 +6,10 @@ var Person2:{new() : {name:string;};}; Person = Person2; //// [constructorAsType.js] -var Person = function () { return { name: "joe" }; }; +var Person = function () { + return { + name: "joe" + }; +}; var Person2; Person = Person2; diff --git a/tests/baselines/reference/constructorOverloads1.js b/tests/baselines/reference/constructorOverloads1.js index 97f33dca862..6f834d0bf6d 100644 --- a/tests/baselines/reference/constructorOverloads1.js +++ b/tests/baselines/reference/constructorOverloads1.js @@ -25,13 +25,19 @@ f1.bar2(); var Foo = (function () { function Foo(x) { } - Foo.prototype.bar1 = function () { }; - Foo.prototype.bar2 = function () { }; + Foo.prototype.bar1 = function () { + }; + Foo.prototype.bar2 = function () { + }; return Foo; })(); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index e3eae0ed5a9..753eca4a1fb 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -35,7 +35,8 @@ var __extends = this.__extends || function (d, b) { var FooBase = (function () { function FooBase(x) { } - FooBase.prototype.bar1 = function () { }; + FooBase.prototype.bar1 = function () { + }; return FooBase; })(); var Foo = (function (_super) { @@ -43,11 +44,16 @@ var Foo = (function (_super) { function Foo(x, y) { _super.call(this, x); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(FooBase); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index c54226745c2..382a7cd8913 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -33,11 +33,16 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(FooBase); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads6.js b/tests/baselines/reference/constructorOverloads6.js index 1996449165c..aef68fcd863 100644 --- a/tests/baselines/reference/constructorOverloads6.js +++ b/tests/baselines/reference/constructorOverloads6.js @@ -28,5 +28,9 @@ f1.bar1(); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads7.js b/tests/baselines/reference/constructorOverloads7.js index 5b7e407e806..b7e152c66e1 100644 --- a/tests/baselines/reference/constructorOverloads7.js +++ b/tests/baselines/reference/constructorOverloads7.js @@ -34,4 +34,6 @@ function Point(x, y) { this.y = y; return this; } -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} diff --git a/tests/baselines/reference/constructorParametersInVariableDeclarations.js b/tests/baselines/reference/constructorParametersInVariableDeclarations.js index 984c8c392b1..3528a9574af 100644 --- a/tests/baselines/reference/constructorParametersInVariableDeclarations.js +++ b/tests/baselines/reference/constructorParametersInVariableDeclarations.js @@ -20,16 +20,24 @@ class B { var A = (function () { function A(x) { this.a = x; - this.b = { p: x }; - this.c = function () { return x; }; + this.b = { + p: x + }; + this.c = function () { + return x; + }; } return A; })(); var B = (function () { function B() { this.a = x; - this.b = { p: x }; - this.c = function () { return x; }; + this.b = { + p: x + }; + this.c = function () { + return x; + }; var x = 1; } return B; diff --git a/tests/baselines/reference/constructorReturnsInvalidType.js b/tests/baselines/reference/constructorReturnsInvalidType.js index 7f6119cc8bd..92afb41a3fe 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.js +++ b/tests/baselines/reference/constructorReturnsInvalidType.js @@ -14,7 +14,8 @@ var X = (function () { function X() { return 1; } - X.prototype.foo = function () { }; + X.prototype.foo = function () { + }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.js b/tests/baselines/reference/constructorWithAssignableReturnExpression.js index 238f2e18aea..b56e63e8e4e 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.js +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.js @@ -51,19 +51,25 @@ var D = (function () { })(); var E = (function () { function E() { - return { x: 1 }; + return { + x: 1 + }; } return E; })(); var F = (function () { function F() { - return { x: 1 }; // error + return { + x: 1 + }; // error } return F; })(); var G = (function () { function G() { - return { x: null }; + return { + x: null + }; } return G; })(); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index 6b394fec4d6..fa1c6bea381 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,1): error TS2304: Cannot find name 'module'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2304: Cannot find name 'module'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. @@ -96,7 +96,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS } import fs = module("fs"); - ~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2304: Cannot find name 'module'. ~ !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 1276763505e..0bc51e90c5c 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -314,12 +314,10 @@ var TypeScriptAllInOne; Program.prototype.if = function (retValue) { if (retValue === void 0) { retValue = != 0; } return 1; - ^ - retValue; + ^ retValue; bfs.TYPES(); if (retValue != 0) { - return 1 && - ; + return 1 && ; } retValue = bfs.OPERATOR; ' );; @@ -350,8 +348,7 @@ var BasicFeatures = (function () { BasicFeatures.prototype.VARIABLES = function () { var local = Number.MAX_VALUE; var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - ; + var inf = Number.NEGATIVE_INFINITY - ; var nan = Number.NaN; var undef = undefined; var _\uD4A5\u7204\uC316, uE59F = local; @@ -360,16 +357,22 @@ var BasicFeatures = (function () { var local6 = local5 instanceof fs.File; var hex = 0xBADC0DE, Hex = 0XDEADBEEF; var float = 6.02e23, float2 = 6.02E-23; - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - ; + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != ; var quoted = '"', quoted2 = "'"; var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: function () { return 'objLit{42}'; } }; + var objLit = { + "var": number = 42, + equals: function (x) { + return x["var"] === 42; + }, + instanceof: function () { + return 'objLit{42}'; + } + }; var weekday = Weekdays.Monday; var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; // - var any = 0 ^= - ; + var any = 0 ^= ; var bool = 0; var declare = 0; var constructor = 0; @@ -385,8 +388,7 @@ var BasicFeatures = (function () { var public = 0; var set = 0; var static = 0; - var string = 0 / > - ; + var string = 0 / > ; var yield = 0; var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; return 0; @@ -412,18 +414,24 @@ var BasicFeatures = (function () { default: break; } - for (var x in { x: 0, y: 1 }) { + for (var x in { + x: 0, + y: 1 + }) { !; try { throw null; } - catch (Exception) { } + catch (Exception) { + } } try { } finally { - try { } - catch (Exception) { } + try { + } + catch (Exception) { + } } return retVal; }; @@ -436,13 +444,17 @@ var BasicFeatures = (function () { var c = new CLASS(); var xx = c; retVal += ; - try { } - catch () { } + try { + } + catch () { + } Property; retVal += c.Member(); retVal += xx.Foo() ? 0 : 1; //anonymous type - var anony = { a: new CLASS() }; + var anony = { + a: new CLASS() + }; retVal += anony.a.d(); return retVal; }; @@ -451,7 +463,13 @@ var BasicFeatures = (function () { ///// ///// BasicFeatures.prototype.OPERATOR = function () { - var a = [1, 2, 3, 4, 5,]; /*[] bug*/ // YES [] + var a = [ + 1, + 2, + 3, + 4, + 5, + ]; /*[] bug*/ // YES [] var i = a[1]; /*[]*/ i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/ var b = true && false || true ^ false; /*& | ^*/ @@ -487,10 +505,15 @@ var BasicFeatures = (function () { })(); var CLASS = (function () { function CLASS() { - this.d = function () { yield; 0; }; + this.d = function () { + yield; + 0; + }; } Object.defineProperty(CLASS.prototype, "Property", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); @@ -498,7 +521,9 @@ var CLASS = (function () { return 0; }; CLASS.prototype.Foo = function () { - var myEvent = function () { return 1; }; + var myEvent = function () { + return 1; + }; if (myEvent() == 1) return true ? : ; else @@ -542,10 +567,10 @@ while () : string, ; rest: string[]; { - & - public; + & public; DefaultValue(value ? : string = "Hello"); - { } + { + } } var Weekdays; (function (Weekdays) { diff --git a/tests/baselines/reference/contextualSignatureInstantiation1.js b/tests/baselines/reference/contextualSignatureInstantiation1.js index 843ac5140f0..a9abab149bb 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation1.js +++ b/tests/baselines/reference/contextualSignatureInstantiation1.js @@ -8,7 +8,11 @@ var e2 = (x: string, y?: K) => x.length; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } //// [contextualSignatureInstantiation1.js] -var e = function (x, y) { return x.length; }; +var e = function (x, y) { + return x.length; +}; var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed -var e2 = function (x, y) { return x.length; }; +var e2 = function (x, y) { + return x.length; +}; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } diff --git a/tests/baselines/reference/contextualSignatureInstantiation2.js b/tests/baselines/reference/contextualSignatureInstantiation2.js index 78bc5a88856..8b29b432ce6 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation2.js +++ b/tests/baselines/reference/contextualSignatureInstantiation2.js @@ -8,6 +8,12 @@ var r23 = dot(id)(id); //// [contextualSignatureInstantiation2.js] // dot f g x = f(g(x)) var dot; -dot = function (f) { return function (g) { return function (x) { return f(g(x)); }; }; }; +dot = function (f) { + return function (g) { + return function (x) { + return f(g(x)); + }; + }; +}; var id; var r23 = dot(id)(id); diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.js b/tests/baselines/reference/contextualSignatureInstantiation3.js index 9198a02ccda..ccc5e584368 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.js +++ b/tests/baselines/reference/contextualSignatureInstantiation3.js @@ -31,9 +31,15 @@ function identity(x) { return x; } function singleton(x) { - return [x]; + return [ + x + ]; } -var xs = [1, 2, 3]; +var xs = [ + 1, + 2, + 3 +]; // Have compiler check that we get the correct types var v1; var v1 = xs.map(identity); // Error if not number[] diff --git a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js index 726d45bffe5..bd76a746ac9 100644 --- a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js +++ b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js @@ -8,7 +8,9 @@ var x = h("", f()); // Call should succeed and x should be string. All t //// [contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js] function f() { - function g(u) { return null; } + function g(u) { + return null; + } return g; } var h; diff --git a/tests/baselines/reference/contextualTypeAny.js b/tests/baselines/reference/contextualTypeAny.js index a88b353a890..1a3918ba0d2 100644 --- a/tests/baselines/reference/contextualTypeAny.js +++ b/tests/baselines/reference/contextualTypeAny.js @@ -7,5 +7,11 @@ var arr: number[] = ["", x]; //// [contextualTypeAny.js] var x; -var obj = { p: "", q: x }; -var arr = ["", x]; +var obj = { + p: "", + q: x +}; +var arr = [ + "", + x +]; diff --git a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js index 77ce90ec737..c4e78318a9c 100644 --- a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js +++ b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js @@ -18,7 +18,8 @@ class Foo{ //// [contextualTypeAppliedToVarArgs.js] function delegate(instance, method, data) { - return function () { }; + return function () { + }; } var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/contextualTypeArrayReturnType.js b/tests/baselines/reference/contextualTypeArrayReturnType.js index adc568d5230..d84b93ec953 100644 --- a/tests/baselines/reference/contextualTypeArrayReturnType.js +++ b/tests/baselines/reference/contextualTypeArrayReturnType.js @@ -24,7 +24,9 @@ var style: IBookStyle = { var style = { initialLeftPageTransforms: function (width) { return [ - { 'ry': null } + { + 'ry': null + } ]; } }; diff --git a/tests/baselines/reference/contextualTypeWithTuple.js b/tests/baselines/reference/contextualTypeWithTuple.js index cfcdd13f7d0..d5c8fa83874 100644 --- a/tests/baselines/reference/contextualTypeWithTuple.js +++ b/tests/baselines/reference/contextualTypeWithTuple.js @@ -27,11 +27,36 @@ numStrTuple = unionTuple3; //// [contextualTypeWithTuple.js] // no error -var numStrTuple = [5, "hello"]; -var numStrTuple2 = [5, "foo", true]; -var numStrBoolTuple = [5, "foo", true]; -var objNumTuple = [{ a: "world" }, 5]; -var strTupleTuple = ["bar", [5, { x: 1, y: 1 }]]; +var numStrTuple = [ + 5, + "hello" +]; +var numStrTuple2 = [ + 5, + "foo", + true +]; +var numStrBoolTuple = [ + 5, + "foo", + true +]; +var objNumTuple = [ + { + a: "world" + }, + 5 +]; +var strTupleTuple = [ + "bar", + [ + 5, + { + x: 1, + y: 1 + } + ] +]; var C = (function () { function C() { } @@ -42,16 +67,36 @@ var D = (function () { } return D; })(); -var unionTuple = [new C(), "foo"]; -var unionTuple1 = [new C(), "foo"]; -var unionTuple2 = [new C(), "foo", new D()]; -var unionTuple3 = [10, "foo"]; +var unionTuple = [ + new C(), + "foo" +]; +var unionTuple1 = [ + new C(), + "foo" +]; +var unionTuple2 = [ + new C(), + "foo", + new D() +]; +var unionTuple3 = [ + 10, + "foo" +]; numStrTuple = numStrTuple2; numStrTuple = numStrBoolTuple; // error -objNumTuple = [{}, 5]; +objNumTuple = [ + {}, + 5 +]; numStrBoolTuple = numStrTuple; -var strStrTuple = ["foo", "bar", 5]; +var strStrTuple = [ + "foo", + "bar", + 5 +]; unionTuple = unionTuple1; unionTuple = unionTuple2; unionTuple2 = unionTuple; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js index e29d4720cbc..9daf108f1cd 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js @@ -40,11 +40,21 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any //When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // With no call signature | callSignatures -var x = function (a) { return a.toString(); }; +var x = function (a) { + return a.toString(); +}; // With call signatures with different return type -var x2 = function (a) { return a.toString(); }; // Like iWithCallSignatures -var x2 = function (a) { return a; }; // Like iWithCallSignatures2 +var x2 = function (a) { + return a.toString(); +}; // Like iWithCallSignatures +var x2 = function (a) { + return a; +}; // Like iWithCallSignatures2 // With call signatures of mismatching parameter type -var x3 = function (a) { return a.toString(); }; +var x3 = function (a) { + return a.toString(); +}; // With call signature count mismatch -var x4 = function (a) { return a.toString(); }; +var x4 = function (a) { + return a.toString(); +}; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js index 2c07f461424..7dfcb683010 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js @@ -65,16 +65,52 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a }; // Let S be the set of types in U that has a string index signature. // If S is not empty, U has a string index signature of a union type of // the types of the string index signatures from each type in S. -var x = { z: function (a) { return a; } }; // a should be number -var x = { foo: function (a) { return a; } }; // a should be any -var x = { foo: "hello" }; -var x2 = { z: function (a) { return a.toString(); } }; // a should be number -var x2 = { z: function (a) { return a; } }; // a should be number +var x = { + z: function (a) { + return a; + } +}; // a should be number +var x = { + foo: function (a) { + return a; + } +}; // a should be any +var x = { + foo: "hello" +}; +var x2 = { + z: function (a) { + return a.toString(); + } +}; // a should be number +var x2 = { + z: function (a) { + return a; + } +}; // a should be number // Let S be the set of types in U that has a numeric index signature. // If S is not empty, U has a numeric index signature of a union type of // the types of the numeric index signatures from each type in S. -var x3 = { 1: function (a) { return a; } }; // a should be number -var x3 = { 0: function (a) { return a; } }; // a should be any -var x3 = { 0: "hello" }; -var x4 = { 1: function (a) { return a.toString(); } }; // a should be number -var x4 = { 1: function (a) { return a; } }; // a should be number +var x3 = { + 1: function (a) { + return a; + } +}; // a should be number +var x3 = { + 0: function (a) { + return a; + } +}; // a should be any +var x3 = { + 0: "hello" +}; +var x4 = { + 1: function (a) { + return a.toString(); + } +}; // a should be number +var x4 = { + 1: function (a) { + return a; + } +}; // a should be number diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js index 10672d86796..7fd30a635a8 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js @@ -128,49 +128,94 @@ var i1Ori2 = i1; var i1Ori2 = i2; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello" }; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI2: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" }; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello", - methodOnlyInI2: function (a) { return a; }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" }; -var arrayI1OrI2 = [i1, i2, { +var arrayI1OrI2 = [ + i1, + i2, + { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello" }, { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI2: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" - }, { + }, + { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello", - methodOnlyInI2: function (a) { return a; }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" - }]; + } +]; var i11; var i21; var i11Ori21 = i11; @@ -191,18 +236,24 @@ var i11Ori21 = { }, commonPropertyDifferentType: 10 }; -var arrayOrI11OrI21 = [i11, i21, i11 || i21, { +var arrayOrI11OrI21 = [ + i11, + i21, + i11 || i21, + { // Like i1 commonMethodDifferentReturnType: function (a, b) { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello" - }, { + }, + { // Like i2 commonMethodDifferentReturnType: function (a, b) { var z = a.charCodeAt(b); return z; }, commonPropertyDifferentType: 10 - }]; + } +]; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js index dc8f07823b6..d58b497a18d 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js @@ -79,7 +79,9 @@ var objStrOrNum3 = { var objStrOrNum4 = { prop: strOrNumber }; -var objStrOrNum5 = { prop: strOrNumber }; +var objStrOrNum5 = { + prop: strOrNumber +}; var objStrOrNum6 = { prop: strOrNumber, anotherP: str @@ -111,5 +113,7 @@ var i11Ori21 = { }; var strOrNumber; var i11Ori21 = { - commonMethodDifferentReturnType: function (a, b) { return strOrNumber; } + commonMethodDifferentReturnType: function (a, b) { + return strOrNumber; + } }; diff --git a/tests/baselines/reference/contextualTyping.js b/tests/baselines/reference/contextualTyping.js index 75b98b16c33..b4c565c5091 100644 --- a/tests/baselines/reference/contextualTyping.js +++ b/tests/baselines/reference/contextualTyping.js @@ -249,24 +249,48 @@ var C2T5; }; })(C2T5 || (C2T5 = {})); // CONTEXT: Variable declaration -var c3t1 = (function (s) { return s; }); +var c3t1 = (function (s) { + return s; +}); var c3t2 = ({ n: 1 }); var c3t3 = []; -var c3t4 = function () { return ({}); }; -var c3t5 = function (n) { return ({}); }; -var c3t6 = function (n, s) { return ({}); }; -var c3t7 = function (n) { return n; }; -var c3t8 = function (n) { return n; }; -var c3t9 = [[], []]; -var c3t10 = [({}), ({})]; -var c3t11 = [function (n, s) { return s; }]; +var c3t4 = function () { + return ({}); +}; +var c3t5 = function (n) { + return ({}); +}; +var c3t6 = function (n, s) { + return ({}); +}; +var c3t7 = function (n) { + return n; +}; +var c3t8 = function (n) { + return n; +}; +var c3t9 = [ + [], + [] +]; +var c3t10 = [ + ({}), + ({}) +]; +var c3t11 = [ + function (n, s) { + return s; + } +]; var c3t12 = { foo: ({}) }; var c3t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); var c3t14 = ({ a: [] @@ -290,41 +314,74 @@ var C5T5; })(C5T5 || (C5T5 = {})); // CONTEXT: Variable assignment var c6t5; -c6t5 = function (n) { return ({}); }; +c6t5 = function (n) { + return ({}); +}; // CONTEXT: Array index assignment var c7t2; -c7t2[0] = ({ n: 1 }); +c7t2[0] = ({ + n: 1 +}); var objc8 = ({}); -objc8.t1 = (function (s) { return s; }); +objc8.t1 = (function (s) { + return s; +}); objc8.t2 = ({ n: 1 }); objc8.t3 = []; -objc8.t4 = function () { return ({}); }; -objc8.t5 = function (n) { return ({}); }; -objc8.t6 = function (n, s) { return ({}); }; -objc8.t7 = function (n) { return n; }; -objc8.t8 = function (n) { return n; }; -objc8.t9 = [[], []]; -objc8.t10 = [({}), ({})]; -objc8.t11 = [function (n, s) { return s; }]; +objc8.t4 = function () { + return ({}); +}; +objc8.t5 = function (n) { + return ({}); +}; +objc8.t6 = function (n, s) { + return ({}); +}; +objc8.t7 = function (n) { + return n; +}; +objc8.t8 = function (n) { + return n; +}; +objc8.t9 = [ + [], + [] +]; +objc8.t10 = [ + ({}), + ({}) +]; +objc8.t11 = [ + function (n, s) { + return s; + } +]; objc8.t12 = { foo: ({}) }; objc8.t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); objc8.t14 = ({ a: [] }); // CONTEXT: Function call -function c9t5(f) { } +function c9t5(f) { +} ; c9t5(function (n) { return ({}); }); // CONTEXT: Return statement -var c10t5 = function () { return function (n) { return ({}); }; }; +var c10t5 = function () { + return function (n) { + return ({}); + }; +}; // CONTEXT: Newing a class var C11t5 = (function () { function C11t5(f) { @@ -332,31 +389,59 @@ var C11t5 = (function () { return C11t5; })(); ; -var i = new C11t5(function (n) { return ({}); }); +var i = new C11t5(function (n) { + return ({}); +}); // CONTEXT: Type annotated expression -var c12t1 = (function (s) { return s; }); +var c12t1 = (function (s) { + return s; +}); var c12t2 = ({ n: 1 }); var c12t3 = []; -var c12t4 = function () { return ({}); }; -var c12t5 = function (n) { return ({}); }; -var c12t6 = function (n, s) { return ({}); }; -var c12t7 = function (n) { return n; }; -var c12t8 = function (n) { return n; }; -var c12t9 = [[], []]; -var c12t10 = [({}), ({})]; -var c12t11 = [function (n, s) { return s; }]; +var c12t4 = function () { + return ({}); +}; +var c12t5 = function (n) { + return ({}); +}; +var c12t6 = function (n, s) { + return ({}); +}; +var c12t7 = function (n) { + return n; +}; +var c12t8 = function (n) { + return n; +}; +var c12t9 = [ + [], + [] +]; +var c12t10 = [ + ({}), + ({}) +]; +var c12t11 = [ + function (n, s) { + return s; + } +]; var c12t12 = { foo: ({}) }; var c12t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); var c12t14 = ({ a: [] }); -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} var efv = EF1(1, 2); function Point(x, y) { this.x = x; diff --git a/tests/baselines/reference/contextualTyping.js.map b/tests/baselines/reference/contextualTyping.js.map index df52fd930cb..0b38517f9cc 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":"AAaA,AADA,sCAAsC;IAChC,IAAI;IAAVA,SAAMA,IAAIA;QACNC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,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;AAGD,AADA,gCAAgC;IAC5B,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;AAGF,AADA,qCAAqC;IAC/B,IAAI;IAENC,SAFEA,IAAIA;QAGFC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,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;AAEF,AADA,yBAAyB;SAChB,IAAI,CAAC,CAAsB,IAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B,cAAa,MAAM,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;IACpB,KAAK;IAAGC,SAARA,KAAKA,CAAeA,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;AAGrD,AADA,qCAAqC;IACjC,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,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA,CAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,SAAS,KAAK,CAAC,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":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","c9t5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAaA,AADA,sCAAsC;;IACtCA;QACIC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,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;AAGD,AADA,gCAAgC;IAC5B,IAAI,GAA0B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,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;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,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;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAGF,AADA,qCAAqC;;IAGjCC;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;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC;IAAC,CAAC,EAAE,CAAC;CAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,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;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,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;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,AADA,yBAAyB;cACX,CAAsB;AAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B;IAAa,MAAM,CAAC,UAAS,CAAC;QAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;IAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;;IACZC,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;AAAC,CAAC,CAAC,CAAC;AAGrD,AADA,qCAAqC;IACjC,KAAK,GAA2B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,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;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AACjC,IAAI,MAAM,GAAY;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,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;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,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;AAACA,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 diff --git a/tests/baselines/reference/contextualTyping.sourcemap.txt b/tests/baselines/reference/contextualTyping.sourcemap.txt index 45b93e3ce97..225aa3285ff 100644 --- a/tests/baselines/reference/contextualTyping.sourcemap.txt +++ b/tests/baselines/reference/contextualTyping.sourcemap.txt @@ -33,26 +33,12 @@ sourceFile:contextualTyping.ts 3 >Emitted(1, 39) Source(13, 39) + SourceIndex(0) --- >>>var C1T5 = (function () { -1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > C1T5 -1 >Emitted(2, 5) Source(14, 7) + SourceIndex(0) -2 >Emitted(2, 9) Source(14, 11) + SourceIndex(0) ---- >>> function C1T5() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^ -4 > ^^^^^^^^^^^^^^^^^-> -1-> -2 > class -3 > C1T5 -1->Emitted(3, 5) Source(14, 1) + SourceIndex(0) name (C1T5) -2 >Emitted(3, 14) Source(14, 7) + SourceIndex(0) name (C1T5) -3 >Emitted(3, 18) Source(14, 11) + SourceIndex(0) name (C1T5) +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 5) Source(14, 1) + SourceIndex(0) name (C1T5) --- >>> this.foo = function (i) { 1->^^^^^^^^ @@ -60,7 +46,7 @@ sourceFile:contextualTyping.ts 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^ -1-> { +1->class C1T5 { > 2 > foo 3 > : (i: number, s: string) => number = @@ -273,7 +259,6 @@ sourceFile:contextualTyping.ts 1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^-> 1-> > >// CONTEXT: Variable declaration @@ -284,71 +269,76 @@ sourceFile:contextualTyping.ts 2 >Emitted(17, 1) Source(27, 1) + SourceIndex(0) 3 >Emitted(17, 33) Source(27, 33) + SourceIndex(0) --- ->>>var c3t1 = (function (s) { return s; }); -1->^^^^ +>>>var c3t1 = (function (s) { +1 >^^^^ 2 > ^^^^ 3 > ^^^ 4 > ^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> +1 > >var 2 > c3t1 3 > : (s: string) => string = 4 > ( 5 > function( 6 > s -7 > ) { -8 > return -9 > -10> s -11> -12> -13> } -14> ) -15> ; -1->Emitted(18, 5) Source(28, 5) + SourceIndex(0) +1 >Emitted(18, 5) Source(28, 5) + SourceIndex(0) 2 >Emitted(18, 9) Source(28, 9) + SourceIndex(0) 3 >Emitted(18, 12) Source(28, 35) + SourceIndex(0) 4 >Emitted(18, 13) Source(28, 36) + SourceIndex(0) 5 >Emitted(18, 23) Source(28, 45) + SourceIndex(0) 6 >Emitted(18, 24) Source(28, 46) + SourceIndex(0) -7 >Emitted(18, 28) Source(28, 50) + SourceIndex(0) -8 >Emitted(18, 34) Source(28, 56) + SourceIndex(0) -9 >Emitted(18, 35) Source(28, 57) + SourceIndex(0) -10>Emitted(18, 36) Source(28, 58) + SourceIndex(0) -11>Emitted(18, 37) Source(28, 58) + SourceIndex(0) -12>Emitted(18, 38) Source(28, 59) + SourceIndex(0) -13>Emitted(18, 39) Source(28, 60) + SourceIndex(0) -14>Emitted(18, 40) Source(28, 61) + SourceIndex(0) -15>Emitted(18, 41) Source(28, 62) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(19, 5) Source(28, 50) + SourceIndex(0) +2 >Emitted(19, 11) Source(28, 56) + SourceIndex(0) +3 >Emitted(19, 12) Source(28, 57) + SourceIndex(0) +4 >Emitted(19, 13) Source(28, 58) + SourceIndex(0) +5 >Emitted(19, 14) Source(28, 58) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(20, 1) Source(28, 59) + SourceIndex(0) +2 >Emitted(20, 2) Source(28, 60) + SourceIndex(0) +3 >Emitted(20, 3) Source(28, 61) + SourceIndex(0) +4 >Emitted(20, 4) Source(28, 62) + SourceIndex(0) --- >>>var c3t2 = ({ -1 > +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^ -1 > +1-> > 2 >var 3 > c3t2 4 > = 5 > ( -1 >Emitted(19, 1) Source(29, 1) + SourceIndex(0) -2 >Emitted(19, 5) Source(29, 5) + SourceIndex(0) -3 >Emitted(19, 9) Source(29, 9) + SourceIndex(0) -4 >Emitted(19, 12) Source(29, 18) + SourceIndex(0) -5 >Emitted(19, 13) Source(29, 19) + SourceIndex(0) +1->Emitted(21, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(21, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(21, 9) Source(29, 9) + SourceIndex(0) +4 >Emitted(21, 12) Source(29, 18) + SourceIndex(0) +5 >Emitted(21, 13) Source(29, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -360,10 +350,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(20, 5) Source(30, 5) + SourceIndex(0) -2 >Emitted(20, 6) Source(30, 6) + SourceIndex(0) -3 >Emitted(20, 8) Source(30, 8) + SourceIndex(0) -4 >Emitted(20, 9) Source(30, 9) + SourceIndex(0) +1 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) +3 >Emitted(22, 8) Source(30, 8) + SourceIndex(0) +4 >Emitted(22, 9) Source(30, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -374,9 +364,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(21, 2) Source(31, 2) + SourceIndex(0) -2 >Emitted(21, 3) Source(31, 3) + SourceIndex(0) -3 >Emitted(21, 4) Source(31, 3) + SourceIndex(0) +1 >Emitted(23, 2) Source(31, 2) + SourceIndex(0) +2 >Emitted(23, 3) Source(31, 3) + SourceIndex(0) +3 >Emitted(23, 4) Source(31, 3) + SourceIndex(0) --- >>>var c3t3 = []; 1-> @@ -385,7 +375,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^-> 1-> > 2 >var @@ -393,77 +383,71 @@ sourceFile:contextualTyping.ts 4 > : number[] = 5 > [] 6 > ; -1->Emitted(22, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(22, 5) Source(32, 5) + SourceIndex(0) -3 >Emitted(22, 9) Source(32, 9) + SourceIndex(0) -4 >Emitted(22, 12) Source(32, 22) + SourceIndex(0) -5 >Emitted(22, 14) Source(32, 24) + SourceIndex(0) -6 >Emitted(22, 15) Source(32, 25) + SourceIndex(0) +1->Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(24, 9) Source(32, 9) + SourceIndex(0) +4 >Emitted(24, 12) Source(32, 22) + SourceIndex(0) +5 >Emitted(24, 14) Source(32, 24) + SourceIndex(0) +6 >Emitted(24, 15) Source(32, 25) + SourceIndex(0) --- ->>>var c3t4 = function () { return ({}); }; +>>>var c3t4 = function () { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^^-> +5 > ^^^^^^-> 1-> > 2 >var 3 > c3t4 4 > : () => IFoo = -5 > function() { -6 > return -7 > -8 > ( -9 > {} -10> ) -11> -12> -13> } -14> ; -1->Emitted(23, 1) Source(33, 1) + SourceIndex(0) -2 >Emitted(23, 5) Source(33, 5) + SourceIndex(0) -3 >Emitted(23, 9) Source(33, 9) + SourceIndex(0) -4 >Emitted(23, 12) Source(33, 24) + SourceIndex(0) -5 >Emitted(23, 26) Source(33, 37) + SourceIndex(0) -6 >Emitted(23, 32) Source(33, 43) + SourceIndex(0) -7 >Emitted(23, 33) Source(33, 50) + SourceIndex(0) -8 >Emitted(23, 34) Source(33, 51) + SourceIndex(0) -9 >Emitted(23, 36) Source(33, 53) + SourceIndex(0) -10>Emitted(23, 37) Source(33, 54) + SourceIndex(0) -11>Emitted(23, 38) Source(33, 54) + SourceIndex(0) -12>Emitted(23, 39) Source(33, 55) + SourceIndex(0) -13>Emitted(23, 40) Source(33, 56) + SourceIndex(0) -14>Emitted(23, 41) Source(33, 57) + SourceIndex(0) +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(25, 9) Source(33, 9) + SourceIndex(0) +4 >Emitted(25, 12) Source(33, 24) + SourceIndex(0) --- ->>>var c3t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(26, 5) Source(33, 37) + SourceIndex(0) +2 >Emitted(26, 11) Source(33, 43) + SourceIndex(0) +3 >Emitted(26, 12) Source(33, 50) + SourceIndex(0) +4 >Emitted(26, 13) Source(33, 51) + SourceIndex(0) +5 >Emitted(26, 15) Source(33, 53) + SourceIndex(0) +6 >Emitted(26, 16) Source(33, 54) + SourceIndex(0) +7 >Emitted(26, 17) Source(33, 54) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(27, 1) Source(33, 55) + SourceIndex(0) +2 >Emitted(27, 2) Source(33, 56) + SourceIndex(0) +3 >Emitted(27, 3) Source(33, 57) + SourceIndex(0) +--- +>>>var c3t5 = function (n) { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^^^^-> 1-> > 2 >var @@ -471,34 +455,49 @@ sourceFile:contextualTyping.ts 4 > : (n: number) => IFoo = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> ( -11> {} -12> ) -13> -14> -15> } -16> ; -1->Emitted(24, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(24, 5) Source(34, 5) + SourceIndex(0) -3 >Emitted(24, 9) Source(34, 9) + SourceIndex(0) -4 >Emitted(24, 12) Source(34, 33) + SourceIndex(0) -5 >Emitted(24, 22) Source(34, 42) + SourceIndex(0) -6 >Emitted(24, 23) Source(34, 43) + SourceIndex(0) -7 >Emitted(24, 27) Source(34, 47) + SourceIndex(0) -8 >Emitted(24, 33) Source(34, 53) + SourceIndex(0) -9 >Emitted(24, 34) Source(34, 60) + SourceIndex(0) -10>Emitted(24, 35) Source(34, 61) + SourceIndex(0) -11>Emitted(24, 37) Source(34, 63) + SourceIndex(0) -12>Emitted(24, 38) Source(34, 64) + SourceIndex(0) -13>Emitted(24, 39) Source(34, 64) + SourceIndex(0) -14>Emitted(24, 40) Source(34, 65) + SourceIndex(0) -15>Emitted(24, 41) Source(34, 66) + SourceIndex(0) -16>Emitted(24, 42) Source(34, 67) + SourceIndex(0) +1->Emitted(28, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(28, 5) Source(34, 5) + SourceIndex(0) +3 >Emitted(28, 9) Source(34, 9) + SourceIndex(0) +4 >Emitted(28, 12) Source(34, 33) + SourceIndex(0) +5 >Emitted(28, 22) Source(34, 42) + SourceIndex(0) +6 >Emitted(28, 23) Source(34, 43) + SourceIndex(0) --- ->>>var c3t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(29, 5) Source(34, 47) + SourceIndex(0) +2 >Emitted(29, 11) Source(34, 53) + SourceIndex(0) +3 >Emitted(29, 12) Source(34, 60) + SourceIndex(0) +4 >Emitted(29, 13) Source(34, 61) + SourceIndex(0) +5 >Emitted(29, 15) Source(34, 63) + SourceIndex(0) +6 >Emitted(29, 16) Source(34, 64) + SourceIndex(0) +7 >Emitted(29, 17) Source(34, 64) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(30, 1) Source(34, 65) + SourceIndex(0) +2 >Emitted(30, 2) Source(34, 66) + SourceIndex(0) +3 >Emitted(30, 3) Source(34, 67) + SourceIndex(0) +--- +>>>var c3t6 = function (n, s) { 1-> 2 >^^^^ 3 > ^^^^ @@ -507,16 +506,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ 1-> > 2 >var @@ -526,52 +515,58 @@ sourceFile:contextualTyping.ts 6 > n 7 > , 8 > s -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> ; -1->Emitted(25, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(25, 5) Source(35, 5) + SourceIndex(0) -3 >Emitted(25, 9) Source(35, 9) + SourceIndex(0) -4 >Emitted(25, 12) Source(35, 44) + SourceIndex(0) -5 >Emitted(25, 22) Source(35, 53) + SourceIndex(0) -6 >Emitted(25, 23) Source(35, 54) + SourceIndex(0) -7 >Emitted(25, 25) Source(35, 56) + SourceIndex(0) -8 >Emitted(25, 26) Source(35, 57) + SourceIndex(0) -9 >Emitted(25, 30) Source(35, 61) + SourceIndex(0) -10>Emitted(25, 36) Source(35, 67) + SourceIndex(0) -11>Emitted(25, 37) Source(35, 74) + SourceIndex(0) -12>Emitted(25, 38) Source(35, 75) + SourceIndex(0) -13>Emitted(25, 40) Source(35, 77) + SourceIndex(0) -14>Emitted(25, 41) Source(35, 78) + SourceIndex(0) -15>Emitted(25, 42) Source(35, 78) + SourceIndex(0) -16>Emitted(25, 43) Source(35, 79) + SourceIndex(0) -17>Emitted(25, 44) Source(35, 80) + SourceIndex(0) -18>Emitted(25, 45) Source(35, 81) + SourceIndex(0) +1->Emitted(31, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(31, 5) Source(35, 5) + SourceIndex(0) +3 >Emitted(31, 9) Source(35, 9) + SourceIndex(0) +4 >Emitted(31, 12) Source(35, 44) + SourceIndex(0) +5 >Emitted(31, 22) Source(35, 53) + SourceIndex(0) +6 >Emitted(31, 23) Source(35, 54) + SourceIndex(0) +7 >Emitted(31, 25) Source(35, 56) + SourceIndex(0) +8 >Emitted(31, 26) Source(35, 57) + SourceIndex(0) --- ->>>var c3t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(32, 5) Source(35, 61) + SourceIndex(0) +2 >Emitted(32, 11) Source(35, 67) + SourceIndex(0) +3 >Emitted(32, 12) Source(35, 74) + SourceIndex(0) +4 >Emitted(32, 13) Source(35, 75) + SourceIndex(0) +5 >Emitted(32, 15) Source(35, 77) + SourceIndex(0) +6 >Emitted(32, 16) Source(35, 78) + SourceIndex(0) +7 >Emitted(32, 17) Source(35, 78) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(33, 1) Source(35, 79) + SourceIndex(0) +2 >Emitted(33, 2) Source(35, 80) + SourceIndex(0) +3 >Emitted(33, 3) Source(35, 81) + SourceIndex(0) +--- +>>>var c3t7 = function (n) { +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^-> -1 > +1-> > 2 >var 3 > c3t7 @@ -581,44 +576,49 @@ sourceFile:contextualTyping.ts > } = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1 >Emitted(26, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(26, 5) Source(36, 5) + SourceIndex(0) -3 >Emitted(26, 9) Source(36, 9) + SourceIndex(0) -4 >Emitted(26, 12) Source(39, 5) + SourceIndex(0) -5 >Emitted(26, 22) Source(39, 14) + SourceIndex(0) -6 >Emitted(26, 23) Source(39, 15) + SourceIndex(0) -7 >Emitted(26, 27) Source(39, 19) + SourceIndex(0) -8 >Emitted(26, 33) Source(39, 25) + SourceIndex(0) -9 >Emitted(26, 34) Source(39, 26) + SourceIndex(0) -10>Emitted(26, 35) Source(39, 27) + SourceIndex(0) -11>Emitted(26, 36) Source(39, 28) + SourceIndex(0) -12>Emitted(26, 37) Source(39, 29) + SourceIndex(0) -13>Emitted(26, 38) Source(39, 30) + SourceIndex(0) -14>Emitted(26, 39) Source(39, 31) + SourceIndex(0) +1->Emitted(34, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(34, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(34, 9) Source(36, 9) + SourceIndex(0) +4 >Emitted(34, 12) Source(39, 5) + SourceIndex(0) +5 >Emitted(34, 22) Source(39, 14) + SourceIndex(0) +6 >Emitted(34, 23) Source(39, 15) + SourceIndex(0) --- ->>>var c3t8 = function (n) { return n; }; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(35, 5) Source(39, 19) + SourceIndex(0) +2 >Emitted(35, 11) Source(39, 25) + SourceIndex(0) +3 >Emitted(35, 12) Source(39, 26) + SourceIndex(0) +4 >Emitted(35, 13) Source(39, 27) + SourceIndex(0) +5 >Emitted(35, 14) Source(39, 28) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(36, 1) Source(39, 29) + SourceIndex(0) +2 >Emitted(36, 2) Source(39, 30) + SourceIndex(0) +3 >Emitted(36, 3) Source(39, 31) + SourceIndex(0) +--- +>>>var c3t8 = function (n) { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1-> > > @@ -627,181 +627,218 @@ sourceFile:contextualTyping.ts 4 > : (n: number, s: string) => number = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1->Emitted(27, 1) Source(41, 1) + SourceIndex(0) -2 >Emitted(27, 5) Source(41, 5) + SourceIndex(0) -3 >Emitted(27, 9) Source(41, 9) + SourceIndex(0) -4 >Emitted(27, 12) Source(41, 46) + SourceIndex(0) -5 >Emitted(27, 22) Source(41, 55) + SourceIndex(0) -6 >Emitted(27, 23) Source(41, 56) + SourceIndex(0) -7 >Emitted(27, 27) Source(41, 60) + SourceIndex(0) -8 >Emitted(27, 33) Source(41, 66) + SourceIndex(0) -9 >Emitted(27, 34) Source(41, 67) + SourceIndex(0) -10>Emitted(27, 35) Source(41, 68) + SourceIndex(0) -11>Emitted(27, 36) Source(41, 69) + SourceIndex(0) -12>Emitted(27, 37) Source(41, 70) + SourceIndex(0) -13>Emitted(27, 38) Source(41, 71) + SourceIndex(0) -14>Emitted(27, 39) Source(41, 72) + SourceIndex(0) +1->Emitted(37, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(37, 5) Source(41, 5) + SourceIndex(0) +3 >Emitted(37, 9) Source(41, 9) + SourceIndex(0) +4 >Emitted(37, 12) Source(41, 46) + SourceIndex(0) +5 >Emitted(37, 22) Source(41, 55) + SourceIndex(0) +6 >Emitted(37, 23) Source(41, 56) + SourceIndex(0) --- ->>>var c3t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(38, 5) Source(41, 60) + SourceIndex(0) +2 >Emitted(38, 11) Source(41, 66) + SourceIndex(0) +3 >Emitted(38, 12) Source(41, 67) + SourceIndex(0) +4 >Emitted(38, 13) Source(41, 68) + SourceIndex(0) +5 >Emitted(38, 14) Source(41, 69) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(39, 1) Source(41, 70) + SourceIndex(0) +2 >Emitted(39, 2) Source(41, 71) + SourceIndex(0) +3 >Emitted(39, 3) Source(41, 72) + SourceIndex(0) +--- +>>>var c3t9 = [ +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ -5 > ^ -6 > ^^ -7 > ^^ -8 > ^^ -9 > ^ -10> ^ -11> ^^^^^^-> -1 > +1-> > 2 >var 3 > c3t9 4 > : number[][] = -5 > [ -6 > [] -7 > , -8 > [] -9 > ] -10> ; -1 >Emitted(28, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) -3 >Emitted(28, 9) Source(42, 9) + SourceIndex(0) -4 >Emitted(28, 12) Source(42, 24) + SourceIndex(0) -5 >Emitted(28, 13) Source(42, 25) + SourceIndex(0) -6 >Emitted(28, 15) Source(42, 27) + SourceIndex(0) -7 >Emitted(28, 17) Source(42, 28) + SourceIndex(0) -8 >Emitted(28, 19) Source(42, 30) + SourceIndex(0) -9 >Emitted(28, 20) Source(42, 31) + SourceIndex(0) -10>Emitted(28, 21) Source(42, 32) + SourceIndex(0) +1->Emitted(40, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(40, 5) Source(42, 5) + SourceIndex(0) +3 >Emitted(40, 9) Source(42, 9) + SourceIndex(0) +4 >Emitted(40, 12) Source(42, 24) + SourceIndex(0) --- ->>>var c3t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(41, 5) Source(42, 25) + SourceIndex(0) +2 >Emitted(41, 7) Source(42, 27) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(42, 5) Source(42, 28) + SourceIndex(0) +2 >Emitted(42, 7) Source(42, 30) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(43, 2) Source(42, 31) + SourceIndex(0) +2 >Emitted(43, 3) Source(42, 32) + SourceIndex(0) +--- +>>>var c3t10 = [ 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >var 3 > c3t10 4 > : IFoo[] = -5 > [ -6 > ( -7 > {} -8 > ) -9 > , -10> ( -11> {} -12> ) -13> ] -14> ; -1->Emitted(29, 1) Source(43, 1) + SourceIndex(0) -2 >Emitted(29, 5) Source(43, 5) + SourceIndex(0) -3 >Emitted(29, 10) Source(43, 10) + SourceIndex(0) -4 >Emitted(29, 13) Source(43, 21) + SourceIndex(0) -5 >Emitted(29, 14) Source(43, 28) + SourceIndex(0) -6 >Emitted(29, 15) Source(43, 29) + SourceIndex(0) -7 >Emitted(29, 17) Source(43, 31) + SourceIndex(0) -8 >Emitted(29, 18) Source(43, 32) + SourceIndex(0) -9 >Emitted(29, 20) Source(43, 39) + SourceIndex(0) -10>Emitted(29, 21) Source(43, 40) + SourceIndex(0) -11>Emitted(29, 23) Source(43, 42) + SourceIndex(0) -12>Emitted(29, 24) Source(43, 43) + SourceIndex(0) -13>Emitted(29, 25) Source(43, 44) + SourceIndex(0) -14>Emitted(29, 26) Source(43, 45) + SourceIndex(0) +1->Emitted(44, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(44, 5) Source(43, 5) + SourceIndex(0) +3 >Emitted(44, 10) Source(43, 10) + SourceIndex(0) +4 >Emitted(44, 13) Source(43, 21) + SourceIndex(0) --- ->>>var c3t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(45, 5) Source(43, 28) + SourceIndex(0) +2 >Emitted(45, 6) Source(43, 29) + SourceIndex(0) +3 >Emitted(45, 8) Source(43, 31) + SourceIndex(0) +4 >Emitted(45, 9) Source(43, 32) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(46, 5) Source(43, 39) + SourceIndex(0) +2 >Emitted(46, 6) Source(43, 40) + SourceIndex(0) +3 >Emitted(46, 8) Source(43, 42) + SourceIndex(0) +4 >Emitted(46, 9) Source(43, 43) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(47, 2) Source(43, 44) + SourceIndex(0) +2 >Emitted(47, 3) Source(43, 45) + SourceIndex(0) +--- +>>>var c3t11 = [ 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ +5 > ^^^^^^^^^^-> 1-> > 2 >var 3 > c3t11 4 > : {(n: number, s: string): string;}[] = -5 > [ -6 > function( -7 > n -8 > , -9 > s -10> ) { -11> return -12> -13> s -14> ; -15> -16> } -17> ] -18> ; -1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) -3 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) -4 >Emitted(30, 13) Source(44, 50) + SourceIndex(0) -5 >Emitted(30, 14) Source(44, 51) + SourceIndex(0) -6 >Emitted(30, 24) Source(44, 60) + SourceIndex(0) -7 >Emitted(30, 25) Source(44, 61) + SourceIndex(0) -8 >Emitted(30, 27) Source(44, 63) + SourceIndex(0) -9 >Emitted(30, 28) Source(44, 64) + SourceIndex(0) -10>Emitted(30, 32) Source(44, 68) + SourceIndex(0) -11>Emitted(30, 38) Source(44, 74) + SourceIndex(0) -12>Emitted(30, 39) Source(44, 75) + SourceIndex(0) -13>Emitted(30, 40) Source(44, 76) + SourceIndex(0) -14>Emitted(30, 41) Source(44, 77) + SourceIndex(0) -15>Emitted(30, 42) Source(44, 78) + SourceIndex(0) -16>Emitted(30, 43) Source(44, 79) + SourceIndex(0) -17>Emitted(30, 44) Source(44, 80) + SourceIndex(0) -18>Emitted(30, 45) Source(44, 81) + SourceIndex(0) +1->Emitted(48, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(48, 5) Source(44, 5) + SourceIndex(0) +3 >Emitted(48, 10) Source(44, 10) + SourceIndex(0) +4 >Emitted(48, 13) Source(44, 50) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(49, 5) Source(44, 51) + SourceIndex(0) +2 >Emitted(49, 15) Source(44, 60) + SourceIndex(0) +3 >Emitted(49, 16) Source(44, 61) + SourceIndex(0) +4 >Emitted(49, 18) Source(44, 63) + SourceIndex(0) +5 >Emitted(49, 19) Source(44, 64) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(50, 9) Source(44, 68) + SourceIndex(0) +2 >Emitted(50, 15) Source(44, 74) + SourceIndex(0) +3 >Emitted(50, 16) Source(44, 75) + SourceIndex(0) +4 >Emitted(50, 17) Source(44, 76) + SourceIndex(0) +5 >Emitted(50, 18) Source(44, 77) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(51, 5) Source(44, 78) + SourceIndex(0) +2 >Emitted(51, 6) Source(44, 79) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(52, 2) Source(44, 80) + SourceIndex(0) +2 >Emitted(52, 3) Source(44, 81) + SourceIndex(0) --- >>>var c3t12 = { -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^-> -1 > +1-> > 2 >var 3 > c3t12 4 > : IBar = -1 >Emitted(31, 1) Source(45, 1) + SourceIndex(0) -2 >Emitted(31, 5) Source(45, 5) + SourceIndex(0) -3 >Emitted(31, 10) Source(45, 10) + SourceIndex(0) -4 >Emitted(31, 13) Source(45, 19) + SourceIndex(0) +1->Emitted(53, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(53, 5) Source(45, 5) + SourceIndex(0) +3 >Emitted(53, 10) Source(45, 10) + SourceIndex(0) +4 >Emitted(53, 13) Source(45, 19) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -817,12 +854,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(32, 5) Source(46, 5) + SourceIndex(0) -2 >Emitted(32, 8) Source(46, 8) + SourceIndex(0) -3 >Emitted(32, 10) Source(46, 16) + SourceIndex(0) -4 >Emitted(32, 11) Source(46, 17) + SourceIndex(0) -5 >Emitted(32, 13) Source(46, 19) + SourceIndex(0) -6 >Emitted(32, 14) Source(46, 20) + SourceIndex(0) +1->Emitted(54, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(54, 8) Source(46, 8) + SourceIndex(0) +3 >Emitted(54, 10) Source(46, 16) + SourceIndex(0) +4 >Emitted(54, 11) Source(46, 17) + SourceIndex(0) +5 >Emitted(54, 13) Source(46, 19) + SourceIndex(0) +6 >Emitted(54, 14) Source(46, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -831,8 +868,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(33, 2) Source(47, 2) + SourceIndex(0) -2 >Emitted(33, 3) Source(47, 2) + SourceIndex(0) +1 >Emitted(55, 2) Source(47, 2) + SourceIndex(0) +2 >Emitted(55, 3) Source(47, 2) + SourceIndex(0) --- >>>var c3t13 = ({ 1-> @@ -840,20 +877,20 @@ sourceFile:contextualTyping.ts 3 > ^^^^^ 4 > ^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^-> 1-> > 2 >var 3 > c3t13 4 > = 5 > ( -1->Emitted(34, 1) Source(48, 1) + SourceIndex(0) -2 >Emitted(34, 5) Source(48, 5) + SourceIndex(0) -3 >Emitted(34, 10) Source(48, 10) + SourceIndex(0) -4 >Emitted(34, 13) Source(48, 19) + SourceIndex(0) -5 >Emitted(34, 14) Source(48, 20) + SourceIndex(0) +1->Emitted(56, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(56, 5) Source(48, 5) + SourceIndex(0) +3 >Emitted(56, 10) Source(48, 10) + SourceIndex(0) +4 >Emitted(56, 13) Source(48, 19) + SourceIndex(0) +5 >Emitted(56, 14) Source(48, 20) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -861,13 +898,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -876,27 +906,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(35, 5) Source(49, 5) + SourceIndex(0) -2 >Emitted(35, 6) Source(49, 6) + SourceIndex(0) -3 >Emitted(35, 8) Source(49, 8) + SourceIndex(0) -4 >Emitted(35, 18) Source(49, 17) + SourceIndex(0) -5 >Emitted(35, 19) Source(49, 18) + SourceIndex(0) -6 >Emitted(35, 21) Source(49, 20) + SourceIndex(0) -7 >Emitted(35, 22) Source(49, 21) + SourceIndex(0) -8 >Emitted(35, 26) Source(49, 25) + SourceIndex(0) -9 >Emitted(35, 32) Source(49, 31) + SourceIndex(0) -10>Emitted(35, 33) Source(49, 32) + SourceIndex(0) -11>Emitted(35, 34) Source(49, 33) + SourceIndex(0) -12>Emitted(35, 35) Source(49, 34) + SourceIndex(0) -13>Emitted(35, 36) Source(49, 35) + SourceIndex(0) -14>Emitted(35, 37) Source(49, 36) + SourceIndex(0) +1->Emitted(57, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(57, 6) Source(49, 6) + SourceIndex(0) +3 >Emitted(57, 8) Source(49, 8) + SourceIndex(0) +4 >Emitted(57, 18) Source(49, 17) + SourceIndex(0) +5 >Emitted(57, 19) Source(49, 18) + SourceIndex(0) +6 >Emitted(57, 21) Source(49, 20) + SourceIndex(0) +7 >Emitted(57, 22) Source(49, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(58, 9) Source(49, 25) + SourceIndex(0) +2 >Emitted(58, 15) Source(49, 31) + SourceIndex(0) +3 >Emitted(58, 16) Source(49, 32) + SourceIndex(0) +4 >Emitted(58, 17) Source(49, 33) + SourceIndex(0) +5 >Emitted(58, 18) Source(49, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(59, 5) Source(49, 35) + SourceIndex(0) +2 >Emitted(59, 6) Source(49, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -907,9 +948,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(36, 2) Source(50, 2) + SourceIndex(0) -2 >Emitted(36, 3) Source(50, 3) + SourceIndex(0) -3 >Emitted(36, 4) Source(50, 3) + SourceIndex(0) +1 >Emitted(60, 2) Source(50, 2) + SourceIndex(0) +2 >Emitted(60, 3) Source(50, 3) + SourceIndex(0) +3 >Emitted(60, 4) Source(50, 3) + SourceIndex(0) --- >>>var c3t14 = ({ 1-> @@ -923,11 +964,11 @@ sourceFile:contextualTyping.ts 3 > c3t14 4 > = 5 > ( -1->Emitted(37, 1) Source(51, 1) + SourceIndex(0) -2 >Emitted(37, 5) Source(51, 5) + SourceIndex(0) -3 >Emitted(37, 10) Source(51, 10) + SourceIndex(0) -4 >Emitted(37, 13) Source(51, 19) + SourceIndex(0) -5 >Emitted(37, 14) Source(51, 20) + SourceIndex(0) +1->Emitted(61, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(61, 5) Source(51, 5) + SourceIndex(0) +3 >Emitted(61, 10) Source(51, 10) + SourceIndex(0) +4 >Emitted(61, 13) Source(51, 19) + SourceIndex(0) +5 >Emitted(61, 14) Source(51, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -939,10 +980,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(38, 5) Source(52, 5) + SourceIndex(0) -2 >Emitted(38, 6) Source(52, 6) + SourceIndex(0) -3 >Emitted(38, 8) Source(52, 8) + SourceIndex(0) -4 >Emitted(38, 10) Source(52, 10) + SourceIndex(0) +1 >Emitted(62, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(62, 6) Source(52, 6) + SourceIndex(0) +3 >Emitted(62, 8) Source(52, 8) + SourceIndex(0) +4 >Emitted(62, 10) Source(52, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -953,9 +994,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(39, 2) Source(53, 2) + SourceIndex(0) -2 >Emitted(39, 3) Source(53, 3) + SourceIndex(0) -3 >Emitted(39, 4) Source(53, 3) + SourceIndex(0) +1 >Emitted(63, 2) Source(53, 2) + SourceIndex(0) +2 >Emitted(63, 3) Source(53, 3) + SourceIndex(0) +3 >Emitted(63, 4) Source(53, 3) + SourceIndex(0) --- >>>// CONTEXT: Class property assignment 1-> @@ -967,33 +1008,19 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Class property assignment -1->Emitted(40, 1) Source(56, 1) + SourceIndex(0) -2 >Emitted(40, 1) Source(55, 1) + SourceIndex(0) -3 >Emitted(40, 38) Source(55, 38) + SourceIndex(0) +1->Emitted(64, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(64, 1) Source(55, 1) + SourceIndex(0) +3 >Emitted(64, 38) Source(55, 38) + SourceIndex(0) --- >>>var C4T5 = (function () { -1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > C4T5 -1 >Emitted(41, 5) Source(56, 7) + SourceIndex(0) -2 >Emitted(41, 9) Source(56, 11) + SourceIndex(0) ---- >>> function C4T5() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^-> -1-> { +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >class C4T5 { > foo: (i: number, s: string) => string; > -2 > -3 > C4T5 -1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) name (C4T5) -2 >Emitted(42, 14) Source(56, 7) + SourceIndex(0) name (C4T5) -3 >Emitted(42, 18) Source(56, 11) + SourceIndex(0) name (C4T5) +1 >Emitted(66, 5) Source(58, 5) + SourceIndex(0) name (C4T5) --- >>> this.foo = function (i, s) { 1->^^^^^^^^ @@ -1005,9 +1032,7 @@ sourceFile:contextualTyping.ts 7 > ^ 8 > ^^ 9 > ^ -1-> { - > foo: (i: number, s: string) => string; - > constructor() { +1->constructor() { > 2 > this 3 > . @@ -1017,15 +1042,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(67, 9) Source(59, 9) + SourceIndex(0) name (C4T5.constructor) +2 >Emitted(67, 13) Source(59, 13) + SourceIndex(0) name (C4T5.constructor) +3 >Emitted(67, 14) Source(59, 14) + SourceIndex(0) name (C4T5.constructor) +4 >Emitted(67, 17) Source(59, 17) + SourceIndex(0) name (C4T5.constructor) +5 >Emitted(67, 20) Source(59, 20) + SourceIndex(0) name (C4T5.constructor) +6 >Emitted(67, 30) Source(59, 29) + SourceIndex(0) name (C4T5.constructor) +7 >Emitted(67, 31) Source(59, 30) + SourceIndex(0) name (C4T5.constructor) +8 >Emitted(67, 33) Source(59, 32) + SourceIndex(0) name (C4T5.constructor) +9 >Emitted(67, 34) Source(59, 33) + SourceIndex(0) name (C4T5.constructor) --- >>> return s; 1 >^^^^^^^^^^^^ @@ -1039,11 +1064,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(44, 13) Source(60, 13) + SourceIndex(0) -2 >Emitted(44, 19) Source(60, 19) + SourceIndex(0) -3 >Emitted(44, 20) Source(60, 20) + SourceIndex(0) -4 >Emitted(44, 21) Source(60, 21) + SourceIndex(0) -5 >Emitted(44, 22) Source(60, 22) + SourceIndex(0) +1 >Emitted(68, 13) Source(60, 13) + SourceIndex(0) +2 >Emitted(68, 19) Source(60, 19) + SourceIndex(0) +3 >Emitted(68, 20) Source(60, 20) + SourceIndex(0) +4 >Emitted(68, 21) Source(60, 21) + SourceIndex(0) +5 >Emitted(68, 22) Source(60, 22) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^ @@ -1053,9 +1078,9 @@ sourceFile:contextualTyping.ts > 2 > } 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) +1 >Emitted(69, 9) Source(61, 9) + SourceIndex(0) +2 >Emitted(69, 10) Source(61, 10) + SourceIndex(0) +3 >Emitted(69, 11) Source(61, 10) + SourceIndex(0) name (C4T5.constructor) --- >>> } 1 >^^^^ @@ -1064,8 +1089,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(70, 5) Source(62, 5) + SourceIndex(0) name (C4T5.constructor) +2 >Emitted(70, 6) Source(62, 6) + SourceIndex(0) name (C4T5.constructor) --- >>> return C4T5; 1->^^^^ @@ -1073,8 +1098,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(71, 5) Source(63, 1) + SourceIndex(0) name (C4T5) +2 >Emitted(71, 16) Source(63, 2) + SourceIndex(0) name (C4T5) --- >>>})(); 1 > @@ -1093,10 +1118,10 @@ 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) -3 >Emitted(48, 2) Source(56, 1) + SourceIndex(0) -4 >Emitted(48, 6) Source(63, 2) + SourceIndex(0) +1 >Emitted(72, 1) Source(63, 1) + SourceIndex(0) name (C4T5) +2 >Emitted(72, 2) Source(63, 2) + SourceIndex(0) name (C4T5) +3 >Emitted(72, 2) Source(56, 1) + SourceIndex(0) +4 >Emitted(72, 6) Source(63, 2) + SourceIndex(0) --- >>>// CONTEXT: Module property assignment 1-> @@ -1108,9 +1133,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Module property assignment -1->Emitted(49, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(49, 1) Source(65, 1) + SourceIndex(0) -3 >Emitted(49, 39) Source(65, 39) + SourceIndex(0) +1->Emitted(73, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(73, 1) Source(65, 1) + SourceIndex(0) +3 >Emitted(73, 39) Source(65, 39) + SourceIndex(0) --- >>>var C5T5; 1 > @@ -1128,10 +1153,10 @@ sourceFile:contextualTyping.ts > return s; > } > } -1 >Emitted(50, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(50, 5) Source(66, 8) + SourceIndex(0) -3 >Emitted(50, 9) Source(66, 12) + SourceIndex(0) -4 >Emitted(50, 10) Source(71, 2) + SourceIndex(0) +1 >Emitted(74, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(74, 5) Source(66, 8) + SourceIndex(0) +3 >Emitted(74, 9) Source(66, 12) + SourceIndex(0) +4 >Emitted(74, 10) Source(71, 2) + SourceIndex(0) --- >>>(function (C5T5) { 1-> @@ -1144,11 +1169,11 @@ sourceFile:contextualTyping.ts 3 > C5T5 4 > 5 > { -1->Emitted(51, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(51, 12) Source(66, 8) + SourceIndex(0) -3 >Emitted(51, 16) Source(66, 12) + SourceIndex(0) -4 >Emitted(51, 18) Source(66, 13) + SourceIndex(0) -5 >Emitted(51, 19) Source(66, 14) + SourceIndex(0) +1->Emitted(75, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(75, 12) Source(66, 8) + SourceIndex(0) +3 >Emitted(75, 16) Source(66, 12) + SourceIndex(0) +4 >Emitted(75, 18) Source(66, 13) + SourceIndex(0) +5 >Emitted(75, 19) Source(66, 14) + SourceIndex(0) --- >>> C5T5.foo; 1 >^^^^ @@ -1159,9 +1184,9 @@ sourceFile:contextualTyping.ts > export var 2 > foo: (i: number, s: string) => string 3 > ; -1 >Emitted(52, 5) Source(67, 16) + SourceIndex(0) name (C5T5) -2 >Emitted(52, 13) Source(67, 53) + SourceIndex(0) name (C5T5) -3 >Emitted(52, 14) Source(67, 54) + SourceIndex(0) name (C5T5) +1 >Emitted(76, 5) Source(67, 16) + SourceIndex(0) name (C5T5) +2 >Emitted(76, 13) Source(67, 53) + SourceIndex(0) name (C5T5) +3 >Emitted(76, 14) Source(67, 54) + SourceIndex(0) name (C5T5) --- >>> C5T5.foo = function (i, s) { 1->^^^^ @@ -1179,13 +1204,13 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -1->Emitted(53, 5) Source(68, 5) + SourceIndex(0) name (C5T5) -2 >Emitted(53, 13) Source(68, 8) + SourceIndex(0) name (C5T5) -3 >Emitted(53, 16) Source(68, 11) + SourceIndex(0) name (C5T5) -4 >Emitted(53, 26) Source(68, 20) + SourceIndex(0) name (C5T5) -5 >Emitted(53, 27) Source(68, 21) + SourceIndex(0) name (C5T5) -6 >Emitted(53, 29) Source(68, 23) + SourceIndex(0) name (C5T5) -7 >Emitted(53, 30) Source(68, 24) + SourceIndex(0) name (C5T5) +1->Emitted(77, 5) Source(68, 5) + SourceIndex(0) name (C5T5) +2 >Emitted(77, 13) Source(68, 8) + SourceIndex(0) name (C5T5) +3 >Emitted(77, 16) Source(68, 11) + SourceIndex(0) name (C5T5) +4 >Emitted(77, 26) Source(68, 20) + SourceIndex(0) name (C5T5) +5 >Emitted(77, 27) Source(68, 21) + SourceIndex(0) name (C5T5) +6 >Emitted(77, 29) Source(68, 23) + SourceIndex(0) name (C5T5) +7 >Emitted(77, 30) Source(68, 24) + SourceIndex(0) name (C5T5) --- >>> return s; 1 >^^^^^^^^ @@ -1199,11 +1224,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(54, 9) Source(69, 9) + SourceIndex(0) -2 >Emitted(54, 15) Source(69, 15) + SourceIndex(0) -3 >Emitted(54, 16) Source(69, 16) + SourceIndex(0) -4 >Emitted(54, 17) Source(69, 17) + SourceIndex(0) -5 >Emitted(54, 18) Source(69, 18) + SourceIndex(0) +1 >Emitted(78, 9) Source(69, 9) + SourceIndex(0) +2 >Emitted(78, 15) Source(69, 15) + SourceIndex(0) +3 >Emitted(78, 16) Source(69, 16) + SourceIndex(0) +4 >Emitted(78, 17) Source(69, 17) + SourceIndex(0) +5 >Emitted(78, 18) Source(69, 18) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -1214,9 +1239,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(55, 5) Source(70, 5) + SourceIndex(0) -2 >Emitted(55, 6) Source(70, 6) + SourceIndex(0) -3 >Emitted(55, 7) Source(70, 6) + SourceIndex(0) name (C5T5) +1 >Emitted(79, 5) Source(70, 5) + SourceIndex(0) +2 >Emitted(79, 6) Source(70, 6) + SourceIndex(0) +3 >Emitted(79, 7) Source(70, 6) + SourceIndex(0) name (C5T5) --- >>>})(C5T5 || (C5T5 = {})); 1-> @@ -1240,13 +1265,13 @@ sourceFile:contextualTyping.ts > return s; > } > } -1->Emitted(56, 1) Source(71, 1) + SourceIndex(0) name (C5T5) -2 >Emitted(56, 2) Source(71, 2) + SourceIndex(0) name (C5T5) -3 >Emitted(56, 4) Source(66, 8) + SourceIndex(0) -4 >Emitted(56, 8) Source(66, 12) + SourceIndex(0) -5 >Emitted(56, 13) Source(66, 8) + SourceIndex(0) -6 >Emitted(56, 17) Source(66, 12) + SourceIndex(0) -7 >Emitted(56, 25) Source(71, 2) + SourceIndex(0) +1->Emitted(80, 1) Source(71, 1) + SourceIndex(0) name (C5T5) +2 >Emitted(80, 2) Source(71, 2) + SourceIndex(0) name (C5T5) +3 >Emitted(80, 4) Source(66, 8) + SourceIndex(0) +4 >Emitted(80, 8) Source(66, 12) + SourceIndex(0) +5 >Emitted(80, 13) Source(66, 8) + SourceIndex(0) +6 >Emitted(80, 17) Source(66, 12) + SourceIndex(0) +7 >Emitted(80, 25) Source(71, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable assignment 1-> @@ -1258,99 +1283,104 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Variable assignment -1->Emitted(57, 1) Source(74, 1) + SourceIndex(0) -2 >Emitted(57, 1) Source(73, 1) + SourceIndex(0) -3 >Emitted(57, 32) Source(73, 32) + SourceIndex(0) +1->Emitted(81, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(81, 1) Source(73, 1) + SourceIndex(0) +3 >Emitted(81, 32) Source(73, 32) + SourceIndex(0) --- >>>var c6t5; 1 >^^^^ 2 > ^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >var -2 > c6t5: (n: number) => IFoo -3 > ; -1 >Emitted(58, 5) Source(74, 5) + SourceIndex(0) -2 >Emitted(58, 9) Source(74, 30) + SourceIndex(0) -3 >Emitted(58, 10) Source(74, 31) + SourceIndex(0) ---- ->>>c6t5 = function (n) { return ({}); }; -1-> -2 >^^^^ -3 > ^^^ -4 > ^^^^^^^^^^ -5 > ^ -6 > ^^^^ -7 > ^^^^^^ -8 > ^ -9 > ^ -10> ^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> - > -2 >c6t5 -3 > = <(n: number) => IFoo> -4 > function( -5 > n -6 > ) { -7 > return -8 > -9 > ( -10> {} -11> ) -12> -13> -14> } -15> ; -1->Emitted(59, 1) Source(75, 1) + SourceIndex(0) -2 >Emitted(59, 5) Source(75, 5) + SourceIndex(0) -3 >Emitted(59, 8) Source(75, 29) + SourceIndex(0) -4 >Emitted(59, 18) Source(75, 38) + SourceIndex(0) -5 >Emitted(59, 19) Source(75, 39) + SourceIndex(0) -6 >Emitted(59, 23) Source(75, 43) + SourceIndex(0) -7 >Emitted(59, 29) Source(75, 49) + SourceIndex(0) -8 >Emitted(59, 30) Source(75, 56) + SourceIndex(0) -9 >Emitted(59, 31) Source(75, 57) + SourceIndex(0) -10>Emitted(59, 33) Source(75, 59) + SourceIndex(0) -11>Emitted(59, 34) Source(75, 60) + SourceIndex(0) -12>Emitted(59, 35) Source(75, 60) + SourceIndex(0) -13>Emitted(59, 36) Source(75, 61) + SourceIndex(0) -14>Emitted(59, 37) Source(75, 62) + SourceIndex(0) -15>Emitted(59, 38) Source(75, 63) + SourceIndex(0) ---- ->>>// CONTEXT: Array index assignment -1 > -2 > -3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > - >// CONTEXT: Array index assignment - > -2 > -3 >// CONTEXT: Array index assignment -1 >Emitted(60, 1) Source(78, 1) + SourceIndex(0) -2 >Emitted(60, 1) Source(77, 1) + SourceIndex(0) -3 >Emitted(60, 35) Source(77, 35) + SourceIndex(0) ---- ->>>var c7t2; -1 >^^^^ -2 > ^^^^ -3 > ^ 4 > ^^^^^^^^^^^^^-> +1 > + >var +2 > c6t5: (n: number) => IFoo +3 > ; +1 >Emitted(82, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(82, 9) Source(74, 30) + SourceIndex(0) +3 >Emitted(82, 10) Source(74, 31) + SourceIndex(0) +--- +>>>c6t5 = function (n) { +1-> +2 >^^^^ +3 > ^^^ +4 > ^^^^^^^^^^ +5 > ^ +1-> + > +2 >c6t5 +3 > = <(n: number) => IFoo> +4 > function( +5 > n +1->Emitted(83, 1) Source(75, 1) + SourceIndex(0) +2 >Emitted(83, 5) Source(75, 5) + SourceIndex(0) +3 >Emitted(83, 8) Source(75, 29) + SourceIndex(0) +4 >Emitted(83, 18) Source(75, 38) + SourceIndex(0) +5 >Emitted(83, 19) Source(75, 39) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(84, 5) Source(75, 43) + SourceIndex(0) +2 >Emitted(84, 11) Source(75, 49) + SourceIndex(0) +3 >Emitted(84, 12) Source(75, 56) + SourceIndex(0) +4 >Emitted(84, 13) Source(75, 57) + SourceIndex(0) +5 >Emitted(84, 15) Source(75, 59) + SourceIndex(0) +6 >Emitted(84, 16) Source(75, 60) + SourceIndex(0) +7 >Emitted(84, 17) Source(75, 60) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(85, 1) Source(75, 61) + SourceIndex(0) +2 >Emitted(85, 2) Source(75, 62) + SourceIndex(0) +3 >Emitted(85, 3) Source(75, 63) + SourceIndex(0) +--- +>>>// CONTEXT: Array index assignment +1-> +2 > +3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> + > + >// CONTEXT: Array index assignment + > +2 > +3 >// CONTEXT: Array index assignment +1->Emitted(86, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(86, 1) Source(77, 1) + SourceIndex(0) +3 >Emitted(86, 35) Source(77, 35) + SourceIndex(0) +--- +>>>var c7t2; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^-> 1 > >var 2 > c7t2: IFoo[] 3 > ; -1 >Emitted(61, 5) Source(78, 5) + SourceIndex(0) -2 >Emitted(61, 9) Source(78, 17) + SourceIndex(0) -3 >Emitted(61, 10) Source(78, 18) + SourceIndex(0) +1 >Emitted(87, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(87, 9) Source(78, 17) + SourceIndex(0) +3 >Emitted(87, 10) Source(78, 18) + SourceIndex(0) --- ->>>c7t2[0] = ({ n: 1 }); +>>>c7t2[0] = ({ 1-> 2 >^^^^ 3 > ^ @@ -1358,13 +1388,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^^ 7 > ^ -8 > ^^ -9 > ^ -10> ^^ -11> ^ -12> ^^ -13> ^ -14> ^ 1-> > 2 >c7t2 @@ -1373,30 +1396,42 @@ sourceFile:contextualTyping.ts 5 > ] 6 > = 7 > ( -8 > { -9 > n -10> : -11> 1 -12> } -13> ) -14> ; -1->Emitted(62, 1) Source(79, 1) + SourceIndex(0) -2 >Emitted(62, 5) Source(79, 5) + SourceIndex(0) -3 >Emitted(62, 6) Source(79, 6) + SourceIndex(0) -4 >Emitted(62, 7) Source(79, 7) + SourceIndex(0) -5 >Emitted(62, 8) Source(79, 8) + SourceIndex(0) -6 >Emitted(62, 11) Source(79, 17) + SourceIndex(0) -7 >Emitted(62, 12) Source(79, 18) + SourceIndex(0) -8 >Emitted(62, 14) Source(79, 19) + SourceIndex(0) -9 >Emitted(62, 15) Source(79, 20) + SourceIndex(0) -10>Emitted(62, 17) Source(79, 22) + SourceIndex(0) -11>Emitted(62, 18) Source(79, 23) + SourceIndex(0) -12>Emitted(62, 20) Source(79, 24) + SourceIndex(0) -13>Emitted(62, 21) Source(79, 25) + SourceIndex(0) -14>Emitted(62, 22) Source(79, 26) + SourceIndex(0) +1->Emitted(88, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(88, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(88, 6) Source(79, 6) + SourceIndex(0) +4 >Emitted(88, 7) Source(79, 7) + SourceIndex(0) +5 >Emitted(88, 8) Source(79, 8) + SourceIndex(0) +6 >Emitted(88, 11) Source(79, 17) + SourceIndex(0) +7 >Emitted(88, 12) Source(79, 18) + SourceIndex(0) +--- +>>> n: 1 +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +1 >{ +2 > n +3 > : +4 > 1 +1 >Emitted(89, 5) Source(79, 19) + SourceIndex(0) +2 >Emitted(89, 6) Source(79, 20) + SourceIndex(0) +3 >Emitted(89, 8) Source(79, 22) + SourceIndex(0) +4 >Emitted(89, 9) Source(79, 23) + SourceIndex(0) +--- +>>>}); +1 >^ +2 > ^ +3 > ^ +4 > ^^^^^^^^^^^^^^^-> +1 >} +2 > ) +3 > ; +1 >Emitted(90, 2) Source(79, 24) + SourceIndex(0) +2 >Emitted(90, 3) Source(79, 25) + SourceIndex(0) +3 >Emitted(90, 4) Source(79, 26) + SourceIndex(0) --- >>>var objc8 = ({}); -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ @@ -1404,8 +1439,8 @@ sourceFile:contextualTyping.ts 6 > ^^ 7 > ^ 8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +9 > ^^^^^^^^^^-> +1-> > >// CONTEXT: Object property assignment >interface IPlaceHolder { @@ -1454,16 +1489,16 @@ sourceFile:contextualTyping.ts 6 > {} 7 > ) 8 > ; -1 >Emitted(63, 1) Source(102, 1) + SourceIndex(0) -2 >Emitted(63, 5) Source(102, 5) + SourceIndex(0) -3 >Emitted(63, 10) Source(102, 10) + SourceIndex(0) -4 >Emitted(63, 13) Source(120, 19) + SourceIndex(0) -5 >Emitted(63, 14) Source(120, 20) + SourceIndex(0) -6 >Emitted(63, 16) Source(120, 22) + SourceIndex(0) -7 >Emitted(63, 17) Source(120, 23) + SourceIndex(0) -8 >Emitted(63, 18) Source(120, 24) + SourceIndex(0) +1->Emitted(91, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(91, 5) Source(102, 5) + SourceIndex(0) +3 >Emitted(91, 10) Source(102, 10) + SourceIndex(0) +4 >Emitted(91, 13) Source(120, 19) + SourceIndex(0) +5 >Emitted(91, 14) Source(120, 20) + SourceIndex(0) +6 >Emitted(91, 16) Source(120, 22) + SourceIndex(0) +7 >Emitted(91, 17) Source(120, 23) + SourceIndex(0) +8 >Emitted(91, 18) Source(120, 24) + SourceIndex(0) --- ->>>objc8.t1 = (function (s) { return s; }); +>>>objc8.t1 = (function (s) { 1-> 2 >^^^^^ 3 > ^ @@ -1472,15 +1507,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^^^^^^^^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ 1-> > > @@ -1491,53 +1517,67 @@ sourceFile:contextualTyping.ts 6 > ( 7 > function( 8 > s -9 > ) { -10> return -11> -12> s -13> -14> -15> } -16> ) -17> ; -1->Emitted(64, 1) Source(122, 1) + SourceIndex(0) -2 >Emitted(64, 6) Source(122, 6) + SourceIndex(0) -3 >Emitted(64, 7) Source(122, 7) + SourceIndex(0) -4 >Emitted(64, 9) Source(122, 9) + SourceIndex(0) -5 >Emitted(64, 12) Source(122, 12) + SourceIndex(0) -6 >Emitted(64, 13) Source(122, 13) + SourceIndex(0) -7 >Emitted(64, 23) Source(122, 22) + SourceIndex(0) -8 >Emitted(64, 24) Source(122, 23) + SourceIndex(0) -9 >Emitted(64, 28) Source(122, 27) + SourceIndex(0) -10>Emitted(64, 34) Source(122, 33) + SourceIndex(0) -11>Emitted(64, 35) Source(122, 34) + SourceIndex(0) -12>Emitted(64, 36) Source(122, 35) + SourceIndex(0) -13>Emitted(64, 37) Source(122, 35) + SourceIndex(0) -14>Emitted(64, 38) Source(122, 36) + SourceIndex(0) -15>Emitted(64, 39) Source(122, 37) + SourceIndex(0) -16>Emitted(64, 40) Source(122, 38) + SourceIndex(0) -17>Emitted(64, 41) Source(122, 39) + SourceIndex(0) +1->Emitted(92, 1) Source(122, 1) + SourceIndex(0) +2 >Emitted(92, 6) Source(122, 6) + SourceIndex(0) +3 >Emitted(92, 7) Source(122, 7) + SourceIndex(0) +4 >Emitted(92, 9) Source(122, 9) + SourceIndex(0) +5 >Emitted(92, 12) Source(122, 12) + SourceIndex(0) +6 >Emitted(92, 13) Source(122, 13) + SourceIndex(0) +7 >Emitted(92, 23) Source(122, 22) + SourceIndex(0) +8 >Emitted(92, 24) Source(122, 23) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(93, 5) Source(122, 27) + SourceIndex(0) +2 >Emitted(93, 11) Source(122, 33) + SourceIndex(0) +3 >Emitted(93, 12) Source(122, 34) + SourceIndex(0) +4 >Emitted(93, 13) Source(122, 35) + SourceIndex(0) +5 >Emitted(93, 14) Source(122, 35) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(94, 1) Source(122, 36) + SourceIndex(0) +2 >Emitted(94, 2) Source(122, 37) + SourceIndex(0) +3 >Emitted(94, 3) Source(122, 38) + SourceIndex(0) +4 >Emitted(94, 4) Source(122, 39) + SourceIndex(0) --- >>>objc8.t2 = ({ -1 > +1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ 6 > ^ -1 > +1-> > 2 >objc8 3 > . 4 > t2 5 > = 6 > ( -1 >Emitted(65, 1) Source(123, 1) + SourceIndex(0) -2 >Emitted(65, 6) Source(123, 6) + SourceIndex(0) -3 >Emitted(65, 7) Source(123, 7) + SourceIndex(0) -4 >Emitted(65, 9) Source(123, 9) + SourceIndex(0) -5 >Emitted(65, 12) Source(123, 18) + SourceIndex(0) -6 >Emitted(65, 13) Source(123, 19) + SourceIndex(0) +1->Emitted(95, 1) Source(123, 1) + SourceIndex(0) +2 >Emitted(95, 6) Source(123, 6) + SourceIndex(0) +3 >Emitted(95, 7) Source(123, 7) + SourceIndex(0) +4 >Emitted(95, 9) Source(123, 9) + SourceIndex(0) +5 >Emitted(95, 12) Source(123, 18) + SourceIndex(0) +6 >Emitted(95, 13) Source(123, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -1549,10 +1589,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(66, 5) Source(124, 5) + SourceIndex(0) -2 >Emitted(66, 6) Source(124, 6) + SourceIndex(0) -3 >Emitted(66, 8) Source(124, 8) + SourceIndex(0) -4 >Emitted(66, 9) Source(124, 9) + SourceIndex(0) +1 >Emitted(96, 5) Source(124, 5) + SourceIndex(0) +2 >Emitted(96, 6) Source(124, 6) + SourceIndex(0) +3 >Emitted(96, 8) Source(124, 8) + SourceIndex(0) +4 >Emitted(96, 9) Source(124, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -1563,9 +1603,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(67, 2) Source(125, 2) + SourceIndex(0) -2 >Emitted(67, 3) Source(125, 3) + SourceIndex(0) -3 >Emitted(67, 4) Source(125, 4) + SourceIndex(0) +1 >Emitted(97, 2) Source(125, 2) + SourceIndex(0) +2 >Emitted(97, 3) Source(125, 3) + SourceIndex(0) +3 >Emitted(97, 4) Source(125, 4) + SourceIndex(0) --- >>>objc8.t3 = []; 1-> @@ -1575,7 +1615,7 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^ 7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^-> 1-> > 2 >objc8 @@ -1584,64 +1624,69 @@ sourceFile:contextualTyping.ts 5 > = 6 > [] 7 > ; -1->Emitted(68, 1) Source(126, 1) + SourceIndex(0) -2 >Emitted(68, 6) Source(126, 6) + SourceIndex(0) -3 >Emitted(68, 7) Source(126, 7) + SourceIndex(0) -4 >Emitted(68, 9) Source(126, 9) + SourceIndex(0) -5 >Emitted(68, 12) Source(126, 12) + SourceIndex(0) -6 >Emitted(68, 14) Source(126, 14) + SourceIndex(0) -7 >Emitted(68, 15) Source(126, 15) + SourceIndex(0) +1->Emitted(98, 1) Source(126, 1) + SourceIndex(0) +2 >Emitted(98, 6) Source(126, 6) + SourceIndex(0) +3 >Emitted(98, 7) Source(126, 7) + SourceIndex(0) +4 >Emitted(98, 9) Source(126, 9) + SourceIndex(0) +5 >Emitted(98, 12) Source(126, 12) + SourceIndex(0) +6 >Emitted(98, 14) Source(126, 14) + SourceIndex(0) +7 >Emitted(98, 15) Source(126, 15) + SourceIndex(0) --- ->>>objc8.t4 = function () { return ({}); }; +>>>objc8.t4 = function () { 1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^^^^^ -8 > ^ -9 > ^ -10> ^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^^-> +6 > ^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t4 5 > = -6 > function() { -7 > return -8 > -9 > ( -10> {} -11> ) -12> -13> -14> } -15> ; -1->Emitted(69, 1) Source(127, 1) + SourceIndex(0) -2 >Emitted(69, 6) Source(127, 6) + SourceIndex(0) -3 >Emitted(69, 7) Source(127, 7) + SourceIndex(0) -4 >Emitted(69, 9) Source(127, 9) + SourceIndex(0) -5 >Emitted(69, 12) Source(127, 12) + SourceIndex(0) -6 >Emitted(69, 26) Source(127, 25) + SourceIndex(0) -7 >Emitted(69, 32) Source(127, 31) + SourceIndex(0) -8 >Emitted(69, 33) Source(127, 38) + SourceIndex(0) -9 >Emitted(69, 34) Source(127, 39) + SourceIndex(0) -10>Emitted(69, 36) Source(127, 41) + SourceIndex(0) -11>Emitted(69, 37) Source(127, 42) + SourceIndex(0) -12>Emitted(69, 38) Source(127, 42) + SourceIndex(0) -13>Emitted(69, 39) Source(127, 43) + SourceIndex(0) -14>Emitted(69, 40) Source(127, 44) + SourceIndex(0) -15>Emitted(69, 41) Source(127, 45) + SourceIndex(0) +1->Emitted(99, 1) Source(127, 1) + SourceIndex(0) +2 >Emitted(99, 6) Source(127, 6) + SourceIndex(0) +3 >Emitted(99, 7) Source(127, 7) + SourceIndex(0) +4 >Emitted(99, 9) Source(127, 9) + SourceIndex(0) +5 >Emitted(99, 12) Source(127, 12) + SourceIndex(0) --- ->>>objc8.t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(100, 5) Source(127, 25) + SourceIndex(0) +2 >Emitted(100, 11) Source(127, 31) + SourceIndex(0) +3 >Emitted(100, 12) Source(127, 38) + SourceIndex(0) +4 >Emitted(100, 13) Source(127, 39) + SourceIndex(0) +5 >Emitted(100, 15) Source(127, 41) + SourceIndex(0) +6 >Emitted(100, 16) Source(127, 42) + SourceIndex(0) +7 >Emitted(100, 17) Source(127, 42) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(101, 1) Source(127, 43) + SourceIndex(0) +2 >Emitted(101, 2) Source(127, 44) + SourceIndex(0) +3 >Emitted(101, 3) Source(127, 45) + SourceIndex(0) +--- +>>>objc8.t5 = function (n) { 1-> 2 >^^^^^ 3 > ^ @@ -1649,17 +1694,6 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^^^^^^^^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^^^^-> 1-> > 2 >objc8 @@ -1668,35 +1702,50 @@ sourceFile:contextualTyping.ts 5 > = 6 > function( 7 > n -8 > ) { -9 > return -10> -11> ( -12> {} -13> ) -14> -15> -16> } -17> ; -1->Emitted(70, 1) Source(128, 1) + SourceIndex(0) -2 >Emitted(70, 6) Source(128, 6) + SourceIndex(0) -3 >Emitted(70, 7) Source(128, 7) + SourceIndex(0) -4 >Emitted(70, 9) Source(128, 9) + SourceIndex(0) -5 >Emitted(70, 12) Source(128, 12) + SourceIndex(0) -6 >Emitted(70, 22) Source(128, 21) + SourceIndex(0) -7 >Emitted(70, 23) Source(128, 22) + SourceIndex(0) -8 >Emitted(70, 27) Source(128, 26) + SourceIndex(0) -9 >Emitted(70, 33) Source(128, 32) + SourceIndex(0) -10>Emitted(70, 34) Source(128, 39) + SourceIndex(0) -11>Emitted(70, 35) Source(128, 40) + SourceIndex(0) -12>Emitted(70, 37) Source(128, 42) + SourceIndex(0) -13>Emitted(70, 38) Source(128, 43) + SourceIndex(0) -14>Emitted(70, 39) Source(128, 43) + SourceIndex(0) -15>Emitted(70, 40) Source(128, 44) + SourceIndex(0) -16>Emitted(70, 41) Source(128, 45) + SourceIndex(0) -17>Emitted(70, 42) Source(128, 46) + SourceIndex(0) +1->Emitted(102, 1) Source(128, 1) + SourceIndex(0) +2 >Emitted(102, 6) Source(128, 6) + SourceIndex(0) +3 >Emitted(102, 7) Source(128, 7) + SourceIndex(0) +4 >Emitted(102, 9) Source(128, 9) + SourceIndex(0) +5 >Emitted(102, 12) Source(128, 12) + SourceIndex(0) +6 >Emitted(102, 22) Source(128, 21) + SourceIndex(0) +7 >Emitted(102, 23) Source(128, 22) + SourceIndex(0) --- ->>>objc8.t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(103, 5) Source(128, 26) + SourceIndex(0) +2 >Emitted(103, 11) Source(128, 32) + SourceIndex(0) +3 >Emitted(103, 12) Source(128, 39) + SourceIndex(0) +4 >Emitted(103, 13) Source(128, 40) + SourceIndex(0) +5 >Emitted(103, 15) Source(128, 42) + SourceIndex(0) +6 >Emitted(103, 16) Source(128, 43) + SourceIndex(0) +7 >Emitted(103, 17) Source(128, 43) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(104, 1) Source(128, 44) + SourceIndex(0) +2 >Emitted(104, 2) Source(128, 45) + SourceIndex(0) +3 >Emitted(104, 3) Source(128, 46) + SourceIndex(0) +--- +>>>objc8.t6 = function (n, s) { 1-> 2 >^^^^^ 3 > ^ @@ -1706,16 +1755,6 @@ sourceFile:contextualTyping.ts 7 > ^ 8 > ^^ 9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ 1-> > 2 >objc8 @@ -1726,86 +1765,105 @@ sourceFile:contextualTyping.ts 7 > n 8 > , 9 > s -10> ) { -11> return -12> -13> ( -14> {} -15> ) -16> -17> -18> } -19> ; -1->Emitted(71, 1) Source(129, 1) + SourceIndex(0) -2 >Emitted(71, 6) Source(129, 6) + SourceIndex(0) -3 >Emitted(71, 7) Source(129, 7) + SourceIndex(0) -4 >Emitted(71, 9) Source(129, 9) + SourceIndex(0) -5 >Emitted(71, 12) Source(129, 12) + SourceIndex(0) -6 >Emitted(71, 22) Source(129, 21) + SourceIndex(0) -7 >Emitted(71, 23) Source(129, 22) + SourceIndex(0) -8 >Emitted(71, 25) Source(129, 24) + SourceIndex(0) -9 >Emitted(71, 26) Source(129, 25) + SourceIndex(0) -10>Emitted(71, 30) Source(129, 29) + SourceIndex(0) -11>Emitted(71, 36) Source(129, 35) + SourceIndex(0) -12>Emitted(71, 37) Source(129, 42) + SourceIndex(0) -13>Emitted(71, 38) Source(129, 43) + SourceIndex(0) -14>Emitted(71, 40) Source(129, 45) + SourceIndex(0) -15>Emitted(71, 41) Source(129, 46) + SourceIndex(0) -16>Emitted(71, 42) Source(129, 46) + SourceIndex(0) -17>Emitted(71, 43) Source(129, 47) + SourceIndex(0) -18>Emitted(71, 44) Source(129, 48) + SourceIndex(0) -19>Emitted(71, 45) Source(129, 49) + SourceIndex(0) +1->Emitted(105, 1) Source(129, 1) + SourceIndex(0) +2 >Emitted(105, 6) Source(129, 6) + SourceIndex(0) +3 >Emitted(105, 7) Source(129, 7) + SourceIndex(0) +4 >Emitted(105, 9) Source(129, 9) + SourceIndex(0) +5 >Emitted(105, 12) Source(129, 12) + SourceIndex(0) +6 >Emitted(105, 22) Source(129, 21) + SourceIndex(0) +7 >Emitted(105, 23) Source(129, 22) + SourceIndex(0) +8 >Emitted(105, 25) Source(129, 24) + SourceIndex(0) +9 >Emitted(105, 26) Source(129, 25) + SourceIndex(0) --- ->>>objc8.t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(106, 5) Source(129, 29) + SourceIndex(0) +2 >Emitted(106, 11) Source(129, 35) + SourceIndex(0) +3 >Emitted(106, 12) Source(129, 42) + SourceIndex(0) +4 >Emitted(106, 13) Source(129, 43) + SourceIndex(0) +5 >Emitted(106, 15) Source(129, 45) + SourceIndex(0) +6 >Emitted(106, 16) Source(129, 46) + SourceIndex(0) +7 >Emitted(106, 17) Source(129, 46) + SourceIndex(0) +--- +>>>}; 1 > -2 >^^^^^ -3 > ^ -4 > ^^ -5 > ^^^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^-> -1 > - > -2 >objc8 -3 > . -4 > t7 -5 > = -6 > function( -7 > n: number -8 > ) { -9 > return -10> -11> n -12> -13> -14> } -15> ; -1 >Emitted(72, 1) Source(130, 1) + SourceIndex(0) -2 >Emitted(72, 6) Source(130, 6) + SourceIndex(0) -3 >Emitted(72, 7) Source(130, 7) + SourceIndex(0) -4 >Emitted(72, 9) Source(130, 9) + SourceIndex(0) -5 >Emitted(72, 12) Source(130, 12) + SourceIndex(0) -6 >Emitted(72, 22) Source(130, 21) + SourceIndex(0) -7 >Emitted(72, 23) Source(130, 30) + SourceIndex(0) -8 >Emitted(72, 27) Source(130, 34) + SourceIndex(0) -9 >Emitted(72, 33) Source(130, 40) + SourceIndex(0) -10>Emitted(72, 34) Source(130, 41) + SourceIndex(0) -11>Emitted(72, 35) Source(130, 42) + SourceIndex(0) -12>Emitted(72, 36) Source(130, 42) + SourceIndex(0) -13>Emitted(72, 37) Source(130, 43) + SourceIndex(0) -14>Emitted(72, 38) Source(130, 44) + SourceIndex(0) -15>Emitted(72, 39) Source(130, 45) + SourceIndex(0) +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(107, 1) Source(129, 47) + SourceIndex(0) +2 >Emitted(107, 2) Source(129, 48) + SourceIndex(0) +3 >Emitted(107, 3) Source(129, 49) + SourceIndex(0) --- ->>>objc8.t8 = function (n) { return n; }; +>>>objc8.t7 = function (n) { +1-> +2 >^^^^^ +3 > ^ +4 > ^^ +5 > ^^^ +6 > ^^^^^^^^^^ +7 > ^ +1-> + > +2 >objc8 +3 > . +4 > t7 +5 > = +6 > function( +7 > n: number +1->Emitted(108, 1) Source(130, 1) + SourceIndex(0) +2 >Emitted(108, 6) Source(130, 6) + SourceIndex(0) +3 >Emitted(108, 7) Source(130, 7) + SourceIndex(0) +4 >Emitted(108, 9) Source(130, 9) + SourceIndex(0) +5 >Emitted(108, 12) Source(130, 12) + SourceIndex(0) +6 >Emitted(108, 22) Source(130, 21) + SourceIndex(0) +7 >Emitted(108, 23) Source(130, 30) + SourceIndex(0) +--- +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > +1 >Emitted(109, 5) Source(130, 34) + SourceIndex(0) +2 >Emitted(109, 11) Source(130, 40) + SourceIndex(0) +3 >Emitted(109, 12) Source(130, 41) + SourceIndex(0) +4 >Emitted(109, 13) Source(130, 42) + SourceIndex(0) +5 >Emitted(109, 14) Source(130, 42) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(110, 1) Source(130, 43) + SourceIndex(0) +2 >Emitted(110, 2) Source(130, 44) + SourceIndex(0) +3 >Emitted(110, 3) Source(130, 45) + SourceIndex(0) +--- +>>>objc8.t8 = function (n) { 1-> 2 >^^^^^ 3 > ^ @@ -1813,14 +1871,6 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^^^^^^^^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ 1-> > > @@ -1830,194 +1880,231 @@ sourceFile:contextualTyping.ts 5 > = 6 > function( 7 > n -8 > ) { -9 > return -10> -11> n -12> ; -13> -14> } -15> ; -1->Emitted(73, 1) Source(132, 1) + SourceIndex(0) -2 >Emitted(73, 6) Source(132, 6) + SourceIndex(0) -3 >Emitted(73, 7) Source(132, 7) + SourceIndex(0) -4 >Emitted(73, 9) Source(132, 9) + SourceIndex(0) -5 >Emitted(73, 12) Source(132, 12) + SourceIndex(0) -6 >Emitted(73, 22) Source(132, 21) + SourceIndex(0) -7 >Emitted(73, 23) Source(132, 22) + SourceIndex(0) -8 >Emitted(73, 27) Source(132, 26) + SourceIndex(0) -9 >Emitted(73, 33) Source(132, 32) + SourceIndex(0) -10>Emitted(73, 34) Source(132, 33) + SourceIndex(0) -11>Emitted(73, 35) Source(132, 34) + SourceIndex(0) -12>Emitted(73, 36) Source(132, 35) + SourceIndex(0) -13>Emitted(73, 37) Source(132, 36) + SourceIndex(0) -14>Emitted(73, 38) Source(132, 37) + SourceIndex(0) -15>Emitted(73, 39) Source(132, 38) + SourceIndex(0) +1->Emitted(111, 1) Source(132, 1) + SourceIndex(0) +2 >Emitted(111, 6) Source(132, 6) + SourceIndex(0) +3 >Emitted(111, 7) Source(132, 7) + SourceIndex(0) +4 >Emitted(111, 9) Source(132, 9) + SourceIndex(0) +5 >Emitted(111, 12) Source(132, 12) + SourceIndex(0) +6 >Emitted(111, 22) Source(132, 21) + SourceIndex(0) +7 >Emitted(111, 23) Source(132, 22) + SourceIndex(0) --- ->>>objc8.t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(112, 5) Source(132, 26) + SourceIndex(0) +2 >Emitted(112, 11) Source(132, 32) + SourceIndex(0) +3 >Emitted(112, 12) Source(132, 33) + SourceIndex(0) +4 >Emitted(112, 13) Source(132, 34) + SourceIndex(0) +5 >Emitted(112, 14) Source(132, 35) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(113, 1) Source(132, 36) + SourceIndex(0) +2 >Emitted(113, 2) Source(132, 37) + SourceIndex(0) +3 >Emitted(113, 3) Source(132, 38) + SourceIndex(0) +--- +>>>objc8.t9 = [ +1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ -6 > ^ -7 > ^^ -8 > ^^ -9 > ^^ -10> ^ -11> ^ -12> ^^^^^^-> -1 > +1-> > 2 >objc8 3 > . 4 > t9 5 > = -6 > [ -7 > [] -8 > , -9 > [] -10> ] -11> ; -1 >Emitted(74, 1) Source(133, 1) + SourceIndex(0) -2 >Emitted(74, 6) Source(133, 6) + SourceIndex(0) -3 >Emitted(74, 7) Source(133, 7) + SourceIndex(0) -4 >Emitted(74, 9) Source(133, 9) + SourceIndex(0) -5 >Emitted(74, 12) Source(133, 12) + SourceIndex(0) -6 >Emitted(74, 13) Source(133, 13) + SourceIndex(0) -7 >Emitted(74, 15) Source(133, 15) + SourceIndex(0) -8 >Emitted(74, 17) Source(133, 16) + SourceIndex(0) -9 >Emitted(74, 19) Source(133, 18) + SourceIndex(0) -10>Emitted(74, 20) Source(133, 19) + SourceIndex(0) -11>Emitted(74, 21) Source(133, 20) + SourceIndex(0) +1->Emitted(114, 1) Source(133, 1) + SourceIndex(0) +2 >Emitted(114, 6) Source(133, 6) + SourceIndex(0) +3 >Emitted(114, 7) Source(133, 7) + SourceIndex(0) +4 >Emitted(114, 9) Source(133, 9) + SourceIndex(0) +5 >Emitted(114, 12) Source(133, 12) + SourceIndex(0) --- ->>>objc8.t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(115, 5) Source(133, 13) + SourceIndex(0) +2 >Emitted(115, 7) Source(133, 15) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(116, 5) Source(133, 16) + SourceIndex(0) +2 >Emitted(116, 7) Source(133, 18) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(117, 2) Source(133, 19) + SourceIndex(0) +2 >Emitted(117, 3) Source(133, 20) + SourceIndex(0) +--- +>>>objc8.t10 = [ 1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ -6 > ^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^ -11> ^ -12> ^^ -13> ^ -14> ^ -15> ^ -16> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t10 5 > = -6 > [ -7 > ( -8 > {} -9 > ) -10> , -11> ( -12> {} -13> ) -14> ] -15> ; -1->Emitted(75, 1) Source(134, 1) + SourceIndex(0) -2 >Emitted(75, 6) Source(134, 6) + SourceIndex(0) -3 >Emitted(75, 7) Source(134, 7) + SourceIndex(0) -4 >Emitted(75, 10) Source(134, 10) + SourceIndex(0) -5 >Emitted(75, 13) Source(134, 13) + SourceIndex(0) -6 >Emitted(75, 14) Source(134, 20) + SourceIndex(0) -7 >Emitted(75, 15) Source(134, 21) + SourceIndex(0) -8 >Emitted(75, 17) Source(134, 23) + SourceIndex(0) -9 >Emitted(75, 18) Source(134, 24) + SourceIndex(0) -10>Emitted(75, 20) Source(134, 31) + SourceIndex(0) -11>Emitted(75, 21) Source(134, 32) + SourceIndex(0) -12>Emitted(75, 23) Source(134, 34) + SourceIndex(0) -13>Emitted(75, 24) Source(134, 35) + SourceIndex(0) -14>Emitted(75, 25) Source(134, 36) + SourceIndex(0) -15>Emitted(75, 26) Source(134, 37) + SourceIndex(0) +1->Emitted(118, 1) Source(134, 1) + SourceIndex(0) +2 >Emitted(118, 6) Source(134, 6) + SourceIndex(0) +3 >Emitted(118, 7) Source(134, 7) + SourceIndex(0) +4 >Emitted(118, 10) Source(134, 10) + SourceIndex(0) +5 >Emitted(118, 13) Source(134, 13) + SourceIndex(0) --- ->>>objc8.t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(119, 5) Source(134, 20) + SourceIndex(0) +2 >Emitted(119, 6) Source(134, 21) + SourceIndex(0) +3 >Emitted(119, 8) Source(134, 23) + SourceIndex(0) +4 >Emitted(119, 9) Source(134, 24) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(120, 5) Source(134, 31) + SourceIndex(0) +2 >Emitted(120, 6) Source(134, 32) + SourceIndex(0) +3 >Emitted(120, 8) Source(134, 34) + SourceIndex(0) +4 >Emitted(120, 9) Source(134, 35) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(121, 2) Source(134, 36) + SourceIndex(0) +2 >Emitted(121, 3) Source(134, 37) + SourceIndex(0) +--- +>>>objc8.t11 = [ 1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^ -12> ^^^^^^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ +6 > ^^^^^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t11 5 > = -6 > [ -7 > function( -8 > n -9 > , -10> s -11> ) { -12> return -13> -14> s -15> ; -16> -17> } -18> ] -19> ; -1->Emitted(76, 1) Source(135, 1) + SourceIndex(0) -2 >Emitted(76, 6) Source(135, 6) + SourceIndex(0) -3 >Emitted(76, 7) Source(135, 7) + SourceIndex(0) -4 >Emitted(76, 10) Source(135, 10) + SourceIndex(0) -5 >Emitted(76, 13) Source(135, 13) + SourceIndex(0) -6 >Emitted(76, 14) Source(135, 14) + SourceIndex(0) -7 >Emitted(76, 24) Source(135, 23) + SourceIndex(0) -8 >Emitted(76, 25) Source(135, 24) + SourceIndex(0) -9 >Emitted(76, 27) Source(135, 26) + SourceIndex(0) -10>Emitted(76, 28) Source(135, 27) + SourceIndex(0) -11>Emitted(76, 32) Source(135, 31) + SourceIndex(0) -12>Emitted(76, 38) Source(135, 37) + SourceIndex(0) -13>Emitted(76, 39) Source(135, 38) + SourceIndex(0) -14>Emitted(76, 40) Source(135, 39) + SourceIndex(0) -15>Emitted(76, 41) Source(135, 40) + SourceIndex(0) -16>Emitted(76, 42) Source(135, 41) + SourceIndex(0) -17>Emitted(76, 43) Source(135, 42) + SourceIndex(0) -18>Emitted(76, 44) Source(135, 43) + SourceIndex(0) -19>Emitted(76, 45) Source(135, 44) + SourceIndex(0) +1->Emitted(122, 1) Source(135, 1) + SourceIndex(0) +2 >Emitted(122, 6) Source(135, 6) + SourceIndex(0) +3 >Emitted(122, 7) Source(135, 7) + SourceIndex(0) +4 >Emitted(122, 10) Source(135, 10) + SourceIndex(0) +5 >Emitted(122, 13) Source(135, 13) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(123, 5) Source(135, 14) + SourceIndex(0) +2 >Emitted(123, 15) Source(135, 23) + SourceIndex(0) +3 >Emitted(123, 16) Source(135, 24) + SourceIndex(0) +4 >Emitted(123, 18) Source(135, 26) + SourceIndex(0) +5 >Emitted(123, 19) Source(135, 27) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(124, 9) Source(135, 31) + SourceIndex(0) +2 >Emitted(124, 15) Source(135, 37) + SourceIndex(0) +3 >Emitted(124, 16) Source(135, 38) + SourceIndex(0) +4 >Emitted(124, 17) Source(135, 39) + SourceIndex(0) +5 >Emitted(124, 18) Source(135, 40) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(125, 5) Source(135, 41) + SourceIndex(0) +2 >Emitted(125, 6) Source(135, 42) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(126, 2) Source(135, 43) + SourceIndex(0) +2 >Emitted(126, 3) Source(135, 44) + SourceIndex(0) --- >>>objc8.t12 = { -1 > +1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ 6 > ^^-> -1 > +1-> > 2 >objc8 3 > . 4 > t12 5 > = -1 >Emitted(77, 1) Source(136, 1) + SourceIndex(0) -2 >Emitted(77, 6) Source(136, 6) + SourceIndex(0) -3 >Emitted(77, 7) Source(136, 7) + SourceIndex(0) -4 >Emitted(77, 10) Source(136, 10) + SourceIndex(0) -5 >Emitted(77, 13) Source(136, 13) + SourceIndex(0) +1->Emitted(127, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(127, 6) Source(136, 6) + SourceIndex(0) +3 >Emitted(127, 7) Source(136, 7) + SourceIndex(0) +4 >Emitted(127, 10) Source(136, 10) + SourceIndex(0) +5 >Emitted(127, 13) Source(136, 13) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -2033,12 +2120,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(78, 5) Source(137, 5) + SourceIndex(0) -2 >Emitted(78, 8) Source(137, 8) + SourceIndex(0) -3 >Emitted(78, 10) Source(137, 16) + SourceIndex(0) -4 >Emitted(78, 11) Source(137, 17) + SourceIndex(0) -5 >Emitted(78, 13) Source(137, 19) + SourceIndex(0) -6 >Emitted(78, 14) Source(137, 20) + SourceIndex(0) +1->Emitted(128, 5) Source(137, 5) + SourceIndex(0) +2 >Emitted(128, 8) Source(137, 8) + SourceIndex(0) +3 >Emitted(128, 10) Source(137, 16) + SourceIndex(0) +4 >Emitted(128, 11) Source(137, 17) + SourceIndex(0) +5 >Emitted(128, 13) Source(137, 19) + SourceIndex(0) +6 >Emitted(128, 14) Source(137, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -2047,8 +2134,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(79, 2) Source(138, 2) + SourceIndex(0) -2 >Emitted(79, 3) Source(138, 2) + SourceIndex(0) +1 >Emitted(129, 2) Source(138, 2) + SourceIndex(0) +2 >Emitted(129, 3) Source(138, 2) + SourceIndex(0) --- >>>objc8.t13 = ({ 1-> @@ -2057,7 +2144,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^-> 1-> > 2 >objc8 @@ -2065,14 +2152,14 @@ sourceFile:contextualTyping.ts 4 > t13 5 > = 6 > ( -1->Emitted(80, 1) Source(139, 1) + SourceIndex(0) -2 >Emitted(80, 6) Source(139, 6) + SourceIndex(0) -3 >Emitted(80, 7) Source(139, 7) + SourceIndex(0) -4 >Emitted(80, 10) Source(139, 10) + SourceIndex(0) -5 >Emitted(80, 13) Source(139, 19) + SourceIndex(0) -6 >Emitted(80, 14) Source(139, 20) + SourceIndex(0) +1->Emitted(130, 1) Source(139, 1) + SourceIndex(0) +2 >Emitted(130, 6) Source(139, 6) + SourceIndex(0) +3 >Emitted(130, 7) Source(139, 7) + SourceIndex(0) +4 >Emitted(130, 10) Source(139, 10) + SourceIndex(0) +5 >Emitted(130, 13) Source(139, 19) + SourceIndex(0) +6 >Emitted(130, 14) Source(139, 20) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -2080,13 +2167,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -2095,27 +2175,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(81, 5) Source(140, 5) + SourceIndex(0) -2 >Emitted(81, 6) Source(140, 6) + SourceIndex(0) -3 >Emitted(81, 8) Source(140, 8) + SourceIndex(0) -4 >Emitted(81, 18) Source(140, 17) + SourceIndex(0) -5 >Emitted(81, 19) Source(140, 18) + SourceIndex(0) -6 >Emitted(81, 21) Source(140, 20) + SourceIndex(0) -7 >Emitted(81, 22) Source(140, 21) + SourceIndex(0) -8 >Emitted(81, 26) Source(140, 25) + SourceIndex(0) -9 >Emitted(81, 32) Source(140, 31) + SourceIndex(0) -10>Emitted(81, 33) Source(140, 32) + SourceIndex(0) -11>Emitted(81, 34) Source(140, 33) + SourceIndex(0) -12>Emitted(81, 35) Source(140, 34) + SourceIndex(0) -13>Emitted(81, 36) Source(140, 35) + SourceIndex(0) -14>Emitted(81, 37) Source(140, 36) + SourceIndex(0) +1->Emitted(131, 5) Source(140, 5) + SourceIndex(0) +2 >Emitted(131, 6) Source(140, 6) + SourceIndex(0) +3 >Emitted(131, 8) Source(140, 8) + SourceIndex(0) +4 >Emitted(131, 18) Source(140, 17) + SourceIndex(0) +5 >Emitted(131, 19) Source(140, 18) + SourceIndex(0) +6 >Emitted(131, 21) Source(140, 20) + SourceIndex(0) +7 >Emitted(131, 22) Source(140, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(132, 9) Source(140, 25) + SourceIndex(0) +2 >Emitted(132, 15) Source(140, 31) + SourceIndex(0) +3 >Emitted(132, 16) Source(140, 32) + SourceIndex(0) +4 >Emitted(132, 17) Source(140, 33) + SourceIndex(0) +5 >Emitted(132, 18) Source(140, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(133, 5) Source(140, 35) + SourceIndex(0) +2 >Emitted(133, 6) Source(140, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -2126,9 +2217,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(82, 2) Source(141, 2) + SourceIndex(0) -2 >Emitted(82, 3) Source(141, 3) + SourceIndex(0) -3 >Emitted(82, 4) Source(141, 3) + SourceIndex(0) +1 >Emitted(134, 2) Source(141, 2) + SourceIndex(0) +2 >Emitted(134, 3) Source(141, 3) + SourceIndex(0) +3 >Emitted(134, 4) Source(141, 3) + SourceIndex(0) --- >>>objc8.t14 = ({ 1-> @@ -2144,12 +2235,12 @@ sourceFile:contextualTyping.ts 4 > t14 5 > = 6 > ( -1->Emitted(83, 1) Source(142, 1) + SourceIndex(0) -2 >Emitted(83, 6) Source(142, 6) + SourceIndex(0) -3 >Emitted(83, 7) Source(142, 7) + SourceIndex(0) -4 >Emitted(83, 10) Source(142, 10) + SourceIndex(0) -5 >Emitted(83, 13) Source(142, 19) + SourceIndex(0) -6 >Emitted(83, 14) Source(142, 20) + SourceIndex(0) +1->Emitted(135, 1) Source(142, 1) + SourceIndex(0) +2 >Emitted(135, 6) Source(142, 6) + SourceIndex(0) +3 >Emitted(135, 7) Source(142, 7) + SourceIndex(0) +4 >Emitted(135, 10) Source(142, 10) + SourceIndex(0) +5 >Emitted(135, 13) Source(142, 19) + SourceIndex(0) +6 >Emitted(135, 14) Source(142, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -2161,10 +2252,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(84, 5) Source(143, 5) + SourceIndex(0) -2 >Emitted(84, 6) Source(143, 6) + SourceIndex(0) -3 >Emitted(84, 8) Source(143, 8) + SourceIndex(0) -4 >Emitted(84, 10) Source(143, 10) + SourceIndex(0) +1 >Emitted(136, 5) Source(143, 5) + SourceIndex(0) +2 >Emitted(136, 6) Source(143, 6) + SourceIndex(0) +3 >Emitted(136, 8) Source(143, 8) + SourceIndex(0) +4 >Emitted(136, 10) Source(143, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -2175,9 +2266,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(85, 2) Source(144, 2) + SourceIndex(0) -2 >Emitted(85, 3) Source(144, 3) + SourceIndex(0) -3 >Emitted(85, 4) Source(144, 3) + SourceIndex(0) +1 >Emitted(137, 2) Source(144, 2) + SourceIndex(0) +2 >Emitted(137, 3) Source(144, 3) + SourceIndex(0) +3 >Emitted(137, 4) Source(144, 3) + SourceIndex(0) --- >>>// CONTEXT: Function call 1-> @@ -2188,39 +2279,36 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Function call -1->Emitted(86, 1) Source(146, 1) + SourceIndex(0) -2 >Emitted(86, 1) Source(145, 1) + SourceIndex(0) -3 >Emitted(86, 26) Source(145, 26) + SourceIndex(0) +1->Emitted(138, 1) Source(146, 1) + SourceIndex(0) +2 >Emitted(138, 1) Source(145, 1) + SourceIndex(0) +3 >Emitted(138, 26) Source(145, 26) + SourceIndex(0) --- ->>>function c9t5(f) { } -1 >^^^^^^^^^ -2 > ^^^^ -3 > ^ -4 > ^ -5 > ^^^^ -6 > ^ +>>>function c9t5(f) { +1 >^^^^^^^^^^^^^^ +2 > ^ 1 > - >function -2 > c9t5 -3 > ( -4 > f: (n: number) => IFoo -5 > ) { -6 > } -1 >Emitted(87, 10) Source(146, 10) + SourceIndex(0) -2 >Emitted(87, 14) Source(146, 14) + SourceIndex(0) -3 >Emitted(87, 15) Source(146, 15) + SourceIndex(0) -4 >Emitted(87, 16) Source(146, 37) + SourceIndex(0) -5 >Emitted(87, 20) Source(146, 40) + SourceIndex(0) name (c9t5) -6 >Emitted(87, 21) Source(146, 41) + SourceIndex(0) name (c9t5) + >function c9t5( +2 > f: (n: number) => IFoo +1 >Emitted(139, 15) Source(146, 15) + SourceIndex(0) +2 >Emitted(139, 16) Source(146, 37) + SourceIndex(0) --- ->>>; +>>>} 1 > 2 >^ +3 > ^-> +1 >) { +2 >} +1 >Emitted(140, 1) Source(146, 40) + SourceIndex(0) name (c9t5) +2 >Emitted(140, 2) Source(146, 41) + SourceIndex(0) name (c9t5) +--- +>>>; +1-> +2 >^ 3 > ^^^^^^^^^^^^^^^^^^^-> -1 > +1-> 2 >; -1 >Emitted(88, 1) Source(146, 41) + SourceIndex(0) -2 >Emitted(88, 2) Source(146, 42) + SourceIndex(0) +1->Emitted(141, 1) Source(146, 41) + SourceIndex(0) +2 >Emitted(141, 2) Source(146, 42) + SourceIndex(0) --- >>>c9t5(function (n) { 1-> @@ -2235,11 +2323,11 @@ sourceFile:contextualTyping.ts 3 > ( 4 > function( 5 > n -1->Emitted(89, 1) Source(147, 1) + SourceIndex(0) -2 >Emitted(89, 5) Source(147, 5) + SourceIndex(0) -3 >Emitted(89, 6) Source(147, 6) + SourceIndex(0) -4 >Emitted(89, 16) Source(147, 15) + SourceIndex(0) -5 >Emitted(89, 17) Source(147, 16) + SourceIndex(0) +1->Emitted(142, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(142, 5) Source(147, 5) + SourceIndex(0) +3 >Emitted(142, 6) Source(147, 6) + SourceIndex(0) +4 >Emitted(142, 16) Source(147, 15) + SourceIndex(0) +5 >Emitted(142, 17) Source(147, 16) + SourceIndex(0) --- >>> return ({}); 1->^^^^ @@ -2257,13 +2345,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > ; -1->Emitted(90, 5) Source(148, 5) + SourceIndex(0) -2 >Emitted(90, 11) Source(148, 11) + SourceIndex(0) -3 >Emitted(90, 12) Source(148, 18) + SourceIndex(0) -4 >Emitted(90, 13) Source(148, 19) + SourceIndex(0) -5 >Emitted(90, 15) Source(148, 21) + SourceIndex(0) -6 >Emitted(90, 16) Source(148, 22) + SourceIndex(0) -7 >Emitted(90, 17) Source(148, 23) + SourceIndex(0) +1->Emitted(143, 5) Source(148, 5) + SourceIndex(0) +2 >Emitted(143, 11) Source(148, 11) + SourceIndex(0) +3 >Emitted(143, 12) Source(148, 18) + SourceIndex(0) +4 >Emitted(143, 13) Source(148, 19) + SourceIndex(0) +5 >Emitted(143, 15) Source(148, 21) + SourceIndex(0) +6 >Emitted(143, 16) Source(148, 22) + SourceIndex(0) +7 >Emitted(143, 17) Source(148, 23) + SourceIndex(0) --- >>>}); 1 > @@ -2276,133 +2364,128 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(91, 1) Source(149, 1) + SourceIndex(0) -2 >Emitted(91, 2) Source(149, 2) + SourceIndex(0) -3 >Emitted(91, 3) Source(149, 3) + SourceIndex(0) -4 >Emitted(91, 4) Source(149, 4) + SourceIndex(0) +1 >Emitted(144, 1) Source(149, 1) + SourceIndex(0) +2 >Emitted(144, 2) Source(149, 2) + SourceIndex(0) +3 >Emitted(144, 3) Source(149, 3) + SourceIndex(0) +4 >Emitted(144, 4) Source(149, 4) + SourceIndex(0) --- >>>// CONTEXT: Return statement 1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > >// CONTEXT: Return statement > 2 > 3 >// CONTEXT: Return statement -1->Emitted(92, 1) Source(152, 1) + SourceIndex(0) -2 >Emitted(92, 1) Source(151, 1) + SourceIndex(0) -3 >Emitted(92, 29) Source(151, 29) + SourceIndex(0) +1->Emitted(145, 1) Source(152, 1) + SourceIndex(0) +2 >Emitted(145, 1) Source(151, 1) + SourceIndex(0) +3 >Emitted(145, 29) Source(151, 29) + SourceIndex(0) --- ->>>var c10t5 = function () { return function (n) { return ({}); }; }; -1->^^^^ +>>>var c10t5 = function () { +1 >^^^^ 2 > ^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^^^^^^^ -8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ -20> ^ -21> ^ -1-> +4 > ^^^^^^^^^^^^^^-> +1 > >var 2 > c10t5 3 > : () => (n: number) => IFoo = -4 > function() { -5 > return -6 > -7 > function( -8 > n -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> -19> -20> } -21> ; -1->Emitted(93, 5) Source(152, 5) + SourceIndex(0) -2 >Emitted(93, 10) Source(152, 10) + SourceIndex(0) -3 >Emitted(93, 13) Source(152, 40) + SourceIndex(0) -4 >Emitted(93, 27) Source(152, 53) + SourceIndex(0) -5 >Emitted(93, 33) Source(152, 59) + SourceIndex(0) -6 >Emitted(93, 34) Source(152, 60) + SourceIndex(0) -7 >Emitted(93, 44) Source(152, 69) + SourceIndex(0) -8 >Emitted(93, 45) Source(152, 70) + SourceIndex(0) -9 >Emitted(93, 49) Source(152, 74) + SourceIndex(0) -10>Emitted(93, 55) Source(152, 80) + SourceIndex(0) -11>Emitted(93, 56) Source(152, 87) + SourceIndex(0) -12>Emitted(93, 57) Source(152, 88) + SourceIndex(0) -13>Emitted(93, 59) Source(152, 90) + SourceIndex(0) -14>Emitted(93, 60) Source(152, 91) + SourceIndex(0) -15>Emitted(93, 61) Source(152, 91) + SourceIndex(0) -16>Emitted(93, 62) Source(152, 92) + SourceIndex(0) -17>Emitted(93, 63) Source(152, 93) + SourceIndex(0) -18>Emitted(93, 64) Source(152, 93) + SourceIndex(0) -19>Emitted(93, 65) Source(152, 94) + SourceIndex(0) -20>Emitted(93, 66) Source(152, 95) + SourceIndex(0) -21>Emitted(93, 67) Source(152, 96) + SourceIndex(0) +1 >Emitted(146, 5) Source(152, 5) + SourceIndex(0) +2 >Emitted(146, 10) Source(152, 10) + SourceIndex(0) +3 >Emitted(146, 13) Source(152, 40) + SourceIndex(0) +--- +>>> return function (n) { +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function() { +2 > return +3 > +4 > function( +5 > n +1->Emitted(147, 5) Source(152, 53) + SourceIndex(0) +2 >Emitted(147, 11) Source(152, 59) + SourceIndex(0) +3 >Emitted(147, 12) Source(152, 60) + SourceIndex(0) +4 >Emitted(147, 22) Source(152, 69) + SourceIndex(0) +5 >Emitted(147, 23) Source(152, 70) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(148, 9) Source(152, 74) + SourceIndex(0) +2 >Emitted(148, 15) Source(152, 80) + SourceIndex(0) +3 >Emitted(148, 16) Source(152, 87) + SourceIndex(0) +4 >Emitted(148, 17) Source(152, 88) + SourceIndex(0) +5 >Emitted(148, 19) Source(152, 90) + SourceIndex(0) +6 >Emitted(148, 20) Source(152, 91) + SourceIndex(0) +7 >Emitted(148, 21) Source(152, 91) + SourceIndex(0) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^ +1 > +2 > } +3 > +1 >Emitted(149, 5) Source(152, 92) + SourceIndex(0) +2 >Emitted(149, 6) Source(152, 93) + SourceIndex(0) +3 >Emitted(149, 7) Source(152, 93) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(150, 1) Source(152, 94) + SourceIndex(0) +2 >Emitted(150, 2) Source(152, 95) + SourceIndex(0) +3 >Emitted(150, 3) Source(152, 96) + SourceIndex(0) --- >>>// CONTEXT: Newing a class -1 > +1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^-> -1 > +1-> > >// CONTEXT: Newing a class > 2 > 3 >// CONTEXT: Newing a class -1 >Emitted(94, 1) Source(155, 1) + SourceIndex(0) -2 >Emitted(94, 1) Source(154, 1) + SourceIndex(0) -3 >Emitted(94, 27) Source(154, 27) + SourceIndex(0) +1->Emitted(151, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(151, 1) Source(154, 1) + SourceIndex(0) +3 >Emitted(151, 27) Source(154, 27) + SourceIndex(0) --- >>>var C11t5 = (function () { -1->^^^^ -2 > ^^^^^ -3 > ^^^^^^^^^^^^^^^-> -1-> - >class -2 > C11t5 -1->Emitted(95, 5) Source(155, 7) + SourceIndex(0) -2 >Emitted(95, 10) Source(155, 12) + SourceIndex(0) ---- >>> function C11t5(f) { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^ -5 > ^ -1-> { -2 > -3 > C11t5 -4 > { constructor( -5 > f: (n: number) => IFoo -1->Emitted(96, 5) Source(155, 15) + SourceIndex(0) name (C11t5) -2 >Emitted(96, 14) Source(155, 7) + SourceIndex(0) name (C11t5) -3 >Emitted(96, 19) Source(155, 12) + SourceIndex(0) name (C11t5) -4 >Emitted(96, 20) Source(155, 27) + SourceIndex(0) name (C11t5) -5 >Emitted(96, 21) Source(155, 49) + SourceIndex(0) name (C11t5) +2 > ^^^^^^^^^^^^^^^ +3 > ^ +1-> + >class C11t5 { +2 > constructor( +3 > f: (n: number) => IFoo +1->Emitted(153, 5) Source(155, 15) + SourceIndex(0) name (C11t5) +2 >Emitted(153, 20) Source(155, 27) + SourceIndex(0) name (C11t5) +3 >Emitted(153, 21) Source(155, 49) + SourceIndex(0) name (C11t5) --- >>> } 1 >^^^^ @@ -2410,16 +2493,16 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(97, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) -2 >Emitted(97, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) +1 >Emitted(154, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) +2 >Emitted(154, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) --- >>> return C11t5; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(98, 5) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(98, 17) Source(155, 56) + SourceIndex(0) name (C11t5) +1->Emitted(155, 5) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(155, 17) Source(155, 56) + SourceIndex(0) name (C11t5) --- >>>})(); 1 > @@ -2430,21 +2513,21 @@ sourceFile:contextualTyping.ts 2 >} 3 > 4 > class C11t5 { constructor(f: (n: number) => IFoo) { } } -1 >Emitted(99, 1) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(99, 2) Source(155, 56) + SourceIndex(0) name (C11t5) -3 >Emitted(99, 2) Source(155, 1) + SourceIndex(0) -4 >Emitted(99, 6) Source(155, 56) + SourceIndex(0) +1 >Emitted(156, 1) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(156, 2) Source(155, 56) + SourceIndex(0) name (C11t5) +3 >Emitted(156, 2) Source(155, 1) + SourceIndex(0) +4 >Emitted(156, 6) Source(155, 56) + SourceIndex(0) --- >>>; 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >; -1 >Emitted(100, 1) Source(155, 56) + SourceIndex(0) -2 >Emitted(100, 2) Source(155, 57) + SourceIndex(0) +1 >Emitted(157, 1) Source(155, 56) + SourceIndex(0) +2 >Emitted(157, 2) Source(155, 57) + SourceIndex(0) --- ->>>var i = new C11t5(function (n) { return ({}); }); +>>>var i = new C11t5(function (n) { 1-> 2 >^^^^ 3 > ^ @@ -2454,17 +2537,6 @@ sourceFile:contextualTyping.ts 7 > ^ 8 > ^^^^^^^^^^ 9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ -20> ^ 1-> > 2 >var @@ -2475,118 +2547,138 @@ sourceFile:contextualTyping.ts 7 > ( 8 > function( 9 > n -10> ) { -11> return -12> -13> ( -14> {} -15> ) -16> -17> -18> } -19> ) -20> ; -1->Emitted(101, 1) Source(156, 1) + SourceIndex(0) -2 >Emitted(101, 5) Source(156, 5) + SourceIndex(0) -3 >Emitted(101, 6) Source(156, 6) + SourceIndex(0) -4 >Emitted(101, 9) Source(156, 9) + SourceIndex(0) -5 >Emitted(101, 13) Source(156, 13) + SourceIndex(0) -6 >Emitted(101, 18) Source(156, 18) + SourceIndex(0) -7 >Emitted(101, 19) Source(156, 19) + SourceIndex(0) -8 >Emitted(101, 29) Source(156, 28) + SourceIndex(0) -9 >Emitted(101, 30) Source(156, 29) + SourceIndex(0) -10>Emitted(101, 34) Source(156, 33) + SourceIndex(0) -11>Emitted(101, 40) Source(156, 39) + SourceIndex(0) -12>Emitted(101, 41) Source(156, 46) + SourceIndex(0) -13>Emitted(101, 42) Source(156, 47) + SourceIndex(0) -14>Emitted(101, 44) Source(156, 49) + SourceIndex(0) -15>Emitted(101, 45) Source(156, 50) + SourceIndex(0) -16>Emitted(101, 46) Source(156, 50) + SourceIndex(0) -17>Emitted(101, 47) Source(156, 51) + SourceIndex(0) -18>Emitted(101, 48) Source(156, 52) + SourceIndex(0) -19>Emitted(101, 49) Source(156, 53) + SourceIndex(0) -20>Emitted(101, 50) Source(156, 54) + SourceIndex(0) +1->Emitted(158, 1) Source(156, 1) + SourceIndex(0) +2 >Emitted(158, 5) Source(156, 5) + SourceIndex(0) +3 >Emitted(158, 6) Source(156, 6) + SourceIndex(0) +4 >Emitted(158, 9) Source(156, 9) + SourceIndex(0) +5 >Emitted(158, 13) Source(156, 13) + SourceIndex(0) +6 >Emitted(158, 18) Source(156, 18) + SourceIndex(0) +7 >Emitted(158, 19) Source(156, 19) + SourceIndex(0) +8 >Emitted(158, 29) Source(156, 28) + SourceIndex(0) +9 >Emitted(158, 30) Source(156, 29) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(159, 5) Source(156, 33) + SourceIndex(0) +2 >Emitted(159, 11) Source(156, 39) + SourceIndex(0) +3 >Emitted(159, 12) Source(156, 46) + SourceIndex(0) +4 >Emitted(159, 13) Source(156, 47) + SourceIndex(0) +5 >Emitted(159, 15) Source(156, 49) + SourceIndex(0) +6 >Emitted(159, 16) Source(156, 50) + SourceIndex(0) +7 >Emitted(159, 17) Source(156, 50) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(160, 1) Source(156, 51) + SourceIndex(0) +2 >Emitted(160, 2) Source(156, 52) + SourceIndex(0) +3 >Emitted(160, 3) Source(156, 53) + SourceIndex(0) +4 >Emitted(160, 4) Source(156, 54) + SourceIndex(0) --- >>>// CONTEXT: Type annotated expression -1 > +1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^-> -1 > +1-> > >// CONTEXT: Type annotated expression > 2 > 3 >// CONTEXT: Type annotated expression -1 >Emitted(102, 1) Source(159, 1) + SourceIndex(0) -2 >Emitted(102, 1) Source(158, 1) + SourceIndex(0) -3 >Emitted(102, 38) Source(158, 38) + SourceIndex(0) +1->Emitted(161, 1) Source(159, 1) + SourceIndex(0) +2 >Emitted(161, 1) Source(158, 1) + SourceIndex(0) +3 >Emitted(161, 38) Source(158, 38) + SourceIndex(0) --- ->>>var c12t1 = (function (s) { return s; }); -1->^^^^ +>>>var c12t1 = (function (s) { +1 >^^^^ 2 > ^^^^^ 3 > ^^^ 4 > ^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> +1 > >var 2 > c12t1 3 > = <(s: string) => string> 4 > ( 5 > function( 6 > s -7 > ) { -8 > return -9 > -10> s -11> -12> -13> } -14> ) -15> ; -1->Emitted(103, 5) Source(159, 5) + SourceIndex(0) -2 >Emitted(103, 10) Source(159, 10) + SourceIndex(0) -3 >Emitted(103, 13) Source(159, 37) + SourceIndex(0) -4 >Emitted(103, 14) Source(159, 38) + SourceIndex(0) -5 >Emitted(103, 24) Source(159, 47) + SourceIndex(0) -6 >Emitted(103, 25) Source(159, 48) + SourceIndex(0) -7 >Emitted(103, 29) Source(159, 52) + SourceIndex(0) -8 >Emitted(103, 35) Source(159, 58) + SourceIndex(0) -9 >Emitted(103, 36) Source(159, 59) + SourceIndex(0) -10>Emitted(103, 37) Source(159, 60) + SourceIndex(0) -11>Emitted(103, 38) Source(159, 60) + SourceIndex(0) -12>Emitted(103, 39) Source(159, 61) + SourceIndex(0) -13>Emitted(103, 40) Source(159, 62) + SourceIndex(0) -14>Emitted(103, 41) Source(159, 63) + SourceIndex(0) -15>Emitted(103, 42) Source(159, 64) + SourceIndex(0) +1 >Emitted(162, 5) Source(159, 5) + SourceIndex(0) +2 >Emitted(162, 10) Source(159, 10) + SourceIndex(0) +3 >Emitted(162, 13) Source(159, 37) + SourceIndex(0) +4 >Emitted(162, 14) Source(159, 38) + SourceIndex(0) +5 >Emitted(162, 24) Source(159, 47) + SourceIndex(0) +6 >Emitted(162, 25) Source(159, 48) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(163, 5) Source(159, 52) + SourceIndex(0) +2 >Emitted(163, 11) Source(159, 58) + SourceIndex(0) +3 >Emitted(163, 12) Source(159, 59) + SourceIndex(0) +4 >Emitted(163, 13) Source(159, 60) + SourceIndex(0) +5 >Emitted(163, 14) Source(159, 60) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(164, 1) Source(159, 61) + SourceIndex(0) +2 >Emitted(164, 2) Source(159, 62) + SourceIndex(0) +3 >Emitted(164, 3) Source(159, 63) + SourceIndex(0) +4 >Emitted(164, 4) Source(159, 64) + SourceIndex(0) --- >>>var c12t2 = ({ -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^ -1 > +1-> > 2 >var 3 > c12t2 4 > = 5 > ( -1 >Emitted(104, 1) Source(160, 1) + SourceIndex(0) -2 >Emitted(104, 5) Source(160, 5) + SourceIndex(0) -3 >Emitted(104, 10) Source(160, 10) + SourceIndex(0) -4 >Emitted(104, 13) Source(160, 20) + SourceIndex(0) -5 >Emitted(104, 14) Source(160, 21) + SourceIndex(0) +1->Emitted(165, 1) Source(160, 1) + SourceIndex(0) +2 >Emitted(165, 5) Source(160, 5) + SourceIndex(0) +3 >Emitted(165, 10) Source(160, 10) + SourceIndex(0) +4 >Emitted(165, 13) Source(160, 20) + SourceIndex(0) +5 >Emitted(165, 14) Source(160, 21) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -2598,10 +2690,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(105, 5) Source(161, 5) + SourceIndex(0) -2 >Emitted(105, 6) Source(161, 6) + SourceIndex(0) -3 >Emitted(105, 8) Source(161, 8) + SourceIndex(0) -4 >Emitted(105, 9) Source(161, 9) + SourceIndex(0) +1 >Emitted(166, 5) Source(161, 5) + SourceIndex(0) +2 >Emitted(166, 6) Source(161, 6) + SourceIndex(0) +3 >Emitted(166, 8) Source(161, 8) + SourceIndex(0) +4 >Emitted(166, 9) Source(161, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -2612,9 +2704,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(106, 2) Source(162, 2) + SourceIndex(0) -2 >Emitted(106, 3) Source(162, 3) + SourceIndex(0) -3 >Emitted(106, 4) Source(162, 4) + SourceIndex(0) +1 >Emitted(167, 2) Source(162, 2) + SourceIndex(0) +2 >Emitted(167, 3) Source(162, 3) + SourceIndex(0) +3 >Emitted(167, 4) Source(162, 4) + SourceIndex(0) --- >>>var c12t3 = []; 1-> @@ -2623,7 +2715,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^-> 1-> > 2 >var @@ -2631,77 +2723,71 @@ sourceFile:contextualTyping.ts 4 > = 5 > [] 6 > ; -1->Emitted(107, 1) Source(163, 1) + SourceIndex(0) -2 >Emitted(107, 5) Source(163, 5) + SourceIndex(0) -3 >Emitted(107, 10) Source(163, 10) + SourceIndex(0) -4 >Emitted(107, 13) Source(163, 24) + SourceIndex(0) -5 >Emitted(107, 15) Source(163, 26) + SourceIndex(0) -6 >Emitted(107, 16) Source(163, 27) + SourceIndex(0) +1->Emitted(168, 1) Source(163, 1) + SourceIndex(0) +2 >Emitted(168, 5) Source(163, 5) + SourceIndex(0) +3 >Emitted(168, 10) Source(163, 10) + SourceIndex(0) +4 >Emitted(168, 13) Source(163, 24) + SourceIndex(0) +5 >Emitted(168, 15) Source(163, 26) + SourceIndex(0) +6 >Emitted(168, 16) Source(163, 27) + SourceIndex(0) --- ->>>var c12t4 = function () { return ({}); }; +>>>var c12t4 = function () { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^^-> +5 > ^^^^^-> 1-> > 2 >var 3 > c12t4 4 > = <() => IFoo> -5 > function() { -6 > return -7 > -8 > ( -9 > {} -10> ) -11> -12> -13> } -14> ; -1->Emitted(108, 1) Source(164, 1) + SourceIndex(0) -2 >Emitted(108, 5) Source(164, 5) + SourceIndex(0) -3 >Emitted(108, 10) Source(164, 10) + SourceIndex(0) -4 >Emitted(108, 13) Source(164, 26) + SourceIndex(0) -5 >Emitted(108, 27) Source(164, 39) + SourceIndex(0) -6 >Emitted(108, 33) Source(164, 45) + SourceIndex(0) -7 >Emitted(108, 34) Source(164, 52) + SourceIndex(0) -8 >Emitted(108, 35) Source(164, 53) + SourceIndex(0) -9 >Emitted(108, 37) Source(164, 55) + SourceIndex(0) -10>Emitted(108, 38) Source(164, 56) + SourceIndex(0) -11>Emitted(108, 39) Source(164, 56) + SourceIndex(0) -12>Emitted(108, 40) Source(164, 57) + SourceIndex(0) -13>Emitted(108, 41) Source(164, 58) + SourceIndex(0) -14>Emitted(108, 42) Source(164, 59) + SourceIndex(0) +1->Emitted(169, 1) Source(164, 1) + SourceIndex(0) +2 >Emitted(169, 5) Source(164, 5) + SourceIndex(0) +3 >Emitted(169, 10) Source(164, 10) + SourceIndex(0) +4 >Emitted(169, 13) Source(164, 26) + SourceIndex(0) --- ->>>var c12t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(170, 5) Source(164, 39) + SourceIndex(0) +2 >Emitted(170, 11) Source(164, 45) + SourceIndex(0) +3 >Emitted(170, 12) Source(164, 52) + SourceIndex(0) +4 >Emitted(170, 13) Source(164, 53) + SourceIndex(0) +5 >Emitted(170, 15) Source(164, 55) + SourceIndex(0) +6 >Emitted(170, 16) Source(164, 56) + SourceIndex(0) +7 >Emitted(170, 17) Source(164, 56) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(171, 1) Source(164, 57) + SourceIndex(0) +2 >Emitted(171, 2) Source(164, 58) + SourceIndex(0) +3 >Emitted(171, 3) Source(164, 59) + SourceIndex(0) +--- +>>>var c12t5 = function (n) { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^^^^-> 1-> > 2 >var @@ -2709,34 +2795,49 @@ sourceFile:contextualTyping.ts 4 > = <(n: number) => IFoo> 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> ( -11> {} -12> ) -13> -14> -15> } -16> ; -1->Emitted(109, 1) Source(165, 1) + SourceIndex(0) -2 >Emitted(109, 5) Source(165, 5) + SourceIndex(0) -3 >Emitted(109, 10) Source(165, 10) + SourceIndex(0) -4 >Emitted(109, 13) Source(165, 35) + SourceIndex(0) -5 >Emitted(109, 23) Source(165, 44) + SourceIndex(0) -6 >Emitted(109, 24) Source(165, 45) + SourceIndex(0) -7 >Emitted(109, 28) Source(165, 49) + SourceIndex(0) -8 >Emitted(109, 34) Source(165, 55) + SourceIndex(0) -9 >Emitted(109, 35) Source(165, 62) + SourceIndex(0) -10>Emitted(109, 36) Source(165, 63) + SourceIndex(0) -11>Emitted(109, 38) Source(165, 65) + SourceIndex(0) -12>Emitted(109, 39) Source(165, 66) + SourceIndex(0) -13>Emitted(109, 40) Source(165, 66) + SourceIndex(0) -14>Emitted(109, 41) Source(165, 67) + SourceIndex(0) -15>Emitted(109, 42) Source(165, 68) + SourceIndex(0) -16>Emitted(109, 43) Source(165, 69) + SourceIndex(0) +1->Emitted(172, 1) Source(165, 1) + SourceIndex(0) +2 >Emitted(172, 5) Source(165, 5) + SourceIndex(0) +3 >Emitted(172, 10) Source(165, 10) + SourceIndex(0) +4 >Emitted(172, 13) Source(165, 35) + SourceIndex(0) +5 >Emitted(172, 23) Source(165, 44) + SourceIndex(0) +6 >Emitted(172, 24) Source(165, 45) + SourceIndex(0) --- ->>>var c12t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(173, 5) Source(165, 49) + SourceIndex(0) +2 >Emitted(173, 11) Source(165, 55) + SourceIndex(0) +3 >Emitted(173, 12) Source(165, 62) + SourceIndex(0) +4 >Emitted(173, 13) Source(165, 63) + SourceIndex(0) +5 >Emitted(173, 15) Source(165, 65) + SourceIndex(0) +6 >Emitted(173, 16) Source(165, 66) + SourceIndex(0) +7 >Emitted(173, 17) Source(165, 66) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(174, 1) Source(165, 67) + SourceIndex(0) +2 >Emitted(174, 2) Source(165, 68) + SourceIndex(0) +3 >Emitted(174, 3) Source(165, 69) + SourceIndex(0) +--- +>>>var c12t6 = function (n, s) { 1-> 2 >^^^^ 3 > ^^^^^ @@ -2745,16 +2846,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ 1-> > 2 >var @@ -2764,52 +2855,58 @@ sourceFile:contextualTyping.ts 6 > n 7 > , 8 > s -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> ; -1->Emitted(110, 1) Source(166, 1) + SourceIndex(0) -2 >Emitted(110, 5) Source(166, 5) + SourceIndex(0) -3 >Emitted(110, 10) Source(166, 10) + SourceIndex(0) -4 >Emitted(110, 13) Source(166, 46) + SourceIndex(0) -5 >Emitted(110, 23) Source(166, 55) + SourceIndex(0) -6 >Emitted(110, 24) Source(166, 56) + SourceIndex(0) -7 >Emitted(110, 26) Source(166, 58) + SourceIndex(0) -8 >Emitted(110, 27) Source(166, 59) + SourceIndex(0) -9 >Emitted(110, 31) Source(166, 63) + SourceIndex(0) -10>Emitted(110, 37) Source(166, 69) + SourceIndex(0) -11>Emitted(110, 38) Source(166, 76) + SourceIndex(0) -12>Emitted(110, 39) Source(166, 77) + SourceIndex(0) -13>Emitted(110, 41) Source(166, 79) + SourceIndex(0) -14>Emitted(110, 42) Source(166, 80) + SourceIndex(0) -15>Emitted(110, 43) Source(166, 80) + SourceIndex(0) -16>Emitted(110, 44) Source(166, 81) + SourceIndex(0) -17>Emitted(110, 45) Source(166, 82) + SourceIndex(0) -18>Emitted(110, 46) Source(166, 83) + SourceIndex(0) +1->Emitted(175, 1) Source(166, 1) + SourceIndex(0) +2 >Emitted(175, 5) Source(166, 5) + SourceIndex(0) +3 >Emitted(175, 10) Source(166, 10) + SourceIndex(0) +4 >Emitted(175, 13) Source(166, 46) + SourceIndex(0) +5 >Emitted(175, 23) Source(166, 55) + SourceIndex(0) +6 >Emitted(175, 24) Source(166, 56) + SourceIndex(0) +7 >Emitted(175, 26) Source(166, 58) + SourceIndex(0) +8 >Emitted(175, 27) Source(166, 59) + SourceIndex(0) --- ->>>var c12t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(176, 5) Source(166, 63) + SourceIndex(0) +2 >Emitted(176, 11) Source(166, 69) + SourceIndex(0) +3 >Emitted(176, 12) Source(166, 76) + SourceIndex(0) +4 >Emitted(176, 13) Source(166, 77) + SourceIndex(0) +5 >Emitted(176, 15) Source(166, 79) + SourceIndex(0) +6 >Emitted(176, 16) Source(166, 80) + SourceIndex(0) +7 >Emitted(176, 17) Source(166, 80) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(177, 1) Source(166, 81) + SourceIndex(0) +2 >Emitted(177, 2) Source(166, 82) + SourceIndex(0) +3 >Emitted(177, 3) Source(166, 83) + SourceIndex(0) +--- +>>>var c12t7 = function (n) { +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^-> -1 > +1-> > 2 >var 3 > c12t7 @@ -2819,44 +2916,49 @@ sourceFile:contextualTyping.ts > }> 5 > function( 6 > n:number -7 > ) { -8 > return -9 > -10> n -11> -12> -13> } -14> ; -1 >Emitted(111, 1) Source(167, 1) + SourceIndex(0) -2 >Emitted(111, 5) Source(167, 5) + SourceIndex(0) -3 >Emitted(111, 10) Source(167, 10) + SourceIndex(0) -4 >Emitted(111, 13) Source(170, 4) + SourceIndex(0) -5 >Emitted(111, 23) Source(170, 13) + SourceIndex(0) -6 >Emitted(111, 24) Source(170, 21) + SourceIndex(0) -7 >Emitted(111, 28) Source(170, 25) + SourceIndex(0) -8 >Emitted(111, 34) Source(170, 31) + SourceIndex(0) -9 >Emitted(111, 35) Source(170, 32) + SourceIndex(0) -10>Emitted(111, 36) Source(170, 33) + SourceIndex(0) -11>Emitted(111, 37) Source(170, 33) + SourceIndex(0) -12>Emitted(111, 38) Source(170, 34) + SourceIndex(0) -13>Emitted(111, 39) Source(170, 35) + SourceIndex(0) -14>Emitted(111, 40) Source(170, 36) + SourceIndex(0) +1->Emitted(178, 1) Source(167, 1) + SourceIndex(0) +2 >Emitted(178, 5) Source(167, 5) + SourceIndex(0) +3 >Emitted(178, 10) Source(167, 10) + SourceIndex(0) +4 >Emitted(178, 13) Source(170, 4) + SourceIndex(0) +5 >Emitted(178, 23) Source(170, 13) + SourceIndex(0) +6 >Emitted(178, 24) Source(170, 21) + SourceIndex(0) --- ->>>var c12t8 = function (n) { return n; }; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > +1 >Emitted(179, 5) Source(170, 25) + SourceIndex(0) +2 >Emitted(179, 11) Source(170, 31) + SourceIndex(0) +3 >Emitted(179, 12) Source(170, 32) + SourceIndex(0) +4 >Emitted(179, 13) Source(170, 33) + SourceIndex(0) +5 >Emitted(179, 14) Source(170, 33) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(180, 1) Source(170, 34) + SourceIndex(0) +2 >Emitted(180, 2) Source(170, 35) + SourceIndex(0) +3 >Emitted(180, 3) Source(170, 36) + SourceIndex(0) +--- +>>>var c12t8 = function (n) { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1-> > > @@ -2865,181 +2967,218 @@ sourceFile:contextualTyping.ts 4 > = <(n: number, s: string) => number> 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1->Emitted(112, 1) Source(172, 1) + SourceIndex(0) -2 >Emitted(112, 5) Source(172, 5) + SourceIndex(0) -3 >Emitted(112, 10) Source(172, 10) + SourceIndex(0) -4 >Emitted(112, 13) Source(172, 48) + SourceIndex(0) -5 >Emitted(112, 23) Source(172, 57) + SourceIndex(0) -6 >Emitted(112, 24) Source(172, 58) + SourceIndex(0) -7 >Emitted(112, 28) Source(172, 62) + SourceIndex(0) -8 >Emitted(112, 34) Source(172, 68) + SourceIndex(0) -9 >Emitted(112, 35) Source(172, 69) + SourceIndex(0) -10>Emitted(112, 36) Source(172, 70) + SourceIndex(0) -11>Emitted(112, 37) Source(172, 71) + SourceIndex(0) -12>Emitted(112, 38) Source(172, 72) + SourceIndex(0) -13>Emitted(112, 39) Source(172, 73) + SourceIndex(0) -14>Emitted(112, 40) Source(172, 74) + SourceIndex(0) +1->Emitted(181, 1) Source(172, 1) + SourceIndex(0) +2 >Emitted(181, 5) Source(172, 5) + SourceIndex(0) +3 >Emitted(181, 10) Source(172, 10) + SourceIndex(0) +4 >Emitted(181, 13) Source(172, 48) + SourceIndex(0) +5 >Emitted(181, 23) Source(172, 57) + SourceIndex(0) +6 >Emitted(181, 24) Source(172, 58) + SourceIndex(0) --- ->>>var c12t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(182, 5) Source(172, 62) + SourceIndex(0) +2 >Emitted(182, 11) Source(172, 68) + SourceIndex(0) +3 >Emitted(182, 12) Source(172, 69) + SourceIndex(0) +4 >Emitted(182, 13) Source(172, 70) + SourceIndex(0) +5 >Emitted(182, 14) Source(172, 71) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(183, 1) Source(172, 72) + SourceIndex(0) +2 >Emitted(183, 2) Source(172, 73) + SourceIndex(0) +3 >Emitted(183, 3) Source(172, 74) + SourceIndex(0) +--- +>>>var c12t9 = [ +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^^ -7 > ^^ -8 > ^^ -9 > ^ -10> ^ -11> ^^^^^^-> -1 > +1-> > 2 >var 3 > c12t9 4 > = -5 > [ -6 > [] -7 > , -8 > [] -9 > ] -10> ; -1 >Emitted(113, 1) Source(173, 1) + SourceIndex(0) -2 >Emitted(113, 5) Source(173, 5) + SourceIndex(0) -3 >Emitted(113, 10) Source(173, 10) + SourceIndex(0) -4 >Emitted(113, 13) Source(173, 26) + SourceIndex(0) -5 >Emitted(113, 14) Source(173, 27) + SourceIndex(0) -6 >Emitted(113, 16) Source(173, 29) + SourceIndex(0) -7 >Emitted(113, 18) Source(173, 30) + SourceIndex(0) -8 >Emitted(113, 20) Source(173, 32) + SourceIndex(0) -9 >Emitted(113, 21) Source(173, 33) + SourceIndex(0) -10>Emitted(113, 22) Source(173, 34) + SourceIndex(0) +1->Emitted(184, 1) Source(173, 1) + SourceIndex(0) +2 >Emitted(184, 5) Source(173, 5) + SourceIndex(0) +3 >Emitted(184, 10) Source(173, 10) + SourceIndex(0) +4 >Emitted(184, 13) Source(173, 26) + SourceIndex(0) --- ->>>var c12t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(185, 5) Source(173, 27) + SourceIndex(0) +2 >Emitted(185, 7) Source(173, 29) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(186, 5) Source(173, 30) + SourceIndex(0) +2 >Emitted(186, 7) Source(173, 32) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(187, 2) Source(173, 33) + SourceIndex(0) +2 >Emitted(187, 3) Source(173, 34) + SourceIndex(0) +--- +>>>var c12t10 = [ 1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ -5 > ^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >var 3 > c12t10 4 > = -5 > [ -6 > ( -7 > {} -8 > ) -9 > , -10> ( -11> {} -12> ) -13> ] -14> ; -1->Emitted(114, 1) Source(174, 1) + SourceIndex(0) -2 >Emitted(114, 5) Source(174, 5) + SourceIndex(0) -3 >Emitted(114, 11) Source(174, 11) + SourceIndex(0) -4 >Emitted(114, 14) Source(174, 23) + SourceIndex(0) -5 >Emitted(114, 15) Source(174, 30) + SourceIndex(0) -6 >Emitted(114, 16) Source(174, 31) + SourceIndex(0) -7 >Emitted(114, 18) Source(174, 33) + SourceIndex(0) -8 >Emitted(114, 19) Source(174, 34) + SourceIndex(0) -9 >Emitted(114, 21) Source(174, 41) + SourceIndex(0) -10>Emitted(114, 22) Source(174, 42) + SourceIndex(0) -11>Emitted(114, 24) Source(174, 44) + SourceIndex(0) -12>Emitted(114, 25) Source(174, 45) + SourceIndex(0) -13>Emitted(114, 26) Source(174, 46) + SourceIndex(0) -14>Emitted(114, 27) Source(174, 47) + SourceIndex(0) +1->Emitted(188, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(188, 5) Source(174, 5) + SourceIndex(0) +3 >Emitted(188, 11) Source(174, 11) + SourceIndex(0) +4 >Emitted(188, 14) Source(174, 23) + SourceIndex(0) --- ->>>var c12t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(189, 5) Source(174, 30) + SourceIndex(0) +2 >Emitted(189, 6) Source(174, 31) + SourceIndex(0) +3 >Emitted(189, 8) Source(174, 33) + SourceIndex(0) +4 >Emitted(189, 9) Source(174, 34) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(190, 5) Source(174, 41) + SourceIndex(0) +2 >Emitted(190, 6) Source(174, 42) + SourceIndex(0) +3 >Emitted(190, 8) Source(174, 44) + SourceIndex(0) +4 >Emitted(190, 9) Source(174, 45) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(191, 2) Source(174, 46) + SourceIndex(0) +2 >Emitted(191, 3) Source(174, 47) + SourceIndex(0) +--- +>>>var c12t11 = [ 1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ -5 > ^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ +5 > ^^^^^^^^^-> 1-> > 2 >var 3 > c12t11 4 > = <{(n: number, s: string): string;}[]> -5 > [ -6 > function( -7 > n -8 > , -9 > s -10> ) { -11> return -12> -13> s -14> ; -15> -16> } -17> ] -18> ; -1->Emitted(115, 1) Source(175, 1) + SourceIndex(0) -2 >Emitted(115, 5) Source(175, 5) + SourceIndex(0) -3 >Emitted(115, 11) Source(175, 11) + SourceIndex(0) -4 >Emitted(115, 14) Source(175, 52) + SourceIndex(0) -5 >Emitted(115, 15) Source(175, 53) + SourceIndex(0) -6 >Emitted(115, 25) Source(175, 62) + SourceIndex(0) -7 >Emitted(115, 26) Source(175, 63) + SourceIndex(0) -8 >Emitted(115, 28) Source(175, 65) + SourceIndex(0) -9 >Emitted(115, 29) Source(175, 66) + SourceIndex(0) -10>Emitted(115, 33) Source(175, 70) + SourceIndex(0) -11>Emitted(115, 39) Source(175, 76) + SourceIndex(0) -12>Emitted(115, 40) Source(175, 77) + SourceIndex(0) -13>Emitted(115, 41) Source(175, 78) + SourceIndex(0) -14>Emitted(115, 42) Source(175, 79) + SourceIndex(0) -15>Emitted(115, 43) Source(175, 80) + SourceIndex(0) -16>Emitted(115, 44) Source(175, 81) + SourceIndex(0) -17>Emitted(115, 45) Source(175, 82) + SourceIndex(0) -18>Emitted(115, 46) Source(175, 83) + SourceIndex(0) +1->Emitted(192, 1) Source(175, 1) + SourceIndex(0) +2 >Emitted(192, 5) Source(175, 5) + SourceIndex(0) +3 >Emitted(192, 11) Source(175, 11) + SourceIndex(0) +4 >Emitted(192, 14) Source(175, 52) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(193, 5) Source(175, 53) + SourceIndex(0) +2 >Emitted(193, 15) Source(175, 62) + SourceIndex(0) +3 >Emitted(193, 16) Source(175, 63) + SourceIndex(0) +4 >Emitted(193, 18) Source(175, 65) + SourceIndex(0) +5 >Emitted(193, 19) Source(175, 66) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(194, 9) Source(175, 70) + SourceIndex(0) +2 >Emitted(194, 15) Source(175, 76) + SourceIndex(0) +3 >Emitted(194, 16) Source(175, 77) + SourceIndex(0) +4 >Emitted(194, 17) Source(175, 78) + SourceIndex(0) +5 >Emitted(194, 18) Source(175, 79) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(195, 5) Source(175, 80) + SourceIndex(0) +2 >Emitted(195, 6) Source(175, 81) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(196, 2) Source(175, 82) + SourceIndex(0) +2 >Emitted(196, 3) Source(175, 83) + SourceIndex(0) --- >>>var c12t12 = { -1 > +1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ 5 > ^-> -1 > +1-> > 2 >var 3 > c12t12 4 > = -1 >Emitted(116, 1) Source(176, 1) + SourceIndex(0) -2 >Emitted(116, 5) Source(176, 5) + SourceIndex(0) -3 >Emitted(116, 11) Source(176, 11) + SourceIndex(0) -4 >Emitted(116, 14) Source(176, 21) + SourceIndex(0) +1->Emitted(197, 1) Source(176, 1) + SourceIndex(0) +2 >Emitted(197, 5) Source(176, 5) + SourceIndex(0) +3 >Emitted(197, 11) Source(176, 11) + SourceIndex(0) +4 >Emitted(197, 14) Source(176, 21) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -3055,12 +3194,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(117, 5) Source(177, 5) + SourceIndex(0) -2 >Emitted(117, 8) Source(177, 8) + SourceIndex(0) -3 >Emitted(117, 10) Source(177, 16) + SourceIndex(0) -4 >Emitted(117, 11) Source(177, 17) + SourceIndex(0) -5 >Emitted(117, 13) Source(177, 19) + SourceIndex(0) -6 >Emitted(117, 14) Source(177, 20) + SourceIndex(0) +1->Emitted(198, 5) Source(177, 5) + SourceIndex(0) +2 >Emitted(198, 8) Source(177, 8) + SourceIndex(0) +3 >Emitted(198, 10) Source(177, 16) + SourceIndex(0) +4 >Emitted(198, 11) Source(177, 17) + SourceIndex(0) +5 >Emitted(198, 13) Source(177, 19) + SourceIndex(0) +6 >Emitted(198, 14) Source(177, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -3069,8 +3208,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(118, 2) Source(178, 2) + SourceIndex(0) -2 >Emitted(118, 3) Source(178, 2) + SourceIndex(0) +1 >Emitted(199, 2) Source(178, 2) + SourceIndex(0) +2 >Emitted(199, 3) Source(178, 2) + SourceIndex(0) --- >>>var c12t13 = ({ 1-> @@ -3078,20 +3217,20 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^ 4 > ^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^-> 1-> > 2 >var 3 > c12t13 4 > = 5 > ( -1->Emitted(119, 1) Source(179, 1) + SourceIndex(0) -2 >Emitted(119, 5) Source(179, 5) + SourceIndex(0) -3 >Emitted(119, 11) Source(179, 11) + SourceIndex(0) -4 >Emitted(119, 14) Source(179, 21) + SourceIndex(0) -5 >Emitted(119, 15) Source(179, 22) + SourceIndex(0) +1->Emitted(200, 1) Source(179, 1) + SourceIndex(0) +2 >Emitted(200, 5) Source(179, 5) + SourceIndex(0) +3 >Emitted(200, 11) Source(179, 11) + SourceIndex(0) +4 >Emitted(200, 14) Source(179, 21) + SourceIndex(0) +5 >Emitted(200, 15) Source(179, 22) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -3099,13 +3238,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -3114,27 +3246,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(120, 5) Source(180, 5) + SourceIndex(0) -2 >Emitted(120, 6) Source(180, 6) + SourceIndex(0) -3 >Emitted(120, 8) Source(180, 8) + SourceIndex(0) -4 >Emitted(120, 18) Source(180, 17) + SourceIndex(0) -5 >Emitted(120, 19) Source(180, 18) + SourceIndex(0) -6 >Emitted(120, 21) Source(180, 20) + SourceIndex(0) -7 >Emitted(120, 22) Source(180, 21) + SourceIndex(0) -8 >Emitted(120, 26) Source(180, 25) + SourceIndex(0) -9 >Emitted(120, 32) Source(180, 31) + SourceIndex(0) -10>Emitted(120, 33) Source(180, 32) + SourceIndex(0) -11>Emitted(120, 34) Source(180, 33) + SourceIndex(0) -12>Emitted(120, 35) Source(180, 34) + SourceIndex(0) -13>Emitted(120, 36) Source(180, 35) + SourceIndex(0) -14>Emitted(120, 37) Source(180, 36) + SourceIndex(0) +1->Emitted(201, 5) Source(180, 5) + SourceIndex(0) +2 >Emitted(201, 6) Source(180, 6) + SourceIndex(0) +3 >Emitted(201, 8) Source(180, 8) + SourceIndex(0) +4 >Emitted(201, 18) Source(180, 17) + SourceIndex(0) +5 >Emitted(201, 19) Source(180, 18) + SourceIndex(0) +6 >Emitted(201, 21) Source(180, 20) + SourceIndex(0) +7 >Emitted(201, 22) Source(180, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(202, 9) Source(180, 25) + SourceIndex(0) +2 >Emitted(202, 15) Source(180, 31) + SourceIndex(0) +3 >Emitted(202, 16) Source(180, 32) + SourceIndex(0) +4 >Emitted(202, 17) Source(180, 33) + SourceIndex(0) +5 >Emitted(202, 18) Source(180, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(203, 5) Source(180, 35) + SourceIndex(0) +2 >Emitted(203, 6) Source(180, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -3145,9 +3288,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(121, 2) Source(181, 2) + SourceIndex(0) -2 >Emitted(121, 3) Source(181, 3) + SourceIndex(0) -3 >Emitted(121, 4) Source(181, 3) + SourceIndex(0) +1 >Emitted(204, 2) Source(181, 2) + SourceIndex(0) +2 >Emitted(204, 3) Source(181, 3) + SourceIndex(0) +3 >Emitted(204, 4) Source(181, 3) + SourceIndex(0) --- >>>var c12t14 = ({ 1-> @@ -3161,11 +3304,11 @@ sourceFile:contextualTyping.ts 3 > c12t14 4 > = 5 > ( -1->Emitted(122, 1) Source(182, 1) + SourceIndex(0) -2 >Emitted(122, 5) Source(182, 5) + SourceIndex(0) -3 >Emitted(122, 11) Source(182, 11) + SourceIndex(0) -4 >Emitted(122, 14) Source(182, 21) + SourceIndex(0) -5 >Emitted(122, 15) Source(182, 22) + SourceIndex(0) +1->Emitted(205, 1) Source(182, 1) + SourceIndex(0) +2 >Emitted(205, 5) Source(182, 5) + SourceIndex(0) +3 >Emitted(205, 11) Source(182, 11) + SourceIndex(0) +4 >Emitted(205, 14) Source(182, 21) + SourceIndex(0) +5 >Emitted(205, 15) Source(182, 22) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -3177,41 +3320,31 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(123, 5) Source(183, 5) + SourceIndex(0) -2 >Emitted(123, 6) Source(183, 6) + SourceIndex(0) -3 >Emitted(123, 8) Source(183, 8) + SourceIndex(0) -4 >Emitted(123, 10) Source(183, 10) + SourceIndex(0) +1 >Emitted(206, 5) Source(183, 5) + SourceIndex(0) +2 >Emitted(206, 6) Source(183, 6) + SourceIndex(0) +3 >Emitted(206, 8) Source(183, 8) + SourceIndex(0) +4 >Emitted(206, 10) Source(183, 10) + SourceIndex(0) --- >>>}); 1 >^ 2 > ^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^-> 1 > >} 2 > ) 3 > -1 >Emitted(124, 2) Source(184, 2) + SourceIndex(0) -2 >Emitted(124, 3) Source(184, 3) + SourceIndex(0) -3 >Emitted(124, 4) Source(184, 3) + SourceIndex(0) +1 >Emitted(207, 2) Source(184, 2) + SourceIndex(0) +2 >Emitted(207, 3) Source(184, 3) + SourceIndex(0) +3 >Emitted(207, 4) Source(184, 3) + SourceIndex(0) --- ->>>function EF1(a, b) { return a + b; } +>>>function EF1(a, b) { 1-> -2 >^^^^^^^^^ -3 > ^^^ -4 > ^ -5 > ^ -6 > ^^ -7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^^^ -13> ^ -14> ^ -15> ^ -16> ^ +2 >^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^-> 1-> > >// CONTEXT: Contextual typing declarations @@ -3220,40 +3353,50 @@ sourceFile:contextualTyping.ts >declare function EF1(a:number, b:number):number; > > -2 >function -3 > EF1 -4 > ( -5 > a -6 > , -7 > b -8 > ) { -9 > return -10> -11> a -12> + -13> b -14> ; -15> -16> } -1->Emitted(125, 1) Source(191, 1) + SourceIndex(0) -2 >Emitted(125, 10) Source(191, 10) + SourceIndex(0) -3 >Emitted(125, 13) Source(191, 13) + SourceIndex(0) -4 >Emitted(125, 14) Source(191, 14) + SourceIndex(0) -5 >Emitted(125, 15) Source(191, 15) + SourceIndex(0) -6 >Emitted(125, 17) Source(191, 16) + SourceIndex(0) -7 >Emitted(125, 18) Source(191, 17) + SourceIndex(0) -8 >Emitted(125, 22) Source(191, 21) + SourceIndex(0) name (EF1) -9 >Emitted(125, 28) Source(191, 27) + SourceIndex(0) name (EF1) -10>Emitted(125, 29) Source(191, 28) + SourceIndex(0) name (EF1) -11>Emitted(125, 30) Source(191, 29) + SourceIndex(0) name (EF1) -12>Emitted(125, 33) Source(191, 30) + SourceIndex(0) name (EF1) -13>Emitted(125, 34) Source(191, 31) + SourceIndex(0) name (EF1) -14>Emitted(125, 35) Source(191, 32) + SourceIndex(0) name (EF1) -15>Emitted(125, 36) Source(191, 33) + SourceIndex(0) name (EF1) -16>Emitted(125, 37) Source(191, 34) + SourceIndex(0) name (EF1) +2 >function EF1( +3 > a +4 > , +5 > b +1->Emitted(208, 1) Source(191, 1) + SourceIndex(0) +2 >Emitted(208, 14) Source(191, 14) + SourceIndex(0) +3 >Emitted(208, 15) Source(191, 15) + SourceIndex(0) +4 >Emitted(208, 17) Source(191, 16) + SourceIndex(0) +5 >Emitted(208, 18) Source(191, 17) + SourceIndex(0) +--- +>>> return a + b; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^ +1->) { +2 > return +3 > +4 > a +5 > + +6 > b +7 > ; +1->Emitted(209, 5) Source(191, 21) + SourceIndex(0) name (EF1) +2 >Emitted(209, 11) Source(191, 27) + SourceIndex(0) name (EF1) +3 >Emitted(209, 12) Source(191, 28) + SourceIndex(0) name (EF1) +4 >Emitted(209, 13) Source(191, 29) + SourceIndex(0) name (EF1) +5 >Emitted(209, 16) Source(191, 30) + SourceIndex(0) name (EF1) +6 >Emitted(209, 17) Source(191, 31) + SourceIndex(0) name (EF1) +7 >Emitted(209, 18) Source(191, 32) + SourceIndex(0) name (EF1) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +1 >Emitted(210, 1) Source(191, 33) + SourceIndex(0) name (EF1) +2 >Emitted(210, 2) Source(191, 34) + SourceIndex(0) name (EF1) --- >>>var efv = EF1(1, 2); -1 > +1-> 2 >^^^^ 3 > ^^^ 4 > ^^^ @@ -3265,7 +3408,7 @@ sourceFile:contextualTyping.ts 10> ^ 11> ^ 12> ^^^-> -1 > +1-> > > 2 >var @@ -3278,26 +3421,24 @@ sourceFile:contextualTyping.ts 9 > 2 10> ) 11> ; -1 >Emitted(126, 1) Source(193, 1) + SourceIndex(0) -2 >Emitted(126, 5) Source(193, 5) + SourceIndex(0) -3 >Emitted(126, 8) Source(193, 8) + SourceIndex(0) -4 >Emitted(126, 11) Source(193, 11) + SourceIndex(0) -5 >Emitted(126, 14) Source(193, 14) + SourceIndex(0) -6 >Emitted(126, 15) Source(193, 15) + SourceIndex(0) -7 >Emitted(126, 16) Source(193, 16) + SourceIndex(0) -8 >Emitted(126, 18) Source(193, 17) + SourceIndex(0) -9 >Emitted(126, 19) Source(193, 18) + SourceIndex(0) -10>Emitted(126, 20) Source(193, 19) + SourceIndex(0) -11>Emitted(126, 21) Source(193, 20) + SourceIndex(0) +1->Emitted(211, 1) Source(193, 1) + SourceIndex(0) +2 >Emitted(211, 5) Source(193, 5) + SourceIndex(0) +3 >Emitted(211, 8) Source(193, 8) + SourceIndex(0) +4 >Emitted(211, 11) Source(193, 11) + SourceIndex(0) +5 >Emitted(211, 14) Source(193, 14) + SourceIndex(0) +6 >Emitted(211, 15) Source(193, 15) + SourceIndex(0) +7 >Emitted(211, 16) Source(193, 16) + SourceIndex(0) +8 >Emitted(211, 18) Source(193, 17) + SourceIndex(0) +9 >Emitted(211, 19) Source(193, 18) + SourceIndex(0) +10>Emitted(211, 20) Source(193, 19) + SourceIndex(0) +11>Emitted(211, 21) Source(193, 20) + SourceIndex(0) --- >>>function Point(x, y) { 1-> -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^ -5 > ^ -6 > ^^ -7 > ^ +2 >^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> > > @@ -3313,19 +3454,15 @@ sourceFile:contextualTyping.ts >} > > -2 >function -3 > Point -4 > ( -5 > x -6 > , -7 > y -1->Emitted(127, 1) Source(207, 1) + SourceIndex(0) -2 >Emitted(127, 10) Source(207, 10) + SourceIndex(0) -3 >Emitted(127, 15) Source(207, 15) + SourceIndex(0) -4 >Emitted(127, 16) Source(207, 16) + SourceIndex(0) -5 >Emitted(127, 17) Source(207, 17) + SourceIndex(0) -6 >Emitted(127, 19) Source(207, 19) + SourceIndex(0) -7 >Emitted(127, 20) Source(207, 20) + SourceIndex(0) +2 >function Point( +3 > x +4 > , +5 > y +1->Emitted(212, 1) Source(207, 1) + SourceIndex(0) +2 >Emitted(212, 16) Source(207, 16) + SourceIndex(0) +3 >Emitted(212, 17) Source(207, 17) + SourceIndex(0) +4 >Emitted(212, 19) Source(207, 19) + SourceIndex(0) +5 >Emitted(212, 20) Source(207, 20) + SourceIndex(0) --- >>> this.x = x; 1 >^^^^ @@ -3344,13 +3481,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > x 7 > ; -1 >Emitted(128, 5) Source(208, 5) + SourceIndex(0) name (Point) -2 >Emitted(128, 9) Source(208, 9) + SourceIndex(0) name (Point) -3 >Emitted(128, 10) Source(208, 10) + SourceIndex(0) name (Point) -4 >Emitted(128, 11) Source(208, 11) + SourceIndex(0) name (Point) -5 >Emitted(128, 14) Source(208, 14) + SourceIndex(0) name (Point) -6 >Emitted(128, 15) Source(208, 15) + SourceIndex(0) name (Point) -7 >Emitted(128, 16) Source(208, 16) + SourceIndex(0) name (Point) +1 >Emitted(213, 5) Source(208, 5) + SourceIndex(0) name (Point) +2 >Emitted(213, 9) Source(208, 9) + SourceIndex(0) name (Point) +3 >Emitted(213, 10) Source(208, 10) + SourceIndex(0) name (Point) +4 >Emitted(213, 11) Source(208, 11) + SourceIndex(0) name (Point) +5 >Emitted(213, 14) Source(208, 14) + SourceIndex(0) name (Point) +6 >Emitted(213, 15) Source(208, 15) + SourceIndex(0) name (Point) +7 >Emitted(213, 16) Source(208, 16) + SourceIndex(0) name (Point) --- >>> this.y = y; 1->^^^^ @@ -3369,13 +3506,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > y 7 > ; -1->Emitted(129, 5) Source(209, 5) + SourceIndex(0) name (Point) -2 >Emitted(129, 9) Source(209, 9) + SourceIndex(0) name (Point) -3 >Emitted(129, 10) Source(209, 10) + SourceIndex(0) name (Point) -4 >Emitted(129, 11) Source(209, 11) + SourceIndex(0) name (Point) -5 >Emitted(129, 14) Source(209, 14) + SourceIndex(0) name (Point) -6 >Emitted(129, 15) Source(209, 15) + SourceIndex(0) name (Point) -7 >Emitted(129, 16) Source(209, 16) + SourceIndex(0) name (Point) +1->Emitted(214, 5) Source(209, 5) + SourceIndex(0) name (Point) +2 >Emitted(214, 9) Source(209, 9) + SourceIndex(0) name (Point) +3 >Emitted(214, 10) Source(209, 10) + SourceIndex(0) name (Point) +4 >Emitted(214, 11) Source(209, 11) + SourceIndex(0) name (Point) +5 >Emitted(214, 14) Source(209, 14) + SourceIndex(0) name (Point) +6 >Emitted(214, 15) Source(209, 15) + SourceIndex(0) name (Point) +7 >Emitted(214, 16) Source(209, 16) + SourceIndex(0) name (Point) --- >>> return this; 1->^^^^ @@ -3390,11 +3527,11 @@ sourceFile:contextualTyping.ts 3 > 4 > this 5 > ; -1->Emitted(130, 5) Source(211, 5) + SourceIndex(0) name (Point) -2 >Emitted(130, 11) Source(211, 11) + SourceIndex(0) name (Point) -3 >Emitted(130, 12) Source(211, 12) + SourceIndex(0) name (Point) -4 >Emitted(130, 16) Source(211, 16) + SourceIndex(0) name (Point) -5 >Emitted(130, 17) Source(211, 17) + SourceIndex(0) name (Point) +1->Emitted(215, 5) Source(211, 5) + SourceIndex(0) name (Point) +2 >Emitted(215, 11) Source(211, 11) + SourceIndex(0) name (Point) +3 >Emitted(215, 12) Source(211, 12) + SourceIndex(0) name (Point) +4 >Emitted(215, 16) Source(211, 16) + SourceIndex(0) name (Point) +5 >Emitted(215, 17) Source(211, 17) + SourceIndex(0) name (Point) --- >>>} 1 > @@ -3403,8 +3540,8 @@ sourceFile:contextualTyping.ts 1 > > 2 >} -1 >Emitted(131, 1) Source(212, 1) + SourceIndex(0) name (Point) -2 >Emitted(131, 2) Source(212, 2) + SourceIndex(0) name (Point) +1 >Emitted(216, 1) Source(212, 1) + SourceIndex(0) name (Point) +2 >Emitted(216, 2) Source(212, 2) + SourceIndex(0) name (Point) --- >>>Point.origin = new Point(0, 0); 1-> @@ -3436,19 +3573,19 @@ sourceFile:contextualTyping.ts 11> 0 12> ) 13> ; -1->Emitted(132, 1) Source(214, 1) + SourceIndex(0) -2 >Emitted(132, 6) Source(214, 6) + SourceIndex(0) -3 >Emitted(132, 7) Source(214, 7) + SourceIndex(0) -4 >Emitted(132, 13) Source(214, 13) + SourceIndex(0) -5 >Emitted(132, 16) Source(214, 16) + SourceIndex(0) -6 >Emitted(132, 20) Source(214, 20) + SourceIndex(0) -7 >Emitted(132, 25) Source(214, 25) + SourceIndex(0) -8 >Emitted(132, 26) Source(214, 26) + SourceIndex(0) -9 >Emitted(132, 27) Source(214, 27) + SourceIndex(0) -10>Emitted(132, 29) Source(214, 29) + SourceIndex(0) -11>Emitted(132, 30) Source(214, 30) + SourceIndex(0) -12>Emitted(132, 31) Source(214, 31) + SourceIndex(0) -13>Emitted(132, 32) Source(214, 32) + SourceIndex(0) +1->Emitted(217, 1) Source(214, 1) + SourceIndex(0) +2 >Emitted(217, 6) Source(214, 6) + SourceIndex(0) +3 >Emitted(217, 7) Source(214, 7) + SourceIndex(0) +4 >Emitted(217, 13) Source(214, 13) + SourceIndex(0) +5 >Emitted(217, 16) Source(214, 16) + SourceIndex(0) +6 >Emitted(217, 20) Source(214, 20) + SourceIndex(0) +7 >Emitted(217, 25) Source(214, 25) + SourceIndex(0) +8 >Emitted(217, 26) Source(214, 26) + SourceIndex(0) +9 >Emitted(217, 27) Source(214, 27) + SourceIndex(0) +10>Emitted(217, 29) Source(214, 29) + SourceIndex(0) +11>Emitted(217, 30) Source(214, 30) + SourceIndex(0) +12>Emitted(217, 31) Source(214, 31) + SourceIndex(0) +13>Emitted(217, 32) Source(214, 32) + SourceIndex(0) --- >>>Point.prototype.add = function (dx, dy) { 1-> @@ -3476,17 +3613,17 @@ sourceFile:contextualTyping.ts 9 > dx 10> , 11> dy -1->Emitted(133, 1) Source(216, 1) + SourceIndex(0) -2 >Emitted(133, 6) Source(216, 6) + SourceIndex(0) -3 >Emitted(133, 7) Source(216, 7) + SourceIndex(0) -4 >Emitted(133, 16) Source(216, 16) + SourceIndex(0) -5 >Emitted(133, 17) Source(216, 17) + SourceIndex(0) -6 >Emitted(133, 20) Source(216, 20) + SourceIndex(0) -7 >Emitted(133, 23) Source(216, 23) + SourceIndex(0) -8 >Emitted(133, 33) Source(216, 32) + SourceIndex(0) -9 >Emitted(133, 35) Source(216, 34) + SourceIndex(0) -10>Emitted(133, 37) Source(216, 36) + SourceIndex(0) -11>Emitted(133, 39) Source(216, 38) + SourceIndex(0) +1->Emitted(218, 1) Source(216, 1) + SourceIndex(0) +2 >Emitted(218, 6) Source(216, 6) + SourceIndex(0) +3 >Emitted(218, 7) Source(216, 7) + SourceIndex(0) +4 >Emitted(218, 16) Source(216, 16) + SourceIndex(0) +5 >Emitted(218, 17) Source(216, 17) + SourceIndex(0) +6 >Emitted(218, 20) Source(216, 20) + SourceIndex(0) +7 >Emitted(218, 23) Source(216, 23) + SourceIndex(0) +8 >Emitted(218, 33) Source(216, 32) + SourceIndex(0) +9 >Emitted(218, 35) Source(216, 34) + SourceIndex(0) +10>Emitted(218, 37) Source(216, 36) + SourceIndex(0) +11>Emitted(218, 39) Source(216, 38) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^ @@ -3528,25 +3665,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(134, 5) Source(217, 5) + SourceIndex(0) -2 >Emitted(134, 11) Source(217, 11) + SourceIndex(0) -3 >Emitted(134, 12) Source(217, 12) + SourceIndex(0) -4 >Emitted(134, 16) Source(217, 16) + SourceIndex(0) -5 >Emitted(134, 21) Source(217, 21) + SourceIndex(0) -6 >Emitted(134, 22) Source(217, 22) + SourceIndex(0) -7 >Emitted(134, 26) Source(217, 26) + SourceIndex(0) -8 >Emitted(134, 27) Source(217, 27) + SourceIndex(0) -9 >Emitted(134, 28) Source(217, 28) + SourceIndex(0) -10>Emitted(134, 31) Source(217, 31) + SourceIndex(0) -11>Emitted(134, 33) Source(217, 33) + SourceIndex(0) -12>Emitted(134, 35) Source(217, 35) + SourceIndex(0) -13>Emitted(134, 39) Source(217, 39) + SourceIndex(0) -14>Emitted(134, 40) Source(217, 40) + SourceIndex(0) -15>Emitted(134, 41) Source(217, 41) + SourceIndex(0) -16>Emitted(134, 44) Source(217, 44) + SourceIndex(0) -17>Emitted(134, 46) Source(217, 46) + SourceIndex(0) -18>Emitted(134, 47) Source(217, 47) + SourceIndex(0) -19>Emitted(134, 48) Source(217, 48) + SourceIndex(0) +1->Emitted(219, 5) Source(217, 5) + SourceIndex(0) +2 >Emitted(219, 11) Source(217, 11) + SourceIndex(0) +3 >Emitted(219, 12) Source(217, 12) + SourceIndex(0) +4 >Emitted(219, 16) Source(217, 16) + SourceIndex(0) +5 >Emitted(219, 21) Source(217, 21) + SourceIndex(0) +6 >Emitted(219, 22) Source(217, 22) + SourceIndex(0) +7 >Emitted(219, 26) Source(217, 26) + SourceIndex(0) +8 >Emitted(219, 27) Source(217, 27) + SourceIndex(0) +9 >Emitted(219, 28) Source(217, 28) + SourceIndex(0) +10>Emitted(219, 31) Source(217, 31) + SourceIndex(0) +11>Emitted(219, 33) Source(217, 33) + SourceIndex(0) +12>Emitted(219, 35) Source(217, 35) + SourceIndex(0) +13>Emitted(219, 39) Source(217, 39) + SourceIndex(0) +14>Emitted(219, 40) Source(217, 40) + SourceIndex(0) +15>Emitted(219, 41) Source(217, 41) + SourceIndex(0) +16>Emitted(219, 44) Source(217, 44) + SourceIndex(0) +17>Emitted(219, 46) Source(217, 46) + SourceIndex(0) +18>Emitted(219, 47) Source(217, 47) + SourceIndex(0) +19>Emitted(219, 48) Source(217, 48) + SourceIndex(0) --- >>>}; 1 > @@ -3557,9 +3694,9 @@ sourceFile:contextualTyping.ts > 2 >} 3 > ; -1 >Emitted(135, 1) Source(218, 1) + SourceIndex(0) -2 >Emitted(135, 2) Source(218, 2) + SourceIndex(0) -3 >Emitted(135, 3) Source(218, 3) + SourceIndex(0) +1 >Emitted(220, 1) Source(218, 1) + SourceIndex(0) +2 >Emitted(220, 2) Source(218, 2) + SourceIndex(0) +3 >Emitted(220, 3) Source(218, 3) + SourceIndex(0) --- >>>Point.prototype = { 1-> @@ -3574,11 +3711,11 @@ sourceFile:contextualTyping.ts 3 > . 4 > prototype 5 > = -1->Emitted(136, 1) Source(220, 1) + SourceIndex(0) -2 >Emitted(136, 6) Source(220, 6) + SourceIndex(0) -3 >Emitted(136, 7) Source(220, 7) + SourceIndex(0) -4 >Emitted(136, 16) Source(220, 16) + SourceIndex(0) -5 >Emitted(136, 19) Source(220, 19) + SourceIndex(0) +1->Emitted(221, 1) Source(220, 1) + SourceIndex(0) +2 >Emitted(221, 6) Source(220, 6) + SourceIndex(0) +3 >Emitted(221, 7) Source(220, 7) + SourceIndex(0) +4 >Emitted(221, 16) Source(220, 16) + SourceIndex(0) +5 >Emitted(221, 19) Source(220, 19) + SourceIndex(0) --- >>> x: 0, 1 >^^^^ @@ -3591,10 +3728,10 @@ sourceFile:contextualTyping.ts 2 > x 3 > : 4 > 0 -1 >Emitted(137, 5) Source(221, 5) + SourceIndex(0) -2 >Emitted(137, 6) Source(221, 6) + SourceIndex(0) -3 >Emitted(137, 8) Source(221, 8) + SourceIndex(0) -4 >Emitted(137, 9) Source(221, 9) + SourceIndex(0) +1 >Emitted(222, 5) Source(221, 5) + SourceIndex(0) +2 >Emitted(222, 6) Source(221, 6) + SourceIndex(0) +3 >Emitted(222, 8) Source(221, 8) + SourceIndex(0) +4 >Emitted(222, 9) Source(221, 9) + SourceIndex(0) --- >>> y: 0, 1->^^^^ @@ -3607,10 +3744,10 @@ sourceFile:contextualTyping.ts 2 > y 3 > : 4 > 0 -1->Emitted(138, 5) Source(222, 5) + SourceIndex(0) -2 >Emitted(138, 6) Source(222, 6) + SourceIndex(0) -3 >Emitted(138, 8) Source(222, 8) + SourceIndex(0) -4 >Emitted(138, 9) Source(222, 9) + SourceIndex(0) +1->Emitted(223, 5) Source(222, 5) + SourceIndex(0) +2 >Emitted(223, 6) Source(222, 6) + SourceIndex(0) +3 >Emitted(223, 8) Source(222, 8) + SourceIndex(0) +4 >Emitted(223, 9) Source(222, 9) + SourceIndex(0) --- >>> add: function (dx, dy) { 1->^^^^ @@ -3629,13 +3766,13 @@ sourceFile:contextualTyping.ts 5 > dx 6 > , 7 > dy -1->Emitted(139, 5) Source(223, 5) + SourceIndex(0) -2 >Emitted(139, 8) Source(223, 8) + SourceIndex(0) -3 >Emitted(139, 10) Source(223, 10) + SourceIndex(0) -4 >Emitted(139, 20) Source(223, 19) + SourceIndex(0) -5 >Emitted(139, 22) Source(223, 21) + SourceIndex(0) -6 >Emitted(139, 24) Source(223, 23) + SourceIndex(0) -7 >Emitted(139, 26) Source(223, 25) + SourceIndex(0) +1->Emitted(224, 5) Source(223, 5) + SourceIndex(0) +2 >Emitted(224, 8) Source(223, 8) + SourceIndex(0) +3 >Emitted(224, 10) Source(223, 10) + SourceIndex(0) +4 >Emitted(224, 20) Source(223, 19) + SourceIndex(0) +5 >Emitted(224, 22) Source(223, 21) + SourceIndex(0) +6 >Emitted(224, 24) Source(223, 23) + SourceIndex(0) +7 >Emitted(224, 26) Source(223, 25) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^^^^^ @@ -3677,25 +3814,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(140, 9) Source(224, 9) + SourceIndex(0) -2 >Emitted(140, 15) Source(224, 15) + SourceIndex(0) -3 >Emitted(140, 16) Source(224, 16) + SourceIndex(0) -4 >Emitted(140, 20) Source(224, 20) + SourceIndex(0) -5 >Emitted(140, 25) Source(224, 25) + SourceIndex(0) -6 >Emitted(140, 26) Source(224, 26) + SourceIndex(0) -7 >Emitted(140, 30) Source(224, 30) + SourceIndex(0) -8 >Emitted(140, 31) Source(224, 31) + SourceIndex(0) -9 >Emitted(140, 32) Source(224, 32) + SourceIndex(0) -10>Emitted(140, 35) Source(224, 35) + SourceIndex(0) -11>Emitted(140, 37) Source(224, 37) + SourceIndex(0) -12>Emitted(140, 39) Source(224, 39) + SourceIndex(0) -13>Emitted(140, 43) Source(224, 43) + SourceIndex(0) -14>Emitted(140, 44) Source(224, 44) + SourceIndex(0) -15>Emitted(140, 45) Source(224, 45) + SourceIndex(0) -16>Emitted(140, 48) Source(224, 48) + SourceIndex(0) -17>Emitted(140, 50) Source(224, 50) + SourceIndex(0) -18>Emitted(140, 51) Source(224, 51) + SourceIndex(0) -19>Emitted(140, 52) Source(224, 52) + SourceIndex(0) +1->Emitted(225, 9) Source(224, 9) + SourceIndex(0) +2 >Emitted(225, 15) Source(224, 15) + SourceIndex(0) +3 >Emitted(225, 16) Source(224, 16) + SourceIndex(0) +4 >Emitted(225, 20) Source(224, 20) + SourceIndex(0) +5 >Emitted(225, 25) Source(224, 25) + SourceIndex(0) +6 >Emitted(225, 26) Source(224, 26) + SourceIndex(0) +7 >Emitted(225, 30) Source(224, 30) + SourceIndex(0) +8 >Emitted(225, 31) Source(224, 31) + SourceIndex(0) +9 >Emitted(225, 32) Source(224, 32) + SourceIndex(0) +10>Emitted(225, 35) Source(224, 35) + SourceIndex(0) +11>Emitted(225, 37) Source(224, 37) + SourceIndex(0) +12>Emitted(225, 39) Source(224, 39) + SourceIndex(0) +13>Emitted(225, 43) Source(224, 43) + SourceIndex(0) +14>Emitted(225, 44) Source(224, 44) + SourceIndex(0) +15>Emitted(225, 45) Source(224, 45) + SourceIndex(0) +16>Emitted(225, 48) Source(224, 48) + SourceIndex(0) +17>Emitted(225, 50) Source(224, 50) + SourceIndex(0) +18>Emitted(225, 51) Source(224, 51) + SourceIndex(0) +19>Emitted(225, 52) Source(224, 52) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -3703,8 +3840,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(141, 5) Source(225, 5) + SourceIndex(0) -2 >Emitted(141, 6) Source(225, 6) + SourceIndex(0) +1 >Emitted(226, 5) Source(225, 5) + SourceIndex(0) +2 >Emitted(226, 6) Source(225, 6) + SourceIndex(0) --- >>>}; 1 >^ @@ -3713,8 +3850,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > ; -1 >Emitted(142, 2) Source(226, 2) + SourceIndex(0) -2 >Emitted(142, 3) Source(226, 3) + SourceIndex(0) +1 >Emitted(227, 2) Source(226, 2) + SourceIndex(0) +2 >Emitted(227, 3) Source(226, 3) + SourceIndex(0) --- >>>var x = {}; 1-> @@ -3734,11 +3871,11 @@ sourceFile:contextualTyping.ts 4 > : B = 5 > { } 6 > ; -1->Emitted(143, 1) Source(230, 1) + SourceIndex(0) -2 >Emitted(143, 5) Source(230, 5) + SourceIndex(0) -3 >Emitted(143, 6) Source(230, 6) + SourceIndex(0) -4 >Emitted(143, 9) Source(230, 12) + SourceIndex(0) -5 >Emitted(143, 11) Source(230, 15) + SourceIndex(0) -6 >Emitted(143, 12) Source(230, 16) + SourceIndex(0) +1->Emitted(228, 1) Source(230, 1) + SourceIndex(0) +2 >Emitted(228, 5) Source(230, 5) + SourceIndex(0) +3 >Emitted(228, 6) Source(230, 6) + SourceIndex(0) +4 >Emitted(228, 9) Source(230, 12) + SourceIndex(0) +5 >Emitted(228, 11) Source(230, 15) + SourceIndex(0) +6 >Emitted(228, 12) Source(230, 16) + SourceIndex(0) --- >>>//# sourceMappingURL=contextualTyping.js.map \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping1.js b/tests/baselines/reference/contextualTyping1.js index 7f1e12c744b..6b1b88c36ff 100644 --- a/tests/baselines/reference/contextualTyping1.js +++ b/tests/baselines/reference/contextualTyping1.js @@ -2,4 +2,4 @@ var foo: {id:number;} = {id:4}; //// [contextualTyping1.js] -var foo = { id: 4 };\n \ No newline at end of file +var foo = {\n id: 4\n};\n \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping10.js b/tests/baselines/reference/contextualTyping10.js index 08a2172b69a..e6afd72e817 100644 --- a/tests/baselines/reference/contextualTyping10.js +++ b/tests/baselines/reference/contextualTyping10.js @@ -4,7 +4,14 @@ class foo { public bar:{id:number;}[] = [{id:1}, {id:2}]; } //// [contextualTyping10.js] var foo = (function () { function foo() { - this.bar = [{ id: 1 }, { id: 2 }]; + this.bar = [ + { + id: 1 + }, + { + id: 2 + } + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping11.js b/tests/baselines/reference/contextualTyping11.js index a7ec3815fae..123295d5387 100644 --- a/tests/baselines/reference/contextualTyping11.js +++ b/tests/baselines/reference/contextualTyping11.js @@ -4,7 +4,9 @@ class foo { public bar:{id:number;}[] = [({})]; } //// [contextualTyping11.js] var foo = (function () { function foo() { - this.bar = [({})]; + this.bar = [ + ({}) + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping12.js b/tests/baselines/reference/contextualTyping12.js index c41ccbed990..60f3965f95a 100644 --- a/tests/baselines/reference/contextualTyping12.js +++ b/tests/baselines/reference/contextualTyping12.js @@ -4,7 +4,15 @@ class foo { public bar:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; } //// [contextualTyping12.js] var foo = (function () { function foo() { - this.bar = [{ id: 1 }, { id: 2, name: "foo" }]; + this.bar = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping13.js b/tests/baselines/reference/contextualTyping13.js index 7965745b943..c035434342e 100644 --- a/tests/baselines/reference/contextualTyping13.js +++ b/tests/baselines/reference/contextualTyping13.js @@ -2,4 +2,6 @@ var foo:(a:number)=>number = function(a){return a}; //// [contextualTyping13.js] -var foo = function (a) { return a; }; +var foo = function (a) { + return a; +}; diff --git a/tests/baselines/reference/contextualTyping14.js b/tests/baselines/reference/contextualTyping14.js index 5bae8c948a2..ea9539ef41e 100644 --- a/tests/baselines/reference/contextualTyping14.js +++ b/tests/baselines/reference/contextualTyping14.js @@ -4,7 +4,9 @@ class foo { public bar:(a:number)=>number = function(a){return a}; } //// [contextualTyping14.js] var foo = (function () { function foo() { - this.bar = function (a) { return a; }; + this.bar = function (a) { + return a; + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping15.js b/tests/baselines/reference/contextualTyping15.js index 250076ec4d5..99855681571 100644 --- a/tests/baselines/reference/contextualTyping15.js +++ b/tests/baselines/reference/contextualTyping15.js @@ -4,7 +4,9 @@ class foo { public bar: { (): number; (i: number): number; } = function() { retu //// [contextualTyping15.js] var foo = (function () { function foo() { - this.bar = function () { return 1; }; + this.bar = function () { + return 1; + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping16.js b/tests/baselines/reference/contextualTyping16.js index 1a4c28ba745..bccf047ad13 100644 --- a/tests/baselines/reference/contextualTyping16.js +++ b/tests/baselines/reference/contextualTyping16.js @@ -2,5 +2,9 @@ var foo: {id:number;} = {id:4}; foo = {id:5}; //// [contextualTyping16.js] -var foo = { id: 4 }; -foo = { id: 5 }; +var foo = { + id: 4 +}; +foo = { + id: 5 +}; diff --git a/tests/baselines/reference/contextualTyping17.js b/tests/baselines/reference/contextualTyping17.js index 0ae2605dbd6..2e433cd4dfd 100644 --- a/tests/baselines/reference/contextualTyping17.js +++ b/tests/baselines/reference/contextualTyping17.js @@ -2,5 +2,10 @@ var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; //// [contextualTyping17.js] -var foo = { id: 4 }; -foo = { id: 5, name: "foo" }; +var foo = { + id: 4 +}; +foo = { + id: 5, + name: "foo" +}; diff --git a/tests/baselines/reference/contextualTyping18.js b/tests/baselines/reference/contextualTyping18.js index fb058032ed2..7289d73ba18 100644 --- a/tests/baselines/reference/contextualTyping18.js +++ b/tests/baselines/reference/contextualTyping18.js @@ -3,4 +3,6 @@ var foo: {id:number;} = <{id:number;}>({ }); foo = {id: 5}; //// [contextualTyping18.js] var foo = ({}); -foo = { id: 5 }; +foo = { + id: 5 +}; diff --git a/tests/baselines/reference/contextualTyping19.js b/tests/baselines/reference/contextualTyping19.js index e4e51372858..2b70fc19767 100644 --- a/tests/baselines/reference/contextualTyping19.js +++ b/tests/baselines/reference/contextualTyping19.js @@ -2,5 +2,16 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2}]; //// [contextualTyping19.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, { id: 2 }]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + { + id: 2 + } +]; diff --git a/tests/baselines/reference/contextualTyping2.js b/tests/baselines/reference/contextualTyping2.js index 4dc3f71e9b0..4240ce23a1f 100644 --- a/tests/baselines/reference/contextualTyping2.js +++ b/tests/baselines/reference/contextualTyping2.js @@ -2,4 +2,7 @@ var foo: {id:number;} = {id:4, name:"foo"}; //// [contextualTyping2.js] -var foo = { id: 4, name: "foo" }; +var foo = { + id: 4, + name: "foo" +}; diff --git a/tests/baselines/reference/contextualTyping20.js b/tests/baselines/reference/contextualTyping20.js index f53a7f7554b..e2afa7a21ff 100644 --- a/tests/baselines/reference/contextualTyping20.js +++ b/tests/baselines/reference/contextualTyping20.js @@ -2,5 +2,17 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2, name:"foo"}]; //// [contextualTyping20.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, { id: 2, name: "foo" }]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } +]; diff --git a/tests/baselines/reference/contextualTyping21.js b/tests/baselines/reference/contextualTyping21.js index 3d87d9e4245..6c3aa6e885f 100644 --- a/tests/baselines/reference/contextualTyping21.js +++ b/tests/baselines/reference/contextualTyping21.js @@ -2,5 +2,14 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; //// [contextualTyping21.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, 1]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + 1 +]; diff --git a/tests/baselines/reference/contextualTyping22.js b/tests/baselines/reference/contextualTyping22.js index 3c9a5cb4d3e..b8ebfd3ecb7 100644 --- a/tests/baselines/reference/contextualTyping22.js +++ b/tests/baselines/reference/contextualTyping22.js @@ -2,5 +2,9 @@ var foo:(a:number)=>number = function(a){return a}; foo = function(b){return b}; //// [contextualTyping22.js] -var foo = function (a) { return a; }; -foo = function (b) { return b; }; +var foo = function (a) { + return a; +}; +foo = function (b) { + return b; +}; diff --git a/tests/baselines/reference/contextualTyping23.js b/tests/baselines/reference/contextualTyping23.js index 0207f6af15d..187fd3f86d3 100644 --- a/tests/baselines/reference/contextualTyping23.js +++ b/tests/baselines/reference/contextualTyping23.js @@ -3,4 +3,6 @@ var foo:(a:{():number; (i:number):number; })=>number; foo = function(a){return 5 //// [contextualTyping23.js] var foo; -foo = function (a) { return 5; }; +foo = function (a) { + return 5; +}; diff --git a/tests/baselines/reference/contextualTyping24.js b/tests/baselines/reference/contextualTyping24.js index 04c4ecba21b..170a6983b9f 100644 --- a/tests/baselines/reference/contextualTyping24.js +++ b/tests/baselines/reference/contextualTyping24.js @@ -3,4 +3,6 @@ var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){r //// [contextualTyping24.js] var foo; -foo = function (a) { return 5; }; +foo = function (a) { + return 5; +}; diff --git a/tests/baselines/reference/contextualTyping25.js b/tests/baselines/reference/contextualTyping25.js index f90a70098d7..808ee2202ec 100644 --- a/tests/baselines/reference/contextualTyping25.js +++ b/tests/baselines/reference/contextualTyping25.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping25.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping26.js b/tests/baselines/reference/contextualTyping26.js index feacf3da328..fabd810c8f5 100644 --- a/tests/baselines/reference/contextualTyping26.js +++ b/tests/baselines/reference/contextualTyping26.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping26.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping27.js b/tests/baselines/reference/contextualTyping27.js index ce35e606196..11b8c251416 100644 --- a/tests/baselines/reference/contextualTyping27.js +++ b/tests/baselines/reference/contextualTyping27.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping27.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping28.js b/tests/baselines/reference/contextualTyping28.js index 095e3812400..a9dd848a2c0 100644 --- a/tests/baselines/reference/contextualTyping28.js +++ b/tests/baselines/reference/contextualTyping28.js @@ -2,6 +2,9 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping28.js] -function foo(param) { } +function foo(param) { +} ; -foo([1]); +foo([ + 1 +]); diff --git a/tests/baselines/reference/contextualTyping29.js b/tests/baselines/reference/contextualTyping29.js index 1d5b32c208d..cf3a8e340a1 100644 --- a/tests/baselines/reference/contextualTyping29.js +++ b/tests/baselines/reference/contextualTyping29.js @@ -2,6 +2,10 @@ function foo(param:number[]){}; foo([1, 3]); //// [contextualTyping29.js] -function foo(param) { } +function foo(param) { +} ; -foo([1, 3]); +foo([ + 1, + 3 +]); diff --git a/tests/baselines/reference/contextualTyping3.js b/tests/baselines/reference/contextualTyping3.js index 19d71f4ca71..8ea5481037d 100644 --- a/tests/baselines/reference/contextualTyping3.js +++ b/tests/baselines/reference/contextualTyping3.js @@ -4,7 +4,9 @@ class foo { public bar:{id:number;} = {id:5}; } //// [contextualTyping3.js] var foo = (function () { function foo() { - this.bar = { id: 5 }; + this.bar = { + id: 5 + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping30.js b/tests/baselines/reference/contextualTyping30.js index 94547a387d7..25b8d9c6f55 100644 --- a/tests/baselines/reference/contextualTyping30.js +++ b/tests/baselines/reference/contextualTyping30.js @@ -2,6 +2,10 @@ function foo(param:number[]){}; foo([1, "a"]); //// [contextualTyping30.js] -function foo(param) { } +function foo(param) { +} ; -foo([1, "a"]); +foo([ + 1, + "a" +]); diff --git a/tests/baselines/reference/contextualTyping31.js b/tests/baselines/reference/contextualTyping31.js index 1eb4d5660fc..0e29d9f68c0 100644 --- a/tests/baselines/reference/contextualTyping31.js +++ b/tests/baselines/reference/contextualTyping31.js @@ -2,6 +2,9 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping31.js] -function foo(param) { } +function foo(param) { +} ; -foo([1]); +foo([ + 1 +]); diff --git a/tests/baselines/reference/contextualTyping32.js b/tests/baselines/reference/contextualTyping32.js index bbbafa70796..8a47a109aec 100644 --- a/tests/baselines/reference/contextualTyping32.js +++ b/tests/baselines/reference/contextualTyping32.js @@ -2,6 +2,14 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); //// [contextualTyping32.js] -function foo(param) { } +function foo(param) { +} ; -foo([function () { return 1; }, function () { return 4; }]); +foo([ + function () { + return 1; + }, + function () { + return 4; + } +]); diff --git a/tests/baselines/reference/contextualTyping33.js b/tests/baselines/reference/contextualTyping33.js index 1d800b1d113..9ee3245416f 100644 --- a/tests/baselines/reference/contextualTyping33.js +++ b/tests/baselines/reference/contextualTyping33.js @@ -2,6 +2,14 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); //// [contextualTyping33.js] -function foo(param) { } +function foo(param) { +} ; -foo([function () { return 1; }, function () { return "foo"; }]); +foo([ + function () { + return 1; + }, + function () { + return "foo"; + } +]); diff --git a/tests/baselines/reference/contextualTyping34.js b/tests/baselines/reference/contextualTyping34.js index 5e12ba602ae..fc801d3cd7e 100644 --- a/tests/baselines/reference/contextualTyping34.js +++ b/tests/baselines/reference/contextualTyping34.js @@ -2,4 +2,6 @@ var foo = <{ id: number;}> ({id:4}); //// [contextualTyping34.js] -var foo = ({ id: 4 }); +var foo = ({ + id: 4 +}); diff --git a/tests/baselines/reference/contextualTyping35.js b/tests/baselines/reference/contextualTyping35.js index 34d9e6b39a8..bf9e02dd903 100644 --- a/tests/baselines/reference/contextualTyping35.js +++ b/tests/baselines/reference/contextualTyping35.js @@ -2,4 +2,7 @@ var foo = <{ id: number;}> {id:4, name: "as"}; //// [contextualTyping35.js] -var foo = { id: 4, name: "as" }; +var foo = { + id: 4, + name: "as" +}; diff --git a/tests/baselines/reference/contextualTyping36.js b/tests/baselines/reference/contextualTyping36.js index 3bdaf5a8d05..623a1e92ad2 100644 --- a/tests/baselines/reference/contextualTyping36.js +++ b/tests/baselines/reference/contextualTyping36.js @@ -2,4 +2,9 @@ var foo = <{ id: number; }[]>[{ id: 4 }, <{ id: number; }>({ })]; //// [contextualTyping36.js] -var foo = [{ id: 4 }, ({})]; +var foo = [ + { + id: 4 + }, + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping37.js b/tests/baselines/reference/contextualTyping37.js index 4bb6e7b350f..2f2636579bf 100644 --- a/tests/baselines/reference/contextualTyping37.js +++ b/tests/baselines/reference/contextualTyping37.js @@ -2,4 +2,9 @@ var foo = <{ id: number; }[]>[{ foo: "s" }, { }]; //// [contextualTyping37.js] -var foo = [{ foo: "s" }, {}]; +var foo = [ + { + foo: "s" + }, + {} +]; diff --git a/tests/baselines/reference/contextualTyping38.js b/tests/baselines/reference/contextualTyping38.js index 9bed543ff7f..71ed8ece57d 100644 --- a/tests/baselines/reference/contextualTyping38.js +++ b/tests/baselines/reference/contextualTyping38.js @@ -2,4 +2,6 @@ var foo = <{ (): number; }> function(a) { return a }; //// [contextualTyping38.js] -var foo = function (a) { return a; }; +var foo = function (a) { + return a; +}; diff --git a/tests/baselines/reference/contextualTyping39.js b/tests/baselines/reference/contextualTyping39.js index 89d045830a3..9a97b7eb3cc 100644 --- a/tests/baselines/reference/contextualTyping39.js +++ b/tests/baselines/reference/contextualTyping39.js @@ -2,4 +2,6 @@ var foo = <{ (): number; }> function() { return "err"; }; //// [contextualTyping39.js] -var foo = function () { return "err"; }; +var foo = function () { + return "err"; +}; diff --git a/tests/baselines/reference/contextualTyping4.js b/tests/baselines/reference/contextualTyping4.js index af79e3732f2..902791adcbc 100644 --- a/tests/baselines/reference/contextualTyping4.js +++ b/tests/baselines/reference/contextualTyping4.js @@ -4,7 +4,10 @@ class foo { public bar:{id:number;} = {id:5, name:"foo"}; } //// [contextualTyping4.js] var foo = (function () { function foo() { - this.bar = { id: 5, name: "foo" }; + this.bar = { + id: 5, + name: "foo" + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping40.js b/tests/baselines/reference/contextualTyping40.js index 0b98f8e45c6..ba2c447b10f 100644 --- a/tests/baselines/reference/contextualTyping40.js +++ b/tests/baselines/reference/contextualTyping40.js @@ -2,4 +2,6 @@ var foo = <{():number; (i:number):number; }> function(){return 1;}; //// [contextualTyping40.js] -var foo = function () { return 1; }; +var foo = function () { + return 1; +}; diff --git a/tests/baselines/reference/contextualTyping41.js b/tests/baselines/reference/contextualTyping41.js index 8bce7918dd2..720f1d178f6 100644 --- a/tests/baselines/reference/contextualTyping41.js +++ b/tests/baselines/reference/contextualTyping41.js @@ -2,4 +2,6 @@ var foo = <{():number; (i:number):number; }> (function(){return "err";}); //// [contextualTyping41.js] -var foo = (function () { return "err"; }); +var foo = (function () { + return "err"; +}); diff --git a/tests/baselines/reference/contextualTyping6.js b/tests/baselines/reference/contextualTyping6.js index df2d2ac15cb..c1fb58d4d2d 100644 --- a/tests/baselines/reference/contextualTyping6.js +++ b/tests/baselines/reference/contextualTyping6.js @@ -2,4 +2,11 @@ var foo:{id:number;}[] = [{id:1}, {id:2}]; //// [contextualTyping6.js] -var foo = [{ id: 1 }, { id: 2 }]; +var foo = [ + { + id: 1 + }, + { + id: 2 + } +]; diff --git a/tests/baselines/reference/contextualTyping7.js b/tests/baselines/reference/contextualTyping7.js index 2cd2494c3bf..6b93e7308d5 100644 --- a/tests/baselines/reference/contextualTyping7.js +++ b/tests/baselines/reference/contextualTyping7.js @@ -2,4 +2,6 @@ var foo:{id:number;}[] = [<{id:number;}>({})]; //// [contextualTyping7.js] -var foo = [({})]; +var foo = [ + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping8.js b/tests/baselines/reference/contextualTyping8.js index a0e3b5b9ef5..276b32bed68 100644 --- a/tests/baselines/reference/contextualTyping8.js +++ b/tests/baselines/reference/contextualTyping8.js @@ -2,4 +2,6 @@ var foo:{id:number;}[] = [<{id:number;}>({})]; //// [contextualTyping8.js] -var foo = [({})]; +var foo = [ + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping9.js b/tests/baselines/reference/contextualTyping9.js index 71384cf8b04..19d0f0fba79 100644 --- a/tests/baselines/reference/contextualTyping9.js +++ b/tests/baselines/reference/contextualTyping9.js @@ -2,4 +2,12 @@ var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; //// [contextualTyping9.js] -var foo = [{ id: 1 }, { id: 2, name: "foo" }]; +var foo = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } +]; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 844a50428e2..b9ea5beaa77 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -40,4 +40,11 @@ var C = (function (_super) { } return C; })(A); -var xs = [function (x) { }, function (x) { }, function (x) { }]; +var xs = [ + function (x) { + }, + function (x) { + }, + function (x) { + } +]; diff --git a/tests/baselines/reference/contextualTypingOfAccessors.js b/tests/baselines/reference/contextualTypingOfAccessors.js index f785d19636c..0f45574be99 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.js +++ b/tests/baselines/reference/contextualTypingOfAccessors.js @@ -18,7 +18,10 @@ x = { var x; x = { get foo() { - return function (n) { return n; }; + return function (n) { + return n; + }; }, - set foo(x) { } + set foo(x) { + } }; diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js index e7513093402..e2edcb3d5df 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js @@ -9,6 +9,9 @@ r2.getDate(); //// [contextualTypingOfArrayLiterals1.js] -var x3 = [new Date(), 1]; +var x3 = [ + new Date(), + 1 +]; var r2 = x3[1]; r2.getDate(); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index b1100ba80a9..805ffca7508 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -21,7 +21,11 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var x = true ? function (a) { return a.toExponential(); } : function (b) { return b.toFixed(); }; +var x = true ? function (a) { + return a.toExponential(); +} : function (b) { + return b.toFixed(); +}; var A = (function () { function A() { } @@ -41,4 +45,8 @@ var C = (function (_super) { } return C; })(A); -var x2 = true ? function (a) { return a.foo; } : function (b) { return b.foo; }; +var x2 = true ? function (a) { + return a.foo; +} : function (b) { + return b.foo; +}; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index f832d2766ee..c84fa87e817 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -38,4 +38,7 @@ var C = (function (_super) { } return C; })(A); -var x2 = true ? function (a) { return a.foo; } : function (b) { }; +var x2 = true ? function (a) { + return a.foo; +} : function (b) { +}; diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js index 8142b51dcdd..b2a8bf0dba1 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js @@ -22,6 +22,10 @@ var r6 = _.forEach(c2, (x) => { return x.toFixed() }); var c2; var _; // errors on all 3 lines, bug was that r5 was the only line with errors -var f = function (x) { return x.toFixed(); }; +var f = function (x) { + return x.toFixed(); +}; var r5 = _.forEach(c2, f); -var r6 = _.forEach(c2, function (x) { return x.toFixed(); }); +var r6 = _.forEach(c2, function (x) { + return x.toFixed(); +}); diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js index 67670bf872e..ecc6a0ecd16 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js @@ -7,6 +7,11 @@ callb((a) => a.length); // Ok, we choose the second overload because the first o callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body //// [contextualTypingOfLambdaReturnExpression.js] -function callb(a) { } -callb(function (a) { return a.length; }); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type -callb(function (a) { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body +function callb(a) { +} +callb(function (a) { + return a.length; +}); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type +callb(function (a) { + a.length; +}); // Error, we picked the first overload and errored when type checking the lambda body diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js index f21bc852af8..400a052a7bb 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js @@ -9,4 +9,5 @@ foo.getFoo = bar => { }; //// [contextualTypingOfLambdaWithMultipleSignatures.js] var foo; -foo.getFoo = function (bar) { }; +foo.getFoo = function (bar) { +}; diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js index 442ded4ba75..415fc3acd2e 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js @@ -8,4 +8,6 @@ f = (a) => { return a.asdf } //// [contextualTypingOfLambdaWithMultipleSignatures2.js] var f; -f = function (a) { return a.asdf; }; +f = function (a) { + return a.asdf; +}; diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.js b/tests/baselines/reference/contextualTypingOfObjectLiterals.js index e267ce6269e..d965ef5828c 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.js @@ -12,10 +12,13 @@ f(obj2); // Error - indexer doesn't match //// [contextualTypingOfObjectLiterals.js] var obj1; -var obj2 = { x: "" }; +var obj2 = { + x: "" +}; obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match -function f(x) { } +function f(x) { +} f({}); // Ok f(obj1); // Ok f(obj2); // Error - indexer doesn't match diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js index 4c450d31152..f709890c550 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js @@ -6,5 +6,10 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error //// [contextualTypingOfObjectLiterals2.js] -function f2(args) { } -f2({ foo: function (s) { return s.hmm; } }); // 's' should be 'string', so this should be an error +function f2(args) { +} +f2({ + foo: function (s) { + return s.hmm; + } +}); // 's' should be 'string', so this should be an error diff --git a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js index 4b392bac80a..96e8f860358 100644 --- a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js +++ b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js @@ -8,4 +8,8 @@ f6(x => f6(y => x = y)); function f6(x) { return null; } -f6(function (x) { return f6(function (y) { return x = y; }); }); +f6(function (x) { + return f6(function (y) { + return x = y; + }); +}); diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js index 55f7580b3f8..f8804547d46 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js @@ -5,5 +5,13 @@ var r9 = f10('', () => (a => a.foo), 1); // error //// [contextualTypingWithFixedTypeParameters1.js] var f10; -f10('', function () { return function (a) { return a.foo; }; }, ''); // a is string -var r9 = f10('', function () { return (function (a) { return a.foo; }); }, 1); // error +f10('', function () { + return function (a) { + return a.foo; + }; +}, ''); // a is string +var r9 = f10('', function () { + return (function (a) { + return a.foo; + }); +}, 1); // error diff --git a/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js b/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js index 5ee0c758022..f548b6daaad 100644 --- a/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js +++ b/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js @@ -19,6 +19,10 @@ f3 = (x, y) => { return x } //// [contextualTypingWithGenericAndNonGenericSignature.js] //• If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. var f2; -f2 = function (x, y) { return x; }; +f2 = function (x, y) { + return x; +}; var f3; -f3 = function (x, y) { return x; }; +f3 = function (x, y) { + return x; +}; diff --git a/tests/baselines/reference/contextualTypingWithGenericSignature.js b/tests/baselines/reference/contextualTypingWithGenericSignature.js index 611a35f38ac..a1417e90b43 100644 --- a/tests/baselines/reference/contextualTypingWithGenericSignature.js +++ b/tests/baselines/reference/contextualTypingWithGenericSignature.js @@ -10,4 +10,6 @@ f2 = (x, y) => { return x } //// [contextualTypingWithGenericSignature.js] // If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. var f2; -f2 = function (x, y) { return x; }; +f2 = function (x, y) { + return x; +}; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator.js b/tests/baselines/reference/contextuallyTypingOrOperator.js index 6dc3e09bf89..6ffd81b1e03 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator.js @@ -7,7 +7,27 @@ var v3 = (s: string) => s.length || function (s: number) { return 1 }; var v4 = (s: number) => 1 || function (s: string) { return s.length }; //// [contextuallyTypingOrOperator.js] -var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; -var v2 = function (s) { return s.length || function (s) { s.length; }; }; -var v3 = function (s) { return s.length || function (s) { return 1; }; }; -var v4 = function (s) { return 1 || function (s) { return s.length; }; }; +var v = { + a: function (s) { + return s.length; + } +} || { + a: function (s) { + return 1; + } +}; +var v2 = function (s) { + return s.length || function (s) { + s.length; + }; +}; +var v3 = function (s) { + return s.length || function (s) { + return 1; + }; +}; +var v4 = function (s) { + return 1 || function (s) { + return s.length; + }; +}; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator2.js b/tests/baselines/reference/contextuallyTypingOrOperator2.js index fa850929b3e..0b4dfa46bc4 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator2.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator2.js @@ -4,5 +4,17 @@ var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 }; var v2 = (s: string) => s.length || function (s) { s.aaa }; //// [contextuallyTypingOrOperator2.js] -var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; -var v2 = function (s) { return s.length || function (s) { s.aaa; }; }; +var v = { + a: function (s) { + return s.length; + } +} || { + a: function (s) { + return 1; + } +}; +var v2 = function (s) { + return s.length || function (s) { + s.aaa; + }; +}; diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index a68f751f434..deae65b54c9 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -325,7 +325,8 @@ var string = 0; var get = 0; var yield = 0; var declare = 0; -function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } +function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { +} var bigObject = { constructor: 0, any: 0, diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.js b/tests/baselines/reference/couldNotSelectGenericOverload.js index 996ebde8448..44bd87ace5d 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.js +++ b/tests/baselines/reference/couldNotSelectGenericOverload.js @@ -9,9 +9,16 @@ var b3G = makeArray2(1, ""); // error //// [couldNotSelectGenericOverload.js] -function makeArray(items) { return items; } -var b = [1, ""]; +function makeArray(items) { + return items; +} +var b = [ + 1, + "" +]; var b1G = makeArray(1, ""); // any, no error var b2G = makeArray(b); // any[] -function makeArray2(items) { return items; } +function makeArray2(items) { + return items; +} var b3G = makeArray2(1, ""); // error diff --git a/tests/baselines/reference/covariance1.js b/tests/baselines/reference/covariance1.js index bed31338cbe..9c012ca85c8 100644 --- a/tests/baselines/reference/covariance1.js +++ b/tests/baselines/reference/covariance1.js @@ -27,10 +27,15 @@ var M; return XX; })(); M.XX = XX; - function f(y) { } + function f(y) { + } M.f = f; var a; - f({ x: a }); // ok + f({ + x: a + }); // ok var b; - f({ x: b }); // ok covariant subtype + f({ + x: b + }); // ok covariant subtype })(M || (M = {})); diff --git a/tests/baselines/reference/crashInResolveInterface.js b/tests/baselines/reference/crashInResolveInterface.js index 85b6217726a..94c60a7cc85 100644 --- a/tests/baselines/reference/crashInResolveInterface.js +++ b/tests/baselines/reference/crashInResolveInterface.js @@ -20,6 +20,8 @@ interface C { //// [file1.js] var q1; -var x = q1.each(function (x) { return c.log(x); }); +var x = q1.each(function (x) { + return c.log(x); +}); //// [file2.js] /// diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 717d76309a5..450d180e884 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. @@ -9,7 +9,7 @@ tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): e } class D extends C { } function foo(x: "hi", items: string[]): typeof foo; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): typeof foo { return null; diff --git a/tests/baselines/reference/customEventDetail.js b/tests/baselines/reference/customEventDetail.js index 7207ecf0628..c88c6e677bf 100644 --- a/tests/baselines/reference/customEventDetail.js +++ b/tests/baselines/reference/customEventDetail.js @@ -8,5 +8,8 @@ var y = x.detail.name; //// [customEventDetail.js] var x; // valid since detail is any -x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }); +x.initCustomEvent('hello', true, true, { + id: 12, + name: 'hello' +}); var y = x.detail.name; diff --git a/tests/baselines/reference/debuggerEmit.js b/tests/baselines/reference/debuggerEmit.js index 8cf5dc69cd0..c2f730271be 100644 --- a/tests/baselines/reference/debuggerEmit.js +++ b/tests/baselines/reference/debuggerEmit.js @@ -3,5 +3,7 @@ var x = function () { debugger; } x(); //// [debuggerEmit.js] -var x = function () { debugger; }; +var x = function () { + debugger; +}; x(); diff --git a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js index 7814e9641ba..30ba24ed405 100644 --- a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js +++ b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js @@ -16,7 +16,8 @@ var Foo = (function () { })(); exports.Foo = Foo; //// [declFileAliasUseBeforeDeclaration_test.js] -function bar(a) { } +function bar(a) { +} exports.bar = bar; diff --git a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js index 5d7273098f1..52d11836b11 100644 --- a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js +++ b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js @@ -31,22 +31,28 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { }; - D.prototype.bat = function () { }; - D.prototype.foo = function () { }; - D.prototype.bar = function () { }; + D.prototype.baz = function () { + }; + D.prototype.bat = function () { + }; + D.prototype.foo = function () { + }; + D.prototype.bar = function () { + }; return D; })(); diff --git a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js index ee2dc8e83bd..545b70f743a 100644 --- a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js +++ b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index e01626a7ead..3c8120e8db9 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -60,17 +60,29 @@ var C; return B; })(); C.B = B; - function F(x) { return null; } + function F(x) { + return null; + } C.F = F; - function F2(x) { return null; } + function F2(x) { + return null; + } C.F2 = F2; - function F3(x) { return null; } + function F3(x) { + return null; + } C.F3 = F3; - function F4(x) { return null; } + function F4(x) { + return null; + } C.F4 = F4; - function F5() { return null; } + function F5() { + return null; + } C.F5 = F5; - function F6(x) { return null; } + function F6(x) { + return null; + } C.F6 = F6; var D = (function () { function D(val) { @@ -86,7 +98,8 @@ exports.c = C.F2; exports.d = C.F3; exports.e = C.F4; exports.x = (new C.D(new C.A())).val; -function f() { } +function f() { +} exports.f = f; exports.g = C.F5(); var h = (function (_super) { diff --git a/tests/baselines/reference/declFileImportModuleWithExportAssignment.types b/tests/baselines/reference/declFileImportModuleWithExportAssignment.types index 15201baa487..94f3e57b1a6 100644 --- a/tests/baselines/reference/declFileImportModuleWithExportAssignment.types +++ b/tests/baselines/reference/declFileImportModuleWithExportAssignment.types @@ -42,23 +42,23 @@ module m2 { } var m2: { ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } (): m2.connectExport; >m2 : unknown ->connectExport : m2.connectExport +>connectExport : default.connectExport test1: m2.connectModule; ->test1 : m2.connectModule +>test1 : default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule test2(): m2.connectModule; ->test2 : () => m2.connectModule +>test2 : () => default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule }; export = m2; ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } diff --git a/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js b/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js index 443933069da..400c53a171a 100644 --- a/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js +++ b/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js @@ -20,8 +20,12 @@ var m1; m1.c = c; })(m1 || (m1 = {})); var d = { - m1: { m: m1 }, - m2: { c: m1.c } + m1: { + m: m1 + }, + m2: { + c: m1.c + } }; diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.js b/tests/baselines/reference/declFileObjectLiteralWithAccessors.js index 85897bc2c9d..7d7c6ee73d3 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.js +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.js @@ -15,8 +15,12 @@ point./*3*/x = 30; function makePoint(x) { return { b: 10, - get x() { return x; }, - set x(a) { this.b = a; } + get x() { + return x; + }, + set x(a) { + this.b = a; + } }; } ; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index dd39a30f7a2..b3d41829637 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -12,7 +12,9 @@ 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/declFileObjectLiteralWithOnlySetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js index e219e885053..dae362caf36 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js @@ -13,7 +13,9 @@ point./*2*/x = 30; function makePoint(x) { return { b: 10, - set x(a) { this.b = a; } + set x(a) { + this.b = a; + } }; } ; diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 326ce62171d..5bec38e4dee 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -18,25 +18,33 @@ class C { var C = (function () { function C() { } - C.a = function () { }; - C.b = function () { }; + C.a = function () { + }; + C.b = function () { + }; Object.defineProperty(C, "c", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "d", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "e", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "f", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/declFileRegressionTests.js b/tests/baselines/reference/declFileRegressionTests.js index a8bf23a8ea8..6178398ef31 100644 --- a/tests/baselines/reference/declFileRegressionTests.js +++ b/tests/baselines/reference/declFileRegressionTests.js @@ -8,7 +8,13 @@ var n = { w: null, x: '', y: () => { }, z: 32 }; //// [declFileRegressionTests.js] // 'null' not converted to 'any' in d.ts // function types not piped through correctly -var n = { w: null, x: '', y: function () { }, z: 32 }; +var n = { + w: null, + x: '', + y: function () { + }, + z: 32 +}; //// [declFileRegressionTests.d.ts] diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js index 563551d67a8..7c6122fc17d 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js @@ -17,11 +17,19 @@ function f1() { args[_i - 0] = arguments[_i]; } } -function f2(x) { } -function f3(x) { } -function f4() { } -function f5() { } -var f6 = function () { return [10]; }; +function f2(x) { +} +function f3(x) { +} +function f4() { +} +function f5() { +} +var f6 = function () { + return [ + 10 + ]; +}; //// [declFileRestParametersOfFunctionAndFunctionType.d.ts] diff --git a/tests/baselines/reference/declFileTypeAnnotationArrayType.js b/tests/baselines/reference/declFileTypeAnnotationArrayType.js index 0a9d04d6bc7..34c150cb992 100644 --- a/tests/baselines/reference/declFileTypeAnnotationArrayType.js +++ b/tests/baselines/reference/declFileTypeAnnotationArrayType.js @@ -79,38 +79,60 @@ var g = (function () { })(); // Just the name function foo() { - return [new c()]; + return [ + new c() + ]; } function foo2() { - return [new c()]; + return [ + new c() + ]; } // Qualified name function foo3() { - return [new m.c()]; + return [ + new m.c() + ]; } function foo4() { return m.c; } // Just the name with type arguments function foo5() { - return [new g()]; + return [ + new g() + ]; } function foo6() { - return [new g()]; + return [ + new g() + ]; } // Qualified name with type arguments function foo7() { - return [new m.g()]; + return [ + new m.g() + ]; } function foo8() { - return [new m.g()]; + return [ + new m.g() + ]; } // Array of function types function foo9() { - return [function () { return new c(); }]; + return [ + function () { + return new c(); + } + ]; } function foo10() { - return [function () { return new c(); }]; + return [ + function () { + return new c(); + } + ]; } diff --git a/tests/baselines/reference/declFileTypeAnnotationParenType.js b/tests/baselines/reference/declFileTypeAnnotationParenType.js index c61517c7339..7b8498ac2cc 100644 --- a/tests/baselines/reference/declFileTypeAnnotationParenType.js +++ b/tests/baselines/reference/declFileTypeAnnotationParenType.js @@ -16,10 +16,22 @@ var c = (function () { } return c; })(); -var x = [function () { return new c(); }]; -var y = [function () { return new c(); }]; -var k = (function () { return new c(); }) || ""; -var l = (function () { return new c(); }) || ""; +var x = [ + function () { + return new c(); + } +]; +var y = [ + function () { + return new c(); + } +]; +var k = (function () { + return new c(); +}) || ""; +var l = (function () { + return new c(); +}) || ""; //// [declFileTypeAnnotationParenType.d.ts] diff --git a/tests/baselines/reference/declFileTypeAnnotationTupleType.js b/tests/baselines/reference/declFileTypeAnnotationTupleType.js index 91d44c2b07f..3c610bb9d04 100644 --- a/tests/baselines/reference/declFileTypeAnnotationTupleType.js +++ b/tests/baselines/reference/declFileTypeAnnotationTupleType.js @@ -45,9 +45,18 @@ var g = (function () { return g; })(); // Just the name -var k = [new c(), new m.c()]; +var k = [ + new c(), + new m.c() +]; var l = k; -var x = [new g(), new m.g(), function () { return new c(); }]; +var x = [ + new g(), + new m.g(), + function () { + return new c(); + } +]; var y = x; diff --git a/tests/baselines/reference/declFileTypeAnnotationUnionType.js b/tests/baselines/reference/declFileTypeAnnotationUnionType.js index 0a8e256ef28..40edf72d361 100644 --- a/tests/baselines/reference/declFileTypeAnnotationUnionType.js +++ b/tests/baselines/reference/declFileTypeAnnotationUnionType.js @@ -51,8 +51,12 @@ var g = (function () { // Just the name var k = new c() || new m.c(); var l = new c() || new m.c(); -var x = new g() || new m.g() || (function () { return new c(); }); -var y = new g() || new m.g() || (function () { return new c(); }); +var x = new g() || new m.g() || (function () { + return new c(); +}); +var y = new g() || new m.g() || (function () { + return new c(); +}); //// [declFileTypeAnnotationUnionType.d.ts] diff --git a/tests/baselines/reference/declFileTypeofFunction.js b/tests/baselines/reference/declFileTypeofFunction.js index 656e02b8ddd..2af519f411d 100644 --- a/tests/baselines/reference/declFileTypeofFunction.js +++ b/tests/baselines/reference/declFileTypeofFunction.js @@ -34,8 +34,12 @@ function foo5(x: number) { } //// [declFileTypeofFunction.js] -function f() { return undefined; } -function g() { return undefined; } +function f() { + return undefined; +} +function g() { + return undefined; +} var b; function b1() { return b1; diff --git a/tests/baselines/reference/declFileTypeofInAnonymousType.js b/tests/baselines/reference/declFileTypeofInAnonymousType.js index 01025ed1806..1a5071fd219 100644 --- a/tests/baselines/reference/declFileTypeofInAnonymousType.js +++ b/tests/baselines/reference/declFileTypeofInAnonymousType.js @@ -43,11 +43,19 @@ var b = { c: m1.c, m1: m1 }; -var c = { m1: m1 }; +var c = { + m1: m1 +}; var d = { - m: { mod: m1 }, - mc: { cl: m1.c }, - me: { en: m1.e }, + m: { + mod: m1 + }, + mc: { + cl: m1.c + }, + me: { + en: m1.e + }, mh: m1.e.holiday }; diff --git a/tests/baselines/reference/declInput-2.js b/tests/baselines/reference/declInput-2.js index dcd37454ef0..3ba5ae11bf6 100644 --- a/tests/baselines/reference/declInput-2.js +++ b/tests/baselines/reference/declInput-2.js @@ -38,12 +38,22 @@ var M; var D = (function () { function D() { } - D.prototype.m232 = function () { return null; }; - D.prototype.m242 = function () { return null; }; - D.prototype.m252 = function () { return null; }; // don't generate - D.prototype.m26 = function (i) { }; - D.prototype.m262 = function (i) { }; - D.prototype.m3 = function () { return new C(); }; + D.prototype.m232 = function () { + return null; + }; + D.prototype.m242 = function () { + return null; + }; + D.prototype.m252 = function () { + return null; + }; // don't generate + D.prototype.m26 = function (i) { + }; + D.prototype.m262 = function (i) { + }; + D.prototype.m3 = function () { + return new C(); + }; return D; })(); M.D = D; diff --git a/tests/baselines/reference/declInput.js b/tests/baselines/reference/declInput.js index cd558c93403..538770668c1 100644 --- a/tests/baselines/reference/declInput.js +++ b/tests/baselines/reference/declInput.js @@ -14,8 +14,16 @@ class bar { var bar = (function () { function bar() { } - bar.prototype.f = function () { return ''; }; - bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; }; + bar.prototype.f = function () { + return ''; + }; + bar.prototype.g = function () { + return { + a: null, + b: undefined, + c: void 4 + }; + }; bar.prototype.h = function (x, y, z) { if (x === void 0) { x = 4; } if (y === void 0) { y = null; } diff --git a/tests/baselines/reference/declInput3.js b/tests/baselines/reference/declInput3.js index 3be31de3de0..52328b01d6d 100644 --- a/tests/baselines/reference/declInput3.js +++ b/tests/baselines/reference/declInput3.js @@ -14,8 +14,16 @@ class bar { var bar = (function () { function bar() { } - bar.prototype.f = function () { return ''; }; - bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; }; + bar.prototype.f = function () { + return ''; + }; + bar.prototype.g = function () { + return { + a: null, + b: undefined, + c: void 4 + }; + }; bar.prototype.h = function (x, y, z) { if (x === void 0) { x = 4; } if (y === void 0) { y = null; } diff --git a/tests/baselines/reference/declInput4.js b/tests/baselines/reference/declInput4.js index 07b6f091a14..18025c808fa 100644 --- a/tests/baselines/reference/declInput4.js +++ b/tests/baselines/reference/declInput4.js @@ -32,9 +32,14 @@ var M; var D = (function () { function D() { } - D.prototype.m232 = function () { return null; }; - D.prototype.m242 = function () { return null; }; - D.prototype.m26 = function (i) { }; + D.prototype.m232 = function () { + return null; + }; + D.prototype.m242 = function () { + return null; + }; + D.prototype.m26 = function (i) { + }; return D; })(); M.D = D; diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index ae517bb7460..161224659f1 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -64,7 +64,8 @@ module.exports = f; var im = require('declarationEmit_nameConflicts_1'); var M; (function (M) { - function f() { } + function f() { + } M.f = f; var C = (function () { function C() { @@ -74,7 +75,8 @@ var M; M.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = M.N || (M.N = {})); @@ -87,7 +89,8 @@ var M; (function (M) { var P; (function (P) { - function f() { } + function f() { + } P.f = f; var C = (function () { function C() { @@ -97,7 +100,8 @@ var M; P.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = P.N || (P.N = {})); @@ -113,7 +117,8 @@ var M; (function (M) { var Q; (function (Q) { - function f() { } + function f() { + } Q.f = f; var C = (function () { function C() { @@ -123,7 +128,8 @@ var M; Q.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = Q.N || (Q.N = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.js b/tests/baselines/reference/declarationEmit_nameConflicts2.js index 2a228080c68..43167f531d7 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.js @@ -22,7 +22,8 @@ var X; (function (Y) { var base; (function (base) { - function f() { } + function f() { + } base.f = f; var C = (function () { function C() { diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index 0d68c38cfda..848343362bc 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -37,17 +37,20 @@ var M; (function (M) { var D; (function (D) { - function f() { } + function f() { + } D.f = f; })(D = M.D || (M.D = {})); var C; (function (C) { - function f() { } + function f() { + } C.f = f; })(C = M.C || (M.C = {})); var E; (function (E) { - function f() { } + function f() { + } E.f = f; })(E = M.E || (M.E = {})); })(M || (M = {})); @@ -58,7 +61,8 @@ var M; var C = (function () { function C() { } - C.f = function () { }; + C.f = function () { + }; return C; })(); P.C = C; diff --git a/tests/baselines/reference/declarationEmit_protectedMembers.js b/tests/baselines/reference/declarationEmit_protectedMembers.js index 61a4ebdfcab..dc8506b220b 100644 --- a/tests/baselines/reference/declarationEmit_protectedMembers.js +++ b/tests/baselines/reference/declarationEmit_protectedMembers.js @@ -65,8 +65,11 @@ var C1 = (function () { return this.x; }; Object.defineProperty(C1.prototype, "accessor", { - get: function () { return 0; }, - set: function (a) { }, + get: function () { + return 0; + }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -74,12 +77,15 @@ var C1 = (function () { return this.sx; }; Object.defineProperty(C1, "staticSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(C1, "staticGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); @@ -112,7 +118,9 @@ var C3 = (function (_super) { return _super.sf.call(this); }; Object.defineProperty(C3, "staticGetter", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/declarationsAndAssignments.errors.txt b/tests/baselines/reference/declarationsAndAssignments.errors.txt index 4eefc2fcc23..828083e7687 100644 --- a/tests/baselines/reference/declarationsAndAssignments.errors.txt +++ b/tests/baselines/reference/declarationsAndAssignments.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2460: Type '[number, string]' has no property '2'. +tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2493: Tuple type '[number, string]' with length '2' cannot be assigned to tuple with length '3'. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(56,17): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2460: Type '[number]' has no property '1'. -tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2460: Type '[number]' has no property '2'. +tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'. +tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(67,9): error TS2461: Type '{ [x: number]: undefined; }' is not an array type. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(68,9): error TS2461: Type '{ [x: number]: number; 0: number; 1: number; }' is not an array type. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(73,11): error TS2459: Type '{}' has no property 'a' and no string index signature. @@ -25,7 +25,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): var [x, y] = [1, "hello"]; var [x, y, z] = [1, "hello"]; // Error ~ -!!! error TS2460: Type '[number, string]' has no property '2'. +!!! error TS2493: Tuple type '[number, string]' with length '2' cannot be assigned to tuple with length '3'. var [,, z] = [0, 1, 2]; var x: number; var y: string; @@ -87,9 +87,9 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): var [a, b, c] = []; // Ok, [] is an array var [d, e, f] = [1]; // Error, [1] is a tuple ~ -!!! error TS2460: Type '[number]' has no property '1'. +!!! error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'. ~ -!!! error TS2460: Type '[number]' has no property '2'. +!!! error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'. } function f9() { diff --git a/tests/baselines/reference/declarationsAndAssignments.js b/tests/baselines/reference/declarationsAndAssignments.js index 032f4cb0e63..6772a842a49 100644 --- a/tests/baselines/reference/declarationsAndAssignments.js +++ b/tests/baselines/reference/declarationsAndAssignments.js @@ -182,16 +182,35 @@ function f21() { //// [declarationsAndAssignments.js] function f0() { - var _a = [1, "hello"]; - var x = ([1, "hello"])[0]; - var _b = [1, "hello"], x = _b[0], y = _b[1]; - var _c = [1, "hello"], x = _c[0], y = _c[1], z = _c[2]; // Error - var _d = [0, 1, 2], z = _d[2]; + var _a = [ + 1, + "hello" + ]; + var x = ([ + 1, + "hello" + ])[0]; + var _b = [ + 1, + "hello" + ], x = _b[0], y = _b[1]; + var _c = [ + 1, + "hello" + ], x = _c[0], y = _c[1], z = _c[2]; // Error + var _d = [ + 0, + 1, + 2 + ], z = _d[2]; var x; var y; } function f1() { - var a = [1, "hello"]; + var a = [ + 1, + "hello" + ]; var x = a[0]; var x = a[0], y = a[1]; var x = a[0], y = a[1], z = a[2]; @@ -200,71 +219,161 @@ function f1() { var z; } function f2() { - var _a = { x: 5, y: "hello" }; - var x = ({ x: 5, y: "hello" }).x; - var y = ({ x: 5, y: "hello" }).y; - var _b = { x: 5, y: "hello" }, x = _b.x, y = _b.y; + var _a = { + x: 5, + y: "hello" + }; + var x = ({ + x: 5, + y: "hello" + }).x; + var y = ({ + x: 5, + y: "hello" + }).y; + var _b = { + x: 5, + y: "hello" + }, x = _b.x, y = _b.y; var x; var y; - var a = ({ x: 5, y: "hello" }).x; - var b = ({ x: 5, y: "hello" }).y; - var _c = { x: 5, y: "hello" }, a = _c.x, b = _c.y; + var a = ({ + x: 5, + y: "hello" + }).x; + var b = ({ + x: 5, + y: "hello" + }).y; + var _c = { + x: 5, + y: "hello" + }, a = _c.x, b = _c.y; var a; var b; } function f3() { - var _a = [1, ["hello", [true]]], x = _a[0], _b = _a[1], y = _b[0], z = _b[1][0]; + var _a = [ + 1, + [ + "hello", + [ + true + ] + ] + ], x = _a[0], _b = _a[1], y = _b[0], z = _b[1][0]; var x; var y; var z; } function f4() { - var _a = { a: 1, b: { a: "hello", b: { a: true } } }, x = _a.a, _b = _a.b, y = _b.a, z = _b.b.a; + var _a = { + a: 1, + b: { + a: "hello", + b: { + a: true + } + } + }, x = _a.a, _b = _a.b, y = _b.a, z = _b.b.a; var x; var y; var z; } function f6() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; + var _a = [ + 1, + "hello" + ], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; var x; var y; } function f7() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string + var _a = [ + 1, + "hello" + ], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string var x; var y; } function f8() { var _a = [], a = _a[0], b = _a[1], c = _a[2]; // Ok, [] is an array - var _b = [1], d = _b[0], e = _b[1], f = _b[2]; // Error, [1] is a tuple + var _b = [ + 1 + ], d = _b[0], e = _b[1], f = _b[2]; // Error, [1] is a tuple } function f9() { var _a = {}, a = _a[0], b = _a[1]; // Error, not array type - var _b = { 0: 10, 1: 20 }, c = _b[0], d = _b[1]; // Error, not array type - var _c = [10, 20], e = _c[0], f = _c[1]; + var _b = { + 0: 10, + 1: 20 + }, c = _b[0], d = _b[1]; // Error, not array type + var _c = [ + 10, + 20 + ], e = _c[0], f = _c[1]; } function f10() { var _a = {}, a = _a.a, b = _a.b; // Error var _b = [], a = _b.a, b = _b.b; // Error } function f11() { - var _a = { x: 10, y: "hello" }, a = _a.x, b = _a.y; - var _b = { 0: 10, 1: "hello" }, a = _b[0], b = _b[1]; - var _c = { "<": 10, ">": "hello" }, a = _c["<"], b = _c[">"]; - var _d = [10, "hello"], a = _d[0], b = _d[1]; + var _a = { + x: 10, + y: "hello" + }, a = _a.x, b = _a.y; + var _b = { + 0: 10, + 1: "hello" + }, a = _b[0], b = _b[1]; + var _c = { + "<": 10, + ">": "hello" + }, a = _c["<"], b = _c[">"]; + var _d = [ + 10, + "hello" + ], a = _d[0], b = _d[1]; var a; var b; } function f12() { - var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _b = _a[1], _c = _b === void 0 ? ["abc", { x: 10, y: false }] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; + var _a = [ + 1, + [ + "hello", + { + x: 5, + y: true + } + ] + ], a = _a[0], _b = _a[1], _c = _b === void 0 ? [ + "abc", + { + x: 10, + y: false + } + ] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; var a; var b; var x; var c; } function f13() { - var _a = [1, "hello"], x = _a[0], y = _a[1]; - var _b = [[x, y], { x: x, y: y }], a = _b[0], b = _b[1]; + var _a = [ + 1, + "hello" + ], x = _a[0], y = _a[1]; + var _b = [ + [ + x, + y + ], + { + x: x, + y: y + } + ], a = _b[0], b = _b[1]; } function f14(_a) { var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], _d = _c[0], b = _d === void 0 ? "hello" : _d, _e = _c[1], x = _e.x, _f = _e.y, c = _f === void 0 ? false : _f; @@ -272,19 +381,51 @@ function f14(_a) { var b; var c; } -f14([2, ["abc", { x: 0, y: true }]]); -f14([2, ["abc", { x: 0 }]]); -f14([2, ["abc", { y: false }]]); // Error, no x +f14([ + 2, + [ + "abc", + { + x: 0, + y: true + } + ] +]); +f14([ + 2, + [ + "abc", + { + x: 0 + } + ] +]); +f14([ + 2, + [ + "abc", + { + y: false + } + ] +]); // Error, no x var M; (function (M) { - _a = [1, 2], M.a = _a[0], M.b = _a[1]; + _a = [ + 1, + 2 + ], M.a = _a[0], M.b = _a[1]; var _a; })(M || (M = {})); function f15() { var a = "hello"; var b = 1; var c = true; - return { a: a, b: b, c: c }; + return { + a: a, + b: b, + c: c + }; } function f16() { var _a = f15(), a = _a.a, b = _a.b, c = _a.c; @@ -293,27 +434,66 @@ function f17(_a) { var _b = _a.a, a = _b === void 0 ? "" : _b, _c = _a.b, b = _c === void 0 ? 0 : _c, _d = _a.c, c = _d === void 0 ? false : _d; } f17({}); -f17({ a: "hello" }); -f17({ c: true }); +f17({ + a: "hello" +}); +f17({ + c: true +}); f17(f15()); function f18() { var a; var b; var aa; - (_a = { a: a, b: b }, a = _a.a, b = _a.b, _a); - (_b = { b: b, a: a }, a = _b.a, b = _b.b, _b); - _c = [a, b], aa[0] = _c[0], b = _c[1]; - _d = [b, a], a = _d[0], b = _d[1]; // Error - _e = [2, "def"], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; + (_a = { + a: a, + b: b + }, a = _a.a, b = _a.b, _a); + (_b = { + b: b, + a: a + }, a = _b.a, b = _b.b, _b); + _c = [ + a, + b + ], aa[0] = _c[0], b = _c[1]; + _d = [ + b, + a + ], a = _d[0], b = _d[1]; // Error + _e = [ + 2, + "def" + ], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; var _a, _b, _c, _d, _e, _f, _g; } function f19() { var a, b; - _a = [1, 2], a = _a[0], b = _a[1]; - _b = [b, a], a = _b[0], b = _b[1]; - (_c = { b: b, a: a }, a = _c.a, b = _c.b, _c); - _d = ([[2, 3]])[0], _e = _d === void 0 ? [1, 2] : _d, a = _e[0], b = _e[1]; - var x = (_f = [1, 2], a = _f[0], b = _f[1], _f); + _a = [ + 1, + 2 + ], a = _a[0], b = _a[1]; + _b = [ + b, + a + ], a = _b[0], b = _b[1]; + (_c = { + b: b, + a: a + }, a = _c.a, b = _c.b, _c); + _d = ([ + [ + 2, + 3 + ] + ])[0], _e = _d === void 0 ? [ + 1, + 2 + ] : _d, a = _e[0], b = _e[1]; + var x = (_f = [ + 1, + 2 + ], a = _f[0], b = _f[1], _f); var _a, _b, _c, _d, _e, _f; } function f20() { @@ -321,14 +501,46 @@ function f20() { var x; var y; var z; - var _a = [1, 2, 3], a = _a.slice(0); - var _b = [1, 2, 3], x = _b[0], a = _b.slice(1); - var _c = [1, 2, 3], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, 2, 3], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, 2, 3], a = _e.slice(0); - _f = [1, 2, 3], x = _f[0], a = _f.slice(1); - _g = [1, 2, 3], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, 2, 3], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); + var _a = [ + 1, + 2, + 3 + ], a = _a.slice(0); + var _b = [ + 1, + 2, + 3 + ], x = _b[0], a = _b.slice(1); + var _c = [ + 1, + 2, + 3 + ], x = _c[0], y = _c[1], a = _c.slice(2); + var _d = [ + 1, + 2, + 3 + ], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); + _e = [ + 1, + 2, + 3 + ], a = _e.slice(0); + _f = [ + 1, + 2, + 3 + ], x = _f[0], a = _f.slice(1); + _g = [ + 1, + 2, + 3 + ], x = _g[0], y = _g[1], a = _g.slice(2); + _h = [ + 1, + 2, + 3 + ], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); var _e, _f, _g, _h; } function f21() { @@ -336,13 +548,45 @@ function f21() { var x; var y; var z; - var _a = [1, "hello", true], a = _a.slice(0); - var _b = [1, "hello", true], x = _b[0], a = _b.slice(1); - var _c = [1, "hello", true], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, "hello", true], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, "hello", true], a = _e.slice(0); - _f = [1, "hello", true], x = _f[0], a = _f.slice(1); - _g = [1, "hello", true], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, "hello", true], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); + var _a = [ + 1, + "hello", + true + ], a = _a.slice(0); + var _b = [ + 1, + "hello", + true + ], x = _b[0], a = _b.slice(1); + var _c = [ + 1, + "hello", + true + ], x = _c[0], y = _c[1], a = _c.slice(2); + var _d = [ + 1, + "hello", + true + ], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); + _e = [ + 1, + "hello", + true + ], a = _e.slice(0); + _f = [ + 1, + "hello", + true + ], x = _f[0], a = _f.slice(1); + _g = [ + 1, + "hello", + true + ], x = _g[0], y = _g[1], a = _g.slice(2); + _h = [ + 1, + "hello", + true + ], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); var _e, _f, _g, _h; } diff --git a/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.types b/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.types index 70718471d50..ff496f678f2 100644 --- a/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.types +++ b/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.types @@ -7,7 +7,7 @@ declare module "express" { function express(): express.ExpressServer; >express : typeof express >express : unknown ->ExpressServer : express.ExpressServer +>ExpressServer : default.ExpressServer module express { >express : typeof express diff --git a/tests/baselines/reference/declareFileExportAssignment.types b/tests/baselines/reference/declareFileExportAssignment.types index f30586b07e3..5853663634c 100644 --- a/tests/baselines/reference/declareFileExportAssignment.types +++ b/tests/baselines/reference/declareFileExportAssignment.types @@ -27,24 +27,24 @@ module m2 { } var m2: { ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } (): m2.connectExport; >m2 : unknown ->connectExport : m2.connectExport +>connectExport : default.connectExport test1: m2.connectModule; ->test1 : m2.connectModule +>test1 : default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule test2(): m2.connectModule; ->test2 : () => m2.connectModule +>test2 : () => default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule }; export = m2; ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } diff --git a/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.types b/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.types index 675dc38c869..baa9fa1170c 100644 --- a/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.types +++ b/tests/baselines/reference/declareFileExportAssignmentWithVarFromVariableStatement.types @@ -28,24 +28,24 @@ module m2 { var x = 10, m2: { >x : number ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } (): m2.connectExport; >m2 : unknown ->connectExport : m2.connectExport +>connectExport : default.connectExport test1: m2.connectModule; ->test1 : m2.connectModule +>test1 : default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule test2(): m2.connectModule; ->test2 : () => m2.connectModule +>test2 : () => default.connectModule >m2 : unknown ->connectModule : m2.connectModule +>connectModule : default.connectModule }; export = m2; ->m2 : { (): m2.connectExport; test1: m2.connectModule; test2(): m2.connectModule; } +>m2 : { (): default.connectExport; test1: default.connectModule; test2(): default.connectModule; } diff --git a/tests/baselines/reference/declareModifierOnImport1.errors.txt b/tests/baselines/reference/declareModifierOnImport1.errors.txt index e78b4973aa1..776f2c07bcb 100644 --- a/tests/baselines/reference/declareModifierOnImport1.errors.txt +++ b/tests/baselines/reference/declareModifierOnImport1.errors.txt @@ -1,10 +1,10 @@ tests/cases/compiler/declareModifierOnImport1.ts(1,1): error TS1079: A 'declare' modifier cannot be used with an import declaration. -tests/cases/compiler/declareModifierOnImport1.ts(1,1): error TS2304: Cannot find name 'b'. +tests/cases/compiler/declareModifierOnImport1.ts(1,20): error TS2304: Cannot find name 'b'. ==== tests/cases/compiler/declareModifierOnImport1.ts (2 errors) ==== declare import a = b; ~~~~~~~ !!! error TS1079: A 'declare' modifier cannot be used with an import declaration. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js index 34ea154daa6..12632572918 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js @@ -52,8 +52,14 @@ M.n--; // -- operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; -var obj = { x: 1, y: null }; +var ANY2 = [ + "", + "" +]; +var obj = { + x: 1, + y: null +}; var A = (function () { function A() { } diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js index 8e4f927a920..e5a73aea37d 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -75,9 +75,16 @@ ANY2--; //// [decrementOperatorWithAnyOtherTypeInvalidOperations.js] // -- operator on any type var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/decrementOperatorWithNumberType.js b/tests/baselines/reference/decrementOperatorWithNumberType.js index 85ed9ca548a..faef864184b 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberType.js +++ b/tests/baselines/reference/decrementOperatorWithNumberType.js @@ -42,7 +42,10 @@ objA.a--, M.n--; //// [decrementOperatorWithNumberType.js] // -- operator on number type var NUMBER; -var NUMBER1 = [1, 2]; +var NUMBER1 = [ + 1, + 2 +]; var A = (function () { function A() { } diff --git a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js index 34e862063ce..ccc5b6eaa1c 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js @@ -49,12 +49,19 @@ foo()--; //// [decrementOperatorWithNumberTypeInvalidOperations.js] // -- operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -67,11 +74,27 @@ var ResultIsNumber1 = --NUMBER1; var ResultIsNumber2 = NUMBER1--; // number type literal var ResultIsNumber3 = --1; -var ResultIsNumber4 = --{ x: 1, y: 2 }; -var ResultIsNumber5 = --{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = --{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = --{ + x: 1, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = 1--; -var ResultIsNumber7 = { x: 1, y: 2 }--; -var ResultIsNumber8 = { x: 1, y: function (n) { return n; } }--; +var ResultIsNumber7 = { + x: 1, + y: 2 +}--; +var ResultIsNumber8 = { + x: 1, + y: function (n) { + return n; + } +}--; // number type expressions var ResultIsNumber9 = --foo(); var ResultIsNumber10 = --A.foo(); diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js index 2be74a64d8f..93737ea87cd 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js @@ -57,11 +57,15 @@ objA.a--, M.n--; //// [decrementOperatorWithUnsupportedBooleanType.js] // -- operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return true; }; + A.foo = function () { + return true; + }; return A; })(); var M; @@ -74,11 +78,27 @@ var ResultIsNumber1 = --BOOLEAN; var ResultIsNumber2 = BOOLEAN--; // boolean type literal var ResultIsNumber3 = --true; -var ResultIsNumber4 = --{ x: true, y: false }; -var ResultIsNumber5 = --{ x: true, y: function (n) { return n; } }; +var ResultIsNumber4 = --{ + x: true, + y: false +}; +var ResultIsNumber5 = --{ + x: true, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = true--; -var ResultIsNumber7 = { x: true, y: false }--; -var ResultIsNumber8 = { x: true, y: function (n) { return n; } }--; +var ResultIsNumber7 = { + x: true, + y: false +}--; +var ResultIsNumber8 = { + x: true, + y: function (n) { + return n; + } +}--; // boolean type expressions var ResultIsNumber9 = --objA.a; var ResultIsNumber10 = --M.n; diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js index 430f9af963f..e033acf3e1e 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js @@ -68,12 +68,19 @@ objA.a--, M.n--; //// [decrementOperatorWithUnsupportedStringType.js] // -- operator on string type var STRING; -var STRING1 = ["", ""]; -function foo() { return ""; } +var STRING1 = [ + "", + "" +]; +function foo() { + return ""; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -88,11 +95,27 @@ var ResultIsNumber3 = STRING--; var ResultIsNumber4 = STRING1--; // string type literal var ResultIsNumber5 = --""; -var ResultIsNumber6 = --{ x: "", y: "" }; -var ResultIsNumber7 = --{ x: "", y: function (s) { return s; } }; +var ResultIsNumber6 = --{ + x: "", + y: "" +}; +var ResultIsNumber7 = --{ + x: "", + y: function (s) { + return s; + } +}; var ResultIsNumber8 = ""--; -var ResultIsNumber9 = { x: "", y: "" }--; -var ResultIsNumber10 = { x: "", y: function (s) { return s; } }--; +var ResultIsNumber9 = { + x: "", + y: "" +}--; +var ResultIsNumber10 = { + x: "", + y: function (s) { + return s; + } +}--; // string type expressions var ResultIsNumber11 = --objA.a; var ResultIsNumber12 = --M.n; diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.js b/tests/baselines/reference/defaultArgsInFunctionExpressions.js index 3f77c4430e8..a58905dd816 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.js +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.js @@ -50,7 +50,9 @@ s = f2(); n = f2(); // Contextually type the default arg with the type annotation var f3 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } + if (a === void 0) { a = function (s) { + return s; + }; } }; // Type check using the function's contextual type var f4 = function (a) { @@ -58,7 +60,9 @@ var f4 = function (a) { }; // Contextually type the default arg using the function's contextual type var f5 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } + if (a === void 0) { a = function (s) { + return s; + }; } }; var U; (function (U) { diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js index ad6181ba7c5..98e135cc712 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js @@ -20,9 +20,13 @@ var obj1; obj1.length; var obj2; obj2.length; -function concat(x, y) { return null; } +function concat(x, y) { + return null; +} var result = concat(1, ""); // error var elementCount = result.length; -function concat2(x, y) { return null; } +function concat2(x, y) { + return null; +} var result2 = concat2(1, ""); // result2 will be number|string var elementCount2 = result.length; diff --git a/tests/baselines/reference/defaultIndexProps1.js b/tests/baselines/reference/defaultIndexProps1.js index fc8fe52b9fc..63d8c70c9d0 100644 --- a/tests/baselines/reference/defaultIndexProps1.js +++ b/tests/baselines/reference/defaultIndexProps1.js @@ -21,5 +21,7 @@ var Foo = (function () { })(); var f = new Foo(); var q = f["v"]; -var o = { v: "Yo2" }; +var o = { + v: "Yo2" +}; var q2 = o["v"]; diff --git a/tests/baselines/reference/defaultIndexProps2.js b/tests/baselines/reference/defaultIndexProps2.js index 7652e591cc9..6a175f0f560 100644 --- a/tests/baselines/reference/defaultIndexProps2.js +++ b/tests/baselines/reference/defaultIndexProps2.js @@ -24,7 +24,9 @@ var Foo = (function () { })(); var f = new Foo(); // WScript.Echo(f[0]); -var o = { v: "Yo2" }; +var o = { + v: "Yo2" +}; // WScript.Echo(o[0]); 1[0]; var q = "s"[0]; diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js index e2a2be4d9aa..b4f9870c7e3 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js @@ -65,9 +65,16 @@ delete M.n; // delete operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/deleteOperatorWithBooleanType.js b/tests/baselines/reference/deleteOperatorWithBooleanType.js index b0a60a23744..2c913251c79 100644 --- a/tests/baselines/reference/deleteOperatorWithBooleanType.js +++ b/tests/baselines/reference/deleteOperatorWithBooleanType.js @@ -41,11 +41,15 @@ delete M.n; //// [deleteOperatorWithBooleanType.js] // delete operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsBoolean1 = delete BOOLEAN; // boolean type literal var ResultIsBoolean2 = delete true; -var ResultIsBoolean3 = delete { x: true, y: false }; +var ResultIsBoolean3 = delete { + x: true, + y: false +}; // boolean type expressions var ResultIsBoolean4 = delete objA.a; var ResultIsBoolean5 = delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithNumberType.js b/tests/baselines/reference/deleteOperatorWithNumberType.js index bb70c55024d..50513247f64 100644 --- a/tests/baselines/reference/deleteOperatorWithNumberType.js +++ b/tests/baselines/reference/deleteOperatorWithNumberType.js @@ -48,12 +48,19 @@ delete objA.a, M.n; //// [deleteOperatorWithNumberType.js] // delete operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -66,8 +73,16 @@ var ResultIsBoolean1 = delete NUMBER; var ResultIsBoolean2 = delete NUMBER1; // number type literal var ResultIsBoolean3 = delete 1; -var ResultIsBoolean4 = delete { x: 1, y: 2 }; -var ResultIsBoolean5 = delete { x: 1, y: function (n) { return n; } }; +var ResultIsBoolean4 = delete { + x: 1, + y: 2 +}; +var ResultIsBoolean5 = delete { + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsBoolean6 = delete objA.a; var ResultIsBoolean7 = delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithStringType.js b/tests/baselines/reference/deleteOperatorWithStringType.js index 79246e27725..ddf4b827779 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.js +++ b/tests/baselines/reference/deleteOperatorWithStringType.js @@ -47,12 +47,19 @@ delete objA.a,M.n; //// [deleteOperatorWithStringType.js] // delete operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsBoolean1 = delete STRING; var ResultIsBoolean2 = delete STRING1; // string type literal var ResultIsBoolean3 = delete ""; -var ResultIsBoolean4 = delete { x: "", y: "" }; -var ResultIsBoolean5 = delete { x: "", y: function (s) { return s; } }; +var ResultIsBoolean4 = delete { + x: "", + y: "" +}; +var ResultIsBoolean5 = delete { + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsBoolean6 = delete objA.a; var ResultIsBoolean7 = delete M.n; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 32e8cf4199e..e4ff8dd9775 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -59,14 +59,18 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var r2 = function () { return _super.call(this); }; // error for misplaced super call (nested function) + var r2 = function () { + return _super.call(this); + }; // error for misplaced super call (nested function) } return Derived2; })(Base2); var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var r = function () { _super.call(this); }; // error + var r = function () { + _super.call(this); + }; // error } return Derived3; })(Base2); diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index f2e816604d2..db54affa6d9 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -50,17 +50,25 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(x) { } - Base.prototype.b = function () { }; + Base.prototype.b = function () { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return ''; }, - set: function (v) { }, + get: function () { + return ''; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function () { }; + Base.s = function () { + }; Object.defineProperty(Base, "t", { - get: function () { return ''; }, - set: function (v) { }, + get: function () { + return ''; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b66d356a73e..8c8b6a13c7e 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -48,17 +48,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -69,17 +77,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 80f7456ab9a..55bfd0e924d 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -75,17 +75,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -97,17 +105,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, a); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index cfb6116ee85..0a228a04f71 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -83,17 +83,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -113,7 +121,8 @@ var Derived2 = (function (_super) { function Derived2(a) { _super.call(this, a); } - Derived2.prototype.b = function (a) { }; + Derived2.prototype.b = function (a) { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -122,7 +131,9 @@ var Derived3 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived3.prototype, "c", { - get: function () { return x; }, + get: function () { + return x; + }, enumerable: true, configurable: true }); @@ -134,7 +145,8 @@ var Derived4 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived4.prototype, "c", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -159,7 +171,8 @@ var Derived7 = (function (_super) { function Derived7(a) { _super.call(this, a); } - Derived7.s = function (a) { }; + Derived7.s = function (a) { + }; return Derived7; })(Base); var Derived8 = (function (_super) { @@ -168,7 +181,9 @@ var Derived8 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived8, "t", { - get: function () { return x; }, + get: function () { + return x; + }, enumerable: true, configurable: true }); @@ -180,7 +195,8 @@ var Derived9 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived9, "t", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 9d7df0eee40..f673d9ab856 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -74,17 +74,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -95,17 +103,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 1902b6f4068..fb979ba6032 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -59,7 +59,9 @@ var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { var _this = this; - _super.call(this, function () { return _this; }); // error + _super.call(this, function () { + return _this; + }); // error this.a = a; } return Derived3; @@ -67,7 +69,9 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - _super.call(this, function () { return this; }); // ok + _super.call(this, function () { + return this; + }); // ok this.a = a; } return Derived4; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 2088fc1122b..53749861549 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { }; // ok to drop parameters + D.prototype.foo = function () { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { }; // ok to add optional parameters + E.prototype.foo = function (x) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 458aede164c..1b4bd58923c 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { }; // ok to drop parameters + D.prototype.foo = function (x) { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { }; // ok to add optional parameters + E.prototype.foo = function (x, y) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 9768a8f5fa3..3e548f5276e 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { }; // ok to drop parameters + D.prototype.foo = function (x) { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { }; // ok to add optional parameters + E.prototype.foo = function (x, y) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index abf1a3b5bd0..5249c6aad2e 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { }; // ok to drop parameters + D.prototype.foo = function () { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { }; // ok to add optional parameters + E.prototype.foo = function (x) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 8070e689bd0..0b568eaec9b 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -70,7 +70,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -123,7 +125,9 @@ var E = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(E.prototype, "X", { - get: function () { return ''; }, + get: function () { + return ''; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 8b00c632058..f802a225088 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -36,8 +36,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -53,8 +56,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 4ac57d159e6..fb0dee3e57b 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -46,8 +46,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -63,8 +66,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 1037d3faaae..558e2309757 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -35,8 +35,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -52,8 +55,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index c5bfea288bd..b2468f62d81 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -47,8 +47,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -65,8 +68,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index e256313d27b..a0d6de6a819 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -44,7 +44,9 @@ var Red = (function (_super) { } Red.prototype.shade = function () { var _this = this; - var getHue = function () { return _this.hue(); }; + var getHue = function () { + return _this.hue(); + }; return getHue() + " red"; }; return Red; @@ -52,8 +54,12 @@ var Red = (function (_super) { var Color = (function () { function Color() { } - Color.prototype.shade = function () { return "some shade"; }; - Color.prototype.hue = function () { return "some hue"; }; + Color.prototype.shade = function () { + return "some shade"; + }; + Color.prototype.hue = function () { + return "some hue"; + }; return Color; })(); var Blue = (function (_super) { @@ -63,7 +69,9 @@ var Blue = (function (_super) { } Blue.prototype.shade = function () { var _this = this; - var getHue = function () { return _this.hue(); }; + var getHue = function () { + return _this.hue(); + }; return getHue() + " blue"; }; return Blue; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 4d1f0452be4..677fadf3876 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -53,7 +53,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); @@ -96,7 +98,9 @@ var E = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(E.prototype, "X", { - get: function () { return ''; } // error + get: function () { + return ''; + } // error , enumerable: true, configurable: true diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 39e87b620d6..1ca6ce59450 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -41,9 +41,17 @@ var Derived = (function (_super) { return null; }; Derived.prototype.bar = function () { - var r = _super.prototype.foo.call(this, { a: 1 }); // { a: number } - var r2 = _super.prototype.foo.call(this, { a: 1, b: 2 }); // { a: number } - var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } + var r = _super.prototype.foo.call(this, { + a: 1 + }); // { a: number } + var r2 = _super.prototype.foo.call(this, { + a: 1, + b: 2 + }); // { a: number } + var r3 = this.foo({ + a: 1, + b: 2 + }); // { a: number; b: number; } }; return Derived; })(Base); diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 50c8aba1ef8..c70e3ff2aee 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -49,4 +49,7 @@ var d1; var d2; b = d1; b = d2; -var r = [d1, d2]; +var r = [ + d1, + d2 +]; diff --git a/tests/baselines/reference/destructuringParameterProperties1.js b/tests/baselines/reference/destructuringParameterProperties1.js index cc16cc78de5..6d39d41cc1b 100644 --- a/tests/baselines/reference/destructuringParameterProperties1.js +++ b/tests/baselines/reference/destructuringParameterProperties1.js @@ -52,10 +52,34 @@ var C3 = (function () { return C3; })(); var c1 = new C1([]); -c1 = new C1(["larry", "{curly}", "moe"]); +c1 = new C1([ + "larry", + "{curly}", + "moe" +]); var useC1Properties = c1.x === c1.y && c1.y === c1.z; -var c2 = new C2(["10", 10, !!10]); -var _a = [c2.x, c2.y, c2.z], c2_x = _a[0], c2_y = _a[1], c2_z = _a[2]; -var c3 = new C3({ x: 0, y: "", z: false }); -c3 = new C3({ x: 0, "y": "y", z: true }); -var _b = [c3.x, c3.y, c3.z], c3_x = _b[0], c3_y = _b[1], c3_z = _b[2]; +var c2 = new C2([ + "10", + 10, + !!10 +]); +var _a = [ + c2.x, + c2.y, + c2.z +], c2_x = _a[0], c2_y = _a[1], c2_z = _a[2]; +var c3 = new C3({ + x: 0, + y: "", + z: false +}); +c3 = new C3({ + x: 0, + "y": "y", + z: true +}); +var _b = [ + c3.x, + c3.y, + c3.z +], c3_x = _b[0], c3_y = _b[1], c3_z = _b[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties2.js b/tests/baselines/reference/destructuringParameterProperties2.js index 27e190af62f..7d7a89380a7 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.js +++ b/tests/baselines/reference/destructuringParameterProperties2.js @@ -50,9 +50,33 @@ var C1 = (function () { }; return C1; })(); -var x = new C1(undefined, [0, undefined, ""]); -var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; -var y = new C1(10, [0, "", true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; -var z = new C1(10, [undefined, "", null]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var x = new C1(undefined, [ + 0, + undefined, + "" +]); +var _a = [ + x.getA(), + x.getB(), + x.getC() +], x_a = _a[0], x_b = _a[1], x_c = _a[2]; +var y = new C1(10, [ + 0, + "", + true +]); +var _b = [ + y.getA(), + y.getB(), + y.getC() +], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var z = new C1(10, [ + undefined, + "", + null +]); +var _c = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _c[0], z_b = _c[1], z_c = _c[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties3.js b/tests/baselines/reference/destructuringParameterProperties3.js index fe9e69d7e5b..f9b89046ae1 100644 --- a/tests/baselines/reference/destructuringParameterProperties3.js +++ b/tests/baselines/reference/destructuringParameterProperties3.js @@ -53,11 +53,43 @@ var C1 = (function () { }; return C1; })(); -var x = new C1(undefined, [0, true, ""]); -var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; -var y = new C1(10, [0, true, true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; -var z = new C1(10, [undefined, "", ""]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; -var w = new C1(10, [undefined, undefined, undefined]); -var _d = [z.getA(), z.getB(), z.getC()], z_a = _d[0], z_b = _d[1], z_c = _d[2]; +var x = new C1(undefined, [ + 0, + true, + "" +]); +var _a = [ + x.getA(), + x.getB(), + x.getC() +], x_a = _a[0], x_b = _a[1], x_c = _a[2]; +var y = new C1(10, [ + 0, + true, + true +]); +var _b = [ + y.getA(), + y.getB(), + y.getC() +], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var z = new C1(10, [ + undefined, + "", + "" +]); +var _c = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var w = new C1(10, [ + undefined, + undefined, + undefined +]); +var _d = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _d[0], z_b = _d[1], z_c = _d[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties4.js b/tests/baselines/reference/destructuringParameterProperties4.js index 6da6f53a4fe..cd6334c8568 100644 --- a/tests/baselines/reference/destructuringParameterProperties4.js +++ b/tests/baselines/reference/destructuringParameterProperties4.js @@ -28,38 +28,26 @@ class C2 extends C1 { //// [destructuringParameterProperties4.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1(k, [a, b, c]) { +class C1 { + constructor(k, [a, b, c]) { this.k = k; this.[a, b, c] = [a, b, c]; if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { this.a = a || k; } } - C1.prototype.getA = function () { + getA() { return this.a; - }; - C1.prototype.getB = function () { - return this.b; - }; - C1.prototype.getC = function () { - return this.c; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); } - C2.prototype.doSomethingWithSuperProperties = function () { + getB() { + return this.b; + } + getC() { + return this.c; + } +} +class C2 extends C1 { + doSomethingWithSuperProperties() { return `${this.a} ${this.b} ${this.c}`; - }; - return C2; -})(C1); + } +} diff --git a/tests/baselines/reference/destructuringParameterProperties5.js b/tests/baselines/reference/destructuringParameterProperties5.js index d9b1710ae89..7575ebb3af7 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.js +++ b/tests/baselines/reference/destructuringParameterProperties5.js @@ -22,5 +22,19 @@ var C1 = (function () { } return C1; })(); -var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]); -var _a = [a.x1, a.x2, a.x3, a.y, a.z], a_x1 = _a[0], a_x2 = _a[1], a_x3 = _a[2], a_y = _a[3], a_z = _a[4]; +var a = new C1([ + { + x1: 10, + x2: "", + x3: true + }, + "", + false +]); +var _a = [ + a.x1, + a.x2, + a.x3, + a.y, + a.z +], a_x1 = _a[0], a_x2 = _a[1], a_x3 = _a[2], a_y = _a[3], a_z = _a[4]; diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js index 13312aea362..c0fe33d086e 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js @@ -16,7 +16,9 @@ var TestFile = (function () { var _this = this; /// Test summary /// - var getMessage = function () { return message + _this.name; }; + var getMessage = function () { + return message + _this.name; + }; this.message = getMessage(); } return TestFile; diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js index 754b432c7c5..97d8e2f3a3d 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js @@ -17,7 +17,9 @@ var TestFile = (function () { /// Test summary /// var _this = this; - var getMessage = function () { return message + _this.name; }; + var getMessage = function () { + return message + _this.name; + }; this.message = getMessage(); } return TestFile; diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js index 3bbea65541f..a37fdefe816 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js @@ -17,7 +17,9 @@ var TestFile = (function () { /// Test summary /// /// - return function () { return message + _this.name; }; + return function () { + return message + _this.name; + }; }; return TestFile; })(); diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js index 2a0ac0a4f0a..e96bfa93471 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js @@ -18,7 +18,9 @@ var TestFile = (function () { /// /// var _this = this; - return function () { return message + _this.name; }; + return function () { + return message + _this.name; + }; }; return TestFile; })(); diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.errors.txt b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.errors.txt new file mode 100644 index 00000000000..fbd9be772fa --- /dev/null +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.errors.txt @@ -0,0 +1,131 @@ +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(2,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(4,7): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(6,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(8,7): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(10,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(12,7): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(14,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(16,7): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(18,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(21,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(23,8): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(26,8): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(52,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(54,5): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(59,13): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(63,13): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(68,13): error TS1200: Line terminator not permitted before arrow. +tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(72,9): error TS1200: Line terminator not permitted before arrow. + + +==== tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts (18 errors) ==== + var f1 = () + => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f2 = (x: string, y: string) /* + */ => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f3 = (x: string, y: number, ...rest) + => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f4 = (x: string, y: number, ...rest) /* + */ => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f5 = (...rest) + => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f6 = (...rest) /* + */ => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f7 = (x: string, y: number, z = 10) + => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f8 = (x: string, y: number, z = 10) /* + */ => { } + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f9 = (a: number): number + => a; + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f10 = (a: number) : + number + => a + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f11 = (a: number): number /* + */ => a; + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + var f12 = (a: number) : + number /* + */ => a + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + + // Should be valid. + var f11 = (a: number + ) => a; + + // Should be valid. + var f12 = (a: number) + : number => a; + + // Should be valid. + var f13 = (a: number): + number => a; + + // Should be valid. + var f14 = () /* */ => {} + + // Should be valid. + var f15 = (a: number): number /* */ => a + + // Should be valid. + var f16 = (a: number, b = 10): + number /* */ => a + b; + + function foo(func: () => boolean) { } + foo(() + => true); + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + foo(() + => { return false; }); + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + + module m { + class City { + constructor(x: number, thing = () + => 100) { + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + } + + public m = () + => 2 * 2 * 2 + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + } + + export enum Enum { + claw = (() + => 10)() + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + } + + export var v = x + => new City(Enum.claw); + ~~ +!!! error TS1200: Line terminator not permitted before arrow. + } + \ No newline at end of file diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js new file mode 100644 index 00000000000..610cbe62c1b --- /dev/null +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js @@ -0,0 +1,178 @@ +//// [disallowLineTerminatorBeforeArrow.ts] +var f1 = () + => { } +var f2 = (x: string, y: string) /* + */ => { } +var f3 = (x: string, y: number, ...rest) + => { } +var f4 = (x: string, y: number, ...rest) /* + */ => { } +var f5 = (...rest) + => { } +var f6 = (...rest) /* + */ => { } +var f7 = (x: string, y: number, z = 10) + => { } +var f8 = (x: string, y: number, z = 10) /* + */ => { } +var f9 = (a: number): number + => a; +var f10 = (a: number) : + number + => a +var f11 = (a: number): number /* + */ => a; +var f12 = (a: number) : + number /* + */ => a + +// Should be valid. +var f11 = (a: number + ) => a; + +// Should be valid. +var f12 = (a: number) + : number => a; + +// Should be valid. +var f13 = (a: number): + number => a; + +// Should be valid. +var f14 = () /* */ => {} + +// Should be valid. +var f15 = (a: number): number /* */ => a + +// Should be valid. +var f16 = (a: number, b = 10): + number /* */ => a + b; + +function foo(func: () => boolean) { } +foo(() + => true); +foo(() + => { return false; }); + +module m { + class City { + constructor(x: number, thing = () + => 100) { + } + + public m = () + => 2 * 2 * 2 + } + + export enum Enum { + claw = (() + => 10)() + } + + export var v = x + => new City(Enum.claw); +} + + +//// [disallowLineTerminatorBeforeArrow.js] +var f1 = function () { +}; +var f2 = function (x, y) { +}; +var f3 = function (x, y) { + var rest = []; + for (var _i = 2; _i < arguments.length; _i++) { + rest[_i - 2] = arguments[_i]; + } +}; +var f4 = function (x, y) { + var rest = []; + for (var _i = 2; _i < arguments.length; _i++) { + rest[_i - 2] = arguments[_i]; + } +}; +var f5 = function () { + var rest = []; + for (var _i = 0; _i < arguments.length; _i++) { + rest[_i - 0] = arguments[_i]; + } +}; +var f6 = function () { + var rest = []; + for (var _i = 0; _i < arguments.length; _i++) { + rest[_i - 0] = arguments[_i]; + } +}; +var f7 = function (x, y, z) { + if (z === void 0) { z = 10; } +}; +var f8 = function (x, y, z) { + if (z === void 0) { z = 10; } +}; +var f9 = function (a) { + return a; +}; +var f10 = function (a) { + return a; +}; +var f11 = function (a) { + return a; +}; +var f12 = function (a) { + return a; +}; +// Should be valid. +var f11 = function (a) { + return a; +}; +// Should be valid. +var f12 = function (a) { + return a; +}; +// Should be valid. +var f13 = function (a) { + return a; +}; +// Should be valid. +var f14 = function () { +}; +// Should be valid. +var f15 = function (a) { + return a; +}; +// Should be valid. +var f16 = function (a, b) { + if (b === void 0) { b = 10; } + return a + b; +}; +function foo(func) { +} +foo(function () { + return true; +}); +foo(function () { + return false; +}); +var m; +(function (m) { + var City = (function () { + function City(x, thing) { + if (thing === void 0) { thing = function () { + return 100; + }; } + this.m = function () { + return 2 * 2 * 2; + }; + } + return City; + })(); + (function (Enum) { + Enum[Enum["claw"] = (function () { + return 10; + })()] = "claw"; + })(m.Enum || (m.Enum = {})); + var Enum = m.Enum; + m.v = function (x) { + return new City(Enum.claw); + }; +})(m || (m = {})); diff --git a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js index b259f321f14..b424436b99a 100644 --- a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js +++ b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js @@ -12,4 +12,11 @@ var test: IIntervalTreeNode[] = [{ interval: { begin: 0 }, children: null }]; // //// [doNotWidenAtObjectLiteralPropertyAssignment.js] -var test = [{ interval: { begin: 0 }, children: null }]; // was error here because best common type is {} +var test = [ + { + interval: { + begin: 0 + }, + children: null + } +]; // was error here because best common type is {} diff --git a/tests/baselines/reference/doWhileBreakStatements.js b/tests/baselines/reference/doWhileBreakStatements.js index a2bc0d3c549..9162c629898 100644 --- a/tests/baselines/reference/doWhileBreakStatements.js +++ b/tests/baselines/reference/doWhileBreakStatements.js @@ -66,6 +66,7 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileContinueStatements.js b/tests/baselines/reference/doWhileContinueStatements.js index 7f73157fd99..a39495e162e 100644 --- a/tests/baselines/reference/doWhileContinueStatements.js +++ b/tests/baselines/reference/doWhileContinueStatements.js @@ -66,6 +66,7 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileLoop.js b/tests/baselines/reference/doWhileLoop.js index 6581bba09e1..0c1abd7aed9 100644 --- a/tests/baselines/reference/doWhileLoop.js +++ b/tests/baselines/reference/doWhileLoop.js @@ -3,5 +3,6 @@ do { } while (false); var n; //// [doWhileLoop.js] -do { } while (false); +do { +} while (false); var n; diff --git a/tests/baselines/reference/dottedSymbolResolution1.js b/tests/baselines/reference/dottedSymbolResolution1.js index a0ac7a38b88..d5bdb6006d5 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.js +++ b/tests/baselines/reference/dottedSymbolResolution1.js @@ -29,7 +29,8 @@ function _setBarAndText(): void { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); function each(collection, callback) { diff --git a/tests/baselines/reference/downlevelLetConst12.js b/tests/baselines/reference/downlevelLetConst12.js index 6437d17accb..9dc69826256 100644 --- a/tests/baselines/reference/downlevelLetConst12.js +++ b/tests/baselines/reference/downlevelLetConst12.js @@ -17,6 +17,10 @@ const {a: baz4} = { a: 1 }; var foo; var bar = 1; var baz = ([])[0]; -var baz2 = ({ a: 1 }).a; +var baz2 = ({ + a: 1 +}).a; var baz3 = ([])[0]; -var baz4 = ({ a: 1 }).a; +var baz4 = ({ + a: 1 +}).a; diff --git a/tests/baselines/reference/downlevelLetConst13.js b/tests/baselines/reference/downlevelLetConst13.js index 8324d697e95..95e89d5245c 100644 --- a/tests/baselines/reference/downlevelLetConst13.js +++ b/tests/baselines/reference/downlevelLetConst13.js @@ -24,16 +24,32 @@ export module M { // exported let\const bindings should not be renamed exports.foo = 10; exports.bar = "123"; -exports.bar1 = ([1])[0]; -exports.bar2 = ([2])[0]; -exports.bar3 = ({ a: 1 }).a; -exports.bar4 = ({ a: 1 }).a; +exports.bar1 = ([ + 1 +])[0]; +exports.bar2 = ([ + 2 +])[0]; +exports.bar3 = ({ + a: 1 +}).a; +exports.bar4 = ({ + a: 1 +}).a; var M; (function (M) { M.baz = 100; M.baz2 = true; - M.bar5 = ([1])[0]; - M.bar6 = ([2])[0]; - M.bar7 = ({ a: 1 }).a; - M.bar8 = ({ a: 1 }).a; + M.bar5 = ([ + 1 + ])[0]; + M.bar6 = ([ + 2 + ])[0]; + M.bar7 = ({ + a: 1 + }).a; + M.bar8 = ({ + a: 1 + }).a; })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/downlevelLetConst14.js b/tests/baselines/reference/downlevelLetConst14.js index 212262dc43a..ffe667eda3f 100644 --- a/tests/baselines/reference/downlevelLetConst14.js +++ b/tests/baselines/reference/downlevelLetConst14.js @@ -61,13 +61,21 @@ var z0, z1, z2, z3; { var _x = 20; use(_x); - var _z0 = ([1])[0]; + var _z0 = ([ + 1 + ])[0]; use(_z0); - var _z1 = ([1])[0]; + var _z1 = ([ + 1 + ])[0]; use(_z1); - var _z2 = ({ a: 1 }).a; + var _z2 = ({ + a: 1 + }).a; use(_z2); - var _z3 = ({ a: 1 }).a; + var _z3 = ({ + a: 1 + }).a; use(_z3); } use(x); @@ -79,10 +87,14 @@ var z6; var y = true; { var _y = ""; - var _z6 = ([true])[0]; + var _z6 = ([ + true + ])[0]; { var _y_1 = 1; - var _z6_1 = ({ a: 1 }).a; + var _z6_1 = ({ + a: 1 + }).a; use(_y_1); use(_z6_1); } @@ -95,10 +107,14 @@ var z = false; var z5 = 1; { var _z = ""; - var _z5 = ([5])[0]; + var _z5 = ([ + 5 + ])[0]; { var _z_1 = 1; - var _z5_1 = ({ a: 1 }).a; + var _z5_1 = ({ + a: 1 + }).a; // try to step on generated name use(_z_1); } diff --git a/tests/baselines/reference/downlevelLetConst15.js b/tests/baselines/reference/downlevelLetConst15.js index c9b67719197..94fcb1b03a0 100644 --- a/tests/baselines/reference/downlevelLetConst15.js +++ b/tests/baselines/reference/downlevelLetConst15.js @@ -61,13 +61,25 @@ var z0, z1, z2, z3; { var _x = 20; use(_x); - var _z0 = ([1])[0]; + var _z0 = ([ + 1 + ])[0]; use(_z0); - var _z1 = ([{ a: 1 }])[0].a; + var _z1 = ([ + { + a: 1 + } + ])[0].a; use(_z1); - var _z2 = ({ a: 1 }).a; + var _z2 = ({ + a: 1 + }).a; use(_z2); - var _z3 = ({ a: { b: 1 } }).a.b; + var _z3 = ({ + a: { + b: 1 + } + }).a.b; use(_z3); } use(x); @@ -79,10 +91,14 @@ var z6; var y = true; { var _y = ""; - var _z6 = ([true])[0]; + var _z6 = ([ + true + ])[0]; { var _y_1 = 1; - var _z6_1 = ({ a: 1 }).a; + var _z6_1 = ({ + a: 1 + }).a; use(_y_1); use(_z6_1); } @@ -95,10 +111,14 @@ var z = false; var z5 = 1; { var _z = ""; - var _z5 = ([5])[0]; + var _z5 = ([ + 5 + ])[0]; { var _z_1 = 1; - var _z5_1 = ({ a: 1 }).a; + var _z5_1 = ({ + a: 1 + }).a; // try to step on generated name use(_z_1); } diff --git a/tests/baselines/reference/downlevelLetConst16.errors.txt b/tests/baselines/reference/downlevelLetConst16.errors.txt index c488e96ca23..94c53360b87 100644 --- a/tests/baselines/reference/downlevelLetConst16.errors.txt +++ b/tests/baselines/reference/downlevelLetConst16.errors.txt @@ -1,12 +1,10 @@ -tests/cases/compiler/downlevelLetConst16.ts(189,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. -tests/cases/compiler/downlevelLetConst16.ts(196,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. -tests/cases/compiler/downlevelLetConst16.ts(203,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. -tests/cases/compiler/downlevelLetConst16.ts(210,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. -tests/cases/compiler/downlevelLetConst16.ts(217,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. -tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/compiler/downlevelLetConst16.ts(195,14): error TS2461: Type 'undefined' is not an array type. +tests/cases/compiler/downlevelLetConst16.ts(202,15): error TS2459: Type 'undefined' has no property 'a' and no string index signature. +tests/cases/compiler/downlevelLetConst16.ts(216,16): error TS2461: Type 'undefined' is not an array type. +tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2459: Type 'undefined' has no property 'a' and no string index signature. -==== tests/cases/compiler/downlevelLetConst16.ts (6 errors) ==== +==== tests/cases/compiler/downlevelLetConst16.ts (4 errors) ==== 'use strict' declare function use(a: any); @@ -193,11 +191,8 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta use(x); } - // TODO: once for-of is supported downlevel function foo7() { for (let x of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. use(x); } use(x); @@ -205,8 +200,8 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta function foo8() { for (let [x] of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~~~ +!!! error TS2461: Type 'undefined' is not an array type. use(x); } use(x); @@ -214,8 +209,8 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta function foo9() { for (let {a: x} of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2459: Type 'undefined' has no property 'a' and no string index signature. use(x); } use(x); @@ -223,8 +218,6 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta function foo10() { for (const x of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. use(x); } use(x); @@ -232,8 +225,8 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta function foo11() { for (const [x] of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~~~ +!!! error TS2461: Type 'undefined' is not an array type. use(x); } use(x); @@ -241,8 +234,8 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta function foo12() { for (const {a: x} of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2459: Type 'undefined' has no property 'a' and no string index signature. use(x); } use(x); diff --git a/tests/baselines/reference/downlevelLetConst16.js b/tests/baselines/reference/downlevelLetConst16.js index 36da8ac36fe..f83e745c554 100644 --- a/tests/baselines/reference/downlevelLetConst16.js +++ b/tests/baselines/reference/downlevelLetConst16.js @@ -185,7 +185,6 @@ function foo6() { use(x); } -// TODO: once for-of is supported downlevel function foo7() { for (let x of []) { use(x); @@ -239,18 +238,26 @@ use(z); function foo1() { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } function foo2() { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -261,18 +268,26 @@ var A = (function () { A.prototype.m1 = function () { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); }; A.prototype.m2 = function () { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -285,18 +300,26 @@ var B = (function () { B.prototype.m1 = function () { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); }; B.prototype.m2 = function () { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -306,18 +329,26 @@ var B = (function () { function bar1() { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } function bar2() { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -326,9 +357,13 @@ var M1; (function (M1) { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); })(M1 || (M1 = {})); var M2; @@ -336,9 +371,13 @@ var M2; { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -347,9 +386,13 @@ var M3; (function (M3) { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); })(M3 || (M3 = {})); var M4; @@ -357,9 +400,13 @@ var M4; { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -373,7 +420,9 @@ function foo3() { for (var _y = ([])[0];;) { use(_y); } - for (var _z = ({ a: 1 }).a;;) { + for (var _z = ({ + a: 1 + }).a;;) { use(_z); } use(x); @@ -385,7 +434,9 @@ function foo4() { for (var _y = ([])[0];;) { use(_y); } - for (var _z = ({ a: 1 }).a;;) { + for (var _z = ({ + a: 1 + }).a;;) { use(_z); } use(x); @@ -402,39 +453,44 @@ function foo6() { } use(x); } -// TODO: once for-of is supported downlevel function foo7() { - for (var _x of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i]; use(_x); } use(x); } function foo8() { - for (var _x = (void 0)[0] of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i][0]; use(_x); } use(x); } function foo9() { - for (var _x = (void 0).a of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i].a; use(_x); } use(x); } function foo10() { - for (var _x of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i]; use(_x); } use(x); } function foo11() { - for (var _x = (void 0)[0] of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i][0]; use(_x); } use(x); } function foo12() { - for (var _x = (void 0).a of []) { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x = _a[_i].a; use(_x); } use(x); diff --git a/tests/baselines/reference/downlevelLetConst17.errors.txt b/tests/baselines/reference/downlevelLetConst17.errors.txt deleted file mode 100644 index ef8f2b89085..00000000000 --- a/tests/baselines/reference/downlevelLetConst17.errors.txt +++ /dev/null @@ -1,74 +0,0 @@ -tests/cases/compiler/downlevelLetConst17.ts(66,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. - - -==== tests/cases/compiler/downlevelLetConst17.ts (1 errors) ==== - 'use strict' - - declare function use(a: any); - - var x; - for (let x = 10; ;) { - use(x); - } - use(x); - - for (const x = 10; ;) { - use(x); - } - - for (; ;) { - let x = 10; - use(x); - x = 1; - } - - for (; ;) { - const x = 10; - use(x); - } - - for (let x; ;) { - use(x); - x = 1; - } - - for (; ;) { - let x; - use(x); - x = 1; - } - - while (true) { - let x; - use(x); - } - - while (true) { - const x = true; - use(x); - } - - do { - let x; - use(x); - } while (true); - - do { - let x; - use(x); - } while (true); - - for (let x in []) { - use(x); - } - - for (const x in []) { - use(x); - } - - // TODO: update once for-of statements are supported downlevel - for (const x of []) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. - use(x); - } \ No newline at end of file diff --git a/tests/baselines/reference/downlevelLetConst17.js b/tests/baselines/reference/downlevelLetConst17.js index 1fe9c1a01ed..d38ec3fde08 100644 --- a/tests/baselines/reference/downlevelLetConst17.js +++ b/tests/baselines/reference/downlevelLetConst17.js @@ -63,7 +63,6 @@ for (const x in []) { use(x); } -// TODO: update once for-of statements are supported downlevel for (const x of []) { use(x); } @@ -118,7 +117,7 @@ for (var _x_10 in []) { for (var _x_11 in []) { use(_x_11); } -// TODO: update once for-of statements are supported downlevel -for (var _x_12 of []) { +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var _x_12 = _a[_i]; use(_x_12); } diff --git a/tests/baselines/reference/downlevelLetConst17.types b/tests/baselines/reference/downlevelLetConst17.types new file mode 100644 index 00000000000..0c5a8eaa86b --- /dev/null +++ b/tests/baselines/reference/downlevelLetConst17.types @@ -0,0 +1,154 @@ +=== tests/cases/compiler/downlevelLetConst17.ts === +'use strict' + +declare function use(a: any); +>use : (a: any) => any +>a : any + +var x; +>x : any + +for (let x = 10; ;) { +>x : number + + use(x); +>use(x) : any +>use : (a: any) => any +>x : number +} +use(x); +>use(x) : any +>use : (a: any) => any +>x : any + +for (const x = 10; ;) { +>x : number + + use(x); +>use(x) : any +>use : (a: any) => any +>x : number +} + +for (; ;) { + let x = 10; +>x : number + + use(x); +>use(x) : any +>use : (a: any) => any +>x : number + + x = 1; +>x = 1 : number +>x : number +} + +for (; ;) { + const x = 10; +>x : number + + use(x); +>use(x) : any +>use : (a: any) => any +>x : number +} + +for (let x; ;) { +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + + x = 1; +>x = 1 : number +>x : any +} + +for (; ;) { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + + x = 1; +>x = 1 : number +>x : any +} + +while (true) { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any +} + +while (true) { + const x = true; +>x : boolean + + use(x); +>use(x) : any +>use : (a: any) => any +>x : boolean +} + +do { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + +} while (true); + +do { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + +} while (true); + +for (let x in []) { +>x : any +>[] : undefined[] + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any +} + +for (const x in []) { +>x : any +>[] : undefined[] + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any +} + +for (const x of []) { +>x : any +>[] : undefined[] + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any +} diff --git a/tests/baselines/reference/downlevelLetConst18.js b/tests/baselines/reference/downlevelLetConst18.js index e9993a90bce..0c025573e20 100644 --- a/tests/baselines/reference/downlevelLetConst18.js +++ b/tests/baselines/reference/downlevelLetConst18.js @@ -33,25 +33,45 @@ for (let x; ;) { //// [downlevelLetConst18.js] 'use strict'; for (var x = void 0;;) { - function foo() { x; } + function foo() { + x; + } ; } for (var _x = void 0;;) { - function foo() { _x; } + function foo() { + _x; + } ; } for (var _x_1 = void 0;;) { - (function () { _x_1; })(); + (function () { + _x_1; + })(); } for (var _x_2 = 1;;) { - (function () { _x_2; })(); + (function () { + _x_2; + })(); } for (var _x_3 = void 0;;) { - ({ foo: function () { _x_3; } }); + ({ + foo: function () { + _x_3; + } + }); } for (var _x_4 = void 0;;) { - ({ get foo() { return _x_4; } }); + ({ + get foo() { + return _x_4; + } + }); } for (var _x_5 = void 0;;) { - ({ set foo(v) { _x_5; } }); + ({ + set foo(v) { + _x_5; + } + }); } diff --git a/tests/baselines/reference/downlevelLetConst19.js b/tests/baselines/reference/downlevelLetConst19.js new file mode 100644 index 00000000000..adcc2e256a8 --- /dev/null +++ b/tests/baselines/reference/downlevelLetConst19.js @@ -0,0 +1,39 @@ +//// [downlevelLetConst19.ts] +'use strict' +declare function use(a: any); +var x; +function a() { + { + let x; + use(x); + + function b() { + { + let x; + use(x); + } + use(x); + } + } + use(x) +} +use(x) + +//// [downlevelLetConst19.js] +'use strict'; +var x; +function a() { + { + var _x; + use(_x); + function b() { + { + var _x_1; + use(_x_1); + } + use(_x); + } + } + use(x); +} +use(x); diff --git a/tests/baselines/reference/downlevelLetConst19.types b/tests/baselines/reference/downlevelLetConst19.types new file mode 100644 index 00000000000..492d10b59c9 --- /dev/null +++ b/tests/baselines/reference/downlevelLetConst19.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/downlevelLetConst19.ts === +'use strict' +declare function use(a: any); +>use : (a: any) => any +>a : any + +var x; +>x : any + +function a() { +>a : () => void + { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + + function b() { +>b : () => void + { + let x; +>x : any + + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + } + use(x); +>use(x) : any +>use : (a: any) => any +>x : any + } + } + use(x) +>use(x) : any +>use : (a: any) => any +>x : any +} +use(x) +>use(x) : any +>use : (a: any) => any +>x : any + diff --git a/tests/baselines/reference/duplicateExportAssignments.errors.txt b/tests/baselines/reference/duplicateExportAssignments.errors.txt index 0052391f62c..1fc844fcaad 100644 --- a/tests/baselines/reference/duplicateExportAssignments.errors.txt +++ b/tests/baselines/reference/duplicateExportAssignments.errors.txt @@ -1,15 +1,15 @@ tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo2.ts(4,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo3.ts(7,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo3.ts(8,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo4.ts(1,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo4.ts(8,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo5.ts(4,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo5.ts(5,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo2.ts(4,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo3.ts(7,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo3.ts(8,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo4.ts(1,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo4.ts(8,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo5.ts(4,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo5.ts(5,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate identifier 'default'. ==== tests/cases/conformance/externalModules/foo1.ts (3 errors) ==== @@ -19,20 +19,20 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module can ~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = y; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== var x = 10; class y {}; export = x; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = y; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. ==== tests/cases/conformance/externalModules/foo3.ts (2 errors) ==== module x { @@ -43,15 +43,15 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module can } export = x; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = y; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. ==== tests/cases/conformance/externalModules/foo4.ts (2 errors) ==== export = x; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. function x(){ return 42; } @@ -60,7 +60,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module can } export = y; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. ==== tests/cases/conformance/externalModules/foo5.ts (3 errors) ==== var x = 5; @@ -68,11 +68,11 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module can var z = {}; export = x; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = y; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = z; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js index e440c06073a..6d43b888f48 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js @@ -19,20 +19,27 @@ try { } catch (e) { //// [duplicateIdentifierInCatchBlock.js] var v; -try { } +try { +} catch (e) { - function v() { } + function v() { + } +} +function w() { +} +try { } -function w() { } -try { } catch (e) { var w; } -try { } +try { +} catch (e) { var x; - function x() { } // error - function e() { } // error + function x() { + } // error + function e() { + } // error var p; var p; // error } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index 6a567018d1f..018d148f9c3 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -64,7 +64,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function f() { } + function f() { + } M.f = f; })(M || (M = {})); var M; @@ -78,7 +79,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function g() { } + function g() { + } })(M || (M = {})); var M; (function (M) { @@ -100,7 +102,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function C() { } // no error + function C() { + } // no error })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/duplicateLocalVariable1.js b/tests/baselines/reference/duplicateLocalVariable1.js index 62e291f28c0..d9ba04ae39a 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.js +++ b/tests/baselines/reference/duplicateLocalVariable1.js @@ -361,7 +361,9 @@ var TestRunner = (function () { this.tests = []; } TestRunner.arrayCompare = function (arg1, arg2) { - return (arg1.every(function (val, index) { return val === arg2[index]; })); + return (arg1.every(function (val, index) { + return val === arg2[index]; + })); }; TestRunner.prototype.addTest = function (test) { this.tests.push(test); @@ -408,11 +410,39 @@ exports.TestRunner = TestRunner; exports.tests = (function () { var testRunner = new TestRunner(); // First 3 are for simple harness validation - testRunner.addTest(new TestCase("Basic test", function () { return true; })); - testRunner.addTest(new TestCase("Test for any error", function () { throw new Error(); return false; }, "")); - testRunner.addTest(new TestCase("Test RegEx error message match", function () { throw new Error("Should also pass"); return false; }, "Should [also]+ pass")); - testRunner.addTest(new TestCase("Test array compare true", function () { return TestRunner.arrayCompare([1, 2, 3], [1, 2, 3]); })); - testRunner.addTest(new TestCase("Test array compare false", function () { return !TestRunner.arrayCompare([3, 2, 3], [1, 2, 3]); })); + testRunner.addTest(new TestCase("Basic test", function () { + return true; + })); + testRunner.addTest(new TestCase("Test for any error", function () { + throw new Error(); + return false; + }, "")); + testRunner.addTest(new TestCase("Test RegEx error message match", function () { + throw new Error("Should also pass"); + return false; + }, "Should [also]+ pass")); + testRunner.addTest(new TestCase("Test array compare true", function () { + return TestRunner.arrayCompare([ + 1, + 2, + 3 + ], [ + 1, + 2, + 3 + ]); + })); + testRunner.addTest(new TestCase("Test array compare false", function () { + return !TestRunner.arrayCompare([ + 3, + 2, + 3 + ], [ + 1, + 2, + 3 + ]); + })); // File detection tests testRunner.addTest(new TestCase("Check file exists", function () { return FileManager.DirectoryManager.fileExists(TestFileDir + "\\Test.txt"); @@ -422,38 +452,28 @@ exports.tests = (function () { })); // File pattern matching tests testRunner.addTest(new TestCase("Check text file match", function () { - return (FileManager.FileBuffer.isTextFile("C:\\somedir\\readme.txt") && - FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") && - FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js")); + return (FileManager.FileBuffer.isTextFile("C:\\somedir\\readme.txt") && FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") && FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js")); })); testRunner.addTest(new TestCase("Check makefile match", function () { return FileManager.FileBuffer.isTextFile("C:\\some dir\\makefile"); })); testRunner.addTest(new TestCase("Check binary file doesn't match", function () { - return (!FileManager.FileBuffer.isTextFile("C:\\somedir\\app.exe") && - !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); + return (!FileManager.FileBuffer.isTextFile("C:\\somedir\\app.exe") && !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); })); // Command-line parameter tests testRunner.addTest(new TestCase("Check App defaults", function () { var app = new App.App([]); - return (app.fixLines === false && - app.recurse === true && - app.lineEndings === "CRLF" && - app.matchPattern === undefined && - app.rootDirectory === ".\\" && - app.encodings[0] === "ascii" && - app.encodings[1] === "utf8nobom"); + return (app.fixLines === false && app.recurse === true && app.lineEndings === "CRLF" && app.matchPattern === undefined && app.rootDirectory === ".\\" && app.encodings[0] === "ascii" && app.encodings[1] === "utf8nobom"); })); testRunner.addTest(new TestCase("Check App params", function () { - var app = new App.App(["-dir=C:\\test dir", "-lineEndings=LF", "-encodings=utf16be,ascii", "-recurse=false", "-fixlines"]); - return (app.fixLines === true && - app.lineEndings === "LF" && - app.recurse === false && - app.matchPattern === undefined && - app.rootDirectory === "C:\\test dir" && - app.encodings[0] === "utf16be" && - app.encodings[1] === "ascii" && - app.encodings.length === 2); + var app = new App.App([ + "-dir=C:\\test dir", + "-lineEndings=LF", + "-encodings=utf16be,ascii", + "-recurse=false", + "-fixlines" + ]); + return (app.fixLines === true && app.lineEndings === "LF" && app.recurse === false && app.matchPattern === undefined && app.rootDirectory === "C:\\test dir" && app.encodings[0] === "utf16be" && app.encodings[1] === "ascii" && app.encodings.length === 2); })); // File BOM detection tests testRunner.addTest(new TestCase("Check encoding detection no BOM", function () { @@ -487,7 +507,19 @@ exports.tests = (function () { for (var i = 0; i < 11; i++) { chars.push(fb.readByte()); } - return TestRunner.arrayCompare(chars, [0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]); + return TestRunner.arrayCompare(chars, [ + 0x54, + 0xC3, + 0xA8, + 0xE1, + 0xB4, + 0xA3, + 0xE2, + 0x80, + 0xA0, + 0x0D, + 0x0A + ]); })); testRunner.addTest(new TestCase("Check UTF8 decoding", function () { var fb = new FileManager.FileBuffer(TestFileDir + "\\UTF8BOM.txt"); @@ -495,12 +527,26 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { chars.push(fb.readUtf8CodePoint()); } - return TestRunner.arrayCompare(chars, [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]); + return TestRunner.arrayCompare(chars, [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]); })); testRunner.addTest(new TestCase("Check UTF8 encoding", function () { var fb = new FileManager.FileBuffer(20); fb.writeUtf8Bom(); - var chars = [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]; + var chars = [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]; for (var i in chars) { fb.writeUtf8CodePoint(chars[i]); } @@ -509,7 +555,22 @@ exports.tests = (function () { for (var i = 0; i < 14; i++) { bytes.push(fb.readByte()); } - var expected = [0xEF, 0xBB, 0xBF, 0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]; + var expected = [ + 0xEF, + 0xBB, + 0xBF, + 0x54, + 0xC3, + 0xA8, + 0xE1, + 0xB4, + 0xA3, + 0xE2, + 0x80, + 0xA0, + 0x0D, + 0x0A + ]; return TestRunner.arrayCompare(bytes, expected); })); // Test reading and writing files @@ -517,14 +578,38 @@ exports.tests = (function () { var filename = TestFileDir + "\\tmpUTF16LE.txt"; var fb = new FileManager.FileBuffer(14); fb.writeUtf16leBom(); - var chars = [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]; - chars.forEach(function (val) { fb.writeUtf16CodePoint(val, false); }); + var chars = [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]; + chars.forEach(function (val) { + fb.writeUtf16CodePoint(val, false); + }); fb.save(filename); var savedFile = new FileManager.FileBuffer(filename); if (savedFile.encoding !== 'utf16le') { throw Error("Incorrect encoding"); } - var expectedBytes = [0xFF, 0xFE, 0x54, 0x00, 0xE8, 0x00, 0x23, 0x1D, 0x20, 0x20, 0x0D, 0x00, 0x0A, 0x00]; + var expectedBytes = [ + 0xFF, + 0xFE, + 0x54, + 0x00, + 0xE8, + 0x00, + 0x23, + 0x1D, + 0x20, + 0x20, + 0x0D, + 0x00, + 0x0A, + 0x00 + ]; savedFile.index = 0; expectedBytes.forEach(function (val) { var byteVal = savedFile.readByte(); @@ -554,7 +639,14 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { codePoints.push(savedFile.readUtf16CodePoint(false)); } - var expectedCodePoints = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; + var expectedCodePoints = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; return TestRunner.arrayCompare(codePoints, expectedCodePoints); })); testRunner.addTest(new TestCase("Read non-BMP utf8 chars", function () { @@ -566,20 +658,52 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { codePoints.push(savedFile.readUtf8CodePoint()); } - var expectedCodePoints = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; + var expectedCodePoints = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; return TestRunner.arrayCompare(codePoints, expectedCodePoints); })); testRunner.addTest(new TestCase("Write non-BMP utf8 chars", function () { var filename = TestFileDir + "\\tmpUTF8nonBmp.txt"; var fb = new FileManager.FileBuffer(15); - var chars = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; - chars.forEach(function (val) { fb.writeUtf8CodePoint(val); }); + var chars = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; + chars.forEach(function (val) { + fb.writeUtf8CodePoint(val); + }); fb.save(filename); var savedFile = new FileManager.FileBuffer(filename); if (savedFile.encoding !== 'utf8') { throw Error("Incorrect encoding"); } - var expectedBytes = [0xF0, 0x90, 0x92, 0x80, 0xF0, 0x90, 0x92, 0x81, 0xF0, 0x90, 0x92, 0x82, 0x54, 0x68, 0x69]; + var expectedBytes = [ + 0xF0, + 0x90, + 0x92, + 0x80, + 0xF0, + 0x90, + 0x92, + 0x81, + 0xF0, + 0x90, + 0x92, + 0x82, + 0x54, + 0x68, + 0x69 + ]; expectedBytes.forEach(function (val) { var byteVal = savedFile.readByte(); if (byteVal !== val) { diff --git a/tests/baselines/reference/duplicateLocalVariable2.js b/tests/baselines/reference/duplicateLocalVariable2.js index a8370f31709..fdb6f5463cd 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.js +++ b/tests/baselines/reference/duplicateLocalVariable2.js @@ -62,7 +62,9 @@ define(["require", "exports"], function (require, exports) { testRunner.addTest(new TestCase("Check UTF8 encoding", function () { var fb; fb.writeUtf8Bom(); - var chars = [0x0054]; + var chars = [ + 0x0054 + ]; for (var i in chars) { fb.writeUtf8CodePoint(chars[i]); } @@ -71,7 +73,9 @@ define(["require", "exports"], function (require, exports) { for (var i = 0; i < 14; i++) { bytes.push(fb.readByte()); } - var expected = [0xEF]; + var expected = [ + 0xEF + ]; return TestRunner.arrayCompare(bytes, expected); })); return testRunner; diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.js b/tests/baselines/reference/duplicateObjectLiteralProperty.js index 9c629b211cf..5bbeb433a0c 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.js +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.js @@ -30,7 +30,12 @@ var x = { } }; var y = { - get a() { return 0; }, - set a(v) { }, - get a() { return 0; } + get a() { + return 0; + }, + set a(v) { + }, + get a() { + return 0; + } }; diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js index 5f55a8b1d22..ceaeac0d025 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js @@ -10,4 +10,6 @@ var r5 = a.reduce((x, y) => x + y); //// [duplicateOverloadInTypeAugmentation1.js] var a; -var r5 = a.reduce(function (x, y) { return x + y; }); +var r5 = a.reduce(function (x, y) { + return x + y; +}); diff --git a/tests/baselines/reference/duplicatePropertyNames.js b/tests/baselines/reference/duplicatePropertyNames.js index c3cde82e2cc..c5da2a1f39f 100644 --- a/tests/baselines/reference/duplicatePropertyNames.js +++ b/tests/baselines/reference/duplicatePropertyNames.js @@ -52,17 +52,23 @@ var b = { // duplicate property names are an error in all types var C = (function () { function C() { - this.baz = function () { }; - this.baz = function () { }; + this.baz = function () { + }; + this.baz = function () { + }; } - C.prototype.bar = function (x) { }; - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; + C.prototype.bar = function (x) { + }; return C; })(); var a; var b = { foo: '', foo: '', - bar: function () { }, - bar: function () { } + bar: function () { + }, + bar: function () { + } }; diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index 89b5a210ec4..e34ed7c8d02 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -93,7 +93,8 @@ define(["require", "exports"], function (require, exports) { (function (F) { var t; })(F || (F = {})); - function F() { } + function F() { + } M.F = F; // Only one error for duplicate identifier (don't consider visibility) })(M || (M = {})); var M; diff --git a/tests/baselines/reference/duplicateTypeParameters1.js b/tests/baselines/reference/duplicateTypeParameters1.js index 990048a25d7..167688719ab 100644 --- a/tests/baselines/reference/duplicateTypeParameters1.js +++ b/tests/baselines/reference/duplicateTypeParameters1.js @@ -3,4 +3,5 @@ function A() { } //// [duplicateTypeParameters1.js] -function A() { } +function A() { +} diff --git a/tests/baselines/reference/duplicateTypeParameters2.js b/tests/baselines/reference/duplicateTypeParameters2.js index 65dce28ad3f..c89f0d15fe3 100644 --- a/tests/baselines/reference/duplicateTypeParameters2.js +++ b/tests/baselines/reference/duplicateTypeParameters2.js @@ -8,12 +8,14 @@ interface I {} var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); diff --git a/tests/baselines/reference/elaboratedErrors.js b/tests/baselines/reference/elaboratedErrors.js index ae5877b2dd6..c245c1a8562 100644 --- a/tests/baselines/reference/elaboratedErrors.js +++ b/tests/baselines/reference/elaboratedErrors.js @@ -27,7 +27,8 @@ y = x; //// [elaboratedErrors.js] -function fn(s) { } +function fn(s) { +} // This should issue a large error, not a small one var WorkerFS = (function () { function WorkerFS() { diff --git a/tests/baselines/reference/emitArrowFunction.js b/tests/baselines/reference/emitArrowFunction.js index 7e2617045a8..074febfa096 100644 --- a/tests/baselines/reference/emitArrowFunction.js +++ b/tests/baselines/reference/emitArrowFunction.js @@ -8,8 +8,10 @@ foo(() => true); foo(() => { return false; }); //// [emitArrowFunction.js] -var f1 = function () { }; -var f2 = function (x, y) { }; +var f1 = function () { +}; +var f2 = function (x, y) { +}; var f3 = function (x, y) { var rest = []; for (var _i = 2; _i < arguments.length; _i++) { @@ -19,6 +21,11 @@ var f3 = function (x, y) { var f4 = function (x, y, z) { if (z === void 0) { z = 10; } }; -function foo(func) { } -foo(function () { return true; }); -foo(function () { return false; }); +function foo(func) { +} +foo(function () { + return true; +}); +foo(function () { + return false; +}); diff --git a/tests/baselines/reference/emitArrowFunctionAsIs.js b/tests/baselines/reference/emitArrowFunctionAsIs.js index c6586ee95a1..11df7903ad8 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionAsIs.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIs.js] -var arrow1 = function (a) { }; -var arrow2 = function (a) { }; -var arrow3 = function (a, b) { }; +var arrow1 = function (a) { +}; +var arrow2 = function (a) { +}; +var arrow3 = function (a, b) { +}; diff --git a/tests/baselines/reference/emitArrowFunctionAsIsES6.js b/tests/baselines/reference/emitArrowFunctionAsIsES6.js index 9876abdafcd..9941434ae10 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionAsIsES6.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIsES6.js] -var arrow1 = a => { }; -var arrow2 = (a) => { }; -var arrow3 = (a, b) => { }; +var arrow1 = a => { +}; +var arrow2 = (a) => { +}; +var arrow3 = (a, b) => { +}; diff --git a/tests/baselines/reference/emitArrowFunctionES6.js b/tests/baselines/reference/emitArrowFunctionES6.js index 603b2737fc5..6409fc9464c 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.js +++ b/tests/baselines/reference/emitArrowFunctionES6.js @@ -9,10 +9,17 @@ foo(() => { return false; }); //// [emitArrowFunctionES6.js] -var f1 = () => { }; -var f2 = (x, y) => { }; -var f3 = (x, y, ...rest) => { }; -var f4 = (x, y, z = 10) => { }; -function foo(func) { } +var f1 = () => { +}; +var f2 = (x, y) => { +}; +var f3 = (x, y, ...rest) => { +}; +var f4 = (x, y, z = 10) => { +}; +function foo(func) { +} foo(() => true); -foo(() => { return false; }); +foo(() => { + return false; +}); diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturing.js b/tests/baselines/reference/emitArrowFunctionThisCapturing.js index ac4326ea508..25d9f7f100b 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturing.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturing.js @@ -22,7 +22,8 @@ var f1 = function () { var f2 = function (x) { _this.name = x; }; -function foo(func) { } +function foo(func) { +} foo(function () { _this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js index 2a82ef9c800..bf235bc0eef 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js @@ -21,7 +21,8 @@ var f1 = () => { var f2 = (x) => { this.name = x; }; -function foo(func) { } +function foo(func) { +} foo(() => { this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js index 589449fad62..00a4c7aa051 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js @@ -45,7 +45,8 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { } +function foo(inputFunc) { +} foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js index 2f84d0843de..0deacd409df 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js @@ -45,7 +45,8 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { } +function foo(inputFunc) { +} foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionsAsIs.js b/tests/baselines/reference/emitArrowFunctionsAsIs.js index cf773efb8b7..ee8347dda3e 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIs.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIs.js] -var arrow1 = function (a) { }; -var arrow2 = function (a) { }; -var arrow3 = function (a, b) { }; +var arrow1 = function (a) { +}; +var arrow2 = function (a) { +}; +var arrow3 = function (a, b) { +}; diff --git a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js index 32323a6597b..021e048ed88 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIsES6.js] -var arrow1 = a => { }; -var arrow2 = (a) => { }; -var arrow3 = (a, b) => { }; +var arrow1 = a => { +}; +var arrow2 = (a) => { +}; +var arrow3 = (a, b) => { +}; diff --git a/tests/baselines/reference/emitClassDeclarationOverloadInES6.js b/tests/baselines/reference/emitClassDeclarationOverloadInES6.js new file mode 100644 index 00000000000..4cf96778f3f --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationOverloadInES6.js @@ -0,0 +1,21 @@ +//// [emitClassDeclarationOverloadInES6.ts] +class C { + constructor(y: any) + constructor(x: number) { + } +} + +class D { + constructor(y: any) + constructor(x: number, z="hello") {} +} + +//// [emitClassDeclarationOverloadInES6.js] +class C { + constructor(x) { + } +} +class D { + constructor(x, z = "hello") { + } +} diff --git a/tests/baselines/reference/emitClassDeclarationOverloadInES6.types b/tests/baselines/reference/emitClassDeclarationOverloadInES6.types new file mode 100644 index 00000000000..850a5aa5456 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationOverloadInES6.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts === +class C { +>C : C + + constructor(y: any) +>y : any + + constructor(x: number) { +>x : number + } +} + +class D { +>D : D + + constructor(y: any) +>y : any + + constructor(x: number, z="hello") {} +>x : number +>z : string +} diff --git a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js new file mode 100644 index 00000000000..8c115b17e9c --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js @@ -0,0 +1,42 @@ +//// [emitClassDeclarationWithConstructorInES6.ts] +class A { + y: number; + constructor(x: number) { + } + foo(a: any); + foo() { } +} + +class B { + y: number; + x: string = "hello"; + _bar: string; + + constructor(x: number, z = "hello", ...args) { + this.y = 10; + } + baz(...args): string; + baz(z: string, v: number): string { + return this._bar; + } +} + + + + +//// [emitClassDeclarationWithConstructorInES6.js] +class A { + constructor(x) { + } + foo() { + } +} +class B { + constructor(x, z = "hello", ...args) { + this.x = "hello"; + this.y = 10; + } + baz(z, v) { + return this._bar; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types new file mode 100644 index 00000000000..10244bf6170 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types @@ -0,0 +1,59 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts === +class A { +>A : A + + y: number; +>y : number + + constructor(x: number) { +>x : number + } + foo(a: any); +>foo : (a: any) => any +>a : any + + foo() { } +>foo : (a: any) => any +} + +class B { +>B : B + + y: number; +>y : number + + x: string = "hello"; +>x : string + + _bar: string; +>_bar : string + + constructor(x: number, z = "hello", ...args) { +>x : number +>z : string +>args : any[] + + this.y = 10; +>this.y = 10 : number +>this.y : number +>this : B +>y : number + } + baz(...args): string; +>baz : (...args: any[]) => string +>args : any[] + + baz(z: string, v: number): string { +>baz : (...args: any[]) => string +>z : string +>v : number + + return this._bar; +>this._bar : string +>this : B +>_bar : string + } +} + + + diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.js b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.js new file mode 100644 index 00000000000..cd217af6a81 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.js @@ -0,0 +1,24 @@ +//// [emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts] +class B { + constructor(a: T) { } +} +class C extends B { } +class D extends B { + constructor(a: any) + constructor(b: number) { + super(b); + } +} + +//// [emitClassDeclarationWithExtensionAndTypeArgumentInES6.js] +class B { + constructor(a) { + } +} +class C extends B { +} +class D extends B { + constructor(b) { + super(b); + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.types b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.types new file mode 100644 index 00000000000..0f546fa7b86 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionAndTypeArgumentInES6.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts === +class B { +>B : B +>T : T + + constructor(a: T) { } +>a : T +>T : T +} +class C extends B { } +>C : C +>B : B + +class D extends B { +>D : D +>B : B + + constructor(a: any) +>a : any + + constructor(b: number) { +>b : number + + super(b); +>super(b) : void +>super : typeof B +>b : number + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.js b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.js new file mode 100644 index 00000000000..5c64aebd16a --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.js @@ -0,0 +1,48 @@ +//// [emitClassDeclarationWithExtensionInES6.ts] +class B { + baz(a: string, y = 10) { } +} +class C extends B { + foo() { } + baz(a: string, y:number) { + super.baz(a, y); + } +} +class D extends C { + constructor() { + super(); + } + + foo() { + super.foo(); + } + + baz() { + super.baz("hello", 10); + } +} + + +//// [emitClassDeclarationWithExtensionInES6.js] +class B { + baz(a, y = 10) { + } +} +class C extends B { + foo() { + } + baz(a, y) { + super.baz(a, y); + } +} +class D extends C { + constructor() { + super(); + } + foo() { + super.foo(); + } + baz() { + super.baz("hello", 10); + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types new file mode 100644 index 00000000000..a1549be5df4 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithExtensionInES6.types @@ -0,0 +1,61 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionInES6.ts === +class B { +>B : B + + baz(a: string, y = 10) { } +>baz : (a: string, y?: number) => void +>a : string +>y : number +} +class C extends B { +>C : C +>B : B + + foo() { } +>foo : () => void + + baz(a: string, y:number) { +>baz : (a: string, y: number) => void +>a : string +>y : number + + super.baz(a, y); +>super.baz(a, y) : void +>super.baz : (a: string, y?: number) => void +>super : B +>baz : (a: string, y?: number) => void +>a : string +>y : number + } +} +class D extends C { +>D : D +>C : C + + constructor() { + super(); +>super() : void +>super : typeof C + } + + foo() { +>foo : () => void + + super.foo(); +>super.foo() : void +>super.foo : () => void +>super : C +>foo : () => void + } + + baz() { +>baz : () => void + + super.baz("hello", 10); +>super.baz("hello", 10) : void +>super.baz : (a: string, y: number) => void +>super : C +>baz : (a: string, y: number) => void + } +} + diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js new file mode 100644 index 00000000000..68ccd1568ed --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.js @@ -0,0 +1,57 @@ +//// [emitClassDeclarationWithGetterSetterInES6.ts] +class C { + _name: string; + get name(): string { + return this._name; + } + static get name2(): string { + return "BYE"; + } + static get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + + set ["computedname"](x: any) { + } + set ["computedname"](y: string) { + } + + set foo(a: string) { } + static set bar(b: number) { } + static set ["computedname"](b: string) { } +} + +//// [emitClassDeclarationWithGetterSetterInES6.js] +class C { + get name() { + return this._name; + } + static get name2() { + return "BYE"; + } + static get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + set ["computedname"](x) { + } + set ["computedname"](y) { + } + set foo(a) { + } + static set bar(b) { + } + static set ["computedname"](b) { + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types new file mode 100644 index 00000000000..83d4fcd0d80 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithGetterSetterInES6.types @@ -0,0 +1,48 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts === +class C { +>C : C + + _name: string; +>_name : string + + get name(): string { +>name : string + + return this._name; +>this._name : string +>this : C +>_name : string + } + static get name2(): string { +>name2 : string + + return "BYE"; + } + static get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + get ["computedname"]() { + return ""; + } + + set ["computedname"](x: any) { +>x : any + } + set ["computedname"](y: string) { +>y : string + } + + set foo(a: string) { } +>foo : string +>a : string + + static set bar(b: number) { } +>bar : number +>b : number + + static set ["computedname"](b: string) { } +>b : string +} diff --git a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js new file mode 100644 index 00000000000..d82750f276f --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js @@ -0,0 +1,37 @@ +//// [emitClassDeclarationWithLiteralPropertyNameInES6.ts] +class B { + "hello" = 10; + 0b110 = "world"; + 0o23534 = "WORLD"; + 20 = "twenty"; + "foo"() { } + 0b1110() {} + 11() { } + interface() { } + static "hi" = 10000; + static 22 = "twenty-two"; + static 0b101 = "binary"; + static 0o3235 = "octal"; +} + +//// [emitClassDeclarationWithLiteralPropertyNameInES6.js] +class B { + constructor() { + this["hello"] = 10; + this[0b110] = "world"; + this[0o23534] = "WORLD"; + this[20] = "twenty"; + } + "foo"() { + } + 0b1110() { + } + 11() { + } + interface() { + } +} +B["hi"] = 10000; +B[22] = "twenty-two"; +B[0b101] = "binary"; +B[0o3235] = "octal"; diff --git a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types new file mode 100644 index 00000000000..65ba8f7d2b9 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.types @@ -0,0 +1,19 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithLiteralPropertyNameInES6.ts === +class B { +>B : B + + "hello" = 10; + 0b110 = "world"; + 0o23534 = "WORLD"; + 20 = "twenty"; + "foo"() { } + 0b1110() {} + 11() { } + interface() { } +>interface : () => void + + static "hi" = 10000; + static 22 = "twenty-two"; + static 0b101 = "binary"; + static 0o3235 = "octal"; +} diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js new file mode 100644 index 00000000000..20f58b4274e --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.js @@ -0,0 +1,58 @@ +//// [emitClassDeclarationWithMethodInES6.ts] +class D { + _bar: string; + foo() { } + ["computedName"]() { } + ["computedName"](a: string) { } + ["computedName"](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 staticMethod() { + var x = 1 + 2; + return x + } + static foo(a: string) { } + static bar(a: string): number { return 1; } +} + +//// [emitClassDeclarationWithMethodInES6.js] +class D { + foo() { + } + ["computedName"]() { + } + ["computedName"](a) { + } + ["computedName"](a) { + return 1; + } + bar() { + return this._bar; + } + baz(a, x) { + return "HELLO"; + } + static ["computedname"]() { + } + static ["computedname"](a) { + } + static ["computedname"](a) { + return true; + } + static staticMethod() { + var x = 1 + 2; + return x; + } + static foo(a) { + } + static bar(a) { + return 1; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types new file mode 100644 index 00000000000..f26a9f87e6d --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithMethodInES6.types @@ -0,0 +1,57 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts === +class D { +>D : D + + _bar: string; +>_bar : string + + foo() { } +>foo : () => void + + ["computedName"]() { } + ["computedName"](a: string) { } +>a : string + + ["computedName"](a: string): number { return 1; } +>a : string + + bar(): string { +>bar : () => string + + return this._bar; +>this._bar : string +>this : D +>_bar : string + } + baz(a: any, x: string): string { +>baz : (a: any, x: string) => string +>a : any +>x : string + + return "HELLO"; + } + static ["computedname"]() { } + static ["computedname"](a: string) { } +>a : string + + static ["computedname"](a: string): boolean { return true; } +>a : string + + static staticMethod() { +>staticMethod : () => number + + var x = 1 + 2; +>x : number +>1 + 2 : number + + return x +>x : number + } + static foo(a: string) { } +>foo : (a: string) => void +>a : string + + static bar(a: string): number { return 1; } +>bar : (a: string) => number +>a : string +} diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.js b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.js new file mode 100644 index 00000000000..03fb45b806e --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.js @@ -0,0 +1,51 @@ +//// [emitClassDeclarationWithPropertyAssignmentInES6.ts] +class C { + x: string = "Hello world"; +} + +class D { + x: string = "Hello world"; + y: number; + constructor() { + this.y = 10; + } +} + +class E extends D{ + z: boolean = true; +} + +class F extends D{ + z: boolean = true; + j: string; + constructor() { + super(); + this.j = "HI"; + } +} + +//// [emitClassDeclarationWithPropertyAssignmentInES6.js] +class C { + constructor() { + this.x = "Hello world"; + } +} +class D { + constructor() { + this.x = "Hello world"; + this.y = 10; + } +} +class E extends D { + constructor(...args) { + super(...args); + this.z = true; + } +} +class F extends D { + constructor() { + super(); + this.z = true; + this.j = "HI"; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types new file mode 100644 index 00000000000..5e7ebbc167c --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithPropertyAssignmentInES6.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts === +class C { +>C : C + + x: string = "Hello world"; +>x : string +} + +class D { +>D : D + + x: string = "Hello world"; +>x : string + + y: number; +>y : number + + constructor() { + this.y = 10; +>this.y = 10 : number +>this.y : number +>this : D +>y : number + } +} + +class E extends D{ +>E : E +>D : D + + z: boolean = true; +>z : boolean +} + +class F extends D{ +>F : F +>D : D + + z: boolean = true; +>z : boolean + + j: string; +>j : string + + constructor() { + super(); +>super() : void +>super : typeof D + + this.j = "HI"; +>this.j = "HI" : string +>this.j : string +>this : F +>j : string + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js new file mode 100644 index 00000000000..8e0bf3de06b --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js @@ -0,0 +1,21 @@ +//// [emitClassDeclarationWithStaticPropertyAssignmentInES6.ts] +class C { + static z: string = "Foo"; +} + +class D { + x = 20000; + static b = true; +} + + +//// [emitClassDeclarationWithStaticPropertyAssignmentInES6.js] +class C { +} +C.z = "Foo"; +class D { + constructor() { + this.x = 20000; + } +} +D.b = true; diff --git a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types new file mode 100644 index 00000000000..6003b85b590 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.types @@ -0,0 +1,18 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithStaticPropertyAssignmentInES6.ts === +class C { +>C : C + + static z: string = "Foo"; +>z : string +} + +class D { +>D : D + + x = 20000; +>x : number + + static b = true; +>b : boolean +} + diff --git a/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.js b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.js new file mode 100644 index 00000000000..14f74682c00 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.js @@ -0,0 +1,38 @@ +//// [emitClassDeclarationWithThisKeywordInES6.ts] +class B { + x = 10; + constructor() { + this.x = 10; + } + static log(a: number) { } + foo() { + B.log(this.x); + } + + get X() { + return this.x; + } + + set bX(y: number) { + this.x = y; + } +} + +//// [emitClassDeclarationWithThisKeywordInES6.js] +class B { + constructor() { + this.x = 10; + this.x = 10; + } + static log(a) { + } + foo() { + B.log(this.x); + } + get X() { + return this.x; + } + set bX(y) { + this.x = y; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types new file mode 100644 index 00000000000..bb0f7e99939 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithThisKeywordInES6.types @@ -0,0 +1,52 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithThisKeywordInES6.ts === +class B { +>B : B + + x = 10; +>x : number + + constructor() { + this.x = 10; +>this.x = 10 : number +>this.x : number +>this : B +>x : number + } + static log(a: number) { } +>log : (a: number) => void +>a : number + + foo() { +>foo : () => void + + B.log(this.x); +>B.log(this.x) : void +>B.log : (a: number) => void +>B : typeof B +>log : (a: number) => void +>this.x : number +>this : B +>x : number + } + + get X() { +>X : number + + return this.x; +>this.x : number +>this : B +>x : number + } + + set bX(y: number) { +>bX : number +>y : number + + this.x = y; +>this.x = y : number +>this.x : number +>this : B +>x : number +>y : number + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js new file mode 100644 index 00000000000..8dc5b6cddaa --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js @@ -0,0 +1,39 @@ +//// [emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts] +class B { + x: T; + B: T; + + constructor(a: any) + constructor(a: any,b: T) + constructor(a: T) { this.B = a;} + + foo(a: T) + foo(a: any) + foo(b: string) + foo(): T { + return this.x; + } + + get BB(): T { + return this.B; + } + set BBWith(c: T) { + this.B = c; + } +} + +//// [emitClassDeclarationWithTypeArgumentAndOverloadInES6.js] +class B { + constructor(a) { + this.B = a; + } + foo() { + return this.x; + } + get BB() { + return this.B; + } + set BBWith(c) { + this.B = c; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types new file mode 100644 index 00000000000..ba515168a5d --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.types @@ -0,0 +1,75 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts === +class B { +>B : B +>T : T + + x: T; +>x : T +>T : T + + B: T; +>B : T +>T : T + + constructor(a: any) +>a : any + + constructor(a: any,b: T) +>a : any +>b : T +>T : T + + constructor(a: T) { this.B = a;} +>a : T +>T : T +>this.B = a : T +>this.B : T +>this : B +>B : T +>a : T + + foo(a: T) +>foo : { (a: T): any; (a: any): any; (b: string): any; } +>a : T +>T : T + + foo(a: any) +>foo : { (a: T): any; (a: any): any; (b: string): any; } +>a : any + + foo(b: string) +>foo : { (a: T): any; (a: any): any; (b: string): any; } +>b : string + + foo(): T { +>foo : { (a: T): any; (a: any): any; (b: string): any; } +>T : T + + return this.x; +>this.x : T +>this : B +>x : T + } + + get BB(): T { +>BB : T +>T : T + + return this.B; +>this.B : T +>this : B +>B : T + } + set BBWith(c: T) { +>BBWith : T +>c : T +>T : T + + this.B = c; +>this.B = c : T +>this.B : T +>this : B +>B : T +>c : T + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.js b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.js new file mode 100644 index 00000000000..4e2872b4f06 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.js @@ -0,0 +1,31 @@ +//// [emitClassDeclarationWithTypeArgumentInES6.ts] +class B { + x: T; + B: T; + constructor(a: T) { this.B = a;} + foo(): T { + return this.x; + } + get BB(): T { + return this.B; + } + set BBWith(c: T) { + this.B = c; + } +} + +//// [emitClassDeclarationWithTypeArgumentInES6.js] +class B { + constructor(a) { + this.B = a; + } + foo() { + return this.x; + } + get BB() { + return this.B; + } + set BBWith(c) { + this.B = c; + } +} diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types new file mode 100644 index 00000000000..8081d044e35 --- /dev/null +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentInES6.types @@ -0,0 +1,53 @@ +=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentInES6.ts === +class B { +>B : B +>T : T + + x: T; +>x : T +>T : T + + B: T; +>B : T +>T : T + + constructor(a: T) { this.B = a;} +>a : T +>T : T +>this.B = a : T +>this.B : T +>this : B +>B : T +>a : T + + foo(): T { +>foo : () => T +>T : T + + return this.x; +>this.x : T +>this : B +>x : T + } + get BB(): T { +>BB : T +>T : T + + return this.B; +>this.B : T +>this : B +>B : T + } + set BBWith(c: T) { +>BBWith : T +>c : T +>T : T + + this.B = c; +>this.B = c : T +>this.B : T +>this : B +>B : T +>c : T + } +} diff --git a/tests/baselines/reference/emitDefaultParametersFunctionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionES6.js index 0d1c9460fed..f4084a16f6f 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionES6.js @@ -5,7 +5,11 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunctionES6.js] -function foo(x, y = 10) { } -function baz(x, y = 5, ...rest) { } -function bar(y = 10) { } -function bar1(y = 10, ...rest) { } +function foo(x, y = 10) { +} +function baz(x, y = 5, ...rest) { +} +function bar(y = 10) { +} +function bar1(y = 10, ...rest) { +} diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js index f72c245b175..5a49a200c6b 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js @@ -9,10 +9,17 @@ var y = (function (num = 10, boo = false, ...rest) { })() var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpressionES6.js] -var lambda1 = (y = "hello") => { }; -var lambda2 = (x, y = "hello") => { }; -var lambda3 = (x, y = "hello", ...rest) => { }; -var lambda4 = (y = "hello", ...rest) => { }; -var x = function (str = "hello", ...rest) { }; -var y = (function (num = 10, boo = false, ...rest) { })(); -var z = (function (num, boo = false, ...rest) { })(10); +var lambda1 = (y = "hello") => { +}; +var lambda2 = (x, y = "hello") => { +}; +var lambda3 = (x, y = "hello", ...rest) => { +}; +var lambda4 = (y = "hello", ...rest) => { +}; +var x = function (str = "hello", ...rest) { +}; +var y = (function (num = 10, boo = false, ...rest) { +})(); +var z = (function (num, boo = false, ...rest) { +})(10); diff --git a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js index 4a85f4a34b0..fce694a453a 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js @@ -8,8 +8,12 @@ var obj2 = { //// [emitDefaultParametersFunctionPropertyES6.js] var obj2 = { - func1(y = 10, ...rest) { }, - func2(x = "hello") { }, - func3(x, z, y = "hello") { }, - func4(x, z, y = "hello", ...rest) { }, + func1(y = 10, ...rest) { + }, + func2(x = "hello") { + }, + func3(x, z, y = "hello") { + }, + func4(x, z, y = "hello", ...rest) { + }, }; diff --git a/tests/baselines/reference/emitDefaultParametersMethodES6.js b/tests/baselines/reference/emitDefaultParametersMethodES6.js index 8489b5708f1..3981ddcba3c 100644 --- a/tests/baselines/reference/emitDefaultParametersMethodES6.js +++ b/tests/baselines/reference/emitDefaultParametersMethodES6.js @@ -17,22 +17,23 @@ class E { } //// [emitDefaultParametersMethodES6.js] -var C = (function () { - function C(t, z, x, y = "hello") { +class C { + constructor(t, z, x, y = "hello") { } - C.prototype.foo = function (x, t = false) { }; - C.prototype.foo1 = function (x, t = false, ...rest) { }; - C.prototype.bar = function (t = false) { }; - C.prototype.boo = function (t = false, ...rest) { }; - return C; -})(); -var D = (function () { - function D(y = "hello") { + foo(x, t = false) { } - return D; -})(); -var E = (function () { - function E(y = "hello", ...rest) { + foo1(x, t = false, ...rest) { } - return E; -})(); + bar(t = false) { + } + boo(t = false, ...rest) { + } +} +class D { + constructor(y = "hello") { + } +} +class E { + constructor(y = "hello", ...rest) { + } +} diff --git a/tests/baselines/reference/emitRestParametersFunctionES6.js b/tests/baselines/reference/emitRestParametersFunctionES6.js index a07b3a13174..242c40f252d 100644 --- a/tests/baselines/reference/emitRestParametersFunctionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionES6.js @@ -3,5 +3,7 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunctionES6.js] -function bar(...rest) { } -function foo(x, y, ...rest) { } +function bar(...rest) { +} +function foo(x, y, ...rest) { +} diff --git a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js index aa52a29b138..c7851db5e78 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js @@ -5,7 +5,11 @@ var funcExp2 = function (...rest) { } var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpressionES6.js] -var funcExp = (...rest) => { }; -var funcExp1 = (X, ...rest) => { }; -var funcExp2 = function (...rest) { }; -var funcExp3 = (function (...rest) { })(); +var funcExp = (...rest) => { +}; +var funcExp1 = (X, ...rest) => { +}; +var funcExp2 = function (...rest) { +}; +var funcExp3 = (function (...rest) { +})(); diff --git a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js index 122a1f6ed52..87aa489ecf3 100644 --- a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js @@ -10,5 +10,6 @@ var obj2 = { //// [emitRestParametersFunctionPropertyES6.js] var obj; var obj2 = { - func(...rest) { } + func(...rest) { + } }; diff --git a/tests/baselines/reference/emitRestParametersMethodES6.js b/tests/baselines/reference/emitRestParametersMethodES6.js index ff8e040be9c..fba6ed01e67 100644 --- a/tests/baselines/reference/emitRestParametersMethodES6.js +++ b/tests/baselines/reference/emitRestParametersMethodES6.js @@ -15,17 +15,19 @@ class D { //// [emitRestParametersMethodES6.js] -var C = (function () { - function C(name, ...rest) { +class C { + constructor(name, ...rest) { } - C.prototype.bar = function (...rest) { }; - C.prototype.foo = function (x, ...rest) { }; - return C; -})(); -var D = (function () { - function D(...rest) { + bar(...rest) { } - D.prototype.bar = function (...rest) { }; - D.prototype.foo = function (x, ...rest) { }; - return D; -})(); + foo(x, ...rest) { + } +} +class D { + constructor(...rest) { + } + bar(...rest) { + } + foo(x, ...rest) { + } +} diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 383da7d419f..de47b0b95af 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -49,20 +49,20 @@ var RegisteredUser = (function (_super) { RegisteredUser.prototype.f = function () { (function () { function inner() { - super.sayHello.call(this); + _super.sayHello.call(this); } }); }; RegisteredUser.prototype.g = function () { function inner() { (function () { - super.sayHello.call(this); + _super.sayHello.call(this); }); } }; RegisteredUser.prototype.h = function () { function inner() { - super.sayHello.call(this); + _super.sayHello.call(this); } }; return RegisteredUser; diff --git a/tests/baselines/reference/emptyExpr.js b/tests/baselines/reference/emptyExpr.js index de3bddeba1e..4bda58e3244 100644 --- a/tests/baselines/reference/emptyExpr.js +++ b/tests/baselines/reference/emptyExpr.js @@ -2,4 +2,6 @@ [{},] //// [emptyExpr.js] -[{},]; +[ + {}, +]; diff --git a/tests/baselines/reference/emptyTypeArgumentList.js b/tests/baselines/reference/emptyTypeArgumentList.js index 30093113be4..91fce396289 100644 --- a/tests/baselines/reference/emptyTypeArgumentList.js +++ b/tests/baselines/reference/emptyTypeArgumentList.js @@ -3,5 +3,6 @@ function foo() { } foo<>(); //// [emptyTypeArgumentList.js] -function foo() { } +function foo() { +} foo(); diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.js b/tests/baselines/reference/enumAssignabilityInInheritance.js index 01439854259..065c561d9eb 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.js +++ b/tests/baselines/reference/enumAssignabilityInInheritance.js @@ -144,7 +144,8 @@ var E2; E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); var r4 = foo13(E.A); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/enumBasics.js b/tests/baselines/reference/enumBasics.js index 25aec5a72d8..f6548f99b95 100644 --- a/tests/baselines/reference/enumBasics.js +++ b/tests/baselines/reference/enumBasics.js @@ -150,9 +150,21 @@ var E9; // (refer to .js to validate) // Enum constant members are propagated var doNotPropagate = [ - E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z + E8.B, + E7.A, + E4.Z, + E3.X, + E3.Y, + E3.Z ]; // Enum computed members are not propagated var doPropagate = [ - E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C + E9.A, + E9.B, + E6.B, + E6.C, + E6.A, + E5.A, + E5.B, + E5.C ]; diff --git a/tests/baselines/reference/enumIndexer.js b/tests/baselines/reference/enumIndexer.js index 561461229c7..9862d787d23 100644 --- a/tests/baselines/reference/enumIndexer.js +++ b/tests/baselines/reference/enumIndexer.js @@ -13,6 +13,15 @@ var MyEnumType; MyEnumType[MyEnumType["foo"] = 0] = "foo"; MyEnumType[MyEnumType["bar"] = 1] = "bar"; })(MyEnumType || (MyEnumType = {})); -var _arr = [{ key: 'foo' }, { key: 'bar' }]; +var _arr = [ + { + key: 'foo' + }, + { + key: 'bar' + } +]; var enumValue = MyEnumType.foo; -var x = _arr.map(function (o) { return MyEnumType[o.key] === enumValue; }); // these are not same type +var x = _arr.map(function (o) { + return MyEnumType[o.key] === enumValue; +}); // these are not same type diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js index d932985ad7d..f9ac7661e3d 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js @@ -150,7 +150,8 @@ var E2; (function (E2) { E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/enumMerging.js b/tests/baselines/reference/enumMerging.js index 5dc5a475b40..d8d9373d3ff 100644 --- a/tests/baselines/reference/enumMerging.js +++ b/tests/baselines/reference/enumMerging.js @@ -95,7 +95,14 @@ var M1; EConst1[EConst1["F"] = 8] = "F"; })(M1.EConst1 || (M1.EConst1 = {})); var EConst1 = M1.EConst1; - var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; + var x = [ + EConst1.A, + EConst1.B, + EConst1.C, + EConst1.D, + EConst1.E, + EConst1.F + ]; })(M1 || (M1 = {})); // Enum with only computed members across 2 declarations with the same root module var M2; @@ -112,7 +119,14 @@ var M2; EComp2[EComp2["F"] = 'foo'.length] = "F"; })(M2.EComp2 || (M2.EComp2 = {})); var EComp2 = M2.EComp2; - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; + var x = [ + EComp2.A, + EComp2.B, + EComp2.C, + EComp2.D, + EComp2.E, + EComp2.F + ]; })(M2 || (M2 = {})); // Enum with initializer in only one of two declarations with constant members with the same root module var M3; diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js index 9e0c26b6be7..2a49ccd2b67 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js @@ -4,5 +4,7 @@ var n2: () => boolean = function ():boolean { }; // expect an error here //// [errorOnContextuallyTypedReturnType.js] -var n1 = function () { }; // expect an error here -var n2 = function () { }; // expect an error here +var n1 = function () { +}; // expect an error here +var n2 = function () { +}; // expect an error here diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 79ba631afed..4ddcca530f1 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -140,27 +140,27 @@ var __extends = this.__extends || function (d, b) { //super property access in instance member accessor(get and set) of class with no base type var NoBase = (function () { function NoBase() { - this.m = super.prototype; - this.n = super.hasOwnProperty.call(this, ''); - var a = super.prototype; - var b = super.hasOwnProperty.call(this, ''); + this.m = _super.prototype; + this.n = _super.hasOwnProperty.call(this, ''); + var a = _super.prototype; + var b = _super.hasOwnProperty.call(this, ''); } NoBase.prototype.fn = function () { - var a = super.prototype; - var b = super.hasOwnProperty.call(this, ''); + var a = _super.prototype; + var b = _super.hasOwnProperty.call(this, ''); }; //super static property access in static member function of class with no base type //super static property access in static member accessor(get and set) of class with no base type NoBase.static1 = function () { - super.hasOwnProperty.call(this, ''); + _super.hasOwnProperty.call(this, ''); }; Object.defineProperty(NoBase, "static2", { get: function () { - super.hasOwnProperty.call(this, ''); + _super.hasOwnProperty.call(this, ''); return ''; }, set: function (n) { - super.hasOwnProperty.call(this, ''); + _super.hasOwnProperty.call(this, ''); }, enumerable: true, configurable: true @@ -172,10 +172,14 @@ var SomeBase = (function () { this.privateMember = 0; this.publicMember = 0; } - SomeBase.prototype.privateFunc = function () { }; - SomeBase.prototype.publicFunc = function () { }; - SomeBase.privateStaticFunc = function () { }; - SomeBase.publicStaticFunc = function () { }; + SomeBase.prototype.privateFunc = function () { + }; + SomeBase.prototype.publicFunc = function () { + }; + SomeBase.privateStaticFunc = function () { + }; + SomeBase.publicStaticFunc = function () { + }; SomeBase.privateStaticMember = 0; SomeBase.publicStaticMember = 0; return SomeBase; @@ -206,10 +210,12 @@ var SomeDerived1 = (function (_super) { }); SomeDerived1.prototype.fn2 = function () { function inner() { - super.publicFunc.call(this); + _super.publicFunc.call(this); } var x = { - test: function () { return super.publicFunc.call(this); } + test: function () { + return _super.publicFunc.call(this); + } }; }; return SomeDerived1; @@ -271,4 +277,7 @@ var SomeDerived3 = (function (_super) { return SomeDerived3; })(SomeBase); // In object literal -var obj = { n: super.wat, p: super.foo.call(this) }; +var obj = { + n: _super.wat, + p: _super.foo.call(this) +}; diff --git a/tests/baselines/reference/errorSupression1.js b/tests/baselines/reference/errorSupression1.js index 53e40e585f0..059530be452 100644 --- a/tests/baselines/reference/errorSupression1.js +++ b/tests/baselines/reference/errorSupression1.js @@ -12,7 +12,9 @@ baz.concat("y"); var Foo = (function () { function Foo() { } - Foo.bar = function () { return "x"; }; + Foo.bar = function () { + return "x"; + }; return Foo; })(); var baz = Foo.b; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 03bf31a6a6b..6a9f62c5e49 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -88,7 +88,8 @@ var Foo = (function () { var testClass1 = (function () { function testClass1() { } - testClass1.prototype.method = function () { }; + testClass1.prototype.method = function () { + }; return testClass1; })(); var tc1 = new testClass1(); @@ -104,10 +105,15 @@ var tc2 = new testClass2(); // error: could not find symbol V var testClass3 = (function () { function testClass3() { } - testClass3.prototype.testMethod1 = function () { return null; }; // error: could not find symbol V - testClass3.testMethod2 = function () { return null; }; // error: could not find symbol V + testClass3.prototype.testMethod1 = function () { + return null; + }; // error: could not find symbol V + testClass3.testMethod2 = function () { + return null; + }; // error: could not find symbol V Object.defineProperty(testClass3.prototype, "a", { - set: function (value) { } // error: could not find symbol V + set: function (value) { + } // error: could not find symbol V , enumerable: true, configurable: true @@ -115,9 +121,12 @@ var testClass3 = (function () { return testClass3; })(); // in function return type annotation -function testFunction1() { return null; } // error: could not find symbol V +function testFunction1() { + return null; +} // error: could not find symbol V // in paramter types -function testFunction2(p) { } // error: could not find symbol V +function testFunction2(p) { +} // error: could not find symbol V // in var type annotation var f; // error: could not find symbol V // in constraints @@ -129,7 +138,8 @@ var testClass4 = (function () { var testClass6 = (function () { function testClass6() { } - testClass6.prototype.method = function () { }; // error: could not find symbol V + testClass6.prototype.method = function () { + }; // error: could not find symbol V return testClass6; })(); // in extends clause diff --git a/tests/baselines/reference/es3-amd.js.map b/tests/baselines/reference/es3-amd.js.map index c587e10f904..a1ccff476c6 100644 --- a/tests/baselines/reference/es3-amd.js.map +++ b/tests/baselines/reference/es3-amd.js.map @@ -1,2 +1,2 @@ //// [es3-amd.js.map] -{"version":3,"file":"es3-amd.js","sourceRoot":"","sources":["es3-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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-amd.js","sourceRoot":"","sources":["es3-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 diff --git a/tests/baselines/reference/es3-amd.sourcemap.txt b/tests/baselines/reference/es3-amd.sourcemap.txt index 226904108df..86ef55a1f58 100644 --- a/tests/baselines/reference/es3-amd.sourcemap.txt +++ b/tests/baselines/reference/es3-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es3-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es3-declaration-amd.js.map b/tests/baselines/reference/es3-declaration-amd.js.map index ccd05b446f7..612763299c9 100644 --- a/tests/baselines/reference/es3-declaration-amd.js.map +++ b/tests/baselines/reference/es3-declaration-amd.js.map @@ -1,2 +1,2 @@ //// [es3-declaration-amd.js.map] -{"version":3,"file":"es3-declaration-amd.js","sourceRoot":"","sources":["es3-declaration-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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-declaration-amd.js","sourceRoot":"","sources":["es3-declaration-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 diff --git a/tests/baselines/reference/es3-declaration-amd.sourcemap.txt b/tests/baselines/reference/es3-declaration-amd.sourcemap.txt index 35e5474dd84..7ad6f48d3ad 100644 --- a/tests/baselines/reference/es3-declaration-amd.sourcemap.txt +++ b/tests/baselines/reference/es3-declaration-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es3-declaration-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es3-sourcemap-amd.js.map b/tests/baselines/reference/es3-sourcemap-amd.js.map index d3f8fafc960..e11de869437 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,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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":["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 diff --git a/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt b/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt index c39c3ccd4b1..a20cfaa766d 100644 --- a/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt +++ b/tests/baselines/reference/es3-sourcemap-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es3-sourcemap-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es5-amd.js.map b/tests/baselines/reference/es5-amd.js.map index 84512d7eece..6201673cb34 100644 --- a/tests/baselines/reference/es5-amd.js.map +++ b/tests/baselines/reference/es5-amd.js.map @@ -1,2 +1,2 @@ //// [es5-amd.js.map] -{"version":3,"file":"es5-amd.js","sourceRoot":"","sources":["es5-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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-amd.js","sourceRoot":"","sources":["es5-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 diff --git a/tests/baselines/reference/es5-amd.sourcemap.txt b/tests/baselines/reference/es5-amd.sourcemap.txt index e7586b02a4e..a5902f03982 100644 --- a/tests/baselines/reference/es5-amd.sourcemap.txt +++ b/tests/baselines/reference/es5-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es5-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es5-declaration-amd.js.map b/tests/baselines/reference/es5-declaration-amd.js.map index 8ed2d06ab3f..d4dfe8ac244 100644 --- a/tests/baselines/reference/es5-declaration-amd.js.map +++ b/tests/baselines/reference/es5-declaration-amd.js.map @@ -1,2 +1,2 @@ //// [es5-declaration-amd.js.map] -{"version":3,"file":"es5-declaration-amd.js","sourceRoot":"","sources":["es5-declaration-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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-declaration-amd.js","sourceRoot":"","sources":["es5-declaration-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 diff --git a/tests/baselines/reference/es5-declaration-amd.sourcemap.txt b/tests/baselines/reference/es5-declaration-amd.sourcemap.txt index 80a60ca6c6a..59b6ba6bb0a 100644 --- a/tests/baselines/reference/es5-declaration-amd.sourcemap.txt +++ b/tests/baselines/reference/es5-declaration-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es5-declaration-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es5-souremap-amd.js.map b/tests/baselines/reference/es5-souremap-amd.js.map index 64d882aae47..b8412bd1e72 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,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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":["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 diff --git a/tests/baselines/reference/es5-souremap-amd.sourcemap.txt b/tests/baselines/reference/es5-souremap-amd.sourcemap.txt index dc614195e28..9b6b4af56ca 100644 --- a/tests/baselines/reference/es5-souremap-amd.sourcemap.txt +++ b/tests/baselines/reference/es5-souremap-amd.sourcemap.txt @@ -10,42 +10,29 @@ sourceFile:es5-souremap-amd.ts ------------------------------------------------------------------- >>>var A = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- >>> function A() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- >>> A.prototype.B = function () { diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration.js b/tests/baselines/reference/es5ExportDefaultClassDeclaration.js new file mode 100644 index 00000000000..3ac92c5d9ea --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration.js @@ -0,0 +1,22 @@ +//// [es5ExportDefaultClassDeclaration.ts] + +export default class C { + method() { } +} + + +//// [es5ExportDefaultClassDeclaration.js] +var C = (function () { + function C() { + } + C.prototype.method = function () { + }; + return C; +})(); +module.exports = C; + + +//// [es5ExportDefaultClassDeclaration.d.ts] +export declare class C { + method(): void; +} diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration.types b/tests/baselines/reference/es5ExportDefaultClassDeclaration.types new file mode 100644 index 00000000000..34fb87fcbb2 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/es5ExportDefaultClassDeclaration.ts === + +export default class C { +>C : C + + method() { } +>method : () => void +} + diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js new file mode 100644 index 00000000000..8c07ff12599 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.js @@ -0,0 +1,52 @@ +//// [es5ExportDefaultClassDeclaration2.ts] + +export default class { + method() { } +} + + +//// [es5ExportDefaultClassDeclaration2.js] +var _default = (function () { + function _default() { + } + _default.prototype.method = function () { + }; + return _default; +})(); +module.exports = _default; + + +//// [es5ExportDefaultClassDeclaration2.d.ts] +export declare class { + method(): void; +} + + +//// [DtsFileErrors] + + +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(1,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(1,8): error TS2304: Cannot find name 'declare'. +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(1,16): error TS1005: ';' expected. +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(2,5): error TS2304: Cannot find name 'method'. +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(2,13): error TS1005: ';' expected. +tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts(2,19): error TS1109: Expression expected. + + +==== tests/cases/compiler/es5ExportDefaultClassDeclaration2.d.ts (6 errors) ==== + export declare class { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~ +!!! error TS1005: ';' expected. + method(): void; + ~~~~~~ +!!! error TS2304: Cannot find name 'method'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/es5ExportDefaultClassDeclaration2.types b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.types new file mode 100644 index 00000000000..e4c7a59e0e7 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultClassDeclaration2.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/es5ExportDefaultClassDeclaration2.ts === + +export default class { + method() { } +>method : () => void +} + diff --git a/tests/baselines/reference/es5ExportDefaultExpression.js b/tests/baselines/reference/es5ExportDefaultExpression.js new file mode 100644 index 00000000000..f0c3da6657b --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultExpression.js @@ -0,0 +1,11 @@ +//// [es5ExportDefaultExpression.ts] + +export default (1 + 2); + + +//// [es5ExportDefaultExpression.js] +module.exports = (1 + 2); + + +//// [es5ExportDefaultExpression.d.ts] +export default (1 + 2); diff --git a/tests/baselines/reference/es5ExportDefaultExpression.types b/tests/baselines/reference/es5ExportDefaultExpression.types new file mode 100644 index 00000000000..2f4e2b57284 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultExpression.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/es5ExportDefaultExpression.ts === + +export default (1 + 2); +>(1 + 2) : number +>1 + 2 : number + diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js new file mode 100644 index 00000000000..01576743581 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js @@ -0,0 +1,13 @@ +//// [es5ExportDefaultFunctionDeclaration.ts] + +export default function f() { } + + +//// [es5ExportDefaultFunctionDeclaration.js] +function f() { +} +module.exports = f; + + +//// [es5ExportDefaultFunctionDeclaration.d.ts] +export declare function f(): void; diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.types b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.types new file mode 100644 index 00000000000..446bd8e2a31 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/es5ExportDefaultFunctionDeclaration.ts === + +export default function f() { } +>f : () => void + diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js new file mode 100644 index 00000000000..6a99726655f --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js @@ -0,0 +1,26 @@ +//// [es5ExportDefaultFunctionDeclaration2.ts] + +export default function () { } + + +//// [es5ExportDefaultFunctionDeclaration2.js] +function () { +} +module.exports = _default; + + +//// [es5ExportDefaultFunctionDeclaration2.d.ts] +export declare function (): void; + + +//// [DtsFileErrors] + + +tests/cases/compiler/es5ExportDefaultFunctionDeclaration2.d.ts(1,25): error TS1003: Identifier expected. + + +==== tests/cases/compiler/es5ExportDefaultFunctionDeclaration2.d.ts (1 errors) ==== + export declare function (): void; + ~ +!!! error TS1003: Identifier expected. + \ No newline at end of file diff --git a/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.types b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.types new file mode 100644 index 00000000000..1b9f9d26151 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/es5ExportDefaultFunctionDeclaration2.ts === + +No type information for this code.export default function () { } +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es5ExportDefaultIdentifier.errors.txt b/tests/baselines/reference/es5ExportDefaultIdentifier.errors.txt new file mode 100644 index 00000000000..7a4fdf52e88 --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultIdentifier.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/es5ExportDefaultIdentifier.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + +==== tests/cases/compiler/es5ExportDefaultIdentifier.ts (1 errors) ==== + + export function f() { } + + export default f; + ~~~~~~~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + \ No newline at end of file diff --git a/tests/baselines/reference/es5ExportDefaultIdentifier.js b/tests/baselines/reference/es5ExportDefaultIdentifier.js new file mode 100644 index 00000000000..0c3a601308b --- /dev/null +++ b/tests/baselines/reference/es5ExportDefaultIdentifier.js @@ -0,0 +1,17 @@ +//// [es5ExportDefaultIdentifier.ts] + +export function f() { } + +export default f; + + +//// [es5ExportDefaultIdentifier.js] +function f() { +} +exports.f = f; +module.exports = f; + + +//// [es5ExportDefaultIdentifier.d.ts] +export declare function f(): void; +export default f; diff --git a/tests/baselines/reference/es5ExportEquals.errors.txt b/tests/baselines/reference/es5ExportEquals.errors.txt new file mode 100644 index 00000000000..89197aca632 --- /dev/null +++ b/tests/baselines/reference/es5ExportEquals.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/es5ExportEquals.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + +==== tests/cases/compiler/es5ExportEquals.ts (1 errors) ==== + + export function f() { } + + export = f; + ~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + \ No newline at end of file diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js new file mode 100644 index 00000000000..04a34b1e23b --- /dev/null +++ b/tests/baselines/reference/es5ExportEquals.js @@ -0,0 +1,17 @@ +//// [es5ExportEquals.ts] + +export function f() { } + +export = f; + + +//// [es5ExportEquals.js] +function f() { +} +exports.f = f; +module.exports = f; + + +//// [es5ExportEquals.d.ts] +export declare function f(): void; +export = f; diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.js b/tests/baselines/reference/es5ModuleInternalNamedImports.js new file mode 100644 index 00000000000..3d9966be7dd --- /dev/null +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.js @@ -0,0 +1,73 @@ +//// [es5ModuleInternalNamedImports.ts] + +export module M { + // variable + export var M_V = 0; + // interface + export interface M_I { } + //calss + export class M_C { } + // instantiated module + export module M_M { var x; } + // uninstantiated module + export module M_MU { } + // function + export function M_F() { } + // enum + export enum M_E { } + // type + export type M_T = number; + // alias + export import M_A = M_M; + + // Reexports + export {M_V as v}; + export {M_I as i}; + export {M_C as c}; + export {M_M as m}; + export {M_MU as mu}; + export {M_F as f}; + export {M_E as e}; + export {M_A as a}; +} + + +//// [es5ModuleInternalNamedImports.js] +define(["require", "exports"], function (require, exports) { + var M; + (function (M) { + // variable + M.M_V = 0; + //calss + var M_C = (function () { + function M_C() { + } + return M_C; + })(); + M.M_C = M_C; + // instantiated module + var M_M; + (function (M_M) { + var x; + })(M_M = M.M_M || (M.M_M = {})); + // function + function M_F() { + } + M.M_F = M_F; + // enum + (function (M_E) { + })(M.M_E || (M.M_E = {})); + var M_E = M.M_E; + // alias + M.M_A = M_M; + // Reexports + M.v = M.M_V; + M.i = M_I; + M.c = M_C; + M.m = M_M; + M.mu = M_MU; + M.f = M_F; + M.e = M_E; + M.a = M.M_A; + })(M = exports.M || (exports.M = {})); +}); diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.types b/tests/baselines/reference/es5ModuleInternalNamedImports.types new file mode 100644 index 00000000000..fa88ab399a3 --- /dev/null +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.types @@ -0,0 +1,77 @@ +=== tests/cases/compiler/es5ModuleInternalNamedImports.ts === + +export module M { +>M : typeof M + + // variable + export var M_V = 0; +>M_V : number + + // interface + export interface M_I { } +>M_I : M_I + + //calss + export class M_C { } +>M_C : M_C + + // instantiated module + export module M_M { var x; } +>M_M : typeof M_M +>x : any + + // uninstantiated module + export module M_MU { } +>M_MU : unknown + + // function + export function M_F() { } +>M_F : () => void + + // enum + export enum M_E { } +>M_E : M_E + + // type + export type M_T = number; +>M_T : number + + // alias + export import M_A = M_M; +>M_A : typeof M_M +>M_M : typeof M_M + + // Reexports + export {M_V as v}; +>M_V : number +>v : number + + export {M_I as i}; +>M_I : unknown +>i : unknown + + export {M_C as c}; +>M_C : typeof M_C +>c : typeof M_C + + export {M_M as m}; +>M_M : typeof M_M +>m : typeof M_M + + export {M_MU as mu}; +>M_MU : unknown +>mu : unknown + + export {M_F as f}; +>M_F : () => void +>f : () => void + + export {M_E as e}; +>M_E : typeof M_E +>e : typeof M_E + + export {M_A as a}; +>M_A : typeof M_M +>a : typeof M_M +} + diff --git a/tests/baselines/reference/es5ModuleWithModuleGenAmd.js b/tests/baselines/reference/es5ModuleWithModuleGenAmd.js new file mode 100644 index 00000000000..f4757b539eb --- /dev/null +++ b/tests/baselines/reference/es5ModuleWithModuleGenAmd.js @@ -0,0 +1,25 @@ +//// [es5ModuleWithModuleGenAmd.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es5ModuleWithModuleGenAmd.js] +define(["require", "exports"], function (require, exports) { + var A = (function () { + function A() { + } + A.prototype.B = function () { + return 42; + }; + return A; + })(); + exports.A = A; +}); diff --git a/tests/baselines/reference/es6-sourcemap-amd.types b/tests/baselines/reference/es5ModuleWithModuleGenAmd.types similarity index 55% rename from tests/baselines/reference/es6-sourcemap-amd.types rename to tests/baselines/reference/es5ModuleWithModuleGenAmd.types index 661ab2e7cdd..e3453587a12 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.types +++ b/tests/baselines/reference/es5ModuleWithModuleGenAmd.types @@ -1,11 +1,9 @@ -=== tests/cases/compiler/es6-sourcemap-amd.ts === - -class A +=== tests/cases/compiler/es5ModuleWithModuleGenAmd.ts === +export class A >A : A { constructor () { - } public B() diff --git a/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js new file mode 100644 index 00000000000..b4ca020f566 --- /dev/null +++ b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.js @@ -0,0 +1,23 @@ +//// [es5ModuleWithModuleGenCommonjs.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es5ModuleWithModuleGenCommonjs.js] +var A = (function () { + function A() { + } + A.prototype.B = function () { + return 42; + }; + return A; +})(); +exports.A = A; diff --git a/tests/baselines/reference/es6-declaration-amd.types b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.types similarity index 53% rename from tests/baselines/reference/es6-declaration-amd.types rename to tests/baselines/reference/es5ModuleWithModuleGenCommonjs.types index e275fc52439..721df9afe58 100644 --- a/tests/baselines/reference/es6-declaration-amd.types +++ b/tests/baselines/reference/es5ModuleWithModuleGenCommonjs.types @@ -1,11 +1,9 @@ -=== tests/cases/compiler/es6-declaration-amd.ts === - -class A +=== tests/cases/compiler/es5ModuleWithModuleGenCommonjs.ts === +export class A >A : A { constructor () { - } public B() diff --git a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt new file mode 100644 index 00000000000..25e64fc72d0 --- /dev/null +++ b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + +==== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts (1 errors) ==== + export class A + ~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. + { + constructor () + { + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js new file mode 100644 index 00000000000..4f663875ade --- /dev/null +++ b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.js @@ -0,0 +1,23 @@ +//// [es5ModuleWithoutModuleGenTarget.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es5ModuleWithoutModuleGenTarget.js] +var A = (function () { + function A() { + } + A.prototype.B = function () { + return 42; + }; + return A; +})(); +exports.A = A; diff --git a/tests/baselines/reference/es6-amd.errors.txt b/tests/baselines/reference/es6-amd.errors.txt new file mode 100644 index 00000000000..cb1ef4b1287 --- /dev/null +++ b/tests/baselines/reference/es6-amd.errors.txt @@ -0,0 +1,18 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. + + +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/es6-amd.ts (0 errors) ==== + + class A + { + constructor () + { + + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es6-amd.js b/tests/baselines/reference/es6-amd.js index 0cce3af0446..74f3037303e 100644 --- a/tests/baselines/reference/es6-amd.js +++ b/tests/baselines/reference/es6-amd.js @@ -14,14 +14,13 @@ class A } //// [es6-amd.js] -var A = (function () { - function A() { +class A { + constructor() { } - A.prototype.B = function () { + B() { return 42; - }; - return A; -})(); + } +} //# sourceMappingURL=es6-amd.js.map //// [es6-amd.d.ts] diff --git a/tests/baselines/reference/es6-amd.js.map b/tests/baselines/reference/es6-amd.js.map index 7371ba578bd..fe234f8424b 100644 --- a/tests/baselines/reference/es6-amd.js.map +++ b/tests/baselines/reference/es6-amd.js.map @@ -1,2 +1,2 @@ //// [es6-amd.js.map] -{"version":3,"file":"es6-amd.js","sourceRoot":"","sources":["es6-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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":"es6-amd.js","sourceRoot":"","sources":["es6-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 diff --git a/tests/baselines/reference/es6-amd.sourcemap.txt b/tests/baselines/reference/es6-amd.sourcemap.txt index 070a35703e1..1ab547073c6 100644 --- a/tests/baselines/reference/es6-amd.sourcemap.txt +++ b/tests/baselines/reference/es6-amd.sourcemap.txt @@ -8,121 +8,84 @@ sources: es6-amd.ts emittedFile:tests/cases/compiler/es6-amd.js sourceFile:es6-amd.ts ------------------------------------------------------------------- ->>>var A = (function () { +>>>class A { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- ->>> function A() { +>>> constructor() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +3 > ^^^^^-> +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- ->>> A.prototype.B = function () { +>>> B() { 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> 1-> > > 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) +2 >Emitted(4, 6) Source(9, 13) + SourceIndex(0) name (A) --- >>> return 42; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^ 5 > ^ -1 >public B() +1->() > { > 2 > return 3 > 4 > 42 5 > ; -1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) +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 >^^^^ 2 > ^ -3 > ^^^^^^^^^-> 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) --- ->>> return A; -1->^^^^ -2 > ^^^^^^^^ -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 > 2 >^ -3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > 2 >} -3 > -4 > class A - > { - > constructor () - > { - > - > } - > - > public B() - > { - > return 42; - > } - > } -1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) name (A) -3 >Emitted(8, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(13, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(13, 1) + SourceIndex(0) name (A) +2 >Emitted(7, 2) Source(13, 2) + SourceIndex(0) name (A) --- ->>>//# sourceMappingURL=es6-amd.js.map \ No newline at end of file +>>>//# sourceMappingURL=es6-amd.js.map1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +1->Emitted(8, 1) Source(13, 2) + SourceIndex(0) +--- \ No newline at end of file diff --git a/tests/baselines/reference/es6-declaration-amd.errors.txt b/tests/baselines/reference/es6-declaration-amd.errors.txt new file mode 100644 index 00000000000..18319504dc9 --- /dev/null +++ b/tests/baselines/reference/es6-declaration-amd.errors.txt @@ -0,0 +1,18 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. + + +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/es6-declaration-amd.ts (0 errors) ==== + + class A + { + constructor () + { + + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es6-declaration-amd.js b/tests/baselines/reference/es6-declaration-amd.js index 471f96b223d..aeba23e0b6e 100644 --- a/tests/baselines/reference/es6-declaration-amd.js +++ b/tests/baselines/reference/es6-declaration-amd.js @@ -14,14 +14,13 @@ class A } //// [es6-declaration-amd.js] -var A = (function () { - function A() { +class A { + constructor() { } - A.prototype.B = function () { + B() { return 42; - }; - return A; -})(); + } +} //# sourceMappingURL=es6-declaration-amd.js.map //// [es6-declaration-amd.d.ts] diff --git a/tests/baselines/reference/es6-declaration-amd.js.map b/tests/baselines/reference/es6-declaration-amd.js.map index 0987f9478e9..ca1899e03f5 100644 --- a/tests/baselines/reference/es6-declaration-amd.js.map +++ b/tests/baselines/reference/es6-declaration-amd.js.map @@ -1,2 +1,2 @@ //// [es6-declaration-amd.js.map] -{"version":3,"file":"es6-declaration-amd.js","sourceRoot":"","sources":["es6-declaration-amd.ts"],"names":["A","A.constructor","A.B"],"mappings":"AACA,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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":"es6-declaration-amd.js","sourceRoot":"","sources":["es6-declaration-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 diff --git a/tests/baselines/reference/es6-declaration-amd.sourcemap.txt b/tests/baselines/reference/es6-declaration-amd.sourcemap.txt index 1fc0b5f05fe..9061bc1ed7c 100644 --- a/tests/baselines/reference/es6-declaration-amd.sourcemap.txt +++ b/tests/baselines/reference/es6-declaration-amd.sourcemap.txt @@ -8,121 +8,84 @@ sources: es6-declaration-amd.ts emittedFile:tests/cases/compiler/es6-declaration-amd.js sourceFile:es6-declaration-amd.ts ------------------------------------------------------------------- ->>>var A = (function () { +>>>class A { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- ->>> function A() { +>>> constructor() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +3 > ^^^^^-> +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- ->>> A.prototype.B = function () { +>>> B() { 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> 1-> > > 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) +2 >Emitted(4, 6) Source(9, 13) + SourceIndex(0) name (A) --- >>> return 42; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^ 5 > ^ -1 >public B() +1->() > { > 2 > return 3 > 4 > 42 5 > ; -1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) +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 >^^^^ 2 > ^ -3 > ^^^^^^^^^-> 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) --- ->>> return A; -1->^^^^ -2 > ^^^^^^^^ -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 > 2 >^ -3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > 2 >} -3 > -4 > class A - > { - > constructor () - > { - > - > } - > - > public B() - > { - > return 42; - > } - > } -1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) name (A) -3 >Emitted(8, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(13, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(13, 1) + SourceIndex(0) name (A) +2 >Emitted(7, 2) Source(13, 2) + SourceIndex(0) name (A) --- ->>>//# sourceMappingURL=es6-declaration-amd.js.map \ No newline at end of file +>>>//# sourceMappingURL=es6-declaration-amd.js.map1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +1->Emitted(8, 1) Source(13, 2) + SourceIndex(0) +--- \ No newline at end of file diff --git a/tests/baselines/reference/es6-sourcemap-amd.errors.txt b/tests/baselines/reference/es6-sourcemap-amd.errors.txt new file mode 100644 index 00000000000..24a83f8ee12 --- /dev/null +++ b/tests/baselines/reference/es6-sourcemap-amd.errors.txt @@ -0,0 +1,18 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. + + +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/es6-sourcemap-amd.ts (0 errors) ==== + + class A + { + constructor () + { + + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es6-sourcemap-amd.js b/tests/baselines/reference/es6-sourcemap-amd.js index 805e56cf830..106726c0f2c 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.js +++ b/tests/baselines/reference/es6-sourcemap-amd.js @@ -14,12 +14,11 @@ class A } //// [es6-sourcemap-amd.js] -var A = (function () { - function A() { +class A { + constructor() { } - A.prototype.B = function () { + B() { return 42; - }; - return A; -})(); + } +} //# sourceMappingURL=es6-sourcemap-amd.js.map \ No newline at end of file diff --git a/tests/baselines/reference/es6-sourcemap-amd.js.map b/tests/baselines/reference/es6-sourcemap-amd.js.map index 689f0447fa8..779c13b1296 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,IAAM,CAAC;IAEHA,SAFEA,CAACA;IAKHC,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":"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 diff --git a/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt b/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt index 09abb195987..179dd79ba17 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt +++ b/tests/baselines/reference/es6-sourcemap-amd.sourcemap.txt @@ -8,121 +8,84 @@ sources: es6-sourcemap-amd.ts emittedFile:tests/cases/compiler/es6-sourcemap-amd.js sourceFile:es6-sourcemap-amd.ts ------------------------------------------------------------------- ->>>var A = (function () { +>>>class A { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > A 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(2, 8) + SourceIndex(0) --- ->>> function A() { +>>> constructor() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> +2 > ^^-> +1->class A >{ > -2 > -3 > A 1->Emitted(2, 5) Source(4, 5) + SourceIndex(0) name (A) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (A) -3 >Emitted(2, 15) Source(2, 8) + SourceIndex(0) name (A) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >{ - > constructor () +3 > ^^^^^-> +1->constructor () > { > > 2 > } -1 >Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) +1->Emitted(3, 5) Source(7, 5) + SourceIndex(0) name (A.constructor) 2 >Emitted(3, 6) Source(7, 6) + SourceIndex(0) name (A.constructor) --- ->>> A.prototype.B = function () { +>>> B() { 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> 1-> > > 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) +2 >Emitted(4, 6) Source(9, 13) + SourceIndex(0) name (A) --- >>> return 42; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^ 3 > ^ 4 > ^^ 5 > ^ -1 >public B() +1->() > { > 2 > return 3 > 4 > 42 5 > ; -1 >Emitted(5, 9) Source(11, 9) + SourceIndex(0) name (A.B) +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 >^^^^ 2 > ^ -3 > ^^^^^^^^^-> 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) --- ->>> return A; -1->^^^^ -2 > ^^^^^^^^ -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 > 2 >^ -3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > 2 >} -3 > -4 > class A - > { - > constructor () - > { - > - > } - > - > public B() - > { - > return 42; - > } - > } -1 >Emitted(8, 1) Source(13, 1) + SourceIndex(0) name (A) -2 >Emitted(8, 2) Source(13, 2) + SourceIndex(0) name (A) -3 >Emitted(8, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(13, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(13, 1) + SourceIndex(0) name (A) +2 >Emitted(7, 2) Source(13, 2) + SourceIndex(0) name (A) --- ->>>//# sourceMappingURL=es6-sourcemap-amd.js.map \ No newline at end of file +>>>//# sourceMappingURL=es6-sourcemap-amd.js.map1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +1->Emitted(8, 1) Source(13, 2) + SourceIndex(0) +--- \ No newline at end of file diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 08c184a0df2..5fd9f0e9b7f 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -112,8 +112,12 @@ var Foo = (function (_super) { this.x = x; this.gar = 5; } - Foo.prototype.bar = function () { return 0; }; - Foo.prototype.boo = function (x) { return x; }; + Foo.prototype.bar = function () { + return 0; + }; + Foo.prototype.boo = function (x) { + return x; + }; Foo.statVal = 0; return Foo; })(Bar); diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index f23be04fd17..8ef7a2fa379 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -248,7 +248,9 @@ var SplatMonster = (function () { }; return SplatMonster; })(); -function foo() { return true; } +function foo() { + return true; +} var PrototypeMonster = (function () { function PrototypeMonster() { this.age = 1; @@ -300,8 +302,10 @@ var Visibility = (function () { this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { }; - Visibility.prototype.bar = function () { }; + Visibility.prototype.foo = function () { + }; + Visibility.prototype.bar = function () { + }; return Visibility; })(); var BaseClassWithConstructor = (function () { diff --git a/tests/baselines/reference/es6ClassTest3.js b/tests/baselines/reference/es6ClassTest3.js index dc9f1c67154..371a983d152 100644 --- a/tests/baselines/reference/es6ClassTest3.js +++ b/tests/baselines/reference/es6ClassTest3.js @@ -22,8 +22,10 @@ var M; this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { }; - Visibility.prototype.bar = function () { }; + Visibility.prototype.foo = function () { + }; + Visibility.prototype.bar = function () { + }; return Visibility; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/es6ClassTest8.js b/tests/baselines/reference/es6ClassTest8.js index f96bbd16b0b..3c616e5e893 100644 --- a/tests/baselines/reference/es6ClassTest8.js +++ b/tests/baselines/reference/es6ClassTest8.js @@ -41,7 +41,9 @@ class Camera { //// [es6ClassTest8.js] -function f1(x) { return x; } +function f1(x) { + return x; +} var C = (function () { function C() { var bar = (function () { @@ -57,11 +59,21 @@ var Vector = (function () { this.y = y; this.z = z; } - Vector.norm = function (v) { return null; }; - Vector.minus = function (v1, v2) { return null; }; - Vector.times = function (v1, v2) { return null; }; - Vector.cross = function (v1, v2) { return null; }; - Vector.dot = function (v1, v2) { return null; }; + Vector.norm = function (v) { + return null; + }; + Vector.minus = function (v1, v2) { + return null; + }; + Vector.times = function (v1, v2) { + return null; + }; + Vector.cross = function (v1, v2) { + return null; + }; + Vector.dot = function (v1, v2) { + return null; + }; return Vector; })(); var Camera = (function () { diff --git a/tests/baselines/reference/es6ClassTest9.js b/tests/baselines/reference/es6ClassTest9.js index 538fec5a2ab..d45c99d3b04 100644 --- a/tests/baselines/reference/es6ClassTest9.js +++ b/tests/baselines/reference/es6ClassTest9.js @@ -5,4 +5,5 @@ function foo() {} //// [es6ClassTest9.js] (); -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/es6ExportAll.js b/tests/baselines/reference/es6ExportAll.js new file mode 100644 index 00000000000..4c223545e8a --- /dev/null +++ b/tests/baselines/reference/es6ExportAll.js @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/es6ExportAll.ts] //// + +//// [server.ts] + +export class c { +} +export interface i { +} +export module m { + export var x = 10; +} +export var x = 10; +export module uninstantiated { +} + +//// [client.ts] +export * from "server"; + +//// [server.js] +export class c { +} +var m; +(function (m) { + m.x = 10; +})(m || (m = {})); +export { m }; +export var x = 10; +//// [client.js] +export * from "server"; + + +//// [server.d.ts] +export declare class c { +} +export interface i { +} +export declare module m { + var x: number; +} +export declare var x: number; +export declare module uninstantiated { +} +//// [client.d.ts] diff --git a/tests/baselines/reference/es6ExportAll.types b/tests/baselines/reference/es6ExportAll.types new file mode 100644 index 00000000000..99e8fde9d40 --- /dev/null +++ b/tests/baselines/reference/es6ExportAll.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/server.ts === + +export class c { +>c : c +} +export interface i { +>i : i +} +export module m { +>m : typeof m + + export var x = 10; +>x : number +} +export var x = 10; +>x : number + +export module uninstantiated { +>uninstantiated : unknown +} + +=== tests/cases/compiler/client.ts === +export * from "server"; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportAllInEs5.js b/tests/baselines/reference/es6ExportAllInEs5.js new file mode 100644 index 00000000000..9fd8c1c4b33 --- /dev/null +++ b/tests/baselines/reference/es6ExportAllInEs5.js @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/es6ExportAllInEs5.ts] //// + +//// [server.ts] + +export class c { +} +export interface i { +} +export module m { + export var x = 10; +} +export var x = 10; +export module uninstantiated { +} + +//// [client.ts] +export * from "server"; + +//// [server.js] +var c = (function () { + function c() { + } + return c; +})(); +exports.c = c; +var m; +(function (m) { + m.x = 10; +})(m = exports.m || (exports.m = {})); +exports.x = 10; +//// [client.js] +var _server = require("server"); +for (var _a in _server) if (!exports.hasOwnProperty(_a)) exports[_a] = _server[_a]; + + +//// [server.d.ts] +export declare class c { +} +export interface i { +} +export declare module m { + var x: number; +} +export declare var x: number; +export declare module uninstantiated { +} +//// [client.d.ts] diff --git a/tests/baselines/reference/es6ExportAllInEs5.types b/tests/baselines/reference/es6ExportAllInEs5.types new file mode 100644 index 00000000000..99e8fde9d40 --- /dev/null +++ b/tests/baselines/reference/es6ExportAllInEs5.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/server.ts === + +export class c { +>c : c +} +export interface i { +>i : i +} +export module m { +>m : typeof m + + export var x = 10; +>x : number +} +export var x = 10; +>x : number + +export module uninstantiated { +>uninstantiated : unknown +} + +=== tests/cases/compiler/client.ts === +export * from "server"; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportAssignment.errors.txt b/tests/baselines/reference/es6ExportAssignment.errors.txt new file mode 100644 index 00000000000..1db7d04e05e --- /dev/null +++ b/tests/baselines/reference/es6ExportAssignment.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/es6ExportAssignment.ts(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + + +==== tests/cases/compiler/es6ExportAssignment.ts (1 errors) ==== + + var a = 10; + export = a; + ~~~~~~~~~~~ +!!! error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportAssignment.js b/tests/baselines/reference/es6ExportAssignment.js new file mode 100644 index 00000000000..113e28108b1 --- /dev/null +++ b/tests/baselines/reference/es6ExportAssignment.js @@ -0,0 +1,8 @@ +//// [es6ExportAssignment.ts] + +var a = 10; +export = a; + +//// [es6ExportAssignment.js] +var a = 10; +export default a; diff --git a/tests/baselines/reference/es6ExportClause.js b/tests/baselines/reference/es6ExportClause.js new file mode 100644 index 00000000000..9fd7a71554d --- /dev/null +++ b/tests/baselines/reference/es6ExportClause.js @@ -0,0 +1,34 @@ +//// [es6ExportClause.ts] + +class c { +} +interface i { +} +module m { + export var x = 10; +} +var x = 10; +module uninstantiated { +} +export { c }; +export { c as c2 }; +export { i, m as instantiatedModule }; +export { uninstantiated }; +export { x }; + +//// [es6ExportClause.js] +class c { +} +var m; +(function (m) { + m.x = 10; +})(m || (m = {})); +var x = 10; +export { c }; +export { c as c2 }; +export { i, m as instantiatedModule }; +export { uninstantiated }; +export { x }; + + +//// [es6ExportClause.d.ts] diff --git a/tests/baselines/reference/es6ExportClause.types b/tests/baselines/reference/es6ExportClause.types new file mode 100644 index 00000000000..24b9859e0e8 --- /dev/null +++ b/tests/baselines/reference/es6ExportClause.types @@ -0,0 +1,38 @@ +=== tests/cases/compiler/es6ExportClause.ts === + +class c { +>c : c +} +interface i { +>i : i +} +module m { +>m : typeof m + + export var x = 10; +>x : number +} +var x = 10; +>x : number + +module uninstantiated { +>uninstantiated : unknown +} +export { c }; +>c : typeof c + +export { c as c2 }; +>c : typeof c +>c2 : typeof c + +export { i, m as instantiatedModule }; +>i : unknown +>m : typeof m +>instantiatedModule : typeof m + +export { uninstantiated }; +>uninstantiated : unknown + +export { x }; +>x : number + diff --git a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js new file mode 100644 index 00000000000..29cdc655397 --- /dev/null +++ b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/es6ExportClauseWithoutModuleSpecifier.ts] //// + +//// [server.ts] + +export class c { +} +export interface i { +} +export module m { + export var x = 10; +} +export var x = 10; +export module uninstantiated { +} + +//// [client.ts] +export { c } from "server"; +export { c as c2 } from "server"; +export { i, m as instantiatedModule } from "server"; +export { uninstantiated } from "server"; +export { x } from "server"; + +//// [server.js] +export class c { +} +var m; +(function (m) { + m.x = 10; +})(m || (m = {})); +export { m }; +export var x = 10; +//// [client.js] +export { c } from "server"; +export { c as c2 } from "server"; +export { i, m as instantiatedModule } from "server"; +export { uninstantiated } from "server"; +export { x } from "server"; + + +//// [server.d.ts] +export declare class c { +} +export interface i { +} +export declare module m { + var x: number; +} +export declare var x: number; +export declare module uninstantiated { +} +//// [client.d.ts] diff --git a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.types b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.types new file mode 100644 index 00000000000..c0087dccd94 --- /dev/null +++ b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/server.ts === + +export class c { +>c : c +} +export interface i { +>i : i +} +export module m { +>m : typeof m + + export var x = 10; +>x : number +} +export var x = 10; +>x : number + +export module uninstantiated { +>uninstantiated : unknown +} + +=== tests/cases/compiler/client.ts === +export { c } from "server"; +>c : typeof c + +export { c as c2 } from "server"; +>c : typeof c +>c2 : typeof c + +export { i, m as instantiatedModule } from "server"; +>i : unknown +>m : typeof instantiatedModule +>instantiatedModule : typeof instantiatedModule + +export { uninstantiated } from "server"; +>uninstantiated : unknown + +export { x } from "server"; +>x : number + diff --git a/tests/baselines/reference/es6ExportDefaultClassDeclaration.js b/tests/baselines/reference/es6ExportDefaultClassDeclaration.js new file mode 100644 index 00000000000..f2682f0a188 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultClassDeclaration.js @@ -0,0 +1,18 @@ +//// [es6ExportDefaultClassDeclaration.ts] + +export default class C { + method() { } +} + + +//// [es6ExportDefaultClassDeclaration.js] +export default class C { + method() { + } +} + + +//// [es6ExportDefaultClassDeclaration.d.ts] +export declare class C { + method(): void; +} diff --git a/tests/baselines/reference/es6ExportDefaultClassDeclaration.types b/tests/baselines/reference/es6ExportDefaultClassDeclaration.types new file mode 100644 index 00000000000..59e74fc1257 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultClassDeclaration.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/es6ExportDefaultClassDeclaration.ts === + +export default class C { +>C : C + + method() { } +>method : () => void +} + diff --git a/tests/baselines/reference/es6ExportDefaultClassDeclaration2.js b/tests/baselines/reference/es6ExportDefaultClassDeclaration2.js new file mode 100644 index 00000000000..a975d4322f5 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultClassDeclaration2.js @@ -0,0 +1,48 @@ +//// [es6ExportDefaultClassDeclaration2.ts] + +export default class { + method() { } +} + + +//// [es6ExportDefaultClassDeclaration2.js] +export default class { + method() { + } +} + + +//// [es6ExportDefaultClassDeclaration2.d.ts] +export declare class { + method(): void; +} + + +//// [DtsFileErrors] + + +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(1,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(1,8): error TS2304: Cannot find name 'declare'. +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(1,16): error TS1005: ';' expected. +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(2,5): error TS2304: Cannot find name 'method'. +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(2,13): error TS1005: ';' expected. +tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts(2,19): error TS1109: Expression expected. + + +==== tests/cases/compiler/es6ExportDefaultClassDeclaration2.d.ts (6 errors) ==== + export declare class { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~ +!!! error TS1005: ';' expected. + method(): void; + ~~~~~~ +!!! error TS2304: Cannot find name 'method'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportDefaultClassDeclaration2.types b/tests/baselines/reference/es6ExportDefaultClassDeclaration2.types new file mode 100644 index 00000000000..513cacf05e4 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultClassDeclaration2.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/es6ExportDefaultClassDeclaration2.ts === + +export default class { + method() { } +>method : () => void +} + diff --git a/tests/baselines/reference/es6ExportDefaultExpression.js b/tests/baselines/reference/es6ExportDefaultExpression.js new file mode 100644 index 00000000000..e0d91043766 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultExpression.js @@ -0,0 +1,11 @@ +//// [es6ExportDefaultExpression.ts] + +export default (1 + 2); + + +//// [es6ExportDefaultExpression.js] +export default (1 + 2); + + +//// [es6ExportDefaultExpression.d.ts] +export default (1 + 2); diff --git a/tests/baselines/reference/es6ExportDefaultExpression.types b/tests/baselines/reference/es6ExportDefaultExpression.types new file mode 100644 index 00000000000..3b056b8d9f9 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultExpression.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/es6ExportDefaultExpression.ts === + +export default (1 + 2); +>(1 + 2) : number +>1 + 2 : number + diff --git a/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.js b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.js new file mode 100644 index 00000000000..fafc5a114f5 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.js @@ -0,0 +1,12 @@ +//// [es6ExportDefaultFunctionDeclaration.ts] + +export default function f() { } + + +//// [es6ExportDefaultFunctionDeclaration.js] +export default function f() { +} + + +//// [es6ExportDefaultFunctionDeclaration.d.ts] +export declare function f(): void; diff --git a/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.types b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.types new file mode 100644 index 00000000000..6179bde9613 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/es6ExportDefaultFunctionDeclaration.ts === + +export default function f() { } +>f : () => void + diff --git a/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.js b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.js new file mode 100644 index 00000000000..2071e56c539 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.js @@ -0,0 +1,25 @@ +//// [es6ExportDefaultFunctionDeclaration2.ts] + +export default function () { } + + +//// [es6ExportDefaultFunctionDeclaration2.js] +export default function () { +} + + +//// [es6ExportDefaultFunctionDeclaration2.d.ts] +export declare function (): void; + + +//// [DtsFileErrors] + + +tests/cases/compiler/es6ExportDefaultFunctionDeclaration2.d.ts(1,25): error TS1003: Identifier expected. + + +==== tests/cases/compiler/es6ExportDefaultFunctionDeclaration2.d.ts (1 errors) ==== + export declare function (): void; + ~ +!!! error TS1003: Identifier expected. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.types b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.types new file mode 100644 index 00000000000..3cb2fc9b1cd --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultFunctionDeclaration2.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/es6ExportDefaultFunctionDeclaration2.ts === + +No type information for this code.export default function () { } +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportDefaultIdentifier.js b/tests/baselines/reference/es6ExportDefaultIdentifier.js new file mode 100644 index 00000000000..5785220dfee --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultIdentifier.js @@ -0,0 +1,16 @@ +//// [es6ExportDefaultIdentifier.ts] + +export function f() { } + +export default f; + + +//// [es6ExportDefaultIdentifier.js] +export function f() { +} +export default f; + + +//// [es6ExportDefaultIdentifier.d.ts] +export declare function f(): void; +export default f; diff --git a/tests/baselines/reference/es6ExportDefaultIdentifier.types b/tests/baselines/reference/es6ExportDefaultIdentifier.types new file mode 100644 index 00000000000..81dc168efd0 --- /dev/null +++ b/tests/baselines/reference/es6ExportDefaultIdentifier.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/es6ExportDefaultIdentifier.ts === + +export function f() { } +>f : () => void + +export default f; +>f : () => void + diff --git a/tests/baselines/reference/es6ExportEquals.errors.txt b/tests/baselines/reference/es6ExportEquals.errors.txt new file mode 100644 index 00000000000..cc4206e2a5f --- /dev/null +++ b/tests/baselines/reference/es6ExportEquals.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/es6ExportEquals.ts(4,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + + +==== tests/cases/compiler/es6ExportEquals.ts (1 errors) ==== + + export function f() { } + + export = f; + ~~~~~~~~~~~ +!!! error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ExportEquals.js b/tests/baselines/reference/es6ExportEquals.js new file mode 100644 index 00000000000..d51f8740da0 --- /dev/null +++ b/tests/baselines/reference/es6ExportEquals.js @@ -0,0 +1,16 @@ +//// [es6ExportEquals.ts] + +export function f() { } + +export = f; + + +//// [es6ExportEquals.js] +export function f() { +} +export default f; + + +//// [es6ExportEquals.d.ts] +export declare function f(): void; +export = f; diff --git a/tests/baselines/reference/es6ImportDefaultBinding.errors.txt b/tests/baselines/reference/es6ImportDefaultBinding.errors.txt index 85390ecce4b..c07a84bb810 100644 --- a/tests/baselines/reference/es6ImportDefaultBinding.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBinding.errors.txt @@ -8,4 +8,5 @@ tests/cases/compiler/es6ImportDefaultBinding_1.ts(1,8): error TS1192: External m ==== tests/cases/compiler/es6ImportDefaultBinding_1.ts (1 errors) ==== import defaultBinding from "es6ImportDefaultBinding_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBinding_0"' has no default export or export assignment. \ No newline at end of file +!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBinding_0"' has no default export or export assignment. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBinding.js b/tests/baselines/reference/es6ImportDefaultBinding.js index d8d1fa8111d..c7a320b76aa 100644 --- a/tests/baselines/reference/es6ImportDefaultBinding.js +++ b/tests/baselines/reference/es6ImportDefaultBinding.js @@ -5,8 +5,14 @@ export var a = 10; //// [es6ImportDefaultBinding_1.ts] -import defaultBinding from "es6ImportDefaultBinding_0"; +import defaultBinding from "es6ImportDefaultBinding_0"; + //// [es6ImportDefaultBinding_0.js] -exports.a = 10; +export var a = 10; //// [es6ImportDefaultBinding_1.js] + + +//// [es6ImportDefaultBinding_0.d.ts] +export declare var a: number; +//// [es6ImportDefaultBinding_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingAmd.js b/tests/baselines/reference/es6ImportDefaultBindingAmd.js new file mode 100644 index 00000000000..34b39cda4b7 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingAmd.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingAmd.ts] //// + +//// [es6ImportDefaultBindingAmd_0.ts] + +var a = 10; +export = a; + +//// [es6ImportDefaultBindingAmd_1.ts] +import defaultBinding from "es6ImportDefaultBindingAmd_0"; +var x = defaultBinding; +import defaultBinding2 from "es6ImportDefaultBindingAmd_0"; // elide this import since defaultBinding2 is not used + + +//// [es6ImportDefaultBindingAmd_0.js] +define(["require", "exports"], function (require, exports) { + var a = 10; + return a; +}); +//// [es6ImportDefaultBindingAmd_1.js] +define(["require", "exports", "es6ImportDefaultBindingAmd_0"], function (require, exports, defaultBinding) { + var x = defaultBinding; +}); + + +//// [es6ImportDefaultBindingAmd_0.d.ts] +declare var a: number; +export = a; +//// [es6ImportDefaultBindingAmd_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingAmd.types b/tests/baselines/reference/es6ImportDefaultBindingAmd.types new file mode 100644 index 00000000000..9b067ef27a4 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingAmd.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/es6ImportDefaultBindingAmd_0.ts === + +var a = 10; +>a : number + +export = a; +>a : number + +=== tests/cases/compiler/es6ImportDefaultBindingAmd_1.ts === +import defaultBinding from "es6ImportDefaultBindingAmd_0"; +>defaultBinding : number + +var x = defaultBinding; +>x : number +>defaultBinding : number + +import defaultBinding2 from "es6ImportDefaultBindingAmd_0"; // elide this import since defaultBinding2 is not used +>defaultBinding2 : number + diff --git a/tests/baselines/reference/es6ImportDefaultBindingDts.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingDts.errors.txt new file mode 100644 index 00000000000..fc1e1a1925c --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingDts.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/client.ts(2,12): error TS4025: Exported variable 'x' has or is using private name 'defaultBinding'. + + +==== tests/cases/compiler/server.ts (0 errors) ==== + + class c { } + export = c; + +==== tests/cases/compiler/client.ts (1 errors) ==== + import defaultBinding from "server"; + export var x = new defaultBinding(); + ~ +!!! error TS4025: Exported variable 'x' has or is using private name 'defaultBinding'. + import defaultBinding2 from "server"; // elide this import since defaultBinding2 is not used + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingDts.js new file mode 100644 index 00000000000..ad58abd8125 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingDts.js @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingDts.ts] //// + +//// [server.ts] + +class c { } +export = c; + +//// [client.ts] +import defaultBinding from "server"; +export var x = new defaultBinding(); +import defaultBinding2 from "server"; // elide this import since defaultBinding2 is not used + + +//// [server.js] +var c = (function () { + function c() { + } + return c; +})(); +module.exports = c; +//// [client.js] +var defaultBinding = require("server"); +exports.x = new defaultBinding(); + + +//// [server.d.ts] +declare class c { +} +export = c; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt index bd8714cb86f..c755b8207e7 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt @@ -48,4 +48,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport_1.ts(6,8): e ~~~~~~~~~~~~~~ !!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport_0"' has no default export or export assignment. ~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'defaultBinding'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'defaultBinding'. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js index a7402bfeb6a..d7196f86eaa 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js @@ -12,10 +12,18 @@ import defaultBinding, { a } from "es6ImportDefaultBindingFollowedWithNamedImpor import defaultBinding, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport_0"; import defaultBinding, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport_0"; import defaultBinding, { x as z, } from "es6ImportDefaultBindingFollowedWithNamedImport_0"; -import defaultBinding, { m, } from "es6ImportDefaultBindingFollowedWithNamedImport_0"; +import defaultBinding, { m, } from "es6ImportDefaultBindingFollowedWithNamedImport_0"; + //// [es6ImportDefaultBindingFollowedWithNamedImport_0.js] -exports.a = 10; -exports.x = exports.a; -exports.m = exports.a; +export var a = 10; +export var x = a; +export var m = a; //// [es6ImportDefaultBindingFollowedWithNamedImport_1.js] + + +//// [es6ImportDefaultBindingFollowedWithNamedImport_0.d.ts] +export declare var a: number; +export declare var x: number; +export declare var m: number; +//// [es6ImportDefaultBindingFollowedWithNamedImport_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.errors.txt new file mode 100644 index 00000000000..a780f7cec30 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.errors.txt @@ -0,0 +1,42 @@ +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0.ts(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(3,27): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(5,27): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(7,27): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'x'. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(7,30): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(9,27): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'x'. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts(11,27): error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'm'. + + +==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0.ts (1 errors) ==== + + var a = 10; + export = a; + ~~~~~~~~~~~ +!!! error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + +==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_1.ts (6 errors) ==== + import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + var x1: number = defaultBinding1; + import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. + var x1: number = defaultBinding2; + import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. + var x1: number = defaultBinding3; + import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'x'. + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'a'. + var x1: number = defaultBinding4; + import defaultBinding5, { x as z, } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'x'. + var x1: number = defaultBinding5; + import defaultBinding6, { m, } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1_0"' has no exported member 'm'. + var x1: number = defaultBinding6; + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js new file mode 100644 index 00000000000..3c8a4080ba7 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.js @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1.ts] //// + +//// [es6ImportDefaultBindingFollowedWithNamedImport1_0.ts] + +var a = 10; +export = a; + +//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.ts] +import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding1; +import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding2; +import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding3; +import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding4; +import defaultBinding5, { x as z, } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding5; +import defaultBinding6, { m, } from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1: number = defaultBinding6; + + +//// [es6ImportDefaultBindingFollowedWithNamedImport1_0.js] +var a = 10; +export default a; +//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.js] +import defaultBinding1 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding1; +import defaultBinding2 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding2; +import defaultBinding3 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding3; +import defaultBinding4 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding4; +import defaultBinding5 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding5; +import defaultBinding6 from "es6ImportDefaultBindingFollowedWithNamedImport1_0"; +var x1 = defaultBinding6; + + +//// [es6ImportDefaultBindingFollowedWithNamedImport1_0.d.ts] +declare var a: number; +export = a; +//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt new file mode 100644 index 00000000000..91d51d5f7ef --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt @@ -0,0 +1,61 @@ +tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(2,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(3,12): error TS4025: Exported variable 'x1' has or is using private name 'a'. +tests/cases/compiler/client.ts(4,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(5,12): error TS4025: Exported variable 'x2' has or is using private name 'b'. +tests/cases/compiler/client.ts(6,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(7,12): error TS4025: Exported variable 'x4' has or is using private name 'x'. +tests/cases/compiler/client.ts(8,12): error TS4025: Exported variable 'x5' has or is using private name 'y'. +tests/cases/compiler/client.ts(9,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(10,12): error TS4025: Exported variable 'x3' has or is using private name 'z'. +tests/cases/compiler/client.ts(11,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(12,12): error TS4025: Exported variable 'x6' has or is using private name 'm'. + + +==== tests/cases/compiler/server.ts (0 errors) ==== + + export class a { } + export class x { } + export class m { } + export class a11 { } + export class a12 { } + export class x11 { } + +==== tests/cases/compiler/client.ts (12 errors) ==== + import defaultBinding1, { } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + import defaultBinding2, { a } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x1 = new a(); + ~~ +!!! error TS4025: Exported variable 'x1' has or is using private name 'a'. + import defaultBinding3, { a11 as b } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x2 = new b(); + ~~ +!!! error TS4025: Exported variable 'x2' has or is using private name 'b'. + import defaultBinding4, { x, a12 as y } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x4 = new x(); + ~~ +!!! error TS4025: Exported variable 'x4' has or is using private name 'x'. + export var x5 = new y(); + ~~ +!!! error TS4025: Exported variable 'x5' has or is using private name 'y'. + import defaultBinding5, { x11 as z, } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x3 = new z(); + ~~ +!!! error TS4025: Exported variable 'x3' has or is using private name 'z'. + import defaultBinding6, { m, } from "server"; + ~~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x6 = new m(); + ~~ +!!! error TS4025: Exported variable 'x6' has or is using private name 'm'. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js new file mode 100644 index 00000000000..a6b2c9a1670 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.ts] //// + +//// [server.ts] + +export class a { } +export class x { } +export class m { } +export class a11 { } +export class a12 { } +export class x11 { } + +//// [client.ts] +import defaultBinding1, { } from "server"; +import defaultBinding2, { a } from "server"; +export var x1 = new a(); +import defaultBinding3, { a11 as b } from "server"; +export var x2 = new b(); +import defaultBinding4, { x, a12 as y } from "server"; +export var x4 = new x(); +export var x5 = new y(); +import defaultBinding5, { x11 as z, } from "server"; +export var x3 = new z(); +import defaultBinding6, { m, } from "server"; +export var x6 = new m(); + + +//// [server.js] +var a = (function () { + function a() { + } + return a; +})(); +exports.a = a; +var x = (function () { + function x() { + } + return x; +})(); +exports.x = x; +var m = (function () { + function m() { + } + return m; +})(); +exports.m = m; +var a11 = (function () { + function a11() { + } + return a11; +})(); +exports.a11 = a11; +var a12 = (function () { + function a12() { + } + return a12; +})(); +exports.a12 = a12; +var x11 = (function () { + function x11() { + } + return x11; +})(); +exports.x11 = x11; +//// [client.js] +var _server_1 = require("server"); +exports.x1 = new _server_1.a(); +var _server_2 = require("server"); +exports.x2 = new _server_2.a11(); +var _server_3 = require("server"); +exports.x4 = new _server_3.x(); +exports.x5 = new _server_3.a12(); +var _server_4 = require("server"); +exports.x3 = new _server_4.x11(); +var _server_5 = require("server"); +exports.x6 = new _server_5.m(); + + +//// [server.d.ts] +export declare class a { +} +export declare class x { +} +export declare class m { +} +export declare class a11 { +} +export declare class a12 { +} +export declare class x11 { +} diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt index 98371eb9198..851a5189a54 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt @@ -8,4 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1, ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts (1 errors) ==== import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export or export assignment. \ No newline at end of file +!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export or export assignment. + var x: number = nameSpaceBinding.a; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js index 5ec91279306..2b24fda0755 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js @@ -5,8 +5,16 @@ export var a = 10; //// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts] -import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; +import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; +var x: number = nameSpaceBinding.a; //// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.js] -exports.a = 10; +export var a = 10; //// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.js] +import * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; +var x = nameSpaceBinding.a; + + +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.d.ts] +export declare var a: number; +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.errors.txt new file mode 100644 index 00000000000..2a0f3ad5485 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0.ts(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + + +==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0.ts (1 errors) ==== + + var a = 10; + export = a; + ~~~~~~~~~~~ +!!! error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + +==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts (0 errors) ==== + import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; + var x: number = defaultBinding; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.js new file mode 100644 index 00000000000..927ed3243e7 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1.ts] //// + +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.ts] + +var a = 10; +export = a; + +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts] +import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; +var x: number = defaultBinding; + +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.js] +var a = 10; +export default a; +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.js] +import defaultBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; +var x = defaultBinding; + + +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.d.ts] +declare var a: number; +export = a; +//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js new file mode 100644 index 00000000000..00166b1bc41 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.ts] //// + +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.ts] + +var a = 10; +export = a; + +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts] +import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"; +var x: number = defaultBinding; + +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.js] +var a = 10; +module.exports = a; +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.js] +var defaultBinding = require("es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"); +var x = defaultBinding; + + +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.d.ts] +declare var a: number; +export = a; +//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.d.ts] diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.types b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.types new file mode 100644 index 00000000000..dfbc8c0be07 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.ts === + +var a = 10; +>a : number + +export = a; +>a : number + +=== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts === +import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"; +>defaultBinding : number +>nameSpaceBinding : typeof nameSpaceBinding + +var x: number = defaultBinding; +>x : number +>defaultBinding : number + diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt new file mode 100644 index 00000000000..b82fb1155e9 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. +tests/cases/compiler/client.ts(2,12): error TS4025: Exported variable 'x' has or is using private name 'nameSpaceBinding.a'. + + +==== tests/cases/compiler/server.ts (0 errors) ==== + + export class a { } + +==== tests/cases/compiler/client.ts (2 errors) ==== + import defaultBinding, * as nameSpaceBinding from "server"; + ~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export or export assignment. + export var x = new nameSpaceBinding.a(); + ~ +!!! error TS4025: Exported variable 'x' has or is using private name 'nameSpaceBinding.a'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js new file mode 100644 index 00000000000..3068fb6d39d --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.ts] //// + +//// [server.ts] + +export class a { } + +//// [client.ts] +import defaultBinding, * as nameSpaceBinding from "server"; +export var x = new nameSpaceBinding.a(); + +//// [server.js] +var a = (function () { + function a() { + } + return a; +})(); +exports.a = a; +//// [client.js] +var nameSpaceBinding = require("server"); +exports.x = new nameSpaceBinding.a(); + + +//// [server.d.ts] +export declare class a { +} diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.errors.txt new file mode 100644 index 00000000000..3b09108bbfc --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/client.ts(2,12): error TS4025: Exported variable 'x' has or is using private name 'defaultBinding'. + + +==== tests/cases/compiler/server.ts (0 errors) ==== + + class a { } + export = a; + +==== tests/cases/compiler/client.ts (1 errors) ==== + import defaultBinding, * as nameSpaceBinding from "server"; + export var x = new defaultBinding(); + ~ +!!! error TS4025: Exported variable 'x' has or is using private name 'defaultBinding'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js new file mode 100644 index 00000000000..708cffca29d --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.js @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.ts] //// + +//// [server.ts] + +class a { } +export = a; + +//// [client.ts] +import defaultBinding, * as nameSpaceBinding from "server"; +export var x = new defaultBinding(); + +//// [server.js] +define(["require", "exports"], function (require, exports) { + var a = (function () { + function a() { + } + return a; + })(); + return a; +}); +//// [client.js] +define(["require", "exports", "server"], function (require, exports, defaultBinding) { + exports.x = new defaultBinding(); +}); + + +//// [server.d.ts] +declare class a { +} +export = a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt new file mode 100644 index 00000000000..d6aacf0ba40 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt @@ -0,0 +1,26 @@ +tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(5,8): error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2' +tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(7,8): error TS2300: Duplicate identifier 'defaultBinding3'. +tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(8,8): error TS2300: Duplicate identifier 'defaultBinding3'. + + +==== tests/cases/compiler/es6ImportDefaultBindingMergeErrors_0.ts (0 errors) ==== + + var a = 10; + export = a; + +==== tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts (3 errors) ==== + import defaultBinding from "es6ImportDefaultBindingMergeErrors_0"; + interface defaultBinding { // This is ok + } + var x = defaultBinding; + import defaultBinding2 from "es6ImportDefaultBindingMergeErrors_0"; // Should be error + ~~~~~~~~~~~~~~~ +!!! error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2' + var defaultBinding2 = "hello world"; + import defaultBinding3 from "es6ImportDefaultBindingMergeErrors_0"; // Should be error + ~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'defaultBinding3'. + import defaultBinding3 from "es6ImportDefaultBindingMergeErrors_0"; // SHould be error + ~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'defaultBinding3'. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js new file mode 100644 index 00000000000..628faec6c27 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingMergeErrors.ts] //// + +//// [es6ImportDefaultBindingMergeErrors_0.ts] + +var a = 10; +export = a; + +//// [es6ImportDefaultBindingMergeErrors_1.ts] +import defaultBinding from "es6ImportDefaultBindingMergeErrors_0"; +interface defaultBinding { // This is ok +} +var x = defaultBinding; +import defaultBinding2 from "es6ImportDefaultBindingMergeErrors_0"; // Should be error +var defaultBinding2 = "hello world"; +import defaultBinding3 from "es6ImportDefaultBindingMergeErrors_0"; // Should be error +import defaultBinding3 from "es6ImportDefaultBindingMergeErrors_0"; // SHould be error + + +//// [es6ImportDefaultBindingMergeErrors_0.js] +var a = 10; +module.exports = a; +//// [es6ImportDefaultBindingMergeErrors_1.js] +var defaultBinding = require("es6ImportDefaultBindingMergeErrors_0"); +var x = defaultBinding; +var defaultBinding2 = "hello world"; diff --git a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt new file mode 100644 index 00000000000..a6aaf9f5508 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export or export assignment. + + +==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0.ts (0 errors) ==== + + export var a = 10; + +==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts (1 errors) ==== + import defaultBinding from "es6ImportDefaultBindingNoDefaultProperty_0"; + ~~~~~~~~~~~~~~ +!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export or export assignment. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js new file mode 100644 index 00000000000..f824dbf71d5 --- /dev/null +++ b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty.ts] //// + +//// [es6ImportDefaultBindingNoDefaultProperty_0.ts] + +export var a = 10; + +//// [es6ImportDefaultBindingNoDefaultProperty_1.ts] +import defaultBinding from "es6ImportDefaultBindingNoDefaultProperty_0"; + + +//// [es6ImportDefaultBindingNoDefaultProperty_0.js] +exports.a = 10; +//// [es6ImportDefaultBindingNoDefaultProperty_1.js] diff --git a/tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt b/tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt new file mode 100644 index 00000000000..d3351ee97b2 --- /dev/null +++ b/tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/client.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. +tests/cases/compiler/server.ts(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + + +==== tests/cases/compiler/client.ts (1 errors) ==== + import a = require("server"); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. +==== tests/cases/compiler/server.ts (1 errors) ==== + + var a = 10; + export = a; + ~~~~~~~~~~~ +!!! error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportEqualsDeclaration.js b/tests/baselines/reference/es6ImportEqualsDeclaration.js new file mode 100644 index 00000000000..b8e9777a894 --- /dev/null +++ b/tests/baselines/reference/es6ImportEqualsDeclaration.js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/es6ImportEqualsDeclaration.ts] //// + +//// [server.ts] + +var a = 10; +export = a; + +//// [client.ts] +import a = require("server"); + +//// [server.js] +var a = 10; +export default a; +//// [client.js] diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.js b/tests/baselines/reference/es6ImportNameSpaceImport.js index c6daa3b1222..4f03e9a0ae2 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImport.js @@ -5,8 +5,14 @@ export var a = 10; //// [es6ImportNameSpaceImport_1.ts] -import * as nameSpaceBinding from "es6ImportNameSpaceImport_0"; +import * as nameSpaceBinding from "es6ImportNameSpaceImport_0"; + //// [es6ImportNameSpaceImport_0.js] -exports.a = 10; +export var a = 10; //// [es6ImportNameSpaceImport_1.js] + + +//// [es6ImportNameSpaceImport_0.d.ts] +export declare var a: number; +//// [es6ImportNameSpaceImport_1.d.ts] diff --git a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt new file mode 100644 index 00000000000..98a68870833 --- /dev/null +++ b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(4,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'. +tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(5,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'. +tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3' + + +==== tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_0.ts (0 errors) ==== + + export var a = 10; + +==== tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts (3 errors) ==== + import * as nameSpaceBinding from "es6ImportNameSpaceImportMergeErrors_0"; + interface nameSpaceBinding { } // this should be ok + + import * as nameSpaceBinding1 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error + ~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'nameSpaceBinding1'. + import * as nameSpaceBinding1 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error + ~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'nameSpaceBinding1'. + + import * as nameSpaceBinding3 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3' + var nameSpaceBinding3 = 10; + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js new file mode 100644 index 00000000000..3c8461fba2b --- /dev/null +++ b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/es6ImportNameSpaceImportMergeErrors.ts] //// + +//// [es6ImportNameSpaceImportMergeErrors_0.ts] + +export var a = 10; + +//// [es6ImportNameSpaceImportMergeErrors_1.ts] +import * as nameSpaceBinding from "es6ImportNameSpaceImportMergeErrors_0"; +interface nameSpaceBinding { } // this should be ok + +import * as nameSpaceBinding1 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error +import * as nameSpaceBinding1 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error + +import * as nameSpaceBinding3 from "es6ImportNameSpaceImportMergeErrors_0"; // should be error +var nameSpaceBinding3 = 10; + + +//// [es6ImportNameSpaceImportMergeErrors_0.js] +exports.a = 10; +//// [es6ImportNameSpaceImportMergeErrors_1.js] +var nameSpaceBinding3 = 10; diff --git a/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js new file mode 100644 index 00000000000..3d6dab17785 --- /dev/null +++ b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/es6ImportNameSpaceImportNoNamedExports.ts] //// + +//// [es6ImportNameSpaceImportNoNamedExports_0.ts] + +var a = 10; +export = a; + +//// [es6ImportNameSpaceImportNoNamedExports_1.ts] +import * as nameSpaceBinding from "es6ImportNameSpaceImportNoNamedExports_0"; // error + +//// [es6ImportNameSpaceImportNoNamedExports_0.js] +var a = 10; +module.exports = a; +//// [es6ImportNameSpaceImportNoNamedExports_1.js] diff --git a/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.types b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.types new file mode 100644 index 00000000000..3ba19cef9b4 --- /dev/null +++ b/tests/baselines/reference/es6ImportNameSpaceImportNoNamedExports.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/es6ImportNameSpaceImportNoNamedExports_0.ts === + +var a = 10; +>a : number + +export = a; +>a : number + +=== tests/cases/compiler/es6ImportNameSpaceImportNoNamedExports_1.ts === +import * as nameSpaceBinding from "es6ImportNameSpaceImportNoNamedExports_0"; // error +>nameSpaceBinding : typeof nameSpaceBinding + diff --git a/tests/baselines/reference/es6ImportNamedImport.js b/tests/baselines/reference/es6ImportNamedImport.js index c52499ef994..7993af7fb07 100644 --- a/tests/baselines/reference/es6ImportNamedImport.js +++ b/tests/baselines/reference/es6ImportNamedImport.js @@ -16,12 +16,22 @@ import { x, a as y } from "es6ImportNamedImport_0"; import { x as z, } from "es6ImportNamedImport_0"; import { m, } from "es6ImportNamedImport_0"; import { a1, x1 } from "es6ImportNamedImport_0"; -import { a1 as a11, x1 as x11 } from "es6ImportNamedImport_0"; +import { a1 as a11, x1 as x11 } from "es6ImportNamedImport_0"; + //// [es6ImportNamedImport_0.js] -exports.a = 10; -exports.x = exports.a; -exports.m = exports.a; -exports.a1 = 10; -exports.x1 = 10; +export var a = 10; +export var x = a; +export var m = a; +export var a1 = 10; +export var x1 = 10; //// [es6ImportNamedImport_1.js] + + +//// [es6ImportNamedImport_0.d.ts] +export declare var a: number; +export declare var x: number; +export declare var m: number; +export declare var a1: number; +export declare var x1: number; +//// [es6ImportNamedImport_1.d.ts] diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js new file mode 100644 index 00000000000..cd2d5ef6922 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/es6ImportNamedImportInExportAssignment.ts] //// + +//// [es6ImportNamedImportInExportAssignment_0.ts] + +export var a = 10; + +//// [es6ImportNamedImportInExportAssignment_1.ts] +import { a } from "es6ImportNamedImportInExportAssignment_0"; +export = a; + +//// [es6ImportNamedImportInExportAssignment_0.js] +exports.a = 10; +//// [es6ImportNamedImportInExportAssignment_1.js] +var _es6ImportNamedImportInExportAssignment_0 = require("es6ImportNamedImportInExportAssignment_0"); +module.exports = _es6ImportNamedImportInExportAssignment_0.a; + + +//// [es6ImportNamedImportInExportAssignment_0.d.ts] +export declare var a: number; +//// [es6ImportNamedImportInExportAssignment_1.d.ts] +export = a; + + +//// [DtsFileErrors] + + +tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.d.ts(1,10): error TS2304: Cannot find name 'a'. + + +==== tests/cases/compiler/es6ImportNamedImportInExportAssignment_0.d.ts (0 errors) ==== + export declare var a: number; + +==== tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.d.ts (1 errors) ==== + export = a; + ~ +!!! error TS2304: Cannot find name 'a'. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.types b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.types new file mode 100644 index 00000000000..cd72f35c8bf --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/es6ImportNamedImportInExportAssignment_0.ts === + +export var a = 10; +>a : number + +=== tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.ts === +import { a } from "es6ImportNamedImportInExportAssignment_0"; +>a : number + +export = a; +>a : number + diff --git a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.errors.txt b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.errors.txt new file mode 100644 index 00000000000..e896a1a88a1 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment_1.ts(2,12): error TS4000: Import declaration 'x' is using private name 'a'. + + +==== tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment_0.ts (0 errors) ==== + + export module a { + export class c { + } + } + +==== tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment_1.ts (1 errors) ==== + import { a } from "es6ImportNamedImportInIndirectExportAssignment_0"; + import x = a; + ~ +!!! error TS4000: Import declaration 'x' is using private name 'a'. + export = x; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js new file mode 100644 index 00000000000..332be6074ad --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts] //// + +//// [es6ImportNamedImportInIndirectExportAssignment_0.ts] + +export module a { + export class c { + } +} + +//// [es6ImportNamedImportInIndirectExportAssignment_1.ts] +import { a } from "es6ImportNamedImportInIndirectExportAssignment_0"; +import x = a; +export = x; + +//// [es6ImportNamedImportInIndirectExportAssignment_0.js] +var a; +(function (a) { + var c = (function () { + function c() { + } + return c; + })(); + a.c = c; +})(a = exports.a || (exports.a = {})); +//// [es6ImportNamedImportInIndirectExportAssignment_1.js] +var _es6ImportNamedImportInIndirectExportAssignment_0 = require("es6ImportNamedImportInIndirectExportAssignment_0"); +var x = _es6ImportNamedImportInIndirectExportAssignment_0.a; +module.exports = x; + + +//// [es6ImportNamedImportInIndirectExportAssignment_0.d.ts] +export declare module a { + class c { + } +} diff --git a/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt b/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt new file mode 100644 index 00000000000..b9461b6caca --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt @@ -0,0 +1,33 @@ +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'x' +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(7,10): error TS2440: Import declaration conflicts with local declaration of 'x44' +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(9,10): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(10,16): error TS2300: Duplicate identifier 'z'. + + +==== tests/cases/compiler/es6ImportNamedImportMergeErrors_0.ts (0 errors) ==== + + export var a = 10; + export var x = a; + export var z = a; + export var z1 = a; + +==== tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts (4 errors) ==== + import { a } from "es6ImportNamedImportMergeErrors_0"; + interface a { } // shouldnt be error + import { x as x1 } from "es6ImportNamedImportMergeErrors_0"; + interface x1 { } // shouldnt be error + import { x } from "es6ImportNamedImportMergeErrors_0"; // should be error + ~ +!!! error TS2440: Import declaration conflicts with local declaration of 'x' + var x = 10; + import { x as x44 } from "es6ImportNamedImportMergeErrors_0"; // should be error + ~~~~~~~~ +!!! error TS2440: Import declaration conflicts with local declaration of 'x44' + var x44 = 10; + import { z } from "es6ImportNamedImportMergeErrors_0"; // should be error + ~ +!!! error TS2300: Duplicate identifier 'z'. + import { z1 as z } from "es6ImportNamedImportMergeErrors_0"; // should be error + ~ +!!! error TS2300: Duplicate identifier 'z'. + \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportMergeErrors.js b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js new file mode 100644 index 00000000000..fad411f557d --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/es6ImportNamedImportMergeErrors.ts] //// + +//// [es6ImportNamedImportMergeErrors_0.ts] + +export var a = 10; +export var x = a; +export var z = a; +export var z1 = a; + +//// [es6ImportNamedImportMergeErrors_1.ts] +import { a } from "es6ImportNamedImportMergeErrors_0"; +interface a { } // shouldnt be error +import { x as x1 } from "es6ImportNamedImportMergeErrors_0"; +interface x1 { } // shouldnt be error +import { x } from "es6ImportNamedImportMergeErrors_0"; // should be error +var x = 10; +import { x as x44 } from "es6ImportNamedImportMergeErrors_0"; // should be error +var x44 = 10; +import { z } from "es6ImportNamedImportMergeErrors_0"; // should be error +import { z1 as z } from "es6ImportNamedImportMergeErrors_0"; // should be error + + +//// [es6ImportNamedImportMergeErrors_0.js] +exports.a = 10; +exports.x = exports.a; +exports.z = exports.a; +exports.z1 = exports.a; +//// [es6ImportNamedImportMergeErrors_1.js] +var x = 10; +var x44 = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportNoExportMember.errors.txt b/tests/baselines/reference/es6ImportNamedImportNoExportMember.errors.txt new file mode 100644 index 00000000000..57a77410cb2 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportNoExportMember.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/es6ImportNamedImport_1.ts(1,10): error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoExportMember_0"' has no exported member 'a1'. +tests/cases/compiler/es6ImportNamedImport_1.ts(2,10): error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoExportMember_0"' has no exported member 'x1'. + + +==== tests/cases/compiler/es6ImportNamedImportNoExportMember_0.ts (0 errors) ==== + + export var a = 10; + export var x = a; + +==== tests/cases/compiler/es6ImportNamedImport_1.ts (2 errors) ==== + import { a1 } from "es6ImportNamedImportNoExportMember_0"; + ~~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoExportMember_0"' has no exported member 'a1'. + import { x1 as x } from "es6ImportNamedImportNoExportMember_0"; + ~~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoExportMember_0"' has no exported member 'x1'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportNoExportMember.js b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js new file mode 100644 index 00000000000..da473fa42a3 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/es6ImportNamedImportNoExportMember.ts] //// + +//// [es6ImportNamedImportNoExportMember_0.ts] + +export var a = 10; +export var x = a; + +//// [es6ImportNamedImport_1.ts] +import { a1 } from "es6ImportNamedImportNoExportMember_0"; +import { x1 as x } from "es6ImportNamedImportNoExportMember_0"; + +//// [es6ImportNamedImportNoExportMember_0.js] +exports.a = 10; +exports.x = exports.a; +//// [es6ImportNamedImport_1.js] diff --git a/tests/baselines/reference/es6ImportNamedImportNoNamedExports.errors.txt b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.errors.txt new file mode 100644 index 00000000000..a5abd986ee8 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(1,10): error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoNamedExports_0"' has no exported member 'a'. +tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(2,10): error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoNamedExports_0"' has no exported member 'a'. + + +==== tests/cases/compiler/es6ImportNamedImportNoNamedExports_0.ts (0 errors) ==== + + var a = 10; + export = a; + +==== tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts (2 errors) ==== + import { a } from "es6ImportNamedImportNoNamedExports_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoNamedExports_0"' has no exported member 'a'. + import { a as x } from "es6ImportNamedImportNoNamedExports_0"; + ~ +!!! error TS2305: Module '"tests/cases/compiler/es6ImportNamedImportNoNamedExports_0"' has no exported member 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js new file mode 100644 index 00000000000..524860827e6 --- /dev/null +++ b/tests/baselines/reference/es6ImportNamedImportNoNamedExports.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/es6ImportNamedImportNoNamedExports.ts] //// + +//// [es6ImportNamedImportNoNamedExports_0.ts] + +var a = 10; +export = a; + +//// [es6ImportNamedImportNoNamedExports_1.ts] +import { a } from "es6ImportNamedImportNoNamedExports_0"; +import { a as x } from "es6ImportNamedImportNoNamedExports_0"; + +//// [es6ImportNamedImportNoNamedExports_0.js] +var a = 10; +module.exports = a; +//// [es6ImportNamedImportNoNamedExports_1.js] diff --git a/tests/baselines/reference/es6ImportNamedImportParsingError.js b/tests/baselines/reference/es6ImportNamedImportParsingError.js index f9d8e90f707..81f141b3dd8 100644 --- a/tests/baselines/reference/es6ImportNamedImportParsingError.js +++ b/tests/baselines/reference/es6ImportNamedImportParsingError.js @@ -13,16 +13,16 @@ import , { a } from "es6ImportNamedImportParsingError_0"; import { a }, from "es6ImportNamedImportParsingError_0"; //// [es6ImportNamedImportParsingError_0.js] -exports.a = 10; -exports.x = exports.a; -exports.m = exports.a; +export var a = 10; +export var x = a; +export var m = a; //// [es6ImportNamedImportParsingError_1.js] from; "es6ImportNamedImportParsingError_0"; { - _module_1.a; + a; } from; "es6ImportNamedImportParsingError_0"; -var _module_1 = require(); +import { a } from , from; "es6ImportNamedImportParsingError_0"; diff --git a/tests/baselines/reference/es6ImportWithoutFromClause.js b/tests/baselines/reference/es6ImportWithoutFromClause.js index 43d21885c27..9666409b924 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClause.js +++ b/tests/baselines/reference/es6ImportWithoutFromClause.js @@ -5,9 +5,15 @@ export var a = 10; //// [es6ImportWithoutFromClause_1.ts] -import "es6ImportWithoutFromClause_0"; +import "es6ImportWithoutFromClause_0"; + //// [es6ImportWithoutFromClause_0.js] -exports.a = 10; +export var a = 10; //// [es6ImportWithoutFromClause_1.js] -require("es6ImportWithoutFromClause_0"); +import "es6ImportWithoutFromClause_0"; + + +//// [es6ImportWithoutFromClause_0.d.ts] +export declare var a: number; +//// [es6ImportWithoutFromClause_1.d.ts] diff --git a/tests/baselines/reference/es6ImportWithoutFromClause.types b/tests/baselines/reference/es6ImportWithoutFromClause.types index 1cd7df9962e..3cc5067891a 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClause.types +++ b/tests/baselines/reference/es6ImportWithoutFromClause.types @@ -5,4 +5,5 @@ export var a = 10; === tests/cases/compiler/es6ImportWithoutFromClause_1.ts === import "es6ImportWithoutFromClause_0"; +No type information for this code. No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.js b/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.js new file mode 100644 index 00000000000..e63dd4bb53a --- /dev/null +++ b/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.js @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule.ts] //// + +//// [es6ImportWithoutFromClauseNonInstantiatedModule_0.ts] + +export interface i { +} + +//// [es6ImportWithoutFromClauseNonInstantiatedModule_1.ts] +import "es6ImportWithoutFromClauseNonInstantiatedModule_0"; + +//// [es6ImportWithoutFromClauseNonInstantiatedModule_0.js] +//// [es6ImportWithoutFromClauseNonInstantiatedModule_1.js] +import "es6ImportWithoutFromClauseNonInstantiatedModule_0"; + + +//// [es6ImportWithoutFromClauseNonInstantiatedModule_0.d.ts] +export interface i { +} +//// [es6ImportWithoutFromClauseNonInstantiatedModule_1.d.ts] diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.types b/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.types new file mode 100644 index 00000000000..2be3f67f1e9 --- /dev/null +++ b/tests/baselines/reference/es6ImportWithoutFromClauseNonInstantiatedModule.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule_0.ts === + +export interface i { +>i : i +} + +=== tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule_1.ts === +import "es6ImportWithoutFromClauseNonInstantiatedModule_0"; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/es6MemberScoping.js b/tests/baselines/reference/es6MemberScoping.js index 7e70045ceb3..85f76a93934 100644 --- a/tests/baselines/reference/es6MemberScoping.js +++ b/tests/baselines/reference/es6MemberScoping.js @@ -30,6 +30,8 @@ var Foo = (function () { var Foo2 = (function () { function Foo2() { } - Foo2.Foo2 = function () { return 0; }; // should not be an error + Foo2.Foo2 = function () { + return 0; + }; // should not be an error return Foo2; })(); diff --git a/tests/baselines/reference/es6Module.js b/tests/baselines/reference/es6Module.js new file mode 100644 index 00000000000..d3141572c92 --- /dev/null +++ b/tests/baselines/reference/es6Module.js @@ -0,0 +1,21 @@ +//// [es6Module.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es6Module.js] +export class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/es6-amd.types b/tests/baselines/reference/es6Module.types similarity index 60% rename from tests/baselines/reference/es6-amd.types rename to tests/baselines/reference/es6Module.types index 62815911f7f..93910200215 100644 --- a/tests/baselines/reference/es6-amd.types +++ b/tests/baselines/reference/es6Module.types @@ -1,11 +1,9 @@ -=== tests/cases/compiler/es6-amd.ts === - -class A +=== tests/cases/compiler/es6Module.ts === +export class A >A : A { constructor () { - } public B() diff --git a/tests/baselines/reference/es6ModuleClassDeclaration.js b/tests/baselines/reference/es6ModuleClassDeclaration.js new file mode 100644 index 00000000000..9676720fd0f --- /dev/null +++ b/tests/baselines/reference/es6ModuleClassDeclaration.js @@ -0,0 +1,231 @@ +//// [es6ModuleClassDeclaration.ts] +export class c { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } +} +class c2 { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } +} +new c(); +new c2(); + +export module m1 { + export class c3 { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } + } + class c4 { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } + } + new c(); + new c2(); + new c3(); + new c4(); +} +module m2 { + export class c3 { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } + } + class c4 { + constructor() { + } + private x = 10; + public y = 30; + static k = 20; + private static l = 30; + private method1() { + } + public method2() { + } + static method3() { + } + private static method4() { + } + } + new c(); + new c2(); + new c3(); + new c4(); + new m1.c3(); +} + +//// [es6ModuleClassDeclaration.js] +export class c { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } +} +c.k = 20; +c.l = 30; +class c2 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } +} +c2.k = 20; +c2.l = 30; +new c(); +new c2(); +var m1; +(function (m1) { + class c3 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c3.k = 20; + c3.l = 30; + m1.c3 = c3; + class c4 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c4.k = 20; + c4.l = 30; + new c(); + new c2(); + new c3(); + new c4(); +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + class c3 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c3.k = 20; + c3.l = 30; + m2.c3 = c3; + class c4 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c4.k = 20; + c4.l = 30; + new c(); + new c2(); + new c3(); + new c4(); + new m1.c3(); +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleClassDeclaration.types b/tests/baselines/reference/es6ModuleClassDeclaration.types new file mode 100644 index 00000000000..09d50c4e542 --- /dev/null +++ b/tests/baselines/reference/es6ModuleClassDeclaration.types @@ -0,0 +1,233 @@ +=== tests/cases/compiler/es6ModuleClassDeclaration.ts === +export class c { +>c : c + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } +} +class c2 { +>c2 : c2 + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } +} +new c(); +>new c() : c +>c : typeof c + +new c2(); +>new c2() : c2 +>c2 : typeof c2 + +export module m1 { +>m1 : typeof m1 + + export class c3 { +>c3 : c3 + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } + } + class c4 { +>c4 : c4 + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } + } + new c(); +>new c() : c +>c : typeof c + + new c2(); +>new c2() : c2 +>c2 : typeof c2 + + new c3(); +>new c3() : c3 +>c3 : typeof c3 + + new c4(); +>new c4() : c4 +>c4 : typeof c4 +} +module m2 { +>m2 : typeof m2 + + export class c3 { +>c3 : c3 + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } + } + class c4 { +>c4 : c4 + + constructor() { + } + private x = 10; +>x : number + + public y = 30; +>y : number + + static k = 20; +>k : number + + private static l = 30; +>l : number + + private method1() { +>method1 : () => void + } + public method2() { +>method2 : () => void + } + static method3() { +>method3 : () => void + } + private static method4() { +>method4 : () => void + } + } + new c(); +>new c() : c +>c : typeof c + + new c2(); +>new c2() : c2 +>c2 : typeof c2 + + new c3(); +>new c3() : c3 +>c3 : typeof c3 + + new c4(); +>new c4() : c4 +>c4 : typeof c4 + + new m1.c3(); +>new m1.c3() : m1.c3 +>m1.c3 : typeof m1.c3 +>m1 : typeof m1 +>c3 : typeof m1.c3 +} diff --git a/tests/baselines/reference/es6ModuleConst.js b/tests/baselines/reference/es6ModuleConst.js new file mode 100644 index 00000000000..2a11ec638a1 --- /dev/null +++ b/tests/baselines/reference/es6ModuleConst.js @@ -0,0 +1,38 @@ +//// [es6ModuleConst.ts] +export const a = "hello"; +export const x: string = a, y = x; +const b = y; +const c: string = b, d = c; +export module m1 { + export const k = a; + export const l: string = b, m = k; + const n = m1.k; + const o: string = n, p = k; +} +module m2 { + export const k = a; + export const l: string = b, m = k; + const n = m1.k; + const o: string = n, p = k; +} + +//// [es6ModuleConst.js] +export const a = "hello"; +export const x = a, y = x; +const b = y; +const c = b, d = c; +var m1; +(function (m1) { + m1.k = a; + m1.l = b, m1.m = m1.k; + const n = m1.k; + const o = n, p = m1.k; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + m2.k = a; + m2.l = b, m2.m = m2.k; + const n = m1.k; + const o = n, p = m2.k; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleConst.types b/tests/baselines/reference/es6ModuleConst.types new file mode 100644 index 00000000000..cceb74a5e1e --- /dev/null +++ b/tests/baselines/reference/es6ModuleConst.types @@ -0,0 +1,70 @@ +=== tests/cases/compiler/es6ModuleConst.ts === +export const a = "hello"; +>a : string + +export const x: string = a, y = x; +>x : string +>a : string +>y : string +>x : string + +const b = y; +>b : string +>y : string + +const c: string = b, d = c; +>c : string +>b : string +>d : string +>c : string + +export module m1 { +>m1 : typeof m1 + + export const k = a; +>k : string +>a : string + + export const l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + const n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + const o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} +module m2 { +>m2 : typeof m2 + + export const k = a; +>k : string +>a : string + + export const l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + const n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + const o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration.js b/tests/baselines/reference/es6ModuleConstEnumDeclaration.js new file mode 100644 index 00000000000..c8096c76c8e --- /dev/null +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration.js @@ -0,0 +1,66 @@ +//// [es6ModuleConstEnumDeclaration.ts] +export const enum e1 { + a, + b, + c +} +const enum e2 { + x, + y, + z +} +var x = e1.a; +var y = e2.x; +export module m1 { + export const enum e3 { + a, + b, + c + } + const enum e4 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e3.a; + var y2 = e4.x; +} +module m2 { + export const enum e5 { + a, + b, + c + } + const enum e6 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e5.a; + var y2 = e6.x; + var x3 = m1.e3.a; +} + +//// [es6ModuleConstEnumDeclaration.js] +var x = 0 /* a */; +var y = 0 /* x */; +var m1; +(function (m1) { + var x1 = 0 /* a */; + var y1 = 0 /* x */; + var x2 = 0 /* a */; + var y2 = 0 /* x */; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + var x1 = 0 /* a */; + var y1 = 0 /* x */; + var x2 = 0 /* a */; + var y2 = 0 /* x */; + var x3 = 0 /* a */; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration.types b/tests/baselines/reference/es6ModuleConstEnumDeclaration.types new file mode 100644 index 00000000000..fae819f93b0 --- /dev/null +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration.types @@ -0,0 +1,147 @@ +=== tests/cases/compiler/es6ModuleConstEnumDeclaration.ts === +export const enum e1 { +>e1 : e1 + + a, +>a : e1 + + b, +>b : e1 + + c +>c : e1 +} +const enum e2 { +>e2 : e2 + + x, +>x : e2 + + y, +>y : e2 + + z +>z : e2 +} +var x = e1.a; +>x : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + +var y = e2.x; +>y : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + +export module m1 { +>m1 : typeof m1 + + export const enum e3 { +>e3 : e3 + + a, +>a : e3 + + b, +>b : e3 + + c +>c : e3 + } + const enum e4 { +>e4 : e4 + + x, +>x : e4 + + y, +>y : e4 + + z +>z : e4 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e3.a; +>x2 : e3 +>e3.a : e3 +>e3 : typeof e3 +>a : e3 + + var y2 = e4.x; +>y2 : e4 +>e4.x : e4 +>e4 : typeof e4 +>x : e4 +} +module m2 { +>m2 : typeof m2 + + export const enum e5 { +>e5 : e5 + + a, +>a : e5 + + b, +>b : e5 + + c +>c : e5 + } + const enum e6 { +>e6 : e6 + + x, +>x : e6 + + y, +>y : e6 + + z +>z : e6 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e5.a; +>x2 : e5 +>e5.a : e5 +>e5 : typeof e5 +>a : e5 + + var y2 = e6.x; +>y2 : e6 +>e6.x : e6 +>e6 : typeof e6 +>x : e6 + + var x3 = m1.e3.a; +>x3 : m1.e3 +>m1.e3.a : m1.e3 +>m1.e3 : typeof m1.e3 +>m1 : typeof m1 +>e3 : typeof m1.e3 +>a : m1.e3 +} diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js new file mode 100644 index 00000000000..5ec953aca88 --- /dev/null +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js @@ -0,0 +1,104 @@ +//// [es6ModuleConstEnumDeclaration2.ts] + +export const enum e1 { + a, + b, + c +} +const enum e2 { + x, + y, + z +} +var x = e1.a; +var y = e2.x; +export module m1 { + export const enum e3 { + a, + b, + c + } + const enum e4 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e3.a; + var y2 = e4.x; +} +module m2 { + export const enum e5 { + a, + b, + c + } + const enum e6 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e5.a; + var y2 = e6.x; + var x3 = m1.e3.a; +} + +//// [es6ModuleConstEnumDeclaration2.js] +var e1; +(function (e1) { + e1[e1["a"] = 0] = "a"; + e1[e1["b"] = 1] = "b"; + e1[e1["c"] = 2] = "c"; +})(e1 || (e1 = {})); +export { e1 }; +var e2; +(function (e2) { + e2[e2["x"] = 0] = "x"; + e2[e2["y"] = 1] = "y"; + e2[e2["z"] = 2] = "z"; +})(e2 || (e2 = {})); +var x = 0 /* a */; +var y = 0 /* x */; +var m1; +(function (m1) { + (function (e3) { + e3[e3["a"] = 0] = "a"; + e3[e3["b"] = 1] = "b"; + e3[e3["c"] = 2] = "c"; + })(m1.e3 || (m1.e3 = {})); + var e3 = m1.e3; + var e4; + (function (e4) { + e4[e4["x"] = 0] = "x"; + e4[e4["y"] = 1] = "y"; + e4[e4["z"] = 2] = "z"; + })(e4 || (e4 = {})); + var x1 = 0 /* a */; + var y1 = 0 /* x */; + var x2 = 0 /* a */; + var y2 = 0 /* x */; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + (function (e5) { + e5[e5["a"] = 0] = "a"; + e5[e5["b"] = 1] = "b"; + e5[e5["c"] = 2] = "c"; + })(m2.e5 || (m2.e5 = {})); + var e5 = m2.e5; + var e6; + (function (e6) { + e6[e6["x"] = 0] = "x"; + e6[e6["y"] = 1] = "y"; + e6[e6["z"] = 2] = "z"; + })(e6 || (e6 = {})); + var x1 = 0 /* a */; + var y1 = 0 /* x */; + var x2 = 0 /* a */; + var y2 = 0 /* x */; + var x3 = 0 /* a */; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.types b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.types new file mode 100644 index 00000000000..c43a938c9b6 --- /dev/null +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.types @@ -0,0 +1,148 @@ +=== tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts === + +export const enum e1 { +>e1 : e1 + + a, +>a : e1 + + b, +>b : e1 + + c +>c : e1 +} +const enum e2 { +>e2 : e2 + + x, +>x : e2 + + y, +>y : e2 + + z +>z : e2 +} +var x = e1.a; +>x : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + +var y = e2.x; +>y : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + +export module m1 { +>m1 : typeof m1 + + export const enum e3 { +>e3 : e3 + + a, +>a : e3 + + b, +>b : e3 + + c +>c : e3 + } + const enum e4 { +>e4 : e4 + + x, +>x : e4 + + y, +>y : e4 + + z +>z : e4 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e3.a; +>x2 : e3 +>e3.a : e3 +>e3 : typeof e3 +>a : e3 + + var y2 = e4.x; +>y2 : e4 +>e4.x : e4 +>e4 : typeof e4 +>x : e4 +} +module m2 { +>m2 : typeof m2 + + export const enum e5 { +>e5 : e5 + + a, +>a : e5 + + b, +>b : e5 + + c +>c : e5 + } + const enum e6 { +>e6 : e6 + + x, +>x : e6 + + y, +>y : e6 + + z +>z : e6 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e5.a; +>x2 : e5 +>e5.a : e5 +>e5 : typeof e5 +>a : e5 + + var y2 = e6.x; +>y2 : e6 +>e6.x : e6 +>e6 : typeof e6 +>x : e6 + + var x3 = m1.e3.a; +>x3 : m1.e3 +>m1.e3.a : m1.e3 +>m1.e3 : typeof m1.e3 +>m1 : typeof m1 +>e3 : typeof m1.e3 +>a : m1.e3 +} diff --git a/tests/baselines/reference/es6ModuleEnumDeclaration.js b/tests/baselines/reference/es6ModuleEnumDeclaration.js new file mode 100644 index 00000000000..08792149818 --- /dev/null +++ b/tests/baselines/reference/es6ModuleEnumDeclaration.js @@ -0,0 +1,103 @@ +//// [es6ModuleEnumDeclaration.ts] +export enum e1 { + a, + b, + c +} +enum e2 { + x, + y, + z +} +var x = e1.a; +var y = e2.x; +export module m1 { + export enum e3 { + a, + b, + c + } + enum e4 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e3.a; + var y2 = e4.x; +} +module m2 { + export enum e5 { + a, + b, + c + } + enum e6 { + x, + y, + z + } + var x1 = e1.a; + var y1 = e2.x; + var x2 = e5.a; + var y2 = e6.x; + var x3 = m1.e3.a; +} + +//// [es6ModuleEnumDeclaration.js] +var e1; +(function (e1) { + e1[e1["a"] = 0] = "a"; + e1[e1["b"] = 1] = "b"; + e1[e1["c"] = 2] = "c"; +})(e1 || (e1 = {})); +export { e1 }; +var e2; +(function (e2) { + e2[e2["x"] = 0] = "x"; + e2[e2["y"] = 1] = "y"; + e2[e2["z"] = 2] = "z"; +})(e2 || (e2 = {})); +var x = e1.a; +var y = e2.x; +var m1; +(function (m1) { + (function (e3) { + e3[e3["a"] = 0] = "a"; + e3[e3["b"] = 1] = "b"; + e3[e3["c"] = 2] = "c"; + })(m1.e3 || (m1.e3 = {})); + var e3 = m1.e3; + var e4; + (function (e4) { + e4[e4["x"] = 0] = "x"; + e4[e4["y"] = 1] = "y"; + e4[e4["z"] = 2] = "z"; + })(e4 || (e4 = {})); + var x1 = e1.a; + var y1 = e2.x; + var x2 = e3.a; + var y2 = e4.x; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + (function (e5) { + e5[e5["a"] = 0] = "a"; + e5[e5["b"] = 1] = "b"; + e5[e5["c"] = 2] = "c"; + })(m2.e5 || (m2.e5 = {})); + var e5 = m2.e5; + var e6; + (function (e6) { + e6[e6["x"] = 0] = "x"; + e6[e6["y"] = 1] = "y"; + e6[e6["z"] = 2] = "z"; + })(e6 || (e6 = {})); + var x1 = e1.a; + var y1 = e2.x; + var x2 = e5.a; + var y2 = e6.x; + var x3 = m1.e3.a; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleEnumDeclaration.types b/tests/baselines/reference/es6ModuleEnumDeclaration.types new file mode 100644 index 00000000000..4b856fee009 --- /dev/null +++ b/tests/baselines/reference/es6ModuleEnumDeclaration.types @@ -0,0 +1,147 @@ +=== tests/cases/compiler/es6ModuleEnumDeclaration.ts === +export enum e1 { +>e1 : e1 + + a, +>a : e1 + + b, +>b : e1 + + c +>c : e1 +} +enum e2 { +>e2 : e2 + + x, +>x : e2 + + y, +>y : e2 + + z +>z : e2 +} +var x = e1.a; +>x : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + +var y = e2.x; +>y : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + +export module m1 { +>m1 : typeof m1 + + export enum e3 { +>e3 : e3 + + a, +>a : e3 + + b, +>b : e3 + + c +>c : e3 + } + enum e4 { +>e4 : e4 + + x, +>x : e4 + + y, +>y : e4 + + z +>z : e4 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e3.a; +>x2 : e3 +>e3.a : e3 +>e3 : typeof e3 +>a : e3 + + var y2 = e4.x; +>y2 : e4 +>e4.x : e4 +>e4 : typeof e4 +>x : e4 +} +module m2 { +>m2 : typeof m2 + + export enum e5 { +>e5 : e5 + + a, +>a : e5 + + b, +>b : e5 + + c +>c : e5 + } + enum e6 { +>e6 : e6 + + x, +>x : e6 + + y, +>y : e6 + + z +>z : e6 + } + var x1 = e1.a; +>x1 : e1 +>e1.a : e1 +>e1 : typeof e1 +>a : e1 + + var y1 = e2.x; +>y1 : e2 +>e2.x : e2 +>e2 : typeof e2 +>x : e2 + + var x2 = e5.a; +>x2 : e5 +>e5.a : e5 +>e5 : typeof e5 +>a : e5 + + var y2 = e6.x; +>y2 : e6 +>e6.x : e6 +>e6 : typeof e6 +>x : e6 + + var x3 = m1.e3.a; +>x3 : m1.e3 +>m1.e3.a : m1.e3 +>m1.e3 : typeof m1.e3 +>m1 : typeof m1 +>e3 : typeof m1.e3 +>a : m1.e3 +} diff --git a/tests/baselines/reference/es6ModuleFunctionDeclaration.js b/tests/baselines/reference/es6ModuleFunctionDeclaration.js new file mode 100644 index 00000000000..4c1fc33647c --- /dev/null +++ b/tests/baselines/reference/es6ModuleFunctionDeclaration.js @@ -0,0 +1,63 @@ +//// [es6ModuleFunctionDeclaration.ts] +export function foo() { +} +function foo2() { +} +foo(); +foo2(); + +export module m1 { + export function foo3() { + } + function foo4() { + } + foo(); + foo2(); + foo3(); + foo4(); +} +module m2 { + export function foo3() { + } + function foo4() { + } + foo(); + foo2(); + foo3(); + foo4(); + m1.foo3(); +} + +//// [es6ModuleFunctionDeclaration.js] +export function foo() { +} +function foo2() { +} +foo(); +foo2(); +var m1; +(function (m1) { + function foo3() { + } + m1.foo3 = foo3; + function foo4() { + } + foo(); + foo2(); + foo3(); + foo4(); +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + function foo3() { + } + m2.foo3 = foo3; + function foo4() { + } + foo(); + foo2(); + foo3(); + foo4(); + m1.foo3(); +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleFunctionDeclaration.types b/tests/baselines/reference/es6ModuleFunctionDeclaration.types new file mode 100644 index 00000000000..b1252c1e8bc --- /dev/null +++ b/tests/baselines/reference/es6ModuleFunctionDeclaration.types @@ -0,0 +1,71 @@ +=== tests/cases/compiler/es6ModuleFunctionDeclaration.ts === +export function foo() { +>foo : () => void +} +function foo2() { +>foo2 : () => void +} +foo(); +>foo() : void +>foo : () => void + +foo2(); +>foo2() : void +>foo2 : () => void + +export module m1 { +>m1 : typeof m1 + + export function foo3() { +>foo3 : () => void + } + function foo4() { +>foo4 : () => void + } + foo(); +>foo() : void +>foo : () => void + + foo2(); +>foo2() : void +>foo2 : () => void + + foo3(); +>foo3() : void +>foo3 : () => void + + foo4(); +>foo4() : void +>foo4 : () => void +} +module m2 { +>m2 : typeof m2 + + export function foo3() { +>foo3 : () => void + } + function foo4() { +>foo4 : () => void + } + foo(); +>foo() : void +>foo : () => void + + foo2(); +>foo2() : void +>foo2 : () => void + + foo3(); +>foo3() : void +>foo3 : () => void + + foo4(); +>foo4() : void +>foo4 : () => void + + m1.foo3(); +>m1.foo3() : void +>m1.foo3 : () => void +>m1 : typeof m1 +>foo3 : () => void +} diff --git a/tests/baselines/reference/es6ModuleInternalImport.js b/tests/baselines/reference/es6ModuleInternalImport.js new file mode 100644 index 00000000000..4a1659cb901 --- /dev/null +++ b/tests/baselines/reference/es6ModuleInternalImport.js @@ -0,0 +1,46 @@ +//// [es6ModuleInternalImport.ts] +export module m { + export var a = 10; +} +export import a1 = m.a; +import a2 = m.a; +var x = a1 + a2; +export module m1 { + export import a3 = m.a; + import a4 = m.a; + var x = a1 + a2; + var x2 = a3 + a4; +} +module m2 { + export import a3 = m.a; + import a4 = m.a; + var x = a1 + a2; + var x2 = a3 + a4; + var x4 = m1.a3 + m2.a3; +} + +//// [es6ModuleInternalImport.js] +var m; +(function (m) { + m.a = 10; +})(m || (m = {})); +export { m }; +export var a1 = m.a; +var a2 = m.a; +var x = a1 + a2; +var m1; +(function (m1) { + m1.a3 = m.a; + var a4 = m.a; + var x = a1 + a2; + var x2 = m1.a3 + a4; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + m2.a3 = m.a; + var a4 = m.a; + var x = a1 + a2; + var x2 = m2.a3 + a4; + var x4 = m1.a3 + m2.a3; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleInternalImport.types b/tests/baselines/reference/es6ModuleInternalImport.types new file mode 100644 index 00000000000..50db69d8edb --- /dev/null +++ b/tests/baselines/reference/es6ModuleInternalImport.types @@ -0,0 +1,83 @@ +=== tests/cases/compiler/es6ModuleInternalImport.ts === +export module m { +>m : typeof m + + export var a = 10; +>a : number +} +export import a1 = m.a; +>a1 : number +>m : typeof m +>a : number + +import a2 = m.a; +>a2 : number +>m : typeof m +>a : number + +var x = a1 + a2; +>x : number +>a1 + a2 : number +>a1 : number +>a2 : number + +export module m1 { +>m1 : typeof m1 + + export import a3 = m.a; +>a3 : number +>m : typeof m +>a : number + + import a4 = m.a; +>a4 : number +>m : typeof m +>a : number + + var x = a1 + a2; +>x : number +>a1 + a2 : number +>a1 : number +>a2 : number + + var x2 = a3 + a4; +>x2 : number +>a3 + a4 : number +>a3 : number +>a4 : number +} +module m2 { +>m2 : typeof m2 + + export import a3 = m.a; +>a3 : number +>m : typeof m +>a : number + + import a4 = m.a; +>a4 : number +>m : typeof m +>a : number + + var x = a1 + a2; +>x : number +>a1 + a2 : number +>a1 : number +>a2 : number + + var x2 = a3 + a4; +>x2 : number +>a3 + a4 : number +>a3 : number +>a4 : number + + var x4 = m1.a3 + m2.a3; +>x4 : number +>m1.a3 + m2.a3 : number +>m1.a3 : number +>m1 : typeof m1 +>a3 : number +>m2.a3 : number +>m2 : typeof m2 +>a3 : number +} diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports.js b/tests/baselines/reference/es6ModuleInternalNamedImports.js new file mode 100644 index 00000000000..532025c4ee6 --- /dev/null +++ b/tests/baselines/reference/es6ModuleInternalNamedImports.js @@ -0,0 +1,69 @@ +//// [es6ModuleInternalNamedImports.ts] + +export module M { + // variable + export var M_V = 0; + // interface + export interface M_I { } + //calss + export class M_C { } + // instantiated module + export module M_M { var x; } + // uninstantiated module + export module M_MU { } + // function + export function M_F() { } + // enum + export enum M_E { } + // type + export type M_T = number; + // alias + export import M_A = M_M; + + // Reexports + export {M_V as v}; + export {M_I as i}; + export {M_C as c}; + export {M_M as m}; + export {M_MU as mu}; + export {M_F as f}; + export {M_E as e}; + export {M_A as a}; +} + + +//// [es6ModuleInternalNamedImports.js] +var M; +(function (M) { + // variable + M.M_V = 0; + //calss + class M_C { + } + M.M_C = M_C; + // instantiated module + var M_M; + (function (M_M) { + var x; + })(M_M = M.M_M || (M.M_M = {})); + // function + function M_F() { + } + M.M_F = M_F; + // enum + (function (M_E) { + })(M.M_E || (M.M_E = {})); + var M_E = M.M_E; + // alias + M.M_A = M_M; + // Reexports + M.v = M.M_V; + M.i = M_I; + M.c = M_C; + M.m = M_M; + M.mu = M_MU; + M.f = M_F; + M.e = M_E; + M.a = M.M_A; +})(M || (M = {})); +export { M }; diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports.types b/tests/baselines/reference/es6ModuleInternalNamedImports.types new file mode 100644 index 00000000000..6b614926a0a --- /dev/null +++ b/tests/baselines/reference/es6ModuleInternalNamedImports.types @@ -0,0 +1,77 @@ +=== tests/cases/compiler/es6ModuleInternalNamedImports.ts === + +export module M { +>M : typeof M + + // variable + export var M_V = 0; +>M_V : number + + // interface + export interface M_I { } +>M_I : M_I + + //calss + export class M_C { } +>M_C : M_C + + // instantiated module + export module M_M { var x; } +>M_M : typeof M_M +>x : any + + // uninstantiated module + export module M_MU { } +>M_MU : unknown + + // function + export function M_F() { } +>M_F : () => void + + // enum + export enum M_E { } +>M_E : M_E + + // type + export type M_T = number; +>M_T : number + + // alias + export import M_A = M_M; +>M_A : typeof M_M +>M_M : typeof M_M + + // Reexports + export {M_V as v}; +>M_V : number +>v : number + + export {M_I as i}; +>M_I : unknown +>i : unknown + + export {M_C as c}; +>M_C : typeof M_C +>c : typeof M_C + + export {M_M as m}; +>M_M : typeof M_M +>m : typeof M_M + + export {M_MU as mu}; +>M_MU : unknown +>mu : unknown + + export {M_F as f}; +>M_F : () => void +>f : () => void + + export {M_E as e}; +>M_E : typeof M_E +>e : typeof M_E + + export {M_A as a}; +>M_A : typeof M_M +>a : typeof M_M +} + diff --git a/tests/baselines/reference/es6ModuleLet.js b/tests/baselines/reference/es6ModuleLet.js new file mode 100644 index 00000000000..275fd39579e --- /dev/null +++ b/tests/baselines/reference/es6ModuleLet.js @@ -0,0 +1,38 @@ +//// [es6ModuleLet.ts] +export let a = "hello"; +export let x: string = a, y = x; +let b = y; +let c: string = b, d = c; +export module m1 { + export let k = a; + export let l: string = b, m = k; + let n = m1.k; + let o: string = n, p = k; +} +module m2 { + export let k = a; + export let l: string = b, m = k; + let n = m1.k; + let o: string = n, p = k; +} + +//// [es6ModuleLet.js] +export let a = "hello"; +export let x = a, y = x; +let b = y; +let c = b, d = c; +var m1; +(function (m1) { + m1.k = a; + m1.l = b, m1.m = m1.k; + let n = m1.k; + let o = n, p = m1.k; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + m2.k = a; + m2.l = b, m2.m = m2.k; + let n = m1.k; + let o = n, p = m2.k; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleLet.types b/tests/baselines/reference/es6ModuleLet.types new file mode 100644 index 00000000000..4b30c89cc81 --- /dev/null +++ b/tests/baselines/reference/es6ModuleLet.types @@ -0,0 +1,70 @@ +=== tests/cases/compiler/es6ModuleLet.ts === +export let a = "hello"; +>a : string + +export let x: string = a, y = x; +>x : string +>a : string +>y : string +>x : string + +let b = y; +>b : string +>y : string + +let c: string = b, d = c; +>c : string +>b : string +>d : string +>c : string + +export module m1 { +>m1 : typeof m1 + + export let k = a; +>k : string +>a : string + + export let l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + let n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + let o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} +module m2 { +>m2 : typeof m2 + + export let k = a; +>k : string +>a : string + + export let l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + let n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + let o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} diff --git a/tests/baselines/reference/es6ModuleModuleDeclaration.js b/tests/baselines/reference/es6ModuleModuleDeclaration.js new file mode 100644 index 00000000000..1e3716ac8c2 --- /dev/null +++ b/tests/baselines/reference/es6ModuleModuleDeclaration.js @@ -0,0 +1,58 @@ +//// [es6ModuleModuleDeclaration.ts] +export module m1 { + export var a = 10; + var b = 10; + export module innerExportedModule { + export var k = 10; + var l = 10; + } + export module innerNonExportedModule { + export var x = 10; + var y = 10; + } +} +module m2 { + export var a = 10; + var b = 10; + export module innerExportedModule { + export var k = 10; + var l = 10; + } + export module innerNonExportedModule { + export var x = 10; + var y = 10; + } +} + +//// [es6ModuleModuleDeclaration.js] +var m1; +(function (m1) { + m1.a = 10; + var b = 10; + var innerExportedModule; + (function (innerExportedModule) { + innerExportedModule.k = 10; + var l = 10; + })(innerExportedModule = m1.innerExportedModule || (m1.innerExportedModule = {})); + var innerNonExportedModule; + (function (innerNonExportedModule) { + innerNonExportedModule.x = 10; + var y = 10; + })(innerNonExportedModule = m1.innerNonExportedModule || (m1.innerNonExportedModule = {})); +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + m2.a = 10; + var b = 10; + var innerExportedModule; + (function (innerExportedModule) { + innerExportedModule.k = 10; + var l = 10; + })(innerExportedModule = m2.innerExportedModule || (m2.innerExportedModule = {})); + var innerNonExportedModule; + (function (innerNonExportedModule) { + innerNonExportedModule.x = 10; + var y = 10; + })(innerNonExportedModule = m2.innerNonExportedModule || (m2.innerNonExportedModule = {})); +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleModuleDeclaration.types b/tests/baselines/reference/es6ModuleModuleDeclaration.types new file mode 100644 index 00000000000..c174fe6f8c7 --- /dev/null +++ b/tests/baselines/reference/es6ModuleModuleDeclaration.types @@ -0,0 +1,57 @@ +=== tests/cases/compiler/es6ModuleModuleDeclaration.ts === +export module m1 { +>m1 : typeof m1 + + export var a = 10; +>a : number + + var b = 10; +>b : number + + export module innerExportedModule { +>innerExportedModule : typeof innerExportedModule + + export var k = 10; +>k : number + + var l = 10; +>l : number + } + export module innerNonExportedModule { +>innerNonExportedModule : typeof innerNonExportedModule + + export var x = 10; +>x : number + + var y = 10; +>y : number + } +} +module m2 { +>m2 : typeof m2 + + export var a = 10; +>a : number + + var b = 10; +>b : number + + export module innerExportedModule { +>innerExportedModule : typeof innerExportedModule + + export var k = 10; +>k : number + + var l = 10; +>l : number + } + export module innerNonExportedModule { +>innerNonExportedModule : typeof innerNonExportedModule + + export var x = 10; +>x : number + + var y = 10; +>y : number + } +} diff --git a/tests/baselines/reference/es6ModuleVariableStatement.js b/tests/baselines/reference/es6ModuleVariableStatement.js new file mode 100644 index 00000000000..11b60555b0d --- /dev/null +++ b/tests/baselines/reference/es6ModuleVariableStatement.js @@ -0,0 +1,38 @@ +//// [es6ModuleVariableStatement.ts] +export var a = "hello"; +export var x: string = a, y = x; +var b = y; +var c: string = b, d = c; +export module m1 { + export var k = a; + export var l: string = b, m = k; + var n = m1.k; + var o: string = n, p = k; +} +module m2 { + export var k = a; + export var l: string = b, m = k; + var n = m1.k; + var o: string = n, p = k; +} + +//// [es6ModuleVariableStatement.js] +export var a = "hello"; +export var x = a, y = x; +var b = y; +var c = b, d = c; +var m1; +(function (m1) { + m1.k = a; + m1.l = b, m1.m = m1.k; + var n = m1.k; + var o = n, p = m1.k; +})(m1 || (m1 = {})); +export { m1 }; +var m2; +(function (m2) { + m2.k = a; + m2.l = b, m2.m = m2.k; + var n = m1.k; + var o = n, p = m2.k; +})(m2 || (m2 = {})); diff --git a/tests/baselines/reference/es6ModuleVariableStatement.types b/tests/baselines/reference/es6ModuleVariableStatement.types new file mode 100644 index 00000000000..a10d8f6cacb --- /dev/null +++ b/tests/baselines/reference/es6ModuleVariableStatement.types @@ -0,0 +1,70 @@ +=== tests/cases/compiler/es6ModuleVariableStatement.ts === +export var a = "hello"; +>a : string + +export var x: string = a, y = x; +>x : string +>a : string +>y : string +>x : string + +var b = y; +>b : string +>y : string + +var c: string = b, d = c; +>c : string +>b : string +>d : string +>c : string + +export module m1 { +>m1 : typeof m1 + + export var k = a; +>k : string +>a : string + + export var l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + var n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + var o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} +module m2 { +>m2 : typeof m2 + + export var k = a; +>k : string +>a : string + + export var l: string = b, m = k; +>l : string +>b : string +>m : string +>k : string + + var n = m1.k; +>n : string +>m1.k : string +>m1 : typeof m1 +>k : string + + var o: string = n, p = k; +>o : string +>n : string +>p : string +>k : string +} diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt new file mode 100644 index 00000000000..bbe0d8b78b6 --- /dev/null +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt @@ -0,0 +1,16 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. + + +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/es6ModuleWithModuleGenTargetAmd.ts (0 errors) ==== + export class A + { + constructor () + { + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js new file mode 100644 index 00000000000..8757bd1c88f --- /dev/null +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.js @@ -0,0 +1,21 @@ +//// [es6ModuleWithModuleGenTargetAmd.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es6ModuleWithModuleGenTargetAmd.js] +export class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt new file mode 100644 index 00000000000..87f53cb7810 --- /dev/null +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt @@ -0,0 +1,16 @@ +error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. + + +!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher. +==== tests/cases/compiler/es6ModuleWithModuleGenTargetCommonjs.ts (0 errors) ==== + export class A + { + constructor () + { + } + + public B() + { + return 42; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js new file mode 100644 index 00000000000..2df98e20826 --- /dev/null +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.js @@ -0,0 +1,21 @@ +//// [es6ModuleWithModuleGenTargetCommonjs.ts] +export class A +{ + constructor () + { + } + + public B() + { + return 42; + } +} + +//// [es6ModuleWithModuleGenTargetCommonjs.js] +export class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/escapedIdentifiers.js b/tests/baselines/reference/escapedIdentifiers.js index 7051d8d2433..dd06f3bbc86 100644 --- a/tests/baselines/reference/escapedIdentifiers.js +++ b/tests/baselines/reference/escapedIdentifiers.js @@ -169,13 +169,21 @@ var classType2Object1 = new classType2(); classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); classType2Object2.foo2 = 2; -var interfaceType1Object1 = { bar1: 0 }; +var interfaceType1Object1 = { + bar1: 0 +}; interfaceType1Object1.bar1 = 2; -var interfaceType1Object2 = { bar1: 0 }; +var interfaceType1Object2 = { + bar1: 0 +}; interfaceType1Object2.bar1 = 2; -var interfaceType2Object1 = { bar2: 0 }; +var interfaceType2Object1 = { + bar2: 0 +}; interfaceType2Object1.bar2 = 2; -var interfaceType2Object2 = { bar2: 0 }; +var interfaceType2Object2 = { + bar2: 0 +}; interfaceType2Object2.bar2 = 2; // arguments var testClass = (function () { diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js index 707801dc4ee..ee447619bfe 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js @@ -59,7 +59,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -68,7 +70,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -81,11 +85,17 @@ var aVoid = undefined; var anInterface = new C(); var aClass = new C(); var aGenericClass = new D(); -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; var anOtherObjectLiteral = new C(); var aFunction = F; var anOtherFunction = F; -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; var aModule = M; var aClassInModule = new M.A(); -var aFunctionInModule = function (x) { return 'this is a string'; }; +var aFunctionInModule = function (x) { + return 'this is a string'; +}; diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js index 40e45bf7ec0..10f3fd9bf11 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js @@ -65,8 +65,12 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } -function F2(x) { return x < 42; } +function F(x) { + return 42; +} +function F2(x) { + return x < 42; +} var M; (function (M) { var A = (function () { @@ -75,7 +79,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var N; @@ -86,7 +92,9 @@ var N; return A; })(); N.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } N.F2 = F2; })(N || (N = {})); var aNumber = 'this is a string'; @@ -96,11 +104,15 @@ var aVoid = 9.9; var anInterface = new D(); var aClass = new D(); var aGenericClass = new C(); -var anObjectLiteral = { id: 'a string' }; +var anObjectLiteral = { + id: 'a string' +}; var anOtherObjectLiteral = new C(); var aFunction = F2; var anOtherFunction = F2; -var aLambda = function (x) { return 'a string'; }; +var aLambda = function (x) { + return 'a string'; +}; var aModule = N; var aClassInModule = new N.A(); var aFunctionInModule = F2; diff --git a/tests/baselines/reference/everyTypeWithInitializer.js b/tests/baselines/reference/everyTypeWithInitializer.js index aae0a9fe291..aafefcc5777 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.js +++ b/tests/baselines/reference/everyTypeWithInitializer.js @@ -60,7 +60,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -69,7 +71,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -81,9 +85,13 @@ var anOtherAny = new C(); var anUndefined = undefined; var aClass = new C(); var aGenericClass = new D(); -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; var aFunction = F; -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; var aModule = M; var aClassInModule = new M.A(); var aFunctionInModule = M.F2; diff --git a/tests/baselines/reference/exportAlreadySeen.js b/tests/baselines/reference/exportAlreadySeen.js index 68d30a697fd..e18c0bbf7f6 100644 --- a/tests/baselines/reference/exportAlreadySeen.js +++ b/tests/baselines/reference/exportAlreadySeen.js @@ -23,7 +23,8 @@ declare module A { var M; (function (M) { M.x = 1; - function f() { } + function f() { + } M.f = f; var N; (function (N) { diff --git a/tests/baselines/reference/exportAssignClassAndModule.types b/tests/baselines/reference/exportAssignClassAndModule.types index dc4a19f345c..9087ac09633 100644 --- a/tests/baselines/reference/exportAssignClassAndModule.types +++ b/tests/baselines/reference/exportAssignClassAndModule.types @@ -22,9 +22,9 @@ class Foo { >Foo : Foo x: Foo.Bar; ->x : Foo.Bar +>x : default.Bar >Foo : unknown ->Bar : Foo.Bar +>Bar : default.Bar } module Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/exportAssignDottedName.errors.txt b/tests/baselines/reference/exportAssignDottedName.errors.txt index 264e32c9cad..a63a62fccbe 100644 --- a/tests/baselines/reference/exportAssignDottedName.errors.txt +++ b/tests/baselines/reference/exportAssignDottedName.errors.txt @@ -1,22 +1,14 @@ -tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/externalModules/foo2.ts(2,14): error TS1005: ';' expected. -tests/cases/conformance/externalModules/foo2.ts(2,15): error TS2304: Cannot find name 'x'. +tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== +==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== import foo1 = require('./foo1'); - export = foo1.x; // Error, export assignment must be identifier only - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS2304: Cannot find name 'x'. + export = foo1.x; // Ok ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ - ~~~~~~~~~~~~~~~~~~~~ - return true; - ~~~~~~~~~~~~~ - } - ~ + ~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. + return true; + } \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignDottedName.js b/tests/baselines/reference/exportAssignDottedName.js index 48b06273c17..5784f9116f1 100644 --- a/tests/baselines/reference/exportAssignDottedName.js +++ b/tests/baselines/reference/exportAssignDottedName.js @@ -7,7 +7,7 @@ export function x(){ //// [foo2.ts] import foo1 = require('./foo1'); -export = foo1.x; // Error, export assignment must be identifier only +export = foo1.x; // Ok //// [foo1.js] @@ -17,5 +17,4 @@ function x() { exports.x = x; //// [foo2.js] var foo1 = require('./foo1'); -x; // Error, export assignment must be identifier only -module.exports = foo1; +module.exports = foo1.x; diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt index 8aa25aee2ad..a3e4702f1e6 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ==== @@ -6,12 +6,10 @@ tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compi var x = foo2(); // should be boolean ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ - ~~~~~~~~~~~~~~~~~~~~ - return true; - ~~~~~~~~~~~~~ - } - ~ + ~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. + return true; + } ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== import foo1 = require('./foo1'); diff --git a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt index 31ca1be2011..9c9f1aa6874 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt @@ -1,55 +1,37 @@ tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/externalModules/foo1.ts(2,10): error TS1003: Identifier expected. -tests/cases/conformance/externalModules/foo2.ts(1,10): error TS1003: Identifier expected. -tests/cases/conformance/externalModules/foo3.ts(1,10): error TS1003: Identifier expected. -tests/cases/conformance/externalModules/foo4.ts(1,10): error TS1003: Identifier expected. -tests/cases/conformance/externalModules/foo6.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo3.ts(1,10): error TS1109: Expression expected. tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected. -tests/cases/conformance/externalModules/foo7.ts(1,15): error TS1005: ';' expected. -tests/cases/conformance/externalModules/foo8.ts(1,10): error TS1003: Identifier expected. -==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== +==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== var x = 10; - export = typeof x; // Error - ~~~~~~~~ + export = typeof x; // Ok + ~~~~~~~~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. - ~~~~~~ -!!! error TS1003: Identifier expected. -==== tests/cases/conformance/externalModules/foo2.ts (1 errors) ==== - export = "sausages"; // Error - ~~~~~~~~~~ -!!! error TS1003: Identifier expected. +==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== + export = "sausages"; // Ok ==== tests/cases/conformance/externalModules/foo3.ts (1 errors) ==== - export = class Foo3 {}; // Error + export = class Foo3 {}; // Error, not an expression ~~~~~ -!!! error TS1003: Identifier expected. +!!! error TS1109: Expression expected. -==== tests/cases/conformance/externalModules/foo4.ts (1 errors) ==== - export = true; // Error - ~~~~ -!!! error TS1003: Identifier expected. +==== tests/cases/conformance/externalModules/foo4.ts (0 errors) ==== + export = true; // Ok ==== tests/cases/conformance/externalModules/foo5.ts (0 errors) ==== export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript -==== tests/cases/conformance/externalModules/foo6.ts (2 errors) ==== - export = void; // Error - ~~~~ -!!! error TS1003: Identifier expected. +==== tests/cases/conformance/externalModules/foo6.ts (1 errors) ==== + export = void; // Error, void operator requires an argument ~ !!! error TS1109: Expression expected. -==== tests/cases/conformance/externalModules/foo7.ts (1 errors) ==== - export = Date || String; // Error - ~~ -!!! error TS1005: ';' expected. +==== tests/cases/conformance/externalModules/foo7.ts (0 errors) ==== + export = Date || String; // Ok -==== tests/cases/conformance/externalModules/foo8.ts (1 errors) ==== - export = null; // Error - ~~~~ -!!! error TS1003: Identifier expected. +==== tests/cases/conformance/externalModules/foo8.ts (0 errors) ==== + export = null; // Ok \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignNonIdentifier.js b/tests/baselines/reference/exportAssignNonIdentifier.js index aaefca034cb..ffa2fb9ba58 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.js +++ b/tests/baselines/reference/exportAssignNonIdentifier.js @@ -2,51 +2,50 @@ //// [foo1.ts] var x = 10; -export = typeof x; // Error +export = typeof x; // Ok //// [foo2.ts] -export = "sausages"; // Error +export = "sausages"; // Ok //// [foo3.ts] -export = class Foo3 {}; // Error +export = class Foo3 {}; // Error, not an expression //// [foo4.ts] -export = true; // Error +export = true; // Ok //// [foo5.ts] export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript //// [foo6.ts] -export = void; // Error +export = void; // Error, void operator requires an argument //// [foo7.ts] -export = Date || String; // Error +export = Date || String; // Ok //// [foo8.ts] -export = null; // Error +export = null; // Ok //// [foo1.js] var x = 10; -typeof x; // Error +module.exports = typeof x; //// [foo2.js] -"sausages"; // Error +module.exports = "sausages"; //// [foo3.js] var Foo3 = (function () { function Foo3() { } return Foo3; })(); -; // Error +; // Error, not an expression //// [foo4.js] -true; // Error +module.exports = true; //// [foo5.js] module.exports = undefined; //// [foo6.js] -void ; // Error +module.exports = void ; //// [foo7.js] - || String; // Error -module.exports = Date; +module.exports = Date || String; //// [foo8.js] -null; // Error +module.exports = null; diff --git a/tests/baselines/reference/exportAssignTypes.js b/tests/baselines/reference/exportAssignTypes.js index e898f798a7c..d4b74659dcc 100644 --- a/tests/baselines/reference/exportAssignTypes.js +++ b/tests/baselines/reference/exportAssignTypes.js @@ -63,10 +63,16 @@ module.exports = x; var x = true; module.exports = x; //// [expArray.js] -var x = [1, 2]; +var x = [ + 1, + 2 +]; module.exports = x; //// [expObject.js] -var x = { answer: 42, when: 1776 }; +var x = { + answer: 42, + when: 1776 +}; module.exports = x; //// [expAny.js] var x; diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js index b62cc8251be..e9742812469 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js @@ -24,5 +24,8 @@ module.exports = Foo; //// [foo_1.js] var foo = require("./foo_0"); var x = new foo(true); // Should error -var y = new foo({ a: "test", b: 42 }); // Should be OK +var y = new foo({ + a: "test", + b: 42 +}); // Should be OK var z = y.test.b; diff --git a/tests/baselines/reference/exportAssignmentFunction.js b/tests/baselines/reference/exportAssignmentFunction.js index 825d0f983ea..6d4336bd4bd 100644 --- a/tests/baselines/reference/exportAssignmentFunction.js +++ b/tests/baselines/reference/exportAssignmentFunction.js @@ -12,7 +12,9 @@ var n: number = fooFunc(); //// [exportAssignmentFunction_A.js] define(["require", "exports"], function (require, exports) { - function foo() { return 0; } + function foo() { + return 0; + } return foo; }); //// [exportAssignmentFunction_B.js] diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.js b/tests/baselines/reference/exportAssignmentMergedInterface.js index f99d7f3a465..fbcb99bc642 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.js +++ b/tests/baselines/reference/exportAssignmentMergedInterface.js @@ -31,7 +31,11 @@ define(["require", "exports"], function (require, exports) { x("test"); x(42); var y = x.b; - if (!!x.c) { } - var z = { x: 1, y: 2 }; + if (!!x.c) { + } + var z = { + x: 1, + y: 2 + }; z = x.d; }); diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt deleted file mode 100644 index ff21d304e40..00000000000 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts(7,10): error TS1003: Identifier expected. - - -==== tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts (1 errors) ==== - function Greeter() { - //... - } - Greeter.prototype.greet = function () { - //... - } - export = new Greeter(); - ~~~ -!!! error TS1003: Identifier expected. - \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js index a90e17d790e..4929eaffd6b 100644 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.js @@ -15,4 +15,4 @@ function Greeter() { Greeter.prototype.greet = function () { //... }; -new Greeter(); +module.exports = new Greeter(); diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.types b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.types new file mode 100644 index 00000000000..56da73abd9d --- /dev/null +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts === +function Greeter() { +>Greeter : () => void + + //... +} +Greeter.prototype.greet = function () { +>Greeter.prototype.greet = function () { //...} : () => void +>Greeter.prototype.greet : any +>Greeter.prototype : any +>Greeter : () => void +>prototype : any +>greet : any +>function () { //...} : () => void + + //... +} +export = new Greeter(); +>new Greeter() : any +>Greeter : () => void + diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 30ed0b07ae9..1b1f934b2f9 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -94,7 +94,8 @@ var E; Color[Color["Red"] = 0] = "Red"; })(E.Color || (E.Color = {})); var Color = E.Color; - function fn() { } + function fn() { + } E.fn = fn; var C = (function () { function C() { @@ -115,7 +116,8 @@ var F; (function (Color) { Color[Color["Red"] = 0] = "Red"; })(Color || (Color = {})); - function fn() { } + function fn() { + } var C = (function () { function C() { } diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt b/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt new file mode 100644 index 00000000000..71ff4261ffe --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt @@ -0,0 +1,8 @@ +tests/cases/compiler/exportDefaultTypeAnnoation.ts(2,18): error TS1201: A type annotation on an export statement is only allowed in an ambient external module declaration. + + +==== tests/cases/compiler/exportDefaultTypeAnnoation.ts (1 errors) ==== + + export default : number; + ~~~~~~ +!!! error TS1201: A type annotation on an export statement is only allowed in an ambient external module declaration. \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation.js b/tests/baselines/reference/exportDefaultTypeAnnoation.js new file mode 100644 index 00000000000..8adf31a5f18 --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation.js @@ -0,0 +1,6 @@ +//// [exportDefaultTypeAnnoation.ts] + +export default : number; + +//// [exportDefaultTypeAnnoation.js] +module.exports = ; diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation2.js b/tests/baselines/reference/exportDefaultTypeAnnoation2.js new file mode 100644 index 00000000000..2c918954702 --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation2.js @@ -0,0 +1,7 @@ +//// [exportDefaultTypeAnnoation2.ts] + +declare module "mod" { + export default : number; +} + +//// [exportDefaultTypeAnnoation2.js] diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation2.types b/tests/baselines/reference/exportDefaultTypeAnnoation2.types new file mode 100644 index 00000000000..53ca78586cc --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation2.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/exportDefaultTypeAnnoation2.ts === + +No type information for this code.declare module "mod" { +No type information for this code. export default : number; +No type information for this code.} +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation3.errors.txt b/tests/baselines/reference/exportDefaultTypeAnnoation3.errors.txt new file mode 100644 index 00000000000..326713e059e --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation3.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/reference1.ts(2,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/reference2.ts(2,5): error TS2322: Type 'number' is not assignable to type 'string'. + + +==== tests/cases/compiler/mod.d.ts (0 errors) ==== + + declare module "mod" { + export default : number; + } + +==== tests/cases/compiler/reference1.ts (1 errors) ==== + import d from "mod"; + var s: string = d; // Error + ~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + +==== tests/cases/compiler/reference2.ts (1 errors) ==== + import { default as d } from "mod"; + var s: string = d; // Error + ~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation3.js b/tests/baselines/reference/exportDefaultTypeAnnoation3.js new file mode 100644 index 00000000000..069c8385e77 --- /dev/null +++ b/tests/baselines/reference/exportDefaultTypeAnnoation3.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/exportDefaultTypeAnnoation3.ts] //// + +//// [mod.d.ts] + +declare module "mod" { + export default : number; +} + +//// [reference1.ts] +import d from "mod"; +var s: string = d; // Error + +//// [reference2.ts] +import { default as d } from "mod"; +var s: string = d; // Error + +//// [reference1.js] +var d = require("mod"); +var s = d; // Error +//// [reference2.js] +var _mod = require("mod"); +var s = _mod.default; // Error diff --git a/tests/baselines/reference/exportEqualNamespaces.types b/tests/baselines/reference/exportEqualNamespaces.types index 0f3091c1b8a..b60ba5a85c0 100644 --- a/tests/baselines/reference/exportEqualNamespaces.types +++ b/tests/baselines/reference/exportEqualNamespaces.types @@ -12,7 +12,7 @@ interface server { (): server.Server; >server : unknown ->Server : server.Server +>Server : default.Server startTime: Date; >startTime : Date diff --git a/tests/baselines/reference/exportImportMultipleFiles.js b/tests/baselines/reference/exportImportMultipleFiles.js index 10909808ffc..225b605f689 100644 --- a/tests/baselines/reference/exportImportMultipleFiles.js +++ b/tests/baselines/reference/exportImportMultipleFiles.js @@ -14,7 +14,9 @@ lib.math.add(3, 4); // Shouldnt be error //// [exportImportMultipleFiles_math.js] define(["require", "exports"], function (require, exports) { - function add(a, b) { return a + b; } + function add(a, b) { + return a + b; + } exports.add = add; }); //// [exportImportMultipleFiles_library.js] diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule.js b/tests/baselines/reference/exportImportNonInstantiatedModule.js index d9081efcd36..720fbfafc61 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule.js @@ -14,4 +14,6 @@ var x: B.A1.I = { x: 1 }; var B; (function (B) { })(B || (B = {})); -var x = { x: 1 }; +var x = { + x: 1 +}; diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.js b/tests/baselines/reference/exportImportNonInstantiatedModule2.js index 2782a6f6f67..575271dba30 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.js @@ -24,7 +24,9 @@ define(["require", "exports"], function (require, exports) { //// [consumer.js] define(["require", "exports"], function (require, exports) { function w() { - return { name: 'value' }; + return { + name: 'value' + }; } exports.w = w; }); diff --git a/tests/baselines/reference/exportNonVisibleType.js b/tests/baselines/reference/exportNonVisibleType.js index 101c356d582..edd0e6988d4 100644 --- a/tests/baselines/reference/exportNonVisibleType.js +++ b/tests/baselines/reference/exportNonVisibleType.js @@ -36,7 +36,10 @@ export = C1; // Should work, private type I1 of visible class C1 only used in pr //// [foo1.js] -var x = { a: "test", b: 42 }; +var x = { + a: "test", + b: 42 +}; module.exports = x; //// [foo2.js] var C1 = (function () { diff --git a/tests/baselines/reference/exportPrivateType.js b/tests/baselines/reference/exportPrivateType.js index 11ccc037ef6..96acc83edb5 100644 --- a/tests/baselines/reference/exportPrivateType.js +++ b/tests/baselines/reference/exportPrivateType.js @@ -41,7 +41,9 @@ var foo; var C2 = (function () { function C2() { } - C2.prototype.test = function () { return true; }; + C2.prototype.test = function () { + return true; + }; return C2; })(); // None of the types are exported, so per section 10.3, should all be errors diff --git a/tests/baselines/reference/exportedVariable1.js b/tests/baselines/reference/exportedVariable1.js index 39eea8d34b5..d1039e0db43 100644 --- a/tests/baselines/reference/exportedVariable1.js +++ b/tests/baselines/reference/exportedVariable1.js @@ -5,6 +5,8 @@ var upper = foo.name.toUpperCase(); //// [exportedVariable1.js] define(["require", "exports"], function (require, exports) { - exports.foo = { name: "Bill" }; + exports.foo = { + name: "Bill" + }; var upper = exports.foo.name.toUpperCase(); }); diff --git a/tests/baselines/reference/extBaseClass2.errors.txt b/tests/baselines/reference/extBaseClass2.errors.txt index 5e49a2dbc47..10c406b6ba0 100644 --- a/tests/baselines/reference/extBaseClass2.errors.txt +++ b/tests/baselines/reference/extBaseClass2.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/extBaseClass2.ts(2,29): error TS2305: Module 'M' has no exported member 'B'. +tests/cases/compiler/extBaseClass2.ts(2,31): error TS2305: Module 'M' has no exported member 'B'. tests/cases/compiler/extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'. ==== tests/cases/compiler/extBaseClass2.ts (2 errors) ==== module N { export class C4 extends M.B { - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'B'. } } diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 23c9127175e..836db4dc362 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); var D = (function (_super) { @@ -31,7 +32,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); var c; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 234cc59ff70..8311f4d6ce6 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -36,7 +36,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); var d = new D(); diff --git a/tests/baselines/reference/extendArray.js b/tests/baselines/reference/extendArray.js index 6d5c0262209..7809aa6bb25 100644 --- a/tests/baselines/reference/extendArray.js +++ b/tests/baselines/reference/extendArray.js @@ -24,8 +24,12 @@ arr.collect = function (fn) { //// [extendArray.js] -var a = [1, 2]; -a.forEach(function (v, i, a) { }); +var a = [ + 1, + 2 +]; +a.forEach(function (v, i, a) { +}); var arr = Array.prototype; arr.collect = function (fn) { var res = []; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 26f0c776dd8..47a602aefaf 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -13,7 +13,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var x = A; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 820a6910962..5c328e39131 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -23,6 +23,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index ad88446c4c4..3f3b7049311 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -23,6 +23,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index 719b68451ae..0dc3d8e84cd 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -42,7 +42,8 @@ n=XDate.UTC(1964,2,1); //// [externModule.js] declare; module; -{ } +{ +} var XDate = (function () { function XDate() { } diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js index f9c83c83cf0..73ef9b6b296 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js @@ -10,7 +10,8 @@ file1.foo(); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_0.js] define(["require", "exports"], function (require, exports) { - function foo() { } + function foo() { + } exports.foo = foo; ; }); diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index f1d1d9fb561..edbdf6b90a5 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -19,7 +19,8 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] -function foo() { } +function foo() { +} exports.foo = foo; ; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file3.js] diff --git a/tests/baselines/reference/fatArrowfunctionAsType.js b/tests/baselines/reference/fatArrowfunctionAsType.js index 894267580c6..bd2dc4310d9 100644 --- a/tests/baselines/reference/fatArrowfunctionAsType.js +++ b/tests/baselines/reference/fatArrowfunctionAsType.js @@ -7,5 +7,7 @@ b = c; //// [fatArrowfunctionAsType.js] -var c = function (x) { return 42; }; +var c = function (x) { + return 42; +}; b = c; diff --git a/tests/baselines/reference/fatarrowfunctions.js b/tests/baselines/reference/fatarrowfunctions.js index eb57d1a9817..1c74f39bed5 100644 --- a/tests/baselines/reference/fatarrowfunctions.js +++ b/tests/baselines/reference/fatarrowfunctions.js @@ -49,30 +49,70 @@ var messenger = { function foo(x) { return x(); } -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function () { return 0; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function () { return 0; }); -foo((function (x) { return x; })); -foo(function (x) { return x * x; }); -var y = function (x) { return x * x; }; -var z = function (x) { return x * x; }; -var w = function () { return 3; }; +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function () { + return 0; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function () { + return 0; +}); +foo((function (x) { + return x; +})); +foo(function (x) { + return x * x; +}); +var y = function (x) { + return x * x; +}; +var z = function (x) { + return x * x; +}; +var w = function () { + return 3; +}; function ternaryTest(isWhile) { - var f = isWhile ? function (n) { return n > 0; } : function (n) { return n === 0; }; + var f = isWhile ? function (n) { + return n > 0; + } : function (n) { + return n === 0; + }; } var messenger = { message: "Hello World", start: function () { var _this = this; - setTimeout(function () { _this.message.toString(); }, 3000); + setTimeout(function () { + _this.message.toString(); + }, 3000); } }; diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index 2ac20f1966a..56fd91f3d1c 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -20,19 +20,28 @@ foo(function () { } return 0; }); -foo((1), { return: 0 }); -foo(function (x) { return x; }); +foo((1), { + return: 0 +}); +foo(function (x) { + return x; +}); foo(function (x) { if (x === void 0) { x = 0; } return x; }); var y = x, number; x * x; -false ? (function () { return null; }) : null; +false ? (function () { + return null; +}) : null; // missing fatarrow -var x1 = function () { }; -var x2 = function (a) { }; -var x3 = function (a) { }; +var x1 = function () { +}; +var x2 = function (a) { +}; +var x3 = function (a) { +}; var x4 = function () { var a = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js index d73eec12bcd..e5c8134a4bb 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js +++ b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js @@ -12,7 +12,9 @@ fn.call(4); // Should be 4 //// [fatarrowfunctionsInFunctionParameterDefaults.js] function fn(x, y) { var _this = this; - if (x === void 0) { x = function () { return _this; }; } + if (x === void 0) { x = function () { + return _this; + }; } if (y === void 0) { y = x(); } // should be 4 return y; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js index e6e43f8bbf4..bdd80477162 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js @@ -134,27 +134,39 @@ foo( //// [fatarrowfunctionsOptionalArgs.js] // valid // no params -(function () { return 1; }); +(function () { + return 1; +}); // one param, no type -(function (arg) { return 2; }); +(function (arg) { + return 2; +}); // one param, no type -(function (arg) { return 2; }); +(function (arg) { + return 2; +}); // one param, no type with default value (function (arg) { if (arg === void 0) { arg = 1; } return 3; }); // one param, no type, optional -(function (arg) { return 4; }); +(function (arg) { + return 4; +}); // typed param -(function (arg) { return 5; }); +(function (arg) { + return 5; +}); // typed param with default value (function (arg) { if (arg === void 0) { arg = 0; } return 6; }); // optional param -(function (arg) { return 7; }); +(function (arg) { + return 7; +}); // var arg param (function () { var arg = []; @@ -164,20 +176,28 @@ foo( return 8; }); // multiple arguments -(function (arg1, arg2) { return 12; }); +(function (arg1, arg2) { + return 12; +}); (function (arg1, arg2) { if (arg1 === void 0) { arg1 = 1; } if (arg2 === void 0) { arg2 = 3; } return 13; }); -(function (arg1, arg2) { return 14; }); -(function (arg1, arg2) { return 15; }); +(function (arg1, arg2) { + return 14; +}); +(function (arg1, arg2) { + return 15; +}); (function (arg1, arg2) { if (arg1 === void 0) { arg1 = 0; } if (arg2 === void 0) { arg2 = 1; } return 16; }); -(function (arg1, arg2) { return 17; }); +(function (arg1, arg2) { + return 17; +}); (function (arg1) { var arg2 = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -185,21 +205,33 @@ foo( } return 18; }); -(function (arg1, arg2) { return 19; }); +(function (arg1, arg2) { + return 19; +}); // in paren -(function () { return 21; }); -(function (arg) { return 22; }); +(function () { + return 21; +}); +(function (arg) { + return 22; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 23; }); -(function (arg) { return 24; }); -(function (arg) { return 25; }); +(function (arg) { + return 24; +}); +(function (arg) { + return 25; +}); (function (arg) { if (arg === void 0) { arg = 0; } return 26; }); -(function (arg) { return 27; }); +(function (arg) { + return 27; +}); (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -208,17 +240,29 @@ foo( return 28; }); // in multiple paren -((((function (arg) { return 32; })))); +((((function (arg) { + return 32; +})))); // in ternary exression -false ? function () { return 41; } : null; -false ? function (arg) { return 42; } : null; +false ? function () { + return 41; +} : null; +false ? function (arg) { + return 42; +} : null; false ? function (arg) { if (arg === void 0) { arg = 1; } return 43; } : null; -false ? function (arg) { return 44; } : null; -false ? function (arg) { return 45; } : null; -false ? function (arg) { return 46; } : null; +false ? function (arg) { + return 44; +} : null; +false ? function (arg) { + return 45; +} : null; +false ? function (arg) { + return 46; +} : null; false ? function (arg) { if (arg === void 0) { arg = 0; } return 47; @@ -231,15 +275,25 @@ false ? function () { return 48; } : null; // in ternary exression within paren -false ? (function () { return 51; }) : null; -false ? (function (arg) { return 52; }) : null; +false ? (function () { + return 51; +}) : null; +false ? (function (arg) { + return 52; +}) : null; false ? (function (arg) { if (arg === void 0) { arg = 1; } return 53; }) : null; -false ? (function (arg) { return 54; }) : null; -false ? (function (arg) { return 55; }) : null; -false ? (function (arg) { return 56; }) : null; +false ? (function (arg) { + return 54; +}) : null; +false ? (function (arg) { + return 55; +}) : null; +false ? (function (arg) { + return 56; +}) : null; false ? (function (arg) { if (arg === void 0) { arg = 0; } return 57; @@ -252,15 +306,25 @@ false ? (function () { return 58; }) : null; // ternary exression's else clause -false ? null : function () { return 61; }; -false ? null : function (arg) { return 62; }; +false ? null : function () { + return 61; +}; +false ? null : function (arg) { + return 62; +}; false ? null : function (arg) { if (arg === void 0) { arg = 1; } return 63; }; -false ? null : function (arg) { return 64; }; -false ? null : function (arg) { return 65; }; -false ? null : function (arg) { return 66; }; +false ? null : function (arg) { + return 64; +}; +false ? null : function (arg) { + return 65; +}; +false ? null : function (arg) { + return 66; +}; false ? null : function (arg) { if (arg === void 0) { arg = 0; } return 67; @@ -273,24 +337,48 @@ false ? null : function () { return 68; }; // nested ternary expressions -(function (a) { return a; }) ? function (b) { return b; } : function (c) { return c; }; +(function (a) { + return a; +}) ? function (b) { + return b; +} : function (c) { + return c; +}; //multiple levels -(function (a) { return a; }); -(function (b) { return function (c) { return 81; }; }); -(function (c) { return function (d) { return 82; }; }); +(function (a) { + return a; +}); +(function (b) { + return function (c) { + return 81; + }; +}); +(function (c) { + return function (d) { + return 82; + }; +}); // In Expressions -(function (arg) { return 90; }) instanceof Function; +(function (arg) { + return 90; +}) instanceof Function; (function (arg) { if (arg === void 0) { arg = 1; } return 91; }) instanceof Function; -(function (arg) { return 92; }) instanceof Function; -(function (arg) { return 93; }) instanceof Function; +(function (arg) { + return 92; +}) instanceof Function; +(function (arg) { + return 93; +}) instanceof Function; (function (arg) { if (arg === void 0) { arg = 1; } return 94; }) instanceof Function; -(function (arg) { return 95; }) instanceof Function; +(function (arg) { + return 95; +}) instanceof Function; (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -298,8 +386,14 @@ false ? null : function () { } return 96; }) instanceof Function; -'' + (function (arg) { return 100; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 101; }); +'' + (function (arg) { + return 100; +}); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 101; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 0; @@ -307,8 +401,16 @@ false ? null : function () { if (arg === void 0) { arg = 2; } return 102; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 103; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 104; }); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 103; +}); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 104; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 0; @@ -336,7 +438,11 @@ false ? null : function () { } return 107; }); -(function (arg1, arg2) { return 0; }) + '' + (function (arg1, arg2) { return 108; }); +(function (arg1, arg2) { + return 0; +}) + '' + (function (arg1, arg2) { + return 108; +}); (function (arg1) { var arg2 = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -357,9 +463,19 @@ function foo() { arg[_i - 0] = arguments[_i]; } } -foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { +foo(function (a) { + return 110; +}, (function (a) { + return 111; +}), function (a) { return 112; -}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +}, function (a) { + return 113; +}, function (a, b) { + return 114; +}, function (a) { + return 115; +}, function (a) { if (a === void 0) { a = 0; } return 116; }, function (a) { @@ -381,4 +497,14 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { c[_i - 2] = arguments[_i]; } return 120; -}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); +}, function (a) { + return function (b) { + return function (c) { + return 121; + }; + }; +}, false ? function (a) { + return 0; +} : function (b) { + return 122; +}); diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js index 428a085ca56..0ee54452a9b 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js @@ -8,7 +8,9 @@ (arg1 = 1, arg2) => 1; //// [fatarrowfunctionsOptionalArgsErrors1.js] -(function (arg1, arg2) { return 101; }); +(function (arg1, arg2) { + return 101; +}); (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js index dfd7e9f74dc..e6628081064 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js @@ -42,9 +42,19 @@ false ? null : function (arg) { if (arg === void 0) { arg = 2; } return 106; }); -foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { +foo(function (a) { + return 110; +}, (function (a) { + return 111; +}), function (a) { return 112; -}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +}, function (a) { + return 113; +}, function (a, b) { + return 114; +}, function (a) { + return 115; +}, function (a) { if (a === void 0) { a = 0; } return 116; }, function (a) { @@ -66,4 +76,14 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { c[_i - 2] = arguments[_i]; } return 120; -}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); +}, function (a) { + return function (b) { + return function (c) { + return 121; + }; + }; +}, false ? function (a) { + return 0; +} : function (b) { + return 122; +}); diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.js b/tests/baselines/reference/fieldAndGetterWithSameName.js index ddd95b9e8f2..64129ff9365 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.js +++ b/tests/baselines/reference/fieldAndGetterWithSameName.js @@ -10,7 +10,9 @@ define(["require", "exports"], function (require, exports) { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js index dea003057c4..d8521e56a14 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js @@ -3,5 +3,6 @@ function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok //// [fixTypeParameterInSignatureWithRestParameters.js] -function bar(item1, item2) { } +function bar(item1, item2) { +} bar(1, ""); // Should be ok diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 3db07d878bf..3787887923c 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -88,38 +88,71 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aString; -for (aString in {}) { } +for (aString in {}) { +} var anAny; -for (anAny in {}) { } -for (var x in {}) { } -for (var x in []) { } -for (var x in [1, 2, 3, 4, 5]) { } -function fn() { } -for (var x in fn()) { } -for (var x in /[a-z]/) { } -for (var x in new Date()) { } +for (anAny in {}) { +} +for (var x in {}) { +} +for (var x in []) { +} +for (var x in [ + 1, + 2, + 3, + 4, + 5 +]) { +} +function fn() { +} +for (var x in fn()) { +} +for (var x in /[a-z]/) { +} +for (var x in new Date()) { +} var c, d, e; -for (var x in c || d) { } -for (var x in e ? c : d) { } -for (var x in 42 ? c : d) { } -for (var x in '' ? c : d) { } -for (var x in 42 ? d[x] : c[x]) { } -for (var x in c[d]) { } -for (var x in (function (x) { return x; })) { } -for (var x in function (x, y) { return x + y; }) { } +for (var x in c || d) { +} +for (var x in e ? c : d) { +} +for (var x in 42 ? c : d) { +} +for (var x in '' ? c : d) { +} +for (var x in 42 ? d[x] : c[x]) { +} +for (var x in c[d]) { +} +for (var x in (function (x) { + return x; +})) { +} +for (var x in function (x, y) { + return x + y; +}) { +} var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } return null; }; A.baz = function () { - for (var x in this) { } - for (var x in this.baz) { } - for (var x in this.baz()) { } + for (var x in this) { + } + for (var x in this.baz) { + } + for (var x in this.baz()) { + } return null; }; return A; @@ -130,17 +163,23 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } - for (var x in _super.prototype.biz) { } - for (var x in _super.prototype.biz.call(this)) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } + for (var x in _super.prototype.biz) { + } + for (var x in _super.prototype.biz.call(this)) { + } return null; }; return B; })(A); var i; -for (var x in i[42]) { } +for (var x in i[42]) { +} var M; (function (M) { var X = (function () { @@ -150,12 +189,16 @@ var M; })(); M.X = X; })(M || (M = {})); -for (var x in M) { } -for (var x in M.X) { } +for (var x in M) { +} +for (var x in M.X) { +} var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Blue"] = 1] = "Blue"; })(Color || (Color = {})); -for (var x in Color) { } -for (var x in Color.Blue) { } +for (var x in Color) { +} +for (var x in Color.Blue) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring.js b/tests/baselines/reference/for-inStatementsDestructuring.js index e5e00d5b3ab..25a696f9fc5 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring.js +++ b/tests/baselines/reference/for-inStatementsDestructuring.js @@ -2,4 +2,5 @@ for (var [a, b] in []) {} //// [for-inStatementsDestructuring.js] -for (var _a = void 0, a = _a[0], b = _a[1] in []) { } +for (var _a = void 0, a = _a[0], b = _a[1] in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring2.js b/tests/baselines/reference/for-inStatementsDestructuring2.js index 41a6d30919f..7051a5a058a 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring2.js +++ b/tests/baselines/reference/for-inStatementsDestructuring2.js @@ -2,4 +2,5 @@ for (var {a, b} in []) {} //// [for-inStatementsDestructuring2.js] -for (var _a = void 0, a = _a.a, b = _a.b in []) { } +for (var _a = void 0, a = _a.a, b = _a.b in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring3.js b/tests/baselines/reference/for-inStatementsDestructuring3.js index 0970740acab..2784e48708b 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring3.js +++ b/tests/baselines/reference/for-inStatementsDestructuring3.js @@ -4,4 +4,8 @@ for ([a, b] in []) { } //// [for-inStatementsDestructuring3.js] var a, b; -for ([a, b] in []) { } +for ([ + a, + b +] in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring4.js b/tests/baselines/reference/for-inStatementsDestructuring4.js index 0cce61ac96d..6eb56960240 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring4.js +++ b/tests/baselines/reference/for-inStatementsDestructuring4.js @@ -4,4 +4,8 @@ for ({a, b} in []) { } //// [for-inStatementsDestructuring4.js] var a, b; -for ({ a: a, b: b } in []) { } +for ({ + a: a, + b: b +} in []) { +} diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 6d42a550a01..a485c8ba7ce 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -71,36 +71,60 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aNumber; -for (aNumber in {}) { } +for (aNumber in {}) { +} var aBoolean; -for (aBoolean in {}) { } +for (aBoolean in {}) { +} var aRegExp; -for (aRegExp in {}) { } -for (var idx in {}) { } -function fn() { } -for (var x in fn()) { } +for (aRegExp in {}) { +} +for (var idx in {}) { +} +function fn() { +} +for (var x in fn()) { +} var c, d, e; -for (var x in c || d) { } -for (var x in e ? c : d) { } -for (var x in 42 ? c : d) { } -for (var x in '' ? c : d) { } -for (var x in 42 ? d[x] : c[x]) { } -for (var x in c[23]) { } -for (var x in (function (x) { return x; })) { } -for (var x in function (x, y) { return x + y; }) { } +for (var x in c || d) { +} +for (var x in e ? c : d) { +} +for (var x in 42 ? c : d) { +} +for (var x in '' ? c : d) { +} +for (var x in 42 ? d[x] : c[x]) { +} +for (var x in c[23]) { +} +for (var x in (function (x) { + return x; +})) { +} +for (var x in function (x, y) { + return x + y; +}) { +} var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } return null; }; A.baz = function () { - for (var x in this) { } - for (var x in this.baz) { } - for (var x in this.baz()) { } + for (var x in this) { + } + for (var x in this.baz) { + } + for (var x in this.baz()) { + } return null; }; return A; @@ -111,14 +135,20 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } - for (var x in _super.prototype.biz) { } - for (var x in _super.prototype.biz.call(this)) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } + for (var x in _super.prototype.biz) { + } + for (var x in _super.prototype.biz.call(this)) { + } return null; }; return B; })(A); var i; -for (var x in i[42]) { } +for (var x in i[42]) { +} diff --git a/tests/baselines/reference/for-of1.js b/tests/baselines/reference/for-of1.js index 9df6a96d78f..fb74d6ecede 100644 --- a/tests/baselines/reference/for-of1.js +++ b/tests/baselines/reference/for-of1.js @@ -4,4 +4,5 @@ for (v of []) { } //// [for-of1.js] var v; -for (v of []) { } +for (v of []) { +} diff --git a/tests/baselines/reference/for-of10.js b/tests/baselines/reference/for-of10.js index 7fd05f5479b..3b01719417f 100644 --- a/tests/baselines/reference/for-of10.js +++ b/tests/baselines/reference/for-of10.js @@ -4,4 +4,7 @@ for (v of [0]) { } //// [for-of10.js] var v; -for (v of [0]) { } +for (v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of11.js b/tests/baselines/reference/for-of11.js index 055ed0039dc..58486c477e7 100644 --- a/tests/baselines/reference/for-of11.js +++ b/tests/baselines/reference/for-of11.js @@ -4,4 +4,8 @@ for (v of [0, ""]) { } //// [for-of11.js] var v; -for (v of [0, ""]) { } +for (v of [ + 0, + "" +]) { +} diff --git a/tests/baselines/reference/for-of12.js b/tests/baselines/reference/for-of12.js index 6185ca8e331..f489eaa40f9 100644 --- a/tests/baselines/reference/for-of12.js +++ b/tests/baselines/reference/for-of12.js @@ -4,4 +4,8 @@ for (v of [0, ""].values()) { } //// [for-of12.js] var v; -for (v of [0, ""].values()) { } +for (v of [ + 0, + "" +].values()) { +} diff --git a/tests/baselines/reference/for-of13.js b/tests/baselines/reference/for-of13.js index e66668f1736..87d908b42b8 100644 --- a/tests/baselines/reference/for-of13.js +++ b/tests/baselines/reference/for-of13.js @@ -4,4 +4,7 @@ for (v of [""].values()) { } //// [for-of13.js] var v; -for (v of [""].values()) { } +for (v of [ + "" +].values()) { +} diff --git a/tests/baselines/reference/for-of14.js b/tests/baselines/reference/for-of14.js index d5f9e29b766..958e621c8aa 100644 --- a/tests/baselines/reference/for-of14.js +++ b/tests/baselines/reference/for-of14.js @@ -10,12 +10,10 @@ class StringIterator { //// [for-of14.js] var v; -for (v of new StringIterator) { } // Should fail because the iterator is not iterable -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (v of new StringIterator) { +} // Should fail because the iterator is not iterable +class StringIterator { + next() { return ""; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of15.js b/tests/baselines/reference/for-of15.js index 36955389756..2b4846ec8be 100644 --- a/tests/baselines/reference/for-of15.js +++ b/tests/baselines/reference/for-of15.js @@ -13,15 +13,13 @@ class StringIterator { //// [for-of15.js] var v; -for (v of new StringIterator) { } // Should fail -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (v of new StringIterator) { +} // Should fail +class StringIterator { + next() { return ""; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of16.js b/tests/baselines/reference/for-of16.js index 21ba2adb75c..1cdf72c26ac 100644 --- a/tests/baselines/reference/for-of16.js +++ b/tests/baselines/reference/for-of16.js @@ -10,12 +10,10 @@ class StringIterator { //// [for-of16.js] var v; -for (v of new StringIterator) { } // Should fail -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype[Symbol.iterator] = function () { +for (v of new StringIterator) { +} // Should fail +class StringIterator { + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of17.js b/tests/baselines/reference/for-of17.js index 5c56cdab445..3fb4fac91d6 100644 --- a/tests/baselines/reference/for-of17.js +++ b/tests/baselines/reference/for-of17.js @@ -16,18 +16,16 @@ class NumberIterator { //// [for-of17.js] var v; -for (v of new NumberIterator) { } // Should succeed -var NumberIterator = (function () { - function NumberIterator() { - } - NumberIterator.prototype.next = function () { +for (v of new NumberIterator) { +} // Should succeed +class NumberIterator { + next() { return { value: 0, done: false }; - }; - NumberIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return NumberIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of18.js b/tests/baselines/reference/for-of18.js index 57168d9bf07..ae3a9e130f0 100644 --- a/tests/baselines/reference/for-of18.js +++ b/tests/baselines/reference/for-of18.js @@ -16,18 +16,16 @@ class StringIterator { //// [for-of18.js] var v; -for (v of new StringIterator) { } // Should succeed -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (v of new StringIterator) { +} // Should succeed +class StringIterator { + next() { return { value: "", done: false }; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of19.js b/tests/baselines/reference/for-of19.js index eefb9339f18..d0f95caa1e2 100644 --- a/tests/baselines/reference/for-of19.js +++ b/tests/baselines/reference/for-of19.js @@ -20,22 +20,16 @@ class FooIterator { for (var v of new FooIterator) { v; } -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var FooIterator = (function () { - function FooIterator() { - } - FooIterator.prototype.next = function () { +class Foo { +} +class FooIterator { + next() { return { value: new Foo, done: false }; - }; - FooIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return FooIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of2.js b/tests/baselines/reference/for-of2.js index d7eceb7c49e..49d3f76746a 100644 --- a/tests/baselines/reference/for-of2.js +++ b/tests/baselines/reference/for-of2.js @@ -4,4 +4,5 @@ for (v of []) { } //// [for-of2.js] const v; -for (v of []) { } +for (v of []) { +} diff --git a/tests/baselines/reference/for-of20.js b/tests/baselines/reference/for-of20.js index 39b1081954b..c098abd2f73 100644 --- a/tests/baselines/reference/for-of20.js +++ b/tests/baselines/reference/for-of20.js @@ -20,22 +20,16 @@ class FooIterator { for (let v of new FooIterator) { v; } -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var FooIterator = (function () { - function FooIterator() { - } - FooIterator.prototype.next = function () { +class Foo { +} +class FooIterator { + next() { return { value: new Foo, done: false }; - }; - FooIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return FooIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of21.js b/tests/baselines/reference/for-of21.js index 5deaad3c2d8..27da28e3b4f 100644 --- a/tests/baselines/reference/for-of21.js +++ b/tests/baselines/reference/for-of21.js @@ -20,22 +20,16 @@ class FooIterator { for (const v of new FooIterator) { v; } -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var FooIterator = (function () { - function FooIterator() { - } - FooIterator.prototype.next = function () { +class Foo { +} +class FooIterator { + next() { return { value: new Foo, done: false }; - }; - FooIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return FooIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of22.js b/tests/baselines/reference/for-of22.js index d38accb6cd8..886e8dba7c3 100644 --- a/tests/baselines/reference/for-of22.js +++ b/tests/baselines/reference/for-of22.js @@ -21,22 +21,16 @@ class FooIterator { v; for (var v of new FooIterator) { } -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var FooIterator = (function () { - function FooIterator() { - } - FooIterator.prototype.next = function () { +class Foo { +} +class FooIterator { + next() { return { value: new Foo, done: false }; - }; - FooIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return FooIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of23.js b/tests/baselines/reference/for-of23.js index 87bb1fd428d..f5649128c11 100644 --- a/tests/baselines/reference/for-of23.js +++ b/tests/baselines/reference/for-of23.js @@ -20,22 +20,16 @@ class FooIterator { for (const v of new FooIterator) { const v = 0; // new scope } -var Foo = (function () { - function Foo() { - } - return Foo; -})(); -var FooIterator = (function () { - function FooIterator() { - } - FooIterator.prototype.next = function () { +class Foo { +} +class FooIterator { + next() { return { value: new Foo, done: false }; - }; - FooIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return FooIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of24.js b/tests/baselines/reference/for-of24.js index b4918519603..bb605011ef6 100644 --- a/tests/baselines/reference/for-of24.js +++ b/tests/baselines/reference/for-of24.js @@ -5,4 +5,5 @@ for (var v of x) { } //// [for-of24.js] var x; -for (var v of x) { } +for (var v of x) { +} diff --git a/tests/baselines/reference/for-of25.js b/tests/baselines/reference/for-of25.js index 21b5ce1408b..2c85a4dc2fd 100644 --- a/tests/baselines/reference/for-of25.js +++ b/tests/baselines/reference/for-of25.js @@ -10,12 +10,10 @@ class StringIterator { //// [for-of25.js] var x; -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype[Symbol.iterator] = function () { +for (var v of new StringIterator) { +} +class StringIterator { + [Symbol.iterator]() { return x; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of26.js b/tests/baselines/reference/for-of26.js index a45492a81c0..e048caf1006 100644 --- a/tests/baselines/reference/for-of26.js +++ b/tests/baselines/reference/for-of26.js @@ -13,15 +13,13 @@ class StringIterator { //// [for-of26.js] var x; -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (var v of new StringIterator) { +} +class StringIterator { + next() { return x; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of27.js b/tests/baselines/reference/for-of27.js index 91e1e7194c1..8b44ca03ef4 100644 --- a/tests/baselines/reference/for-of27.js +++ b/tests/baselines/reference/for-of27.js @@ -6,9 +6,7 @@ class StringIterator { } //// [for-of27.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - return StringIterator; -})(); +for (var v of new StringIterator) { +} +class StringIterator { +} diff --git a/tests/baselines/reference/for-of28.js b/tests/baselines/reference/for-of28.js index 06029e6bb08..69c8ccab727 100644 --- a/tests/baselines/reference/for-of28.js +++ b/tests/baselines/reference/for-of28.js @@ -9,12 +9,10 @@ class StringIterator { } //// [for-of28.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype[Symbol.iterator] = function () { +for (var v of new StringIterator) { +} +class StringIterator { + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of29.js b/tests/baselines/reference/for-of29.js index 450cafbde85..c369731bee0 100644 --- a/tests/baselines/reference/for-of29.js +++ b/tests/baselines/reference/for-of29.js @@ -8,4 +8,5 @@ for (var v of iterableWithOptionalIterator) { } //// [for-of29.js] var iterableWithOptionalIterator; -for (var v of iterableWithOptionalIterator) { } +for (var v of iterableWithOptionalIterator) { +} diff --git a/tests/baselines/reference/for-of3.js b/tests/baselines/reference/for-of3.js index 7ef27187702..f47802dac6b 100644 --- a/tests/baselines/reference/for-of3.js +++ b/tests/baselines/reference/for-of3.js @@ -4,4 +4,5 @@ for (v++ of []) { } //// [for-of3.js] var v; -for (v++ of []) { } +for (v++ of []) { +} diff --git a/tests/baselines/reference/for-of30.js b/tests/baselines/reference/for-of30.js index 4618dae5ff6..0ed6caaf81e 100644 --- a/tests/baselines/reference/for-of30.js +++ b/tests/baselines/reference/for-of30.js @@ -17,19 +17,19 @@ class StringIterator { } //// [for-of30.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { +for (var v of new StringIterator) { +} +class StringIterator { + constructor() { this.return = 0; } - StringIterator.prototype.next = function () { + next() { return { done: false, value: "" }; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of31.js b/tests/baselines/reference/for-of31.js index 588c75a1145..d38c1fa017d 100644 --- a/tests/baselines/reference/for-of31.js +++ b/tests/baselines/reference/for-of31.js @@ -15,18 +15,16 @@ class StringIterator { } //// [for-of31.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (var v of new StringIterator) { +} +class StringIterator { + next() { return { // no done property value: "" }; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of32.js b/tests/baselines/reference/for-of32.js index d25d16fbebe..bce2097e3ca 100644 --- a/tests/baselines/reference/for-of32.js +++ b/tests/baselines/reference/for-of32.js @@ -2,4 +2,5 @@ for (var v of v) { } //// [for-of32.js] -for (var v of v) { } +for (var v of v) { +} diff --git a/tests/baselines/reference/for-of33.js b/tests/baselines/reference/for-of33.js index 91d8de41c6a..66097f777c8 100644 --- a/tests/baselines/reference/for-of33.js +++ b/tests/baselines/reference/for-of33.js @@ -8,12 +8,10 @@ class StringIterator { } //// [for-of33.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype[Symbol.iterator] = function () { +for (var v of new StringIterator) { +} +class StringIterator { + [Symbol.iterator]() { return v; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of34.js b/tests/baselines/reference/for-of34.js index ccb6006c63d..568a9f73535 100644 --- a/tests/baselines/reference/for-of34.js +++ b/tests/baselines/reference/for-of34.js @@ -12,15 +12,13 @@ class StringIterator { } //// [for-of34.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (var v of new StringIterator) { +} +class StringIterator { + next() { return v; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of35.js b/tests/baselines/reference/for-of35.js index a4f1a37e3bf..a157d5e2e8e 100644 --- a/tests/baselines/reference/for-of35.js +++ b/tests/baselines/reference/for-of35.js @@ -15,18 +15,16 @@ class StringIterator { } //// [for-of35.js] -for (var v of new StringIterator) { } -var StringIterator = (function () { - function StringIterator() { - } - StringIterator.prototype.next = function () { +for (var v of new StringIterator) { +} +class StringIterator { + next() { return { done: true, value: v }; - }; - StringIterator.prototype[Symbol.iterator] = function () { + } + [Symbol.iterator]() { return this; - }; - return StringIterator; -})(); + } +} diff --git a/tests/baselines/reference/for-of36.js b/tests/baselines/reference/for-of36.js index 14523695151..fb70b1d60cc 100644 --- a/tests/baselines/reference/for-of36.js +++ b/tests/baselines/reference/for-of36.js @@ -5,7 +5,10 @@ for (var v of tuple) { } //// [for-of36.js] -var tuple = ["", true]; +var tuple = [ + "", + true +]; for (var v of tuple) { v; } diff --git a/tests/baselines/reference/for-of37.js b/tests/baselines/reference/for-of37.js index 472193e6cb5..cada43a6326 100644 --- a/tests/baselines/reference/for-of37.js +++ b/tests/baselines/reference/for-of37.js @@ -5,7 +5,12 @@ for (var v of map) { } //// [for-of37.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var v of map) { v; } diff --git a/tests/baselines/reference/for-of38.js b/tests/baselines/reference/for-of38.js index 1f0ac09682e..48b697f906e 100644 --- a/tests/baselines/reference/for-of38.js +++ b/tests/baselines/reference/for-of38.js @@ -6,7 +6,12 @@ for (var [k, v] of map) { } //// [for-of38.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of39.js b/tests/baselines/reference/for-of39.js index 91dbc56c0ab..3b7d8d9a56a 100644 --- a/tests/baselines/reference/for-of39.js +++ b/tests/baselines/reference/for-of39.js @@ -6,7 +6,16 @@ for (var [k, v] of map) { } //// [for-of39.js] -var map = new Map([["", true], ["", 0]]); +var map = new Map([ + [ + "", + true + ], + [ + "", + 0 + ] +]); for (var [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of4.js b/tests/baselines/reference/for-of4.js index 147619d2fe2..03cef92c1f5 100644 --- a/tests/baselines/reference/for-of4.js +++ b/tests/baselines/reference/for-of4.js @@ -4,6 +4,8 @@ for (var v of [0]) { } //// [for-of4.js] -for (var v of [0]) { +for (var v of [ + 0 +]) { v; } diff --git a/tests/baselines/reference/for-of40.js b/tests/baselines/reference/for-of40.js index 243f81097db..06fc45adfa7 100644 --- a/tests/baselines/reference/for-of40.js +++ b/tests/baselines/reference/for-of40.js @@ -6,7 +6,12 @@ for (var [k = "", v = false] of map) { } //// [for-of40.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var [k = "", v = false] of map) { k; v; diff --git a/tests/baselines/reference/for-of41.js b/tests/baselines/reference/for-of41.js index 0fa380c53c4..f3ae215c5b8 100644 --- a/tests/baselines/reference/for-of41.js +++ b/tests/baselines/reference/for-of41.js @@ -6,7 +6,16 @@ for (var {x: [a], y: {p}} of array) { } //// [for-of41.js] -var array = [{ x: [0], y: { p: "" } }]; +var array = [ + { + x: [ + 0 + ], + y: { + p: "" + } + } +]; for (var { x: [a], y: { p } } of array) { a; p; diff --git a/tests/baselines/reference/for-of42.js b/tests/baselines/reference/for-of42.js index 1fa9219df47..774ce512e9f 100644 --- a/tests/baselines/reference/for-of42.js +++ b/tests/baselines/reference/for-of42.js @@ -6,7 +6,12 @@ for (var {x: a, y: b} of array) { } //// [for-of42.js] -var array = [{ x: "", y: 0 }]; +var array = [ + { + x: "", + y: 0 + } +]; for (var { x: a, y: b } of array) { a; b; diff --git a/tests/baselines/reference/for-of43.js b/tests/baselines/reference/for-of43.js index de3b4fcd9b0..dc8c9c885d8 100644 --- a/tests/baselines/reference/for-of43.js +++ b/tests/baselines/reference/for-of43.js @@ -6,7 +6,12 @@ for (var {x: a = "", y: b = true} of array) { } //// [for-of43.js] -var array = [{ x: "", y: 0 }]; +var array = [ + { + x: "", + y: 0 + } +]; for (var { x: a = "", y: b = true } of array) { a; b; diff --git a/tests/baselines/reference/for-of44.js b/tests/baselines/reference/for-of44.js index 087485ed73f..9d4745d1366 100644 --- a/tests/baselines/reference/for-of44.js +++ b/tests/baselines/reference/for-of44.js @@ -6,7 +6,20 @@ for (var [num, strBoolSym] of array) { } //// [for-of44.js] -var array = [[0, ""], [0, true], [1, Symbol()]]; +var array = [ + [ + 0, + "" + ], + [ + 0, + true + ], + [ + 1, + Symbol() + ] +]; for (var [num, strBoolSym] of array) { num; strBoolSym; diff --git a/tests/baselines/reference/for-of45.js b/tests/baselines/reference/for-of45.js index 1222b2dcdd5..3394c50c215 100644 --- a/tests/baselines/reference/for-of45.js +++ b/tests/baselines/reference/for-of45.js @@ -8,8 +8,16 @@ for ([k = "", v = false] of map) { //// [for-of45.js] var k, v; -var map = new Map([["", true]]); -for ([k = "", v = false] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k = "", + v = false +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of46.js b/tests/baselines/reference/for-of46.js index 2ea15936c54..7146993513c 100644 --- a/tests/baselines/reference/for-of46.js +++ b/tests/baselines/reference/for-of46.js @@ -8,8 +8,16 @@ for ([k = false, v = ""] of map) { //// [for-of46.js] var k, v; -var map = new Map([["", true]]); -for ([k = false, v = ""] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k = false, + v = "" +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of47.js b/tests/baselines/reference/for-of47.js index d7e596d2edc..f1e9295c367 100644 --- a/tests/baselines/reference/for-of47.js +++ b/tests/baselines/reference/for-of47.js @@ -9,12 +9,20 @@ for ({x, y: y = E.x} of array) { //// [for-of47.js] var x, y; -var array = [{ x: "", y: true }]; +var array = [ + { + x: "", + y: true + } +]; var E; (function (E) { E[E["x"] = 0] = "x"; })(E || (E = {})); -for ({ x, y: y = E.x } of array) { +for ({ + x, + y: y = E.x +} of array) { x; y; } diff --git a/tests/baselines/reference/for-of48.js b/tests/baselines/reference/for-of48.js index 2a5e4e32b94..3030f07e605 100644 --- a/tests/baselines/reference/for-of48.js +++ b/tests/baselines/reference/for-of48.js @@ -9,12 +9,20 @@ for ({x, y = E.x} of array) { //// [for-of48.js] var x, y; -var array = [{ x: "", y: true }]; +var array = [ + { + x: "", + y: true + } +]; var E; (function (E) { E[E["x"] = 0] = "x"; })(E || (E = {})); -for ({ x, y: = E.x } of array) { +for ({ + x, + y: = E.x +} of array) { x; y; } diff --git a/tests/baselines/reference/for-of49.js b/tests/baselines/reference/for-of49.js index ac7f99f3607..ad3bc415d1d 100644 --- a/tests/baselines/reference/for-of49.js +++ b/tests/baselines/reference/for-of49.js @@ -8,8 +8,18 @@ for ([k, ...[v]] of map) { //// [for-of49.js] var k, v; -var map = new Map([["", true]]); -for ([k, ...[v]] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k, + ...[ + v + ] +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of5.js b/tests/baselines/reference/for-of5.js index 4d93b0bd483..374e1aa79a0 100644 --- a/tests/baselines/reference/for-of5.js +++ b/tests/baselines/reference/for-of5.js @@ -4,6 +4,8 @@ for (let v of [0]) { } //// [for-of5.js] -for (let v of [0]) { +for (let v of [ + 0 +]) { v; } diff --git a/tests/baselines/reference/for-of50.js b/tests/baselines/reference/for-of50.js index a300812e6a9..21e6f1e7325 100644 --- a/tests/baselines/reference/for-of50.js +++ b/tests/baselines/reference/for-of50.js @@ -6,7 +6,12 @@ for (const [k, v] of map) { } //// [for-of50.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (const [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of51.js b/tests/baselines/reference/for-of51.js index cae8c8b38fe..29b907b0f80 100644 --- a/tests/baselines/reference/for-of51.js +++ b/tests/baselines/reference/for-of51.js @@ -2,4 +2,5 @@ for (let let of []) {} //// [for-of51.js] -for (let let of []) { } +for (let let of []) { +} diff --git a/tests/baselines/reference/for-of52.js b/tests/baselines/reference/for-of52.js index 48e1dca936c..066dd4f81ac 100644 --- a/tests/baselines/reference/for-of52.js +++ b/tests/baselines/reference/for-of52.js @@ -2,4 +2,7 @@ for (let [v, v] of [[]]) {} //// [for-of52.js] -for (let [v, v] of [[]]) { } +for (let [v, v] of [ + [] +]) { +} diff --git a/tests/baselines/reference/for-of55.errors.txt b/tests/baselines/reference/for-of55.errors.txt new file mode 100644 index 00000000000..aa1285afbd6 --- /dev/null +++ b/tests/baselines/reference/for-of55.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/es6/for-ofStatements/for-of55.ts(2,15): error TS2448: Block-scoped variable 'v' used before its declaration. + + +==== tests/cases/conformance/es6/for-ofStatements/for-of55.ts (1 errors) ==== + let v = [1]; + for (let v of v) { + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + v; + } \ No newline at end of file diff --git a/tests/baselines/reference/for-of55.js b/tests/baselines/reference/for-of55.js index a0f949c6ce5..30baacc8b13 100644 --- a/tests/baselines/reference/for-of55.js +++ b/tests/baselines/reference/for-of55.js @@ -5,7 +5,9 @@ for (let v of v) { } //// [for-of55.js] -let v = [1]; +let v = [ + 1 +]; for (let v of v) { v; } diff --git a/tests/baselines/reference/for-of55.types b/tests/baselines/reference/for-of55.types deleted file mode 100644 index b0f5aab3fee..00000000000 --- a/tests/baselines/reference/for-of55.types +++ /dev/null @@ -1,12 +0,0 @@ -=== tests/cases/conformance/es6/for-ofStatements/for-of55.ts === -let v = [1]; ->v : number[] ->[1] : number[] - -for (let v of v) { ->v : any ->v : any - - v; ->v : any -} diff --git a/tests/baselines/reference/for-of56.js b/tests/baselines/reference/for-of56.js index 0992b9c0bb9..5d540151c12 100644 --- a/tests/baselines/reference/for-of56.js +++ b/tests/baselines/reference/for-of56.js @@ -2,4 +2,5 @@ for (var let of []) {} //// [for-of56.js] -for (var let of []) { } +for (var let of []) { +} diff --git a/tests/baselines/reference/for-of6.js b/tests/baselines/reference/for-of6.js index 24e93e2a9fd..f176488595a 100644 --- a/tests/baselines/reference/for-of6.js +++ b/tests/baselines/reference/for-of6.js @@ -4,6 +4,8 @@ for (v of [0]) { } //// [for-of6.js] -for (v of [0]) { +for (v of [ + 0 +]) { let v; } diff --git a/tests/baselines/reference/for-of7.js b/tests/baselines/reference/for-of7.js index 04aadd9736a..9bc205676d7 100644 --- a/tests/baselines/reference/for-of7.js +++ b/tests/baselines/reference/for-of7.js @@ -4,4 +4,7 @@ for (let v of [0]) { } //// [for-of7.js] v; -for (let v of [0]) { } +for (let v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of8.js b/tests/baselines/reference/for-of8.js index f33d69166dc..d5219780446 100644 --- a/tests/baselines/reference/for-of8.js +++ b/tests/baselines/reference/for-of8.js @@ -4,4 +4,7 @@ for (var v of [0]) { } //// [for-of8.js] v; -for (var v of [0]) { } +for (var v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of9.js b/tests/baselines/reference/for-of9.js index f96d353bd7a..b53092414ad 100644 --- a/tests/baselines/reference/for-of9.js +++ b/tests/baselines/reference/for-of9.js @@ -5,5 +5,9 @@ for (v of "hello") { } //// [for-of9.js] var v; -for (v of ["hello"]) { } -for (v of "hello") { } +for (v of [ + "hello" +]) { +} +for (v of "hello") { +} diff --git a/tests/baselines/reference/forBreakStatements.js b/tests/baselines/reference/forBreakStatements.js index 9ed65627c9c..017837cded4 100644 --- a/tests/baselines/reference/forBreakStatements.js +++ b/tests/baselines/reference/forBreakStatements.js @@ -61,6 +61,7 @@ SEVEN: for (;;) for (;;) break SEVEN; EIGHT: for (;;) { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } diff --git a/tests/baselines/reference/forContinueStatements.js b/tests/baselines/reference/forContinueStatements.js index 34f70bb1fc1..b1ace24f4b1 100644 --- a/tests/baselines/reference/forContinueStatements.js +++ b/tests/baselines/reference/forContinueStatements.js @@ -61,6 +61,7 @@ SEVEN: for (;;) for (;;) continue SEVEN; EIGHT: for (;;) { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } diff --git a/tests/baselines/reference/forInBreakStatements.js b/tests/baselines/reference/forInBreakStatements.js index 24b7cc57b8d..09f0071d4bf 100644 --- a/tests/baselines/reference/forInBreakStatements.js +++ b/tests/baselines/reference/forInBreakStatements.js @@ -61,6 +61,7 @@ SEVEN: for (var x in {}) for (var x in {}) break SEVEN; EIGHT: for (var x in {}) { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } diff --git a/tests/baselines/reference/forInContinueStatements.js b/tests/baselines/reference/forInContinueStatements.js index 8b036c59721..68cac5221ae 100644 --- a/tests/baselines/reference/forInContinueStatements.js +++ b/tests/baselines/reference/forInContinueStatements.js @@ -61,6 +61,7 @@ SEVEN: for (var x in {}) for (var x in {}) continue SEVEN; EIGHT: for (var x in {}) { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } diff --git a/tests/baselines/reference/forStatements.js b/tests/baselines/reference/forStatements.js index 39fdb6c8871..12f1c691cc5 100644 --- a/tests/baselines/reference/forStatements.js +++ b/tests/baselines/reference/forStatements.js @@ -57,7 +57,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -66,24 +68,50 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); -for (var aNumber = 9.9;;) { } -for (var aString = 'this is a string';;) { } -for (var aDate = new Date(12);;) { } -for (var anObject = new Object();;) { } -for (var anAny = null;;) { } -for (var aSecondAny = undefined;;) { } -for (var aVoid = undefined;;) { } -for (var anInterface = new C();;) { } -for (var aClass = new C();;) { } -for (var aGenericClass = new D();;) { } -for (var anObjectLiteral = { id: 12 };;) { } -for (var anOtherObjectLiteral = new C();;) { } -for (var aFunction = F;;) { } -for (var anOtherFunction = F;;) { } -for (var aLambda = function (x) { return 2; };;) { } -for (var aModule = M;;) { } -for (var aClassInModule = new M.A();;) { } -for (var aFunctionInModule = function (x) { return 'this is a string'; };;) { } +for (var aNumber = 9.9;;) { +} +for (var aString = 'this is a string';;) { +} +for (var aDate = new Date(12);;) { +} +for (var anObject = new Object();;) { +} +for (var anAny = null;;) { +} +for (var aSecondAny = undefined;;) { +} +for (var aVoid = undefined;;) { +} +for (var anInterface = new C();;) { +} +for (var aClass = new C();;) { +} +for (var aGenericClass = new D();;) { +} +for (var anObjectLiteral = { + id: 12 +};;) { +} +for (var anOtherObjectLiteral = new C();;) { +} +for (var aFunction = F;;) { +} +for (var anOtherFunction = F;;) { +} +for (var aLambda = function (x) { + return 2; +};;) { +} +for (var aModule = M;;) { +} +for (var aClassInModule = new M.A();;) { +} +for (var aFunctionInModule = function (x) { + return 'this is a string'; +};;) { +} diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 2282136be3a..40888c7ce8b 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -77,7 +77,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -86,25 +88,58 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); // all of these are errors -for (var a;;) { } -for (var a = 1;;) { } -for (var a = 'a string';;) { } -for (var a = new C();;) { } -for (var a = new D();;) { } -for (var a = M;;) { } -for (var b;;) { } -for (var b = new C();;) { } -for (var b = new C2();;) { } -for (var f = F;;) { } -for (var f = function (x) { return ''; };;) { } -for (var arr;;) { } -for (var arr = [1, 2, 3, 4];;) { } -for (var arr = [new C(), new C2(), new D()];;) { } -for (var arr2 = [new D()];;) { } -for (var arr2 = new Array();;) { } -for (var m;;) { } -for (var m = M.A;;) { } +for (var a;;) { +} +for (var a = 1;;) { +} +for (var a = 'a string';;) { +} +for (var a = new C();;) { +} +for (var a = new D();;) { +} +for (var a = M;;) { +} +for (var b;;) { +} +for (var b = new C();;) { +} +for (var b = new C2();;) { +} +for (var f = F;;) { +} +for (var f = function (x) { + return ''; +};;) { +} +for (var arr;;) { +} +for (var arr = [ + 1, + 2, + 3, + 4 +];;) { +} +for (var arr = [ + new C(), + new C2(), + new D() +];;) { +} +for (var arr2 = [ + new D() +];;) { +} +for (var arr2 = new Array();;) { +} +for (var m;;) { +} +for (var m = M.A;;) { +} diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.js b/tests/baselines/reference/forStatementsMultipleValidDecl.js index e95e37d63ac..aaf88edfe8b 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.js @@ -35,29 +35,74 @@ for (var a: typeof a; ;) { } //// [forStatementsMultipleValidDecl.js] // all expected to be valid -for (var x;;) { } -for (var x = 2;;) { } -for (var x = undefined;;) { } +for (var x;;) { +} +for (var x = 2;;) { +} +for (var x = undefined;;) { +} // new declaration space, making redeclaring x as a string valid function declSpace() { - for (var x = 'this is a string';;) { } + for (var x = 'this is a string';;) { + } +} +for (var p;;) { +} +for (var p = { + x: 1, + y: 2 +};;) { +} +for (var p = { + x: 0, + y: undefined +};;) { +} +for (var p = { + x: 1, + y: undefined +};;) { +} +for (var p = { + x: 1, + y: 2 +};;) { +} +for (var p = { + x: 0, + y: undefined +};;) { +} +for (var p;;) { +} +for (var fn = function (s) { + return 42; +};;) { +} +for (var fn = function (s) { + return 3; +};;) { +} +for (var fn;;) { +} +for (var fn;;) { +} +for (var fn = null;;) { +} +for (var fn;;) { +} +for (var a;;) { +} +for (var a = [ + 'a', + 'b' +];;) { +} +for (var a = [];;) { +} +for (var a = [];;) { +} +for (var a = new Array();;) { +} +for (var a;;) { } -for (var p;;) { } -for (var p = { x: 1, y: 2 };;) { } -for (var p = { x: 0, y: undefined };;) { } -for (var p = { x: 1, y: undefined };;) { } -for (var p = { x: 1, y: 2 };;) { } -for (var p = { x: 0, y: undefined };;) { } -for (var p;;) { } -for (var fn = function (s) { return 42; };;) { } -for (var fn = function (s) { return 3; };;) { } -for (var fn;;) { } -for (var fn;;) { } -for (var fn = null;;) { } -for (var fn;;) { } -for (var a;;) { } -for (var a = ['a', 'b'];;) { } -for (var a = [];;) { } -for (var a = [];;) { } -for (var a = new Array();;) { } -for (var a;;) { } diff --git a/tests/baselines/reference/funClodule.js b/tests/baselines/reference/funClodule.js index cc7dba7e476..8629ed63055 100644 --- a/tests/baselines/reference/funClodule.js +++ b/tests/baselines/reference/funClodule.js @@ -20,10 +20,12 @@ module foo3 { class foo3 { } // Should error //// [funClodule.js] -function foo3() { } +function foo3() { +} var foo3; (function (foo3) { - function x() { } + function x() { + } foo3.x = x; })(foo3 || (foo3 = {})); var foo3 = (function () { diff --git a/tests/baselines/reference/funcdecl.js b/tests/baselines/reference/funcdecl.js index 348d25bd670..de080873b9f 100644 --- a/tests/baselines/reference/funcdecl.js +++ b/tests/baselines/reference/funcdecl.js @@ -115,7 +115,8 @@ function overload1(ns) { return ns.toString(); } var withOverloadSignature = overload1; -function f(n) { } +function f(n) { +} var m2; (function (m2) { function foo(n) { diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt index 72f24af0c63..51287c87393 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(6,5): error TS2411: Property 'prop' of type 'number' is not assignable to string index type 'string'. ==== tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts (2 errors) ==== function Foo(s: string); - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function Foo(n: number) { } diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js index d59cff501ed..004e65d92af 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js @@ -8,4 +8,5 @@ interface Foo { } //// [functionAndInterfaceWithSeparateErrors.js] -function Foo(n) { } +function Foo(n) { +} diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.js b/tests/baselines/reference/functionAndPropertyNameConflict.js index 28a2cd54c9e..1368f8241d5 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.js +++ b/tests/baselines/reference/functionAndPropertyNameConflict.js @@ -10,7 +10,8 @@ class C65 { var C65 = (function () { function C65() { } - C65.prototype.aaaaa = function () { }; + C65.prototype.aaaaa = function () { + }; Object.defineProperty(C65.prototype, "aaaaa", { get: function () { return 1; diff --git a/tests/baselines/reference/functionArgShadowing.js b/tests/baselines/reference/functionArgShadowing.js index 451e46536e0..c74570902ed 100644 --- a/tests/baselines/reference/functionArgShadowing.js +++ b/tests/baselines/reference/functionArgShadowing.js @@ -18,13 +18,15 @@ class C { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); function foo(x) { diff --git a/tests/baselines/reference/functionAssignment.js b/tests/baselines/reference/functionAssignment.js index 3237f53bf9a..52b66946500 100644 --- a/tests/baselines/reference/functionAssignment.js +++ b/tests/baselines/reference/functionAssignment.js @@ -38,19 +38,30 @@ callb((a) =>{ a.length; }); //// [functionAssignment.js] -function f(n) { } -f(function () { }); +function f(n) { +} +f(function () { +}); var barbaz; var test; test.get(function (param) { - var x = barbaz.get(function () { }); + var x = barbaz.get(function () { + }); }); -function f2(n) { } +function f2(n) { +} f2(function () { var n = ''; n = 4; }); -function f3(a) { } -f3({ a: 0, b: 0 }); -function callb(a) { } -callb(function (a) { a.length; }); +function f3(a) { +} +f3({ + a: 0, + b: 0 +}); +function callb(a) { +} +callb(function (a) { + a.length; +}); diff --git a/tests/baselines/reference/functionAssignmentError.js b/tests/baselines/reference/functionAssignmentError.js index dd35ccb271a..e19547096b8 100644 --- a/tests/baselines/reference/functionAssignmentError.js +++ b/tests/baselines/reference/functionAssignmentError.js @@ -3,5 +3,9 @@ var func = function (){return "ONE";}; func = function (){return "ONE";}; //// [functionAssignmentError.js] -var func = function () { return "ONE"; }; -func = function () { return "ONE"; }; +var func = function () { + return "ONE"; +}; +func = function () { + return "ONE"; +}; diff --git a/tests/baselines/reference/functionCall1.js b/tests/baselines/reference/functionCall1.js index cb8c1a46a23..8025ad5a6f5 100644 --- a/tests/baselines/reference/functionCall1.js +++ b/tests/baselines/reference/functionCall1.js @@ -3,6 +3,8 @@ function foo():any{return ""}; var x = foo(); //// [functionCall1.js] -function foo() { return ""; } +function foo() { + return ""; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall11.js b/tests/baselines/reference/functionCall11.js index 019ea213dbc..9c36dedba36 100644 --- a/tests/baselines/reference/functionCall11.js +++ b/tests/baselines/reference/functionCall11.js @@ -8,7 +8,8 @@ foo('foo', 1, 'bar'); //// [functionCall11.js] -function foo(a, b) { } +function foo(a, b) { +} foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall12.js b/tests/baselines/reference/functionCall12.js index 2c3396c209a..ca71c25a172 100644 --- a/tests/baselines/reference/functionCall12.js +++ b/tests/baselines/reference/functionCall12.js @@ -9,7 +9,8 @@ foo('foo', 1, 3); //// [functionCall12.js] -function foo(a, b, c) { } +function foo(a, b, c) { +} foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall2.js b/tests/baselines/reference/functionCall2.js index 5351dc116ff..5b6da378103 100644 --- a/tests/baselines/reference/functionCall2.js +++ b/tests/baselines/reference/functionCall2.js @@ -3,6 +3,8 @@ function foo():number{return 1}; var x = foo(); //// [functionCall2.js] -function foo() { return 1; } +function foo() { + return 1; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall3.js b/tests/baselines/reference/functionCall3.js index 74540c2ccf6..0e229ccddbf 100644 --- a/tests/baselines/reference/functionCall3.js +++ b/tests/baselines/reference/functionCall3.js @@ -3,5 +3,9 @@ function foo():any[]{return [1];} var x = foo(); //// [functionCall3.js] -function foo() { return [1]; } +function foo() { + return [ + 1 + ]; +} var x = foo(); diff --git a/tests/baselines/reference/functionCall4.js b/tests/baselines/reference/functionCall4.js index 0f937337d49..05021c33563 100644 --- a/tests/baselines/reference/functionCall4.js +++ b/tests/baselines/reference/functionCall4.js @@ -4,8 +4,12 @@ function bar():()=>any{return foo}; var x = bar(); //// [functionCall4.js] -function foo() { return ""; } +function foo() { + return ""; +} ; -function bar() { return foo; } +function bar() { + return foo; +} ; var x = bar(); diff --git a/tests/baselines/reference/functionCall5.js b/tests/baselines/reference/functionCall5.js index dc7db4a9959..e6b0e049ef6 100644 --- a/tests/baselines/reference/functionCall5.js +++ b/tests/baselines/reference/functionCall5.js @@ -13,6 +13,8 @@ var m1; })(); m1.c1 = c1; })(m1 || (m1 = {})); -function foo() { return new m1.c1(); } +function foo() { + return new m1.c1(); +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall6.js b/tests/baselines/reference/functionCall6.js index 01197a5fd8d..21582666b94 100644 --- a/tests/baselines/reference/functionCall6.js +++ b/tests/baselines/reference/functionCall6.js @@ -7,7 +7,8 @@ foo(); //// [functionCall6.js] -function foo(a) { } +function foo(a) { +} ; foo('bar'); foo(2); diff --git a/tests/baselines/reference/functionCall7.js b/tests/baselines/reference/functionCall7.js index cb30e5d8b24..b32c21b5892 100644 --- a/tests/baselines/reference/functionCall7.js +++ b/tests/baselines/reference/functionCall7.js @@ -18,7 +18,9 @@ var m1; })(); m1.c1 = c1; })(m1 || (m1 = {})); -function foo(a) { a.a = 1; } +function foo(a) { + a.a = 1; +} ; var myC = new m1.c1(); foo(myC); diff --git a/tests/baselines/reference/functionCall8.js b/tests/baselines/reference/functionCall8.js index 5859fdfb375..7eb5a9f60d9 100644 --- a/tests/baselines/reference/functionCall8.js +++ b/tests/baselines/reference/functionCall8.js @@ -7,7 +7,8 @@ foo(); //// [functionCall8.js] -function foo(a) { } +function foo(a) { +} foo('foo'); foo('foo', 'bar'); foo(4); diff --git a/tests/baselines/reference/functionCall9.js b/tests/baselines/reference/functionCall9.js index bc7e112f0c8..d2d81a3ca04 100644 --- a/tests/baselines/reference/functionCall9.js +++ b/tests/baselines/reference/functionCall9.js @@ -7,7 +7,8 @@ foo('foo', 1, 'bar'); foo(); //// [functionCall9.js] -function foo(a, b) { } +function foo(a, b) { +} ; foo('foo', 1); foo('foo'); diff --git a/tests/baselines/reference/functionConstraintSatisfaction.js b/tests/baselines/reference/functionConstraintSatisfaction.js index b8741456178..20c5df00987 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.js +++ b/tests/baselines/reference/functionConstraintSatisfaction.js @@ -63,7 +63,9 @@ function foo2(x: T, y: U) { //// [functionConstraintSatisfaction.js] // satisfaction of a constraint to Function, no errors expected -function foo(x) { return x; } +function foo(x) { + return x; +} var i; var C = (function () { function C() { @@ -74,10 +76,18 @@ var a; var b; var c; var r = foo(new Function()); -var r1 = foo(function (x) { return x; }); -var r2 = foo(function (x) { return x; }); -var r3 = foo(function (x) { return x; }); -var r4 = foo(function (x) { return x; }); +var r1 = foo(function (x) { + return x; +}); +var r2 = foo(function (x) { + return x; +}); +var r3 = foo(function (x) { + return x; +}); +var r4 = foo(function (x) { + return x; +}); var r5 = foo(i); var r6 = foo(C); var r7 = foo(b); @@ -91,10 +101,18 @@ var C2 = (function () { var a2; var b2; var c2; -var r9 = foo(function (x) { return x; }); -var r10 = foo(function (x) { return x; }); -var r11 = foo(function (x) { return x; }); -var r12 = foo(function (x, y) { return x; }); +var r9 = foo(function (x) { + return x; +}); +var r10 = foo(function (x) { + return x; +}); +var r11 = foo(function (x) { + return x; +}); +var r12 = foo(function (x, y) { + return x; +}); var r13 = foo(i2); var r14 = foo(C2); var r15 = foo(b2); diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.js b/tests/baselines/reference/functionConstraintSatisfaction2.js index 9e70a508ccd..45757759536 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.js +++ b/tests/baselines/reference/functionConstraintSatisfaction2.js @@ -42,11 +42,17 @@ function fff(x: T, y: U) { //// [functionConstraintSatisfaction2.js] // satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted -function foo(x) { return x; } +function foo(x) { + return x; +} foo(1); -foo(function () { }, 1); -foo(1, function () { }); -function foo2(x) { return x; } +foo(function () { +}, 1); +foo(1, function () { +}); +function foo2(x) { + return x; +} var C = (function () { function C() { } @@ -60,11 +66,17 @@ var C2 = (function () { })(); var b2; var r = foo2(new Function()); -var r2 = foo2(function (x) { return x; }); +var r2 = foo2(function (x) { + return x; +}); var r6 = foo2(C); var r7 = foo2(b); -var r8 = foo2(function (x) { return x; }); // no error expected -var r11 = foo2(function (x, y) { return x; }); +var r8 = foo2(function (x) { + return x; +}); // no error expected +var r11 = foo2(function (x, y) { + return x; +}); var r13 = foo2(C2); var r14 = foo2(b2); var f2; diff --git a/tests/baselines/reference/functionConstraintSatisfaction3.js b/tests/baselines/reference/functionConstraintSatisfaction3.js index 2c1bfa4d399..a33c2c6408d 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction3.js +++ b/tests/baselines/reference/functionConstraintSatisfaction3.js @@ -43,7 +43,9 @@ var r15 = foo(c2); //// [functionConstraintSatisfaction3.js] // satisfaction of a constraint to Function, no errors expected -function foo(x) { return x; } +function foo(x) { + return x; +} var i; var C = (function () { function C() { @@ -53,10 +55,18 @@ var C = (function () { var a; var b; var c; -var r1 = foo(function (x) { return x; }); -var r2 = foo(function (x) { return x; }); -var r3 = foo(function (x) { return x; }); -var r4 = foo(function (x) { return x; }); +var r1 = foo(function (x) { + return x; +}); +var r2 = foo(function (x) { + return x; +}); +var r3 = foo(function (x) { + return x; +}); +var r4 = foo(function (x) { + return x; +}); var r5 = foo(i); var r8 = foo(c); var i2; @@ -68,7 +78,11 @@ var C2 = (function () { var a2; var b2; var c2; -var r9 = foo(function (x) { return x; }); -var r10 = foo(function (x) { return x; }); +var r9 = foo(function (x) { + return x; +}); +var r10 = foo(function (x) { + return x; +}); var r12 = foo(i2); var r15 = foo(c2); diff --git a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js index fe10f96f7bb..2c882b82857 100644 --- a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js +++ b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js @@ -14,8 +14,11 @@ var CDoc = (function () { function CDoc() { function doSomething(a) { } - doSomething(function () { return undefined; }); - doSomething(function () { }); + doSomething(function () { + return undefined; + }); + doSomething(function () { + }); } return CDoc; })(); diff --git a/tests/baselines/reference/functionExpressionInWithBlock.js b/tests/baselines/reference/functionExpressionInWithBlock.js index f2353412d5c..5e06ad8169a 100644 --- a/tests/baselines/reference/functionExpressionInWithBlock.js +++ b/tests/baselines/reference/functionExpressionInWithBlock.js @@ -11,7 +11,9 @@ function x() { function x() { with ({}) { function f() { - (function () { return this; }); + (function () { + return this; + }); } } } diff --git a/tests/baselines/reference/functionExpressionReturningItself.js b/tests/baselines/reference/functionExpressionReturningItself.js index 9485100164e..8553d2da867 100644 --- a/tests/baselines/reference/functionExpressionReturningItself.js +++ b/tests/baselines/reference/functionExpressionReturningItself.js @@ -2,7 +2,9 @@ var x = function somefn() { return somefn; }; //// [functionExpressionReturningItself.js] -var x = function somefn() { return somefn; }; +var x = function somefn() { + return somefn; +}; //// [functionExpressionReturningItself.d.ts] diff --git a/tests/baselines/reference/functionImplementationErrors.errors.txt b/tests/baselines/reference/functionImplementationErrors.errors.txt index 8ebd5aa272d..0c74588c316 100644 --- a/tests/baselines/reference/functionImplementationErrors.errors.txt +++ b/tests/baselines/reference/functionImplementationErrors.errors.txt @@ -1,15 +1,15 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(2,10): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/functions/functionImplementationErrors.ts(6,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(6,19): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(10,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(16,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(25,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. tests/cases/conformance/functions/functionImplementationErrors.ts(30,17): error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. tests/cases/conformance/functions/functionImplementationErrors.ts(35,17): error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. tests/cases/conformance/functions/functionImplementationErrors.ts(40,28): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/conformance/functions/functionImplementationErrors.ts(49,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(49,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(53,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(57,11): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/functions/functionImplementationErrors.ts(61,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(61,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(65,11): error TS2354: No best common type exists among return expressions. tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error TS2354: No best common type exists among return expressions. @@ -17,23 +17,17 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error ==== tests/cases/conformance/functions/functionImplementationErrors.ts (14 errors) ==== // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { - ~~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~ - return 3; - ~~~~~~~~~~~~~ - }; - ~ + ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. + return ''; + return 3; + }; var f2 = function x() { - ~~~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~ - return 3; - ~~~~~~~~~~~~~ - }; - ~ + ~ !!! error TS2354: No best common type exists among return expressions. + return ''; + return 3; + }; var f3 = () => { ~~~~~~~ return ''; @@ -46,20 +40,14 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error // FunctionExpression with no return type annotation with return branch of number[] and other of string[] var f4 = function () { - ~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return ['']; - ~~~~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return [1]; - ~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return ['']; + } else { + return [1]; + } + } // Function implemetnation with non -void return type annotation with no return function f5(): number { @@ -95,23 +83,17 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error class Derived1 extends Base { private m; } class Derived2 extends Base { private n; } function f8() { - ~~~~~~~~~~~~~~~ + ~~ +!!! error TS2354: No best common type exists among return expressions. return new Derived1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ return new Derived2(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~ -!!! error TS2354: No best common type exists among return expressions. var f9 = function () { - ~~~~~~~~~~~~~ - return new Derived1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - return new Derived2(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - }; - ~ + ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. + return new Derived1(); + return new Derived2(); + }; var f10 = () => { ~~~~~~~ return new Derived1(); @@ -122,23 +104,17 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error ~ !!! error TS2354: No best common type exists among return expressions. function f11() { - ~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS2354: No best common type exists among return expressions. return new Base(); - ~~~~~~~~~~~~~~~~~~~~~~ return new AnotherClass(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~ -!!! error TS2354: No best common type exists among return expressions. var f12 = function () { - ~~~~~~~~~~~~~ - return new Base(); - ~~~~~~~~~~~~~~~~~~~~~~ - return new AnotherClass(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - }; - ~ + ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. + return new Base(); + return new AnotherClass(); + }; var f13 = () => { ~~~~~~~ return new Base(); diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 5eaf9027335..95b0d9e700b 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -96,10 +96,14 @@ var f3 = function () { // FunctionExpression with no return type annotation with return branch of number[] and other of string[] var f4 = function () { if (true) { - return ['']; + return [ + '' + ]; } else { - return [1]; + return [ + 1 + ]; } }; // Function implemetnation with non -void return type annotation with no return diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index c478f892fd5..e3a498dbeb2 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -164,7 +164,8 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // FunctionExpression with no return type annotation and no return statement returns void -var v = function () { }(); +var v = function () { +}(); // FunctionExpression f with no return type annotation and directly references f in its body returns any var a = function f() { return f; @@ -268,7 +269,10 @@ function opt1(n) { } // Function signature with optional parameter, no type annotation and initializer has initializer's widened type function opt2(n) { - if (n === void 0) { n = { x: null, y: undefined }; } + if (n === void 0) { n = { + x: null, + y: undefined + }; } var m = n; var m; } diff --git a/tests/baselines/reference/functionLiteral.js b/tests/baselines/reference/functionLiteral.js index 8ee515e8f8c..bf42f9e859a 100644 --- a/tests/baselines/reference/functionLiteral.js +++ b/tests/baselines/reference/functionLiteral.js @@ -15,10 +15,14 @@ var z: new (x: number) => number; //// [functionLiteral.js] // basic valid forms of function literals -var x = function () { return 1; }; +var x = function () { + return 1; +}; var x; var y; var y; -var y2 = function (x) { return x; }; +var y2 = function (x) { + return x; +}; var z; var z; diff --git a/tests/baselines/reference/functionLiteralForOverloads.js b/tests/baselines/reference/functionLiteralForOverloads.js index 1a0bc874c48..06631101e0f 100644 --- a/tests/baselines/reference/functionLiteralForOverloads.js +++ b/tests/baselines/reference/functionLiteralForOverloads.js @@ -23,7 +23,15 @@ var f4: { //// [functionLiteralForOverloads.js] // basic uses of function literals with overloads -var f = function (x) { return x; }; -var f2 = function (x) { return x; }; -var f3 = function (x) { return x; }; -var f4 = function (x) { return x; }; +var f = function (x) { + return x; +}; +var f2 = function (x) { + return x; +}; +var f3 = function (x) { + return x; +}; +var f4 = function (x) { + return x; +}; diff --git a/tests/baselines/reference/functionNameConflicts.js b/tests/baselines/reference/functionNameConflicts.js index 87b61e3733d..99ede14dfde 100644 --- a/tests/baselines/reference/functionNameConflicts.js +++ b/tests/baselines/reference/functionNameConflicts.js @@ -32,17 +32,22 @@ function overrr() { //Function overload with different name from implementation signature var M; (function (M) { - function fn1() { } + function fn1() { + } var fn1; var fn2; - function fn2() { } + function fn2() { + } })(M || (M = {})); -function fn3() { } +function fn3() { +} var fn3; function func() { var fn4; - function fn4() { } - function fn5() { } + function fn4() { + } + function fn5() { + } var fn5; } function overrr() { diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.js b/tests/baselines/reference/functionOverloadAmbiguity1.js index 2833ccbcdc3..d53ec68c9d9 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.js +++ b/tests/baselines/reference/functionOverloadAmbiguity1.js @@ -11,7 +11,13 @@ callb2((a) => { a.length; } ); // ok, chose first overload //// [functionOverloadAmbiguity1.js] -function callb(a) { } -callb(function (a) { a.length; }); // error, chose first overload -function callb2(a) { } -callb2(function (a) { a.length; }); // ok, chose first overload +function callb(a) { +} +callb(function (a) { + a.length; +}); // error, chose first overload +function callb2(a) { +} +callb2(function (a) { + a.length; +}); // ok, chose first overload diff --git a/tests/baselines/reference/functionOverloadErrors.errors.txt b/tests/baselines/reference/functionOverloadErrors.errors.txt index bc4fea0a98b..ae1dfeae4d1 100644 --- a/tests/baselines/reference/functionOverloadErrors.errors.txt +++ b/tests/baselines/reference/functionOverloadErrors.errors.txt @@ -8,9 +8,9 @@ tests/cases/conformance/functions/functionOverloadErrors.ts(75,21): error TS2383 tests/cases/conformance/functions/functionOverloadErrors.ts(79,14): error TS2383: Overload signatures must all be exported or not exported. tests/cases/conformance/functions/functionOverloadErrors.ts(85,18): error TS2384: Overload signatures must all be ambient or non-ambient. tests/cases/conformance/functions/functionOverloadErrors.ts(90,18): error TS2384: Overload signatures must all be ambient or non-ambient. -tests/cases/conformance/functions/functionOverloadErrors.ts(94,1): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/conformance/functions/functionOverloadErrors.ts(99,1): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/conformance/functions/functionOverloadErrors.ts(103,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(94,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(99,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(103,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/functions/functionOverloadErrors.ts(116,19): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. @@ -129,20 +129,20 @@ tests/cases/conformance/functions/functionOverloadErrors.ts(116,19): error TS237 //Function overloads with fewer params than implementation signature function fewerParams(); - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function fewerParams(n: string) { } //Function implementation whose parameter types are not assignable to all corresponding overload signature parameters function fn13(n: string); - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function fn13(n: number) { } //Function overloads where return types are not all subtype of implementation return type function fn14(n: string): string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function fn14() { return 3; diff --git a/tests/baselines/reference/functionOverloadErrors.js b/tests/baselines/reference/functionOverloadErrors.js index b0c0f449456..623b0e6f4dc 100644 --- a/tests/baselines/reference/functionOverloadErrors.js +++ b/tests/baselines/reference/functionOverloadErrors.js @@ -119,7 +119,8 @@ function initExpr() { } //// [functionOverloadErrors.js] -function fn1() { } +function fn1() { +} function fn2a() { } function fn2b() { @@ -127,37 +128,52 @@ function fn2b() { function fn3() { return null; } -function fn6() { } -function fn7() { } -function fn8() { } -function fn9() { } -function fn10() { } -function fn11() { } -function fn12() { } +function fn6() { +} +function fn7() { +} +function fn8() { +} +function fn9() { +} +function fn10() { +} +function fn11() { +} +function fn12() { +} //Function overloads that differ by accessibility var cls = (function () { function cls() { } - cls.prototype.f = function () { }; - cls.prototype.g = function () { }; + cls.prototype.f = function () { + }; + cls.prototype.g = function () { + }; return cls; })(); //Function overloads with differing export var M; (function (M) { - function fn1() { } - function fn2() { } + function fn1() { + } + function fn2() { + } M.fn2 = fn2; })(M || (M = {})); -function dfn1() { } -function dfn2() { } +function dfn1() { +} +function dfn2() { +} function fewerParams(n) { } -function fn13(n) { } +function fn13(n) { +} function fn14() { return 3; } function fn15() { return undefined; } -function initExpr() { } +function initExpr() { +} diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.js b/tests/baselines/reference/functionOverloadErrorsSyntax.js index 1a5537d2de2..3706f4da744 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.js +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.js @@ -12,6 +12,9 @@ function fn5() { } //// [functionOverloadErrorsSyntax.js] -function fn4a() { } -function fn4b() { } -function fn5() { } +function fn4a() { +} +function fn4b() { +} +function fn5() { +} diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js index 465753f1040..6b66bc89ffa 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js @@ -4,4 +4,5 @@ function foo(x, y); function bar() { } //// [functionOverloadImplementationOfWrongName.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js index 34cf73d3239..c3008e7a6c2 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js @@ -4,4 +4,5 @@ function bar() { } function foo(x, y); //// [functionOverloadImplementationOfWrongName2.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/functionOverloads.js b/tests/baselines/reference/functionOverloads.js index 7e38b8fe993..5504b286628 100644 --- a/tests/baselines/reference/functionOverloads.js +++ b/tests/baselines/reference/functionOverloads.js @@ -5,6 +5,8 @@ function foo(bar?: string): any { return "" }; var x = foo(5); //// [functionOverloads.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} ; var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads1.js b/tests/baselines/reference/functionOverloads1.js index 5b4acabd02c..695a9c37808 100644 --- a/tests/baselines/reference/functionOverloads1.js +++ b/tests/baselines/reference/functionOverloads1.js @@ -5,4 +5,6 @@ function foo():string { return "a" } //// [functionOverloads1.js] 1 + 1; -function foo() { return "a"; } +function foo() { + return "a"; +} diff --git a/tests/baselines/reference/functionOverloads10.js b/tests/baselines/reference/functionOverloads10.js index 08b71698dce..2cd24bcd1cb 100644 --- a/tests/baselines/reference/functionOverloads10.js +++ b/tests/baselines/reference/functionOverloads10.js @@ -5,4 +5,5 @@ function foo(foo:any){ } //// [functionOverloads10.js] -function foo(foo) { } +function foo(foo) { +} diff --git a/tests/baselines/reference/functionOverloads11.errors.txt b/tests/baselines/reference/functionOverloads11.errors.txt index 18155cbe69f..005ee9bb143 100644 --- a/tests/baselines/reference/functionOverloads11.errors.txt +++ b/tests/baselines/reference/functionOverloads11.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/functionOverloads11.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads11.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads11.ts (1 errors) ==== function foo():number; - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads11.js b/tests/baselines/reference/functionOverloads11.js index 8d85b0ffb7b..efc9c793125 100644 --- a/tests/baselines/reference/functionOverloads11.js +++ b/tests/baselines/reference/functionOverloads11.js @@ -4,4 +4,6 @@ function foo():string { return "" } //// [functionOverloads11.js] -function foo() { return ""; } +function foo() { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads12.js b/tests/baselines/reference/functionOverloads12.js index 4681e43ee5b..ff789083eeb 100644 --- a/tests/baselines/reference/functionOverloads12.js +++ b/tests/baselines/reference/functionOverloads12.js @@ -5,7 +5,9 @@ function foo():any { if (true) return ""; else return 0;} //// [functionOverloads12.js] -function foo() { if (true) - return ""; -else - return 0; } +function foo() { + if (true) + return ""; + else + return 0; +} diff --git a/tests/baselines/reference/functionOverloads13.js b/tests/baselines/reference/functionOverloads13.js index ff43c85e3df..f9eb4d59e47 100644 --- a/tests/baselines/reference/functionOverloads13.js +++ b/tests/baselines/reference/functionOverloads13.js @@ -5,4 +5,6 @@ function foo(bar?:number):any { return "" } //// [functionOverloads13.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads14.js b/tests/baselines/reference/functionOverloads14.js index 826b096290a..e580c4e2283 100644 --- a/tests/baselines/reference/functionOverloads14.js +++ b/tests/baselines/reference/functionOverloads14.js @@ -5,4 +5,8 @@ function foo():{a:any;} { return {a:1} } //// [functionOverloads14.js] -function foo() { return { a: 1 }; } +function foo() { + return { + a: 1 + }; +} diff --git a/tests/baselines/reference/functionOverloads15.js b/tests/baselines/reference/functionOverloads15.js index fe0c90f82af..2b80df6630c 100644 --- a/tests/baselines/reference/functionOverloads15.js +++ b/tests/baselines/reference/functionOverloads15.js @@ -5,4 +5,6 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads15.js] -function foo(foo) { return ""; } +function foo(foo) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads16.js b/tests/baselines/reference/functionOverloads16.js index a0fdaa88894..ebf82febd16 100644 --- a/tests/baselines/reference/functionOverloads16.js +++ b/tests/baselines/reference/functionOverloads16.js @@ -5,4 +5,6 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads16.js] -function foo(foo) { return ""; } +function foo(foo) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads17.errors.txt b/tests/baselines/reference/functionOverloads17.errors.txt index 44565702632..febd2c03ac8 100644 --- a/tests/baselines/reference/functionOverloads17.errors.txt +++ b/tests/baselines/reference/functionOverloads17.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/functionOverloads17.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads17.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads17.ts (1 errors) ==== function foo():{a:number;} - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo():{a:string;} { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads17.js b/tests/baselines/reference/functionOverloads17.js index 3a5dcd81914..ef1a9e765fc 100644 --- a/tests/baselines/reference/functionOverloads17.js +++ b/tests/baselines/reference/functionOverloads17.js @@ -4,4 +4,8 @@ function foo():{a:string;} { return {a:""} } //// [functionOverloads17.js] -function foo() { return { a: "" }; } +function foo() { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads18.errors.txt b/tests/baselines/reference/functionOverloads18.errors.txt index 384c1e3fa8f..bec6a45ed89 100644 --- a/tests/baselines/reference/functionOverloads18.errors.txt +++ b/tests/baselines/reference/functionOverloads18.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/functionOverloads18.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads18.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads18.ts (1 errors) ==== function foo(bar:{a:number;}); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads18.js b/tests/baselines/reference/functionOverloads18.js index 8c196831e48..65a16c2896a 100644 --- a/tests/baselines/reference/functionOverloads18.js +++ b/tests/baselines/reference/functionOverloads18.js @@ -4,4 +4,8 @@ function foo(bar:{a:string;}) { return {a:""} } //// [functionOverloads18.js] -function foo(bar) { return { a: "" }; } +function foo(bar) { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads19.errors.txt b/tests/baselines/reference/functionOverloads19.errors.txt index 4c6935493e9..d87ba17562a 100644 --- a/tests/baselines/reference/functionOverloads19.errors.txt +++ b/tests/baselines/reference/functionOverloads19.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/functionOverloads19.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads19.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads19.ts (1 errors) ==== function foo(bar:{b:string;}); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}); function foo(bar:{a:any;}) { return {a:""} } diff --git a/tests/baselines/reference/functionOverloads19.js b/tests/baselines/reference/functionOverloads19.js index 4183f6a48b8..d5749d3eef2 100644 --- a/tests/baselines/reference/functionOverloads19.js +++ b/tests/baselines/reference/functionOverloads19.js @@ -5,4 +5,8 @@ function foo(bar:{a:any;}) { return {a:""} } //// [functionOverloads19.js] -function foo(bar) { return { a: "" }; } +function foo(bar) { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads2.js b/tests/baselines/reference/functionOverloads2.js index 39a58663cf4..7e9eb45d236 100644 --- a/tests/baselines/reference/functionOverloads2.js +++ b/tests/baselines/reference/functionOverloads2.js @@ -5,6 +5,8 @@ function foo(bar: any): any { return bar }; var x = foo(true); //// [functionOverloads2.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} ; var x = foo(true); diff --git a/tests/baselines/reference/functionOverloads20.errors.txt b/tests/baselines/reference/functionOverloads20.errors.txt index 2a51afefe0c..6b33795bc3e 100644 --- a/tests/baselines/reference/functionOverloads20.errors.txt +++ b/tests/baselines/reference/functionOverloads20.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/functionOverloads20.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads20.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads20.ts (1 errors) ==== function foo(bar:{a:number;}): number; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}): string; function foo(bar:{a:any;}): string {return ""} diff --git a/tests/baselines/reference/functionOverloads20.js b/tests/baselines/reference/functionOverloads20.js index 4f259a88538..012f2ce09cd 100644 --- a/tests/baselines/reference/functionOverloads20.js +++ b/tests/baselines/reference/functionOverloads20.js @@ -5,4 +5,6 @@ function foo(bar:{a:any;}): string {return ""} //// [functionOverloads20.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads21.js b/tests/baselines/reference/functionOverloads21.js index 6e69169efbf..78fb1fe011f 100644 --- a/tests/baselines/reference/functionOverloads21.js +++ b/tests/baselines/reference/functionOverloads21.js @@ -5,4 +5,6 @@ function foo(bar:{a:any; b?:string;}[]) { return 0 } //// [functionOverloads21.js] -function foo(bar) { return 0; } +function foo(bar) { + return 0; +} diff --git a/tests/baselines/reference/functionOverloads22.errors.txt b/tests/baselines/reference/functionOverloads22.errors.txt index bc075e0c3ef..c9fc8aa2b2f 100644 --- a/tests/baselines/reference/functionOverloads22.errors.txt +++ b/tests/baselines/reference/functionOverloads22.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/functionOverloads22.ts(2,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads22.ts(2,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads22.ts (1 errors) ==== function foo(bar:number):{a:number;}[]; function foo(bar:string):{a:number; b:string;}[]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads22.js b/tests/baselines/reference/functionOverloads22.js index 54b745d96dd..d682b441822 100644 --- a/tests/baselines/reference/functionOverloads22.js +++ b/tests/baselines/reference/functionOverloads22.js @@ -5,4 +5,10 @@ function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } //// [functionOverloads22.js] -function foo(bar) { return [{ a: "" }]; } +function foo(bar) { + return [ + { + a: "" + } + ]; +} diff --git a/tests/baselines/reference/functionOverloads23.js b/tests/baselines/reference/functionOverloads23.js index aa3a7172ada..d8cac7eb8ee 100644 --- a/tests/baselines/reference/functionOverloads23.js +++ b/tests/baselines/reference/functionOverloads23.js @@ -5,4 +5,6 @@ function foo(bar:(a?)=>void) { return 0 } //// [functionOverloads23.js] -function foo(bar) { return 0; } +function foo(bar) { + return 0; +} diff --git a/tests/baselines/reference/functionOverloads24.js b/tests/baselines/reference/functionOverloads24.js index 8fcc3c81902..5ff4e248c0a 100644 --- a/tests/baselines/reference/functionOverloads24.js +++ b/tests/baselines/reference/functionOverloads24.js @@ -5,4 +5,7 @@ function foo(bar:any):(a)=>void { return function(){} } //// [functionOverloads24.js] -function foo(bar) { return function () { }; } +function foo(bar) { + return function () { + }; +} diff --git a/tests/baselines/reference/functionOverloads25.js b/tests/baselines/reference/functionOverloads25.js index d466aa82d21..bbaef498926 100644 --- a/tests/baselines/reference/functionOverloads25.js +++ b/tests/baselines/reference/functionOverloads25.js @@ -6,6 +6,8 @@ var x = foo(); //// [functionOverloads25.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionOverloads26.js b/tests/baselines/reference/functionOverloads26.js index bc4d017b9bb..088c06147ba 100644 --- a/tests/baselines/reference/functionOverloads26.js +++ b/tests/baselines/reference/functionOverloads26.js @@ -6,5 +6,7 @@ var x = foo('baz'); //// [functionOverloads26.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var x = foo('baz'); diff --git a/tests/baselines/reference/functionOverloads27.js b/tests/baselines/reference/functionOverloads27.js index 199905d8219..2b11b1f6c4e 100644 --- a/tests/baselines/reference/functionOverloads27.js +++ b/tests/baselines/reference/functionOverloads27.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads27.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads28.js b/tests/baselines/reference/functionOverloads28.js index d10ef52e2b2..566972ee25d 100644 --- a/tests/baselines/reference/functionOverloads28.js +++ b/tests/baselines/reference/functionOverloads28.js @@ -6,6 +6,8 @@ var t:any; var x = foo(t); //// [functionOverloads28.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var t; var x = foo(t); diff --git a/tests/baselines/reference/functionOverloads29.js b/tests/baselines/reference/functionOverloads29.js index edc1ea178bc..c828bb95917 100644 --- a/tests/baselines/reference/functionOverloads29.js +++ b/tests/baselines/reference/functionOverloads29.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads29.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads30.js b/tests/baselines/reference/functionOverloads30.js index bc7593a0771..27b1436b6fb 100644 --- a/tests/baselines/reference/functionOverloads30.js +++ b/tests/baselines/reference/functionOverloads30.js @@ -6,5 +6,7 @@ var x = foo('bar'); //// [functionOverloads30.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo('bar'); diff --git a/tests/baselines/reference/functionOverloads31.js b/tests/baselines/reference/functionOverloads31.js index 2c2a15821a7..01cee2c342b 100644 --- a/tests/baselines/reference/functionOverloads31.js +++ b/tests/baselines/reference/functionOverloads31.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads31.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads32.js b/tests/baselines/reference/functionOverloads32.js index a5557042dfb..4e0efa98b09 100644 --- a/tests/baselines/reference/functionOverloads32.js +++ b/tests/baselines/reference/functionOverloads32.js @@ -6,6 +6,8 @@ var baz:number; var x = foo(baz); //// [functionOverloads32.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var baz; var x = foo(baz); diff --git a/tests/baselines/reference/functionOverloads33.js b/tests/baselines/reference/functionOverloads33.js index 98bcc09b8b4..0c01cd54d1e 100644 --- a/tests/baselines/reference/functionOverloads33.js +++ b/tests/baselines/reference/functionOverloads33.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads33.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads34.js b/tests/baselines/reference/functionOverloads34.js index 3d4311e4193..48ac2b5fc59 100644 --- a/tests/baselines/reference/functionOverloads34.js +++ b/tests/baselines/reference/functionOverloads34.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads34.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads35.js b/tests/baselines/reference/functionOverloads35.js index b25ac6c3c5f..64ff527dee9 100644 --- a/tests/baselines/reference/functionOverloads35.js +++ b/tests/baselines/reference/functionOverloads35.js @@ -6,5 +6,9 @@ var x = foo({a:1}); //// [functionOverloads35.js] -function foo(bar) { return bar; } -var x = foo({ a: 1 }); +function foo(bar) { + return bar; +} +var x = foo({ + a: 1 +}); diff --git a/tests/baselines/reference/functionOverloads36.js b/tests/baselines/reference/functionOverloads36.js index 4e790917d93..3872aa3191f 100644 --- a/tests/baselines/reference/functionOverloads36.js +++ b/tests/baselines/reference/functionOverloads36.js @@ -6,5 +6,9 @@ var x = foo({a:'foo'}); //// [functionOverloads36.js] -function foo(bar) { return bar; } -var x = foo({ a: 'foo' }); +function foo(bar) { + return bar; +} +var x = foo({ + a: 'foo' +}); diff --git a/tests/baselines/reference/functionOverloads37.js b/tests/baselines/reference/functionOverloads37.js index c4e0d4fd18b..f9e6130dbd9 100644 --- a/tests/baselines/reference/functionOverloads37.js +++ b/tests/baselines/reference/functionOverloads37.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads37.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads38.js b/tests/baselines/reference/functionOverloads38.js index c973cbe7b67..fa8aa4693b3 100644 --- a/tests/baselines/reference/functionOverloads38.js +++ b/tests/baselines/reference/functionOverloads38.js @@ -6,5 +6,11 @@ var x = foo([{a:1}]); //// [functionOverloads38.js] -function foo(bar) { return bar; } -var x = foo([{ a: 1 }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 1 + } +]); diff --git a/tests/baselines/reference/functionOverloads39.js b/tests/baselines/reference/functionOverloads39.js index ad4ded394d8..218c3e9f698 100644 --- a/tests/baselines/reference/functionOverloads39.js +++ b/tests/baselines/reference/functionOverloads39.js @@ -6,5 +6,11 @@ var x = foo([{a:true}]); //// [functionOverloads39.js] -function foo(bar) { return bar; } -var x = foo([{ a: true }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: true + } +]); diff --git a/tests/baselines/reference/functionOverloads4.errors.txt b/tests/baselines/reference/functionOverloads4.errors.txt index 1e41fde6021..78d772a0f6f 100644 --- a/tests/baselines/reference/functionOverloads4.errors.txt +++ b/tests/baselines/reference/functionOverloads4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/functionOverloads4.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads4.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/functionOverloads4.ts (1 errors) ==== function foo():number; - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads4.js b/tests/baselines/reference/functionOverloads4.js index 3a1ff2ced33..b428f6938b4 100644 --- a/tests/baselines/reference/functionOverloads4.js +++ b/tests/baselines/reference/functionOverloads4.js @@ -3,4 +3,6 @@ function foo():number; function foo():string { return "a" } //// [functionOverloads4.js] -function foo() { return "a"; } +function foo() { + return "a"; +} diff --git a/tests/baselines/reference/functionOverloads40.js b/tests/baselines/reference/functionOverloads40.js index 11edff26a4b..3ad42e1b91d 100644 --- a/tests/baselines/reference/functionOverloads40.js +++ b/tests/baselines/reference/functionOverloads40.js @@ -6,5 +6,11 @@ var x = foo([{a:'bar'}]); //// [functionOverloads40.js] -function foo(bar) { return bar; } -var x = foo([{ a: 'bar' }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 'bar' + } +]); diff --git a/tests/baselines/reference/functionOverloads41.js b/tests/baselines/reference/functionOverloads41.js index dd730e25b31..449250dd1cd 100644 --- a/tests/baselines/reference/functionOverloads41.js +++ b/tests/baselines/reference/functionOverloads41.js @@ -6,5 +6,9 @@ var x = foo([{}]); //// [functionOverloads41.js] -function foo(bar) { return bar; } -var x = foo([{}]); +function foo(bar) { + return bar; +} +var x = foo([ + {} +]); diff --git a/tests/baselines/reference/functionOverloads42.js b/tests/baselines/reference/functionOverloads42.js index 979bfa86d62..0f87b5139d2 100644 --- a/tests/baselines/reference/functionOverloads42.js +++ b/tests/baselines/reference/functionOverloads42.js @@ -6,5 +6,11 @@ var x = foo([{a:'s'}]); //// [functionOverloads42.js] -function foo(bar) { return bar; } -var x = foo([{ a: 's' }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 's' + } +]); diff --git a/tests/baselines/reference/functionOverloads5.js b/tests/baselines/reference/functionOverloads5.js index b59154d2417..15507a9fb61 100644 --- a/tests/baselines/reference/functionOverloads5.js +++ b/tests/baselines/reference/functionOverloads5.js @@ -9,6 +9,7 @@ class baz { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { }; + baz.prototype.foo = function (bar) { + }; return baz; })(); diff --git a/tests/baselines/reference/functionOverloads6.js b/tests/baselines/reference/functionOverloads6.js index 2c19b376dc8..b7f9fd8c1f2 100644 --- a/tests/baselines/reference/functionOverloads6.js +++ b/tests/baselines/reference/functionOverloads6.js @@ -10,6 +10,7 @@ class foo { var foo = (function () { function foo() { } - foo.fnOverload = function (foo) { }; + foo.fnOverload = function (foo) { + }; return foo; })(); diff --git a/tests/baselines/reference/functionOverloads7.js b/tests/baselines/reference/functionOverloads7.js index 540abf9eb8c..52cac83af72 100644 --- a/tests/baselines/reference/functionOverloads7.js +++ b/tests/baselines/reference/functionOverloads7.js @@ -14,7 +14,9 @@ class foo { var foo = (function () { function foo() { } - foo.prototype.bar = function (foo) { return "foo"; }; + foo.prototype.bar = function (foo) { + return "foo"; + }; foo.prototype.n = function () { var foo = this.bar(); foo = this.bar("test"); diff --git a/tests/baselines/reference/functionOverloads8.js b/tests/baselines/reference/functionOverloads8.js index 55539a61659..08c2c0b65a1 100644 --- a/tests/baselines/reference/functionOverloads8.js +++ b/tests/baselines/reference/functionOverloads8.js @@ -5,4 +5,6 @@ function foo(foo?:any){ return '' } //// [functionOverloads8.js] -function foo(foo) { return ''; } +function foo(foo) { + return ''; +} diff --git a/tests/baselines/reference/functionOverloads9.js b/tests/baselines/reference/functionOverloads9.js index 9d2ae21f4fa..53cc0385a59 100644 --- a/tests/baselines/reference/functionOverloads9.js +++ b/tests/baselines/reference/functionOverloads9.js @@ -5,6 +5,8 @@ var x = foo('foo'); //// [functionOverloads9.js] -function foo(foo) { return ''; } +function foo(foo) { + return ''; +} ; var x = foo('foo'); diff --git a/tests/baselines/reference/functionReturn.js b/tests/baselines/reference/functionReturn.js index c433eec190d..bfcd12e2b95 100644 --- a/tests/baselines/reference/functionReturn.js +++ b/tests/baselines/reference/functionReturn.js @@ -15,12 +15,16 @@ function f5(): string { } //// [functionReturn.js] -function f0() { } +function f0() { +} function f1() { var n = f0(); } -function f2() { } -function f3() { return; } +function f2() { +} +function f3() { + return; +} function f4() { return ''; return; diff --git a/tests/baselines/reference/functionType.js b/tests/baselines/reference/functionType.js index 6e3edc7347e..c2d6eea784c 100644 --- a/tests/baselines/reference/functionType.js +++ b/tests/baselines/reference/functionType.js @@ -7,6 +7,7 @@ salt.apply("hello", []); //// [functionType.js] -function salt() { } +function salt() { +} salt.apply("hello", []); (new Function("return 5"))(); diff --git a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js index 15080e99d73..b4ed20e9ed0 100644 --- a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js +++ b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js @@ -15,7 +15,9 @@ console.log(s); //// [functionTypeArgumentAssignmentCompat.js] var f; -var g = function () { return []; }; +var g = function () { + return []; +}; f = g; var s = f("str").toUpperCase(); console.log(s); diff --git a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js index dae960bad68..6bca14b063b 100644 --- a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js +++ b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js @@ -6,6 +6,9 @@ var f3 = (): any => { }; //// [functionWithAnyReturnTypeAndNoReturnExpression.js] // All should be allowed -function f() { } -var f2 = function () { }; -var f3 = function () { }; +function f() { +} +var f2 = function () { +}; +var f3 = function () { +}; diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js index f312966ea4f..a72b15a1b9c 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js @@ -6,8 +6,12 @@ function bar(a = [0]) { //// [functionWithDefaultParameterWithNoStatements10.js] function foo(a) { - if (a === void 0) { a = [0]; } + if (a === void 0) { a = [ + 0 + ]; } } function bar(a) { - if (a === void 0) { a = [0]; } + if (a === void 0) { a = [ + 0 + ]; } } diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js index 7fcbae72541..db98c6353cc 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js @@ -9,8 +9,12 @@ function bar(a = [1 + 1]) { //// [functionWithDefaultParameterWithNoStatements13.js] var v; function foo(a) { - if (a === void 0) { a = [1 + 1]; } + if (a === void 0) { a = [ + 1 + 1 + ]; } } function bar(a) { - if (a === void 0) { a = [1 + 1]; } + if (a === void 0) { a = [ + 1 + 1 + ]; } } diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt index d9a25e24566..8a57d8e08e6 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(4,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(12,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(22,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(31,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(43,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(48,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(4,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(12,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(22,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(31,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(43,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(48,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,26): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -14,126 +14,80 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti // it is an error if there is no single BCT, these are error cases function f1() { - ~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return 1; + } else { + return ''; + } + } function f2() { - ~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } else if (false) { - ~~~~~~~~~~~~~~~~~~~~~~~ - return 2; - ~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return 1; + } else if (false) { + return 2; + } else { + return ''; + } + } function f3() { - ~~~~~~~~~~~~~~~ - try { - ~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ - catch (e) { - ~~~~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + try { + return 1; + } + catch (e) { + return ''; + } + } function f4() { - ~~~~~~~~~~~~~~~ - try { - ~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ - catch (e) { - ~~~~~~~~~~~~~~~ - - - } - ~~~~~ - finally { - ~~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + try { + return 1; + } + catch (e) { + + } + finally { + return ''; + } + } function f5() { - ~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~ - return ''; - ~~~~~~~~~~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + return 1; + return ''; + } function f6(x: T, y:U) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return x; - ~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return y; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return x; + } else { + return y; + } + } function f8(x: T, y: U) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ +!!! error TS2354: No best common type exists among return expressions. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. if (true) { - ~~~~~~~~~~~~~~~ return x; - ~~~~~~~~~~~~~~~~~ } else { - ~~~~~~~~~~~~ return y; - ~~~~~~~~~~~~~~~~~ } - ~~~~~ } - ~ -!!! error TS2354: No best common type exists among return expressions. \ No newline at end of file diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt index 2b14bd97bad..bbaa5a85578 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(58,1): error TS2354: No best common type exists among return expressions. -tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(67,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(58,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(67,10): error TS2354: No best common type exists among return expressions. ==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts (2 errors) ==== @@ -61,37 +61,25 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti var b: { x: number; z?: number }; // returns typeof a function f9() { - ~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return a; - ~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return b; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return a; + } else { + return b; + } + } // returns typeof b function f10() { - ~~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return b; - ~~~~~~~~~~~~~~~~~ - } else { - ~~~~~~~~~~~~ - return a; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ - } - ~ + ~~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return b; + } else { + return a; + } + } // returns number => void function f11() { diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.js b/tests/baselines/reference/functionWithMultipleReturnStatements2.js index 4674c6db953..396c4a8d9c0 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.js +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.js @@ -166,18 +166,22 @@ function f10() { // returns number => void function f11() { if (true) { - return function (x) { }; + return function (x) { + }; } else { - return function (x) { }; + return function (x) { + }; } } // returns Object => void function f12() { if (true) { - return function (x) { }; + return function (x) { + }; } else { - return function (x) { }; + return function (x) { + }; } } diff --git a/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt b/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt new file mode 100644 index 00000000000..3c8fef3eb49 --- /dev/null +++ b/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/functionWithNoBestCommonType1.ts(1,10): error TS2354: No best common type exists among return expressions. + + +==== tests/cases/compiler/functionWithNoBestCommonType1.ts (1 errors) ==== + function foo() { + ~~~ +!!! error TS2354: No best common type exists among return expressions. + return true; + return bar(); + } + + function bar(): void { + } \ No newline at end of file diff --git a/tests/baselines/reference/functionWithNoBestCommonType1.js b/tests/baselines/reference/functionWithNoBestCommonType1.js new file mode 100644 index 00000000000..f7114fb40d8 --- /dev/null +++ b/tests/baselines/reference/functionWithNoBestCommonType1.js @@ -0,0 +1,16 @@ +//// [functionWithNoBestCommonType1.ts] +function foo() { + return true; + return bar(); +} + +function bar(): void { +} + +//// [functionWithNoBestCommonType1.js] +function foo() { + return true; + return bar(); +} +function bar() { +} diff --git a/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt b/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt new file mode 100644 index 00000000000..981e330d9b5 --- /dev/null +++ b/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/functionWithNoBestCommonType2.ts(1,9): error TS2354: No best common type exists among return expressions. + + +==== tests/cases/compiler/functionWithNoBestCommonType2.ts (1 errors) ==== + var v = function () { + ~~~~~~~~ +!!! error TS2354: No best common type exists among return expressions. + return true; + return bar(); + }; + + function bar(): void { + } \ No newline at end of file diff --git a/tests/baselines/reference/functionWithNoBestCommonType2.js b/tests/baselines/reference/functionWithNoBestCommonType2.js new file mode 100644 index 00000000000..8e903518ec0 --- /dev/null +++ b/tests/baselines/reference/functionWithNoBestCommonType2.js @@ -0,0 +1,16 @@ +//// [functionWithNoBestCommonType2.ts] +var v = function () { + return true; + return bar(); +}; + +function bar(): void { +} + +//// [functionWithNoBestCommonType2.js] +var v = function () { + return true; + return bar(); +}; +function bar() { +} diff --git a/tests/baselines/reference/functionsWithModifiersInBlocks1.js b/tests/baselines/reference/functionsWithModifiersInBlocks1.js index 757fe509747..1d381bccfe1 100644 --- a/tests/baselines/reference/functionsWithModifiersInBlocks1.js +++ b/tests/baselines/reference/functionsWithModifiersInBlocks1.js @@ -7,6 +7,7 @@ //// [functionsWithModifiersInBlocks1.js] { - function f() { } + function f() { + } exports.f = f; } diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.js b/tests/baselines/reference/funduleSplitAcrossFiles.js index bb59338a630..330fbcdec74 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.js +++ b/tests/baselines/reference/funduleSplitAcrossFiles.js @@ -10,7 +10,8 @@ module D { D.y; //// [funduleSplitAcrossFiles_function.js] -function D() { } +function D() { +} //// [funduleSplitAcrossFiles_module.js] var D; (function (D) { diff --git a/tests/baselines/reference/fuzzy.js b/tests/baselines/reference/fuzzy.js index b98a9ced107..4729b59e2c3 100644 --- a/tests/baselines/reference/fuzzy.js +++ b/tests/baselines/reference/fuzzy.js @@ -38,13 +38,20 @@ var M; this.x = x; } C.prototype.works = function () { - return ({ anything: 1 }); + return ({ + anything: 1 + }); }; C.prototype.doesntWork = function () { - return { anything: 1, oneI: this }; + return { + anything: 1, + oneI: this + }; }; C.prototype.worksToo = function () { - return ({ oneI: this }); + return ({ + oneI: this + }); }; return C; })(); diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index a88929669fd..ec79d3a7522 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -381,1072 +381,2973 @@ var Derived2 = (function (_super) { return Derived2; })(Base); var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); -var x1 = function () { return [d1, d2]; }; -var x2 = function () { return [d1, d2]; }; -var x3 = function named() { return [d1, d2]; }; -var x4 = function () { return [d1, d2]; }; -var x5 = function () { return [d1, d2]; }; -var x6 = function named() { return [d1, d2]; }; -var x7 = [d1, d2]; -var x8 = [d1, d2]; -var x9 = [d1, d2]; -var x10 = { n: [d1, d2] }; -var x11 = function (n) { var n; return null; }; -var x12 = { func: function (n) { return [d1, d2]; } }; +var x1 = function () { + return [ + d1, + d2 + ]; +}; +var x2 = function () { + return [ + d1, + d2 + ]; +}; +var x3 = function named() { + return [ + d1, + d2 + ]; +}; +var x4 = function () { + return [ + d1, + d2 + ]; +}; +var x5 = function () { + return [ + d1, + d2 + ]; +}; +var x6 = function named() { + return [ + d1, + d2 + ]; +}; +var x7 = [ + d1, + d2 +]; +var x8 = [ + d1, + d2 +]; +var x9 = [ + d1, + d2 +]; +var x10 = { + n: [ + d1, + d2 + ] +}; +var x11 = function (n) { + var n; + return null; +}; +var x12 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; var x13 = (function () { function x13() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x13; })(); var x14 = (function () { function x14() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x14; })(); var x15 = (function () { function x15() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x15; })(); var x16 = (function () { function x16() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x16; })(); var x17 = (function () { function x17() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x17; })(); var x18 = (function () { function x18() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x18; })(); var x19 = (function () { function x19() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x19; })(); var x20 = (function () { function x20() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x20; })(); var x21 = (function () { function x21() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x21; })(); var x22 = (function () { function x22() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x22; })(); var x23 = (function () { function x23() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x23; })(); var x24 = (function () { function x24() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x24; })(); var x25 = (function () { function x25() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x25; })(); var x26 = (function () { function x26() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x26; })(); var x27 = (function () { function x27() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x27; })(); var x28 = (function () { function x28() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x28; })(); var x29 = (function () { function x29() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x29; })(); var x30 = (function () { function x30() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x30; })(); var x31 = (function () { function x31() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x31; })(); var x32 = (function () { function x32() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x32; })(); var x33 = (function () { function x33() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x33; })(); var x34 = (function () { function x34() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x34; })(); var x35 = (function () { function x35() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x35; })(); var x36 = (function () { function x36() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x36; })(); var x37 = (function () { function x37() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x37; })(); var x38 = (function () { function x38() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x38; })(); var x39 = (function () { function x39() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x39; })(); var x40 = (function () { function x40() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x40; })(); var x41 = (function () { function x41() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x41; })(); var x42 = (function () { function x42() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x42; })(); var x43 = (function () { function x43() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x43; })(); var x44 = (function () { function x44() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x44; })(); var x45 = (function () { function x45() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x45; })(); var x46 = (function () { function x46() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x46; })(); var x47 = (function () { function x47() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x47; })(); var x48 = (function () { function x48() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x48; })(); var x49 = (function () { function x49() { } - x49.member = function () { return [d1, d2]; }; + x49.member = function () { + return [ + d1, + d2 + ]; + }; return x49; })(); var x50 = (function () { function x50() { } - x50.member = function () { return [d1, d2]; }; + x50.member = function () { + return [ + d1, + d2 + ]; + }; return x50; })(); var x51 = (function () { function x51() { } - x51.member = function named() { return [d1, d2]; }; + x51.member = function named() { + return [ + d1, + d2 + ]; + }; return x51; })(); var x52 = (function () { function x52() { } - x52.member = function () { return [d1, d2]; }; + x52.member = function () { + return [ + d1, + d2 + ]; + }; return x52; })(); var x53 = (function () { function x53() { } - x53.member = function () { return [d1, d2]; }; + x53.member = function () { + return [ + d1, + d2 + ]; + }; return x53; })(); var x54 = (function () { function x54() { } - x54.member = function named() { return [d1, d2]; }; + x54.member = function named() { + return [ + d1, + d2 + ]; + }; return x54; })(); var x55 = (function () { function x55() { } - x55.member = [d1, d2]; + x55.member = [ + d1, + d2 + ]; return x55; })(); var x56 = (function () { function x56() { } - x56.member = [d1, d2]; + x56.member = [ + d1, + d2 + ]; return x56; })(); var x57 = (function () { function x57() { } - x57.member = [d1, d2]; + x57.member = [ + d1, + d2 + ]; return x57; })(); var x58 = (function () { function x58() { } - x58.member = { n: [d1, d2] }; + x58.member = { + n: [ + d1, + d2 + ] + }; return x58; })(); var x59 = (function () { function x59() { } - x59.member = function (n) { var n; return null; }; + x59.member = function (n) { + var n; + return null; + }; return x59; })(); var x60 = (function () { function x60() { } - x60.member = { func: function (n) { return [d1, d2]; } }; + x60.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x60; })(); var x61 = (function () { function x61() { } - x61.member = function () { return [d1, d2]; }; + x61.member = function () { + return [ + d1, + d2 + ]; + }; return x61; })(); var x62 = (function () { function x62() { } - x62.member = function () { return [d1, d2]; }; + x62.member = function () { + return [ + d1, + d2 + ]; + }; return x62; })(); var x63 = (function () { function x63() { } - x63.member = function named() { return [d1, d2]; }; + x63.member = function named() { + return [ + d1, + d2 + ]; + }; return x63; })(); var x64 = (function () { function x64() { } - x64.member = function () { return [d1, d2]; }; + x64.member = function () { + return [ + d1, + d2 + ]; + }; return x64; })(); var x65 = (function () { function x65() { } - x65.member = function () { return [d1, d2]; }; + x65.member = function () { + return [ + d1, + d2 + ]; + }; return x65; })(); var x66 = (function () { function x66() { } - x66.member = function named() { return [d1, d2]; }; + x66.member = function named() { + return [ + d1, + d2 + ]; + }; return x66; })(); var x67 = (function () { function x67() { } - x67.member = [d1, d2]; + x67.member = [ + d1, + d2 + ]; return x67; })(); var x68 = (function () { function x68() { } - x68.member = [d1, d2]; + x68.member = [ + d1, + d2 + ]; return x68; })(); var x69 = (function () { function x69() { } - x69.member = [d1, d2]; + x69.member = [ + d1, + d2 + ]; return x69; })(); var x70 = (function () { function x70() { } - x70.member = { n: [d1, d2] }; + x70.member = { + n: [ + d1, + d2 + ] + }; return x70; })(); var x71 = (function () { function x71() { } - x71.member = function (n) { var n; return null; }; + x71.member = function (n) { + var n; + return null; + }; return x71; })(); var x72 = (function () { function x72() { } - x72.member = { func: function (n) { return [d1, d2]; } }; + x72.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x72; })(); var x73 = (function () { function x73() { } - x73.member = function () { return [d1, d2]; }; + x73.member = function () { + return [ + d1, + d2 + ]; + }; return x73; })(); var x74 = (function () { function x74() { } - x74.member = function () { return [d1, d2]; }; + x74.member = function () { + return [ + d1, + d2 + ]; + }; return x74; })(); var x75 = (function () { function x75() { } - x75.member = function named() { return [d1, d2]; }; + x75.member = function named() { + return [ + d1, + d2 + ]; + }; return x75; })(); var x76 = (function () { function x76() { } - x76.member = function () { return [d1, d2]; }; + x76.member = function () { + return [ + d1, + d2 + ]; + }; return x76; })(); var x77 = (function () { function x77() { } - x77.member = function () { return [d1, d2]; }; + x77.member = function () { + return [ + d1, + d2 + ]; + }; return x77; })(); var x78 = (function () { function x78() { } - x78.member = function named() { return [d1, d2]; }; + x78.member = function named() { + return [ + d1, + d2 + ]; + }; return x78; })(); var x79 = (function () { function x79() { } - x79.member = [d1, d2]; + x79.member = [ + d1, + d2 + ]; return x79; })(); var x80 = (function () { function x80() { } - x80.member = [d1, d2]; + x80.member = [ + d1, + d2 + ]; return x80; })(); var x81 = (function () { function x81() { } - x81.member = [d1, d2]; + x81.member = [ + d1, + d2 + ]; return x81; })(); var x82 = (function () { function x82() { } - x82.member = { n: [d1, d2] }; + x82.member = { + n: [ + d1, + d2 + ] + }; return x82; })(); var x83 = (function () { function x83() { } - x83.member = function (n) { var n; return null; }; + x83.member = function (n) { + var n; + return null; + }; return x83; })(); var x84 = (function () { function x84() { } - x84.member = { func: function (n) { return [d1, d2]; } }; + x84.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x84; })(); var x85 = (function () { function x85(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x85; })(); var x86 = (function () { function x86(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x86; })(); var x87 = (function () { function x87(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } return x87; })(); var x88 = (function () { function x88(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x88; })(); var x89 = (function () { function x89(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x89; })(); var x90 = (function () { function x90(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } return x90; })(); var x91 = (function () { function x91(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x91; })(); var x92 = (function () { function x92(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x92; })(); var x93 = (function () { function x93(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x93; })(); var x94 = (function () { function x94(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } } return x94; })(); var x95 = (function () { function x95(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } } return x95; })(); var x96 = (function () { function x96(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } } return x96; })(); var x97 = (function () { function x97(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x97; })(); var x98 = (function () { function x98(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x98; })(); var x99 = (function () { function x99(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x99; })(); var x100 = (function () { function x100(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x100; })(); var x101 = (function () { function x101(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x101; })(); var x102 = (function () { function x102(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x102; })(); var x103 = (function () { function x103(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x103; })(); var x104 = (function () { function x104(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x104; })(); var x105 = (function () { function x105(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x105; })(); var x106 = (function () { function x106(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } this.parm = parm; } return x106; })(); var x107 = (function () { function x107(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } this.parm = parm; } return x107; })(); var x108 = (function () { function x108(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } this.parm = parm; } return x108; })(); var x109 = (function () { function x109(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x109; })(); var x110 = (function () { function x110(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x110; })(); var x111 = (function () { function x111(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x111; })(); var x112 = (function () { function x112(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x112; })(); var x113 = (function () { function x113(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x113; })(); var x114 = (function () { function x114(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x114; })(); var x115 = (function () { function x115(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x115; })(); var x116 = (function () { function x116(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x116; })(); var x117 = (function () { function x117(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x117; })(); var x118 = (function () { function x118(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } this.parm = parm; } return x118; })(); var x119 = (function () { function x119(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } this.parm = parm; } return x119; })(); var x120 = (function () { function x120(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } this.parm = parm; } return x120; })(); function x121(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x122(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x123(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } function x124(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x125(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x126(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } function x127(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x128(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x129(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x130(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } } function x131(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } } function x132(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } } -function x133() { return function () { return [d1, d2]; }; } -function x134() { return function () { return [d1, d2]; }; } -function x135() { return function named() { return [d1, d2]; }; } -function x136() { return function () { return [d1, d2]; }; } -function x137() { return function () { return [d1, d2]; }; } -function x138() { return function named() { return [d1, d2]; }; } -function x139() { return [d1, d2]; } -function x140() { return [d1, d2]; } -function x141() { return [d1, d2]; } -function x142() { return { n: [d1, d2] }; } -function x143() { return function (n) { var n; return null; }; } -function x144() { return { func: function (n) { return [d1, d2]; } }; } -function x145() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x146() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x147() { return function named() { return [d1, d2]; }; return function named() { return [d1, d2]; }; } -function x148() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x149() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x150() { return function named() { return [d1, d2]; }; return function named() { return [d1, d2]; }; } -function x151() { return [d1, d2]; return [d1, d2]; } -function x152() { return [d1, d2]; return [d1, d2]; } -function x153() { return [d1, d2]; return [d1, d2]; } -function x154() { return { n: [d1, d2] }; return { n: [d1, d2] }; } -function x155() { return function (n) { var n; return null; }; return function (n) { var n; return null; }; } -function x156() { return { func: function (n) { return [d1, d2]; } }; return { func: function (n) { return [d1, d2]; } }; } -var x157 = function () { return function () { return [d1, d2]; }; }; -var x158 = function () { return function () { return [d1, d2]; }; }; -var x159 = function () { return function named() { return [d1, d2]; }; }; -var x160 = function () { return function () { return [d1, d2]; }; }; -var x161 = function () { return function () { return [d1, d2]; }; }; -var x162 = function () { return function named() { return [d1, d2]; }; }; -var x163 = function () { return [d1, d2]; }; -var x164 = function () { return [d1, d2]; }; -var x165 = function () { return [d1, d2]; }; -var x166 = function () { return { n: [d1, d2] }; }; -var x167 = function () { return function (n) { var n; return null; }; }; -var x168 = function () { return { func: function (n) { return [d1, d2]; } }; }; -var x169 = function () { return function () { return [d1, d2]; }; }; -var x170 = function () { return function () { return [d1, d2]; }; }; -var x171 = function () { return function named() { return [d1, d2]; }; }; -var x172 = function () { return function () { return [d1, d2]; }; }; -var x173 = function () { return function () { return [d1, d2]; }; }; -var x174 = function () { return function named() { return [d1, d2]; }; }; -var x175 = function () { return [d1, d2]; }; -var x176 = function () { return [d1, d2]; }; -var x177 = function () { return [d1, d2]; }; -var x178 = function () { return { n: [d1, d2] }; }; -var x179 = function () { return function (n) { var n; return null; }; }; -var x180 = function () { return { func: function (n) { return [d1, d2]; } }; }; +function x133() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x134() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x135() { + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x136() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x137() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x138() { + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x139() { + return [ + d1, + d2 + ]; +} +function x140() { + return [ + d1, + d2 + ]; +} +function x141() { + return [ + d1, + d2 + ]; +} +function x142() { + return { + n: [ + d1, + d2 + ] + }; +} +function x143() { + return function (n) { + var n; + return null; + }; +} +function x144() { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +} +function x145() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x146() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x147() { + return function named() { + return [ + d1, + d2 + ]; + }; + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x148() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x149() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x150() { + return function named() { + return [ + d1, + d2 + ]; + }; + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x151() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x152() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x153() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x154() { + return { + n: [ + d1, + d2 + ] + }; + return { + n: [ + d1, + d2 + ] + }; +} +function x155() { + return function (n) { + var n; + return null; + }; + return function (n) { + var n; + return null; + }; +} +function x156() { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +} +var x157 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x158 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x159 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x160 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x161 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x162 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x163 = function () { + return [ + d1, + d2 + ]; +}; +var x164 = function () { + return [ + d1, + d2 + ]; +}; +var x165 = function () { + return [ + d1, + d2 + ]; +}; +var x166 = function () { + return { + n: [ + d1, + d2 + ] + }; +}; +var x167 = function () { + return function (n) { + var n; + return null; + }; +}; +var x168 = function () { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +}; +var x169 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x170 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x171 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x172 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x173 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x174 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x175 = function () { + return [ + d1, + d2 + ]; +}; +var x176 = function () { + return [ + d1, + d2 + ]; +}; +var x177 = function () { + return [ + d1, + d2 + ]; +}; +var x178 = function () { + return { + n: [ + d1, + d2 + ] + }; +}; +var x179 = function () { + return function (n) { + var n; + return null; + }; +}; +var x180 = function () { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +}; var x181; (function (x181) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x181 || (x181 = {})); var x182; (function (x182) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x182 || (x182 = {})); var x183; (function (x183) { - var t = function named() { return [d1, d2]; }; + var t = function named() { + return [ + d1, + d2 + ]; + }; })(x183 || (x183 = {})); var x184; (function (x184) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x184 || (x184 = {})); var x185; (function (x185) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x185 || (x185 = {})); var x186; (function (x186) { - var t = function named() { return [d1, d2]; }; + var t = function named() { + return [ + d1, + d2 + ]; + }; })(x186 || (x186 = {})); var x187; (function (x187) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x187 || (x187 = {})); var x188; (function (x188) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x188 || (x188 = {})); var x189; (function (x189) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x189 || (x189 = {})); var x190; (function (x190) { - var t = { n: [d1, d2] }; + var t = { + n: [ + d1, + d2 + ] + }; })(x190 || (x190 = {})); var x191; (function (x191) { - var t = function (n) { var n; return null; }; + var t = function (n) { + var n; + return null; + }; })(x191 || (x191 = {})); var x192; (function (x192) { - var t = { func: function (n) { return [d1, d2]; } }; + var t = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; })(x192 || (x192 = {})); var x193; (function (x193) { - x193.t = function () { return [d1, d2]; }; + x193.t = function () { + return [ + d1, + d2 + ]; + }; })(x193 || (x193 = {})); var x194; (function (x194) { - x194.t = function () { return [d1, d2]; }; + x194.t = function () { + return [ + d1, + d2 + ]; + }; })(x194 || (x194 = {})); var x195; (function (x195) { - x195.t = function named() { return [d1, d2]; }; + x195.t = function named() { + return [ + d1, + d2 + ]; + }; })(x195 || (x195 = {})); var x196; (function (x196) { - x196.t = function () { return [d1, d2]; }; + x196.t = function () { + return [ + d1, + d2 + ]; + }; })(x196 || (x196 = {})); var x197; (function (x197) { - x197.t = function () { return [d1, d2]; }; + x197.t = function () { + return [ + d1, + d2 + ]; + }; })(x197 || (x197 = {})); var x198; (function (x198) { - x198.t = function named() { return [d1, d2]; }; + x198.t = function named() { + return [ + d1, + d2 + ]; + }; })(x198 || (x198 = {})); var x199; (function (x199) { - x199.t = [d1, d2]; + x199.t = [ + d1, + d2 + ]; })(x199 || (x199 = {})); var x200; (function (x200) { - x200.t = [d1, d2]; + x200.t = [ + d1, + d2 + ]; })(x200 || (x200 = {})); var x201; (function (x201) { - x201.t = [d1, d2]; + x201.t = [ + d1, + d2 + ]; })(x201 || (x201 = {})); var x202; (function (x202) { - x202.t = { n: [d1, d2] }; + x202.t = { + n: [ + d1, + d2 + ] + }; })(x202 || (x202 = {})); var x203; (function (x203) { - x203.t = function (n) { var n; return null; }; + x203.t = function (n) { + var n; + return null; + }; })(x203 || (x203 = {})); var x204; (function (x204) { - x204.t = { func: function (n) { return [d1, d2]; } }; + x204.t = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; })(x204 || (x204 = {})); -var x206 = function () { return [d1, d2]; }; -var x207 = function named() { return [d1, d2]; }; -var x209 = function () { return [d1, d2]; }; -var x210 = function named() { return [d1, d2]; }; -var x211 = [d1, d2]; -var x212 = [d1, d2]; -var x213 = [d1, d2]; -var x214 = { n: [d1, d2] }; -var x216 = { func: function (n) { return [d1, d2]; } }; -var x217 = undefined || function () { return [d1, d2]; }; -var x218 = undefined || function named() { return [d1, d2]; }; -var x219 = undefined || function () { return [d1, d2]; }; -var x220 = undefined || function named() { return [d1, d2]; }; -var x221 = undefined || [d1, d2]; -var x222 = undefined || [d1, d2]; -var x223 = undefined || [d1, d2]; -var x224 = undefined || { n: [d1, d2] }; +var x206 = function () { + return [ + d1, + d2 + ]; +}; +var x207 = function named() { + return [ + d1, + d2 + ]; +}; +var x209 = function () { + return [ + d1, + d2 + ]; +}; +var x210 = function named() { + return [ + d1, + d2 + ]; +}; +var x211 = [ + d1, + d2 +]; +var x212 = [ + d1, + d2 +]; +var x213 = [ + d1, + d2 +]; +var x214 = { + n: [ + d1, + d2 + ] +}; +var x216 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x217 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x218 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x219 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x220 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x221 = undefined || [ + d1, + d2 +]; +var x222 = undefined || [ + d1, + d2 +]; +var x223 = undefined || [ + d1, + d2 +]; +var x224 = undefined || { + n: [ + d1, + d2 + ] +}; var x225; -x225 = function () { return [d1, d2]; }; +x225 = function () { + return [ + d1, + d2 + ]; +}; var x226; -x226 = function () { return [d1, d2]; }; +x226 = function () { + return [ + d1, + d2 + ]; +}; var x227; -x227 = function named() { return [d1, d2]; }; +x227 = function named() { + return [ + d1, + d2 + ]; +}; var x228; -x228 = function () { return [d1, d2]; }; +x228 = function () { + return [ + d1, + d2 + ]; +}; var x229; -x229 = function () { return [d1, d2]; }; +x229 = function () { + return [ + d1, + d2 + ]; +}; var x230; -x230 = function named() { return [d1, d2]; }; +x230 = function named() { + return [ + d1, + d2 + ]; +}; var x231; -x231 = [d1, d2]; +x231 = [ + d1, + d2 +]; var x232; -x232 = [d1, d2]; +x232 = [ + d1, + d2 +]; var x233; -x233 = [d1, d2]; +x233 = [ + d1, + d2 +]; var x234; -x234 = { n: [d1, d2] }; +x234 = { + n: [ + d1, + d2 + ] +}; var x235; -x235 = function (n) { var n; return null; }; +x235 = function (n) { + var n; + return null; +}; var x236; -x236 = { func: function (n) { return [d1, d2]; } }; -var x237 = { n: function () { return [d1, d2]; } }; -var x238 = { n: function () { return [d1, d2]; } }; -var x239 = { n: function named() { return [d1, d2]; } }; -var x240 = { n: function () { return [d1, d2]; } }; -var x241 = { n: function () { return [d1, d2]; } }; -var x242 = { n: function named() { return [d1, d2]; } }; -var x243 = { n: [d1, d2] }; -var x244 = { n: [d1, d2] }; -var x245 = { n: [d1, d2] }; -var x246 = { n: { n: [d1, d2] } }; -var x247 = { n: function (n) { var n; return null; } }; -var x248 = { n: { func: function (n) { return [d1, d2]; } } }; -var x252 = [function () { return [d1, d2]; }]; -var x253 = [function () { return [d1, d2]; }]; -var x254 = [function named() { return [d1, d2]; }]; -var x255 = [[d1, d2]]; -var x256 = [[d1, d2]]; -var x257 = [[d1, d2]]; -var x258 = [{ n: [d1, d2] }]; -var x260 = [{ func: function (n) { return [d1, d2]; } }]; -var x261 = function () { return [d1, d2]; } || undefined; -var x262 = function named() { return [d1, d2]; } || undefined; -var x263 = function () { return [d1, d2]; } || undefined; -var x264 = function named() { return [d1, d2]; } || undefined; -var x265 = [d1, d2] || undefined; -var x266 = [d1, d2] || undefined; -var x267 = [d1, d2] || undefined; -var x268 = { n: [d1, d2] } || undefined; -var x269 = undefined || function () { return [d1, d2]; }; -var x270 = undefined || function named() { return [d1, d2]; }; -var x271 = undefined || function () { return [d1, d2]; }; -var x272 = undefined || function named() { return [d1, d2]; }; -var x273 = undefined || [d1, d2]; -var x274 = undefined || [d1, d2]; -var x275 = undefined || [d1, d2]; -var x276 = undefined || { n: [d1, d2] }; -var x277 = function () { return [d1, d2]; } || function () { return [d1, d2]; }; -var x278 = function named() { return [d1, d2]; } || function named() { return [d1, d2]; }; -var x279 = function () { return [d1, d2]; } || function () { return [d1, d2]; }; -var x280 = function named() { return [d1, d2]; } || function named() { return [d1, d2]; }; -var x281 = [d1, d2] || [d1, d2]; -var x282 = [d1, d2] || [d1, d2]; -var x283 = [d1, d2] || [d1, d2]; -var x284 = { n: [d1, d2] } || { n: [d1, d2] }; -var x285 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x286 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x287 = true ? function named() { return [d1, d2]; } : function named() { return [d1, d2]; }; -var x288 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x289 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x290 = true ? function named() { return [d1, d2]; } : function named() { return [d1, d2]; }; -var x291 = true ? [d1, d2] : [d1, d2]; -var x292 = true ? [d1, d2] : [d1, d2]; -var x293 = true ? [d1, d2] : [d1, d2]; -var x294 = true ? { n: [d1, d2] } : { n: [d1, d2] }; -var x295 = true ? function (n) { var n; return null; } : function (n) { var n; return null; }; -var x296 = true ? { func: function (n) { return [d1, d2]; } } : { func: function (n) { return [d1, d2]; } }; -var x297 = true ? undefined : function () { return [d1, d2]; }; -var x298 = true ? undefined : function () { return [d1, d2]; }; -var x299 = true ? undefined : function named() { return [d1, d2]; }; -var x300 = true ? undefined : function () { return [d1, d2]; }; -var x301 = true ? undefined : function () { return [d1, d2]; }; -var x302 = true ? undefined : function named() { return [d1, d2]; }; -var x303 = true ? undefined : [d1, d2]; -var x304 = true ? undefined : [d1, d2]; -var x305 = true ? undefined : [d1, d2]; -var x306 = true ? undefined : { n: [d1, d2] }; -var x307 = true ? undefined : function (n) { var n; return null; }; -var x308 = true ? undefined : { func: function (n) { return [d1, d2]; } }; -var x309 = true ? function () { return [d1, d2]; } : undefined; -var x310 = true ? function () { return [d1, d2]; } : undefined; -var x311 = true ? function named() { return [d1, d2]; } : undefined; -var x312 = true ? function () { return [d1, d2]; } : undefined; -var x313 = true ? function () { return [d1, d2]; } : undefined; -var x314 = true ? function named() { return [d1, d2]; } : undefined; -var x315 = true ? [d1, d2] : undefined; -var x316 = true ? [d1, d2] : undefined; -var x317 = true ? [d1, d2] : undefined; -var x318 = true ? { n: [d1, d2] } : undefined; -var x319 = true ? function (n) { var n; return null; } : undefined; -var x320 = true ? { func: function (n) { return [d1, d2]; } } : undefined; -function x321(n) { } +x236 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x237 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x238 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x239 = { + n: function named() { + return [ + d1, + d2 + ]; + } +}; +var x240 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x241 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x242 = { + n: function named() { + return [ + d1, + d2 + ]; + } +}; +var x243 = { + n: [ + d1, + d2 + ] +}; +var x244 = { + n: [ + d1, + d2 + ] +}; +var x245 = { + n: [ + d1, + d2 + ] +}; +var x246 = { + n: { + n: [ + d1, + d2 + ] + } +}; +var x247 = { + n: function (n) { + var n; + return null; + } +}; +var x248 = { + n: { + func: function (n) { + return [ + d1, + d2 + ]; + } + } +}; +var x252 = [ + function () { + return [ + d1, + d2 + ]; + } +]; +var x253 = [ + function () { + return [ + d1, + d2 + ]; + } +]; +var x254 = [ + function named() { + return [ + d1, + d2 + ]; + } +]; +var x255 = [ + [ + d1, + d2 + ] +]; +var x256 = [ + [ + d1, + d2 + ] +]; +var x257 = [ + [ + d1, + d2 + ] +]; +var x258 = [ + { + n: [ + d1, + d2 + ] + } +]; +var x260 = [ + { + func: function (n) { + return [ + d1, + d2 + ]; + } + } +]; +var x261 = function () { + return [ + d1, + d2 + ]; +} || undefined; +var x262 = function named() { + return [ + d1, + d2 + ]; +} || undefined; +var x263 = function () { + return [ + d1, + d2 + ]; +} || undefined; +var x264 = function named() { + return [ + d1, + d2 + ]; +} || undefined; +var x265 = [ + d1, + d2 +] || undefined; +var x266 = [ + d1, + d2 +] || undefined; +var x267 = [ + d1, + d2 +] || undefined; +var x268 = { + n: [ + d1, + d2 + ] +} || undefined; +var x269 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x270 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x271 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x272 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x273 = undefined || [ + d1, + d2 +]; +var x274 = undefined || [ + d1, + d2 +]; +var x275 = undefined || [ + d1, + d2 +]; +var x276 = undefined || { + n: [ + d1, + d2 + ] +}; +var x277 = function () { + return [ + d1, + d2 + ]; +} || function () { + return [ + d1, + d2 + ]; +}; +var x278 = function named() { + return [ + d1, + d2 + ]; +} || function named() { + return [ + d1, + d2 + ]; +}; +var x279 = function () { + return [ + d1, + d2 + ]; +} || function () { + return [ + d1, + d2 + ]; +}; +var x280 = function named() { + return [ + d1, + d2 + ]; +} || function named() { + return [ + d1, + d2 + ]; +}; +var x281 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x282 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x283 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x284 = { + n: [ + d1, + d2 + ] +} || { + n: [ + d1, + d2 + ] +}; +var x285 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x286 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x287 = true ? function named() { + return [ + d1, + d2 + ]; +} : function named() { + return [ + d1, + d2 + ]; +}; +var x288 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x289 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x290 = true ? function named() { + return [ + d1, + d2 + ]; +} : function named() { + return [ + d1, + d2 + ]; +}; +var x291 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x292 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x293 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x294 = true ? { + n: [ + d1, + d2 + ] +} : { + n: [ + d1, + d2 + ] +}; +var x295 = true ? function (n) { + var n; + return null; +} : function (n) { + var n; + return null; +}; +var x296 = true ? { + func: function (n) { + return [ + d1, + d2 + ]; + } +} : { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x297 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x298 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x299 = true ? undefined : function named() { + return [ + d1, + d2 + ]; +}; +var x300 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x301 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x302 = true ? undefined : function named() { + return [ + d1, + d2 + ]; +}; +var x303 = true ? undefined : [ + d1, + d2 +]; +var x304 = true ? undefined : [ + d1, + d2 +]; +var x305 = true ? undefined : [ + d1, + d2 +]; +var x306 = true ? undefined : { + n: [ + d1, + d2 + ] +}; +var x307 = true ? undefined : function (n) { + var n; + return null; +}; +var x308 = true ? undefined : { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x309 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x310 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x311 = true ? function named() { + return [ + d1, + d2 + ]; +} : undefined; +var x312 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x313 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x314 = true ? function named() { + return [ + d1, + d2 + ]; +} : undefined; +var x315 = true ? [ + d1, + d2 +] : undefined; +var x316 = true ? [ + d1, + d2 +] : undefined; +var x317 = true ? [ + d1, + d2 +] : undefined; +var x318 = true ? { + n: [ + d1, + d2 + ] +} : undefined; +var x319 = true ? function (n) { + var n; + return null; +} : undefined; +var x320 = true ? { + func: function (n) { + return [ + d1, + d2 + ]; + } +} : undefined; +function x321(n) { +} ; -x321(function () { return [d1, d2]; }); -function x322(n) { } +x321(function () { + return [ + d1, + d2 + ]; +}); +function x322(n) { +} ; -x322(function () { return [d1, d2]; }); -function x323(n) { } +x322(function () { + return [ + d1, + d2 + ]; +}); +function x323(n) { +} ; -x323(function named() { return [d1, d2]; }); -function x324(n) { } +x323(function named() { + return [ + d1, + d2 + ]; +}); +function x324(n) { +} ; -x324(function () { return [d1, d2]; }); -function x325(n) { } +x324(function () { + return [ + d1, + d2 + ]; +}); +function x325(n) { +} ; -x325(function () { return [d1, d2]; }); -function x326(n) { } +x325(function () { + return [ + d1, + d2 + ]; +}); +function x326(n) { +} ; -x326(function named() { return [d1, d2]; }); -function x327(n) { } +x326(function named() { + return [ + d1, + d2 + ]; +}); +function x327(n) { +} ; -x327([d1, d2]); -function x328(n) { } +x327([ + d1, + d2 +]); +function x328(n) { +} ; -x328([d1, d2]); -function x329(n) { } +x328([ + d1, + d2 +]); +function x329(n) { +} ; -x329([d1, d2]); -function x330(n) { } +x329([ + d1, + d2 +]); +function x330(n) { +} ; -x330({ n: [d1, d2] }); -function x331(n) { } +x330({ + n: [ + d1, + d2 + ] +}); +function x331(n) { +} ; -x331(function (n) { var n; return null; }); -function x332(n) { } +x331(function (n) { + var n; + return null; +}); +function x332(n) { +} ; -x332({ func: function (n) { return [d1, d2]; } }); -var x333 = function (n) { return n; }; -x333(function () { return [d1, d2]; }); -var x334 = function (n) { return n; }; -x334(function () { return [d1, d2]; }); -var x335 = function (n) { return n; }; -x335(function named() { return [d1, d2]; }); -var x336 = function (n) { return n; }; -x336(function () { return [d1, d2]; }); -var x337 = function (n) { return n; }; -x337(function () { return [d1, d2]; }); -var x338 = function (n) { return n; }; -x338(function named() { return [d1, d2]; }); -var x339 = function (n) { return n; }; -x339([d1, d2]); -var x340 = function (n) { return n; }; -x340([d1, d2]); -var x341 = function (n) { return n; }; -x341([d1, d2]); -var x342 = function (n) { return n; }; -x342({ n: [d1, d2] }); -var x343 = function (n) { return n; }; -x343(function (n) { var n; return null; }); -var x344 = function (n) { return n; }; -x344({ func: function (n) { return [d1, d2]; } }); -var x345 = function (n) { }; -x345(function () { return [d1, d2]; }); -var x346 = function (n) { }; -x346(function () { return [d1, d2]; }); -var x347 = function (n) { }; -x347(function named() { return [d1, d2]; }); -var x348 = function (n) { }; -x348(function () { return [d1, d2]; }); -var x349 = function (n) { }; -x349(function () { return [d1, d2]; }); -var x350 = function (n) { }; -x350(function named() { return [d1, d2]; }); -var x351 = function (n) { }; -x351([d1, d2]); -var x352 = function (n) { }; -x352([d1, d2]); -var x353 = function (n) { }; -x353([d1, d2]); -var x354 = function (n) { }; -x354({ n: [d1, d2] }); -var x355 = function (n) { }; -x355(function (n) { var n; return null; }); -var x356 = function (n) { }; -x356({ func: function (n) { return [d1, d2]; } }); +x332({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); +var x333 = function (n) { + return n; +}; +x333(function () { + return [ + d1, + d2 + ]; +}); +var x334 = function (n) { + return n; +}; +x334(function () { + return [ + d1, + d2 + ]; +}); +var x335 = function (n) { + return n; +}; +x335(function named() { + return [ + d1, + d2 + ]; +}); +var x336 = function (n) { + return n; +}; +x336(function () { + return [ + d1, + d2 + ]; +}); +var x337 = function (n) { + return n; +}; +x337(function () { + return [ + d1, + d2 + ]; +}); +var x338 = function (n) { + return n; +}; +x338(function named() { + return [ + d1, + d2 + ]; +}); +var x339 = function (n) { + return n; +}; +x339([ + d1, + d2 +]); +var x340 = function (n) { + return n; +}; +x340([ + d1, + d2 +]); +var x341 = function (n) { + return n; +}; +x341([ + d1, + d2 +]); +var x342 = function (n) { + return n; +}; +x342({ + n: [ + d1, + d2 + ] +}); +var x343 = function (n) { + return n; +}; +x343(function (n) { + var n; + return null; +}); +var x344 = function (n) { + return n; +}; +x344({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); +var x345 = function (n) { +}; +x345(function () { + return [ + d1, + d2 + ]; +}); +var x346 = function (n) { +}; +x346(function () { + return [ + d1, + d2 + ]; +}); +var x347 = function (n) { +}; +x347(function named() { + return [ + d1, + d2 + ]; +}); +var x348 = function (n) { +}; +x348(function () { + return [ + d1, + d2 + ]; +}); +var x349 = function (n) { +}; +x349(function () { + return [ + d1, + d2 + ]; +}); +var x350 = function (n) { +}; +x350(function named() { + return [ + d1, + d2 + ]; +}); +var x351 = function (n) { +}; +x351([ + d1, + d2 +]); +var x352 = function (n) { +}; +x352([ + d1, + d2 +]); +var x353 = function (n) { +}; +x353([ + d1, + d2 +]); +var x354 = function (n) { +}; +x354({ + n: [ + d1, + d2 + ] +}); +var x355 = function (n) { +}; +x355(function (n) { + var n; + return null; +}); +var x356 = function (n) { +}; +x356({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); diff --git a/tests/baselines/reference/generativeRecursionWithTypeOf.js b/tests/baselines/reference/generativeRecursionWithTypeOf.js index 2b7eebfd11c..599751ebde7 100644 --- a/tests/baselines/reference/generativeRecursionWithTypeOf.js +++ b/tests/baselines/reference/generativeRecursionWithTypeOf.js @@ -14,7 +14,8 @@ module M { var C = (function () { function C() { } - C.foo = function (x) { }; + C.foo = function (x) { + }; return C; })(); var M; diff --git a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js index dd06b855b68..321400fc24d 100644 --- a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js +++ b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js @@ -23,6 +23,13 @@ _.all([true], _.identity); //// [genericArgumentCallSigAssignmentCompat.js] // No error, Call signatures of types '(value: T) => T' and 'Underscore.Iterator<{}, boolean>' are compatible when instantiated with any. // Ideally, we would not have a generic signature here, because it should be instantiated with {} during inferential typing -_.all([true, 1, null, 'yes'], _.identity); +_.all([ + true, + 1, + null, + 'yes' +], _.identity); // Ok, because fixing makes us infer boolean for T -_.all([true], _.identity); +_.all([ + true +], _.identity); diff --git a/tests/baselines/reference/genericArray1.js b/tests/baselines/reference/genericArray1.js index b0bfcd2201a..e698d339073 100644 --- a/tests/baselines/reference/genericArray1.js +++ b/tests/baselines/reference/genericArray1.js @@ -26,7 +26,13 @@ interface String{ length: number; } */ -var lengths = ["a", "b", "c"].map(function (x) { return x.length; }); +var lengths = [ + "a", + "b", + "c" +].map(function (x) { + return x.length; +}); //// [genericArray1.d.ts] diff --git a/tests/baselines/reference/genericArrayMethods1.js b/tests/baselines/reference/genericArrayMethods1.js index c7fca1ee6b7..e6cebcb220e 100644 --- a/tests/baselines/reference/genericArrayMethods1.js +++ b/tests/baselines/reference/genericArrayMethods1.js @@ -3,4 +3,7 @@ var x:string[] = [0,1].slice(0); // this should be an error //// [genericArrayMethods1.js] -var x = [0, 1].slice(0); // this should be an error +var x = [ + 0, + 1 +].slice(0); // this should be an error diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js index 9b7d5b713e9..6f1928a2601 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js @@ -6,7 +6,9 @@ x1 = x2; x2 = x1; //// [genericAssignmentCompatOfFunctionSignatures1.js] -var x1 = function foo3(x, z) { }; -var x2 = function foo3(x, z) { }; +var x1 = function foo3(x, z) { +}; +var x2 = function foo3(x, z) { +}; x1 = x2; x2 = x1; diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js index 70f70ae07ba..7f82cc6afb3 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js @@ -23,13 +23,21 @@ var a4: I = >z; var A = (function () { function A() { } - A.prototype.compareTo = function (other) { return 1; }; + A.prototype.compareTo = function (other) { + return 1; + }; return A; })(); -var z = { x: new A() }; -var a1 = { x: new A() }; +var z = { + x: new A() +}; +var a1 = { + x: new A() +}; var a2 = function () { - var z = { x: new A() }; + var z = { + x: new A() + }; return z; }(); var a3 = z; diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js index ba8c2884fff..ebc49f37c0d 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js @@ -17,11 +17,29 @@ var r6 = foo([1, '']); // Object[] function foo(t) { return t; } -var r = foo([1, 2]); // number[] -var r = foo([1, 2]); // number[] -var ra = foo([1, 2]); // any[] +var r = foo([ + 1, + 2 +]); // number[] +var r = foo([ + 1, + 2 +]); // number[] +var ra = foo([ + 1, + 2 +]); // any[] var r2 = foo([]); // any[] var r3 = foo([]); // number[] -var r4 = foo([1, '']); // {}[] -var r5 = foo([1, '']); // any[] -var r6 = foo([1, '']); // Object[] +var r4 = foo([ + 1, + '' +]); // {}[] +var r5 = foo([ + 1, + '' +]); // any[] +var r6 = foo([ + 1, + '' +]); // Object[] diff --git a/tests/baselines/reference/genericCallWithFixedArguments.js b/tests/baselines/reference/genericCallWithFixedArguments.js index e588c0d113d..10c0e2b496b 100644 --- a/tests/baselines/reference/genericCallWithFixedArguments.js +++ b/tests/baselines/reference/genericCallWithFixedArguments.js @@ -11,14 +11,17 @@ g(7) // the parameter list is fixed, so this should not error var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); -function g(x) { } +function g(x) { +} g(7); // the parameter list is fixed, so this should not error diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js index 30d4ed353ff..b6f2839bae1 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js @@ -42,25 +42,53 @@ function other(t: T, u: U) { function foo(x) { return x(null); } -var r = foo(function (x) { return ''; }); // {} -var r2 = foo(function (x) { return ''; }); // string -var r3 = foo(function (x) { return ''; }); // {} +var r = foo(function (x) { + return ''; +}); // {} +var r2 = foo(function (x) { + return ''; +}); // string +var r3 = foo(function (x) { + return ''; +}); // {} function foo2(x, cb) { return cb(x); } -var r4 = foo2(1, function (a) { return ''; }); // string, contextual signature instantiation is applied to generic functions -var r5 = foo2(1, function (a) { return ''; }); // string -var r6 = foo2('', function (a) { return 1; }); +var r4 = foo2(1, function (a) { + return ''; +}); // string, contextual signature instantiation is applied to generic functions +var r5 = foo2(1, function (a) { + return ''; +}); // string +var r6 = foo2('', function (a) { + return 1; +}); function foo3(x, cb, y) { return cb(x); } -var r7 = foo3(1, function (a) { return ''; }, ''); // string -var r8 = foo3(1, function (a) { return ''; }, 1); // error -var r9 = foo3(1, function (a) { return ''; }, ''); // string +var r7 = foo3(1, function (a) { + return ''; +}, ''); // string +var r8 = foo3(1, function (a) { + return ''; +}, 1); // error +var r9 = foo3(1, function (a) { + return ''; +}, ''); // string function other(t, u) { - var r10 = foo2(1, function (x) { return ''; }); // error - var r10 = foo2(1, function (x) { return ''; }); // string - var r11 = foo3(1, function (x) { return ''; }, ''); // error - var r11b = foo3(1, function (x) { return ''; }, 1); // error - var r12 = foo3(1, function (a) { return ''; }, 1); // error + var r10 = foo2(1, function (x) { + return ''; + }); // error + var r10 = foo2(1, function (x) { + return ''; + }); // string + var r11 = foo3(1, function (x) { + return ''; + }, ''); // error + var r11b = foo3(1, function (x) { + return ''; + }, 1); // error + var r12 = foo3(1, function (a) { + return ''; + }, 1); // error } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js index 4e3e20071b2..1675b582d49 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js @@ -27,16 +27,40 @@ var r7 = foo({ cb: () => '' }); // string function foo(arg) { return arg.cb(null); } -var arg = { cb: function (x) { return ''; } }; +var arg = { + cb: function (x) { + return ''; + } +}; var r = foo(arg); // {} // more args not allowed -var r2 = foo({ cb: function (x, y) { return ''; } }); // error -var r3 = foo({ cb: function (x, y) { return ''; } }); // error +var r2 = foo({ + cb: function (x, y) { + return ''; + } +}); // error +var r3 = foo({ + cb: function (x, y) { + return ''; + } +}); // error function foo2(arg) { return arg.cb(null, null); } // fewer args ok var r4 = foo(arg); // {} -var r5 = foo({ cb: function (x) { return ''; } }); // {} -var r6 = foo({ cb: function (x) { return ''; } }); // string -var r7 = foo({ cb: function () { return ''; } }); // string +var r5 = foo({ + cb: function (x) { + return ''; + } +}); // {} +var r6 = foo({ + cb: function (x) { + return ''; + } +}); // string +var r7 = foo({ + cb: function () { + return ''; + } +}); // string diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js index 17094dae69c..0f39ae16dee 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js @@ -50,21 +50,61 @@ function foo(a, b) { return r; } //var r1 = foo((x: number) => 1, (x: string) => ''); // error -var r1b = foo(function (x) { return 1; }, function (x) { return ''; }); // {} => {} -var r2 = foo(function (x) { return null; }, function (x) { return ''; }); // Object => Object -var r3 = foo(function (x) { return 1; }, function (x) { return null; }); // number => number -var r3ii = foo(function (x) { return 1; }, function (x) { return 1; }); // number => number +var r1b = foo(function (x) { + return 1; +}, function (x) { + return ''; +}); // {} => {} +var r2 = foo(function (x) { + return null; +}, function (x) { + return ''; +}); // Object => Object +var r3 = foo(function (x) { + return 1; +}, function (x) { + return null; +}); // number => number +var r3ii = foo(function (x) { + return 1; +}, function (x) { + return 1; +}); // number => number var a; var b; -var r4 = foo(function (x) { return a; }, function (x) { return b; }); // typeof a => typeof a -var r5 = foo(function (x) { return b; }, function (x) { return a; }); // typeof b => typeof b +var r4 = foo(function (x) { + return a; +}, function (x) { + return b; +}); // typeof a => typeof a +var r5 = foo(function (x) { + return b; +}, function (x) { + return a; +}); // typeof b => typeof b function other(x) { - var r6 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r6b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r6 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T + var r6b = foo(function (a) { + return a; + }, function (b) { + return b; + }); // {} => {} } function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r7b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T + var r7b = foo(function (a) { + return a; + }, function (b) { + return b; + }); // {} => {} var r8 = r7(null); // BUG 835518 //var r9 = r7(new Date()); @@ -74,5 +114,9 @@ function foo2(a, b) { return r; } function other3(x) { - var r8 = foo2(function (a) { return a; }, function (b) { return b; }); // Date => Date + var r8 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // Date => Date } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js index 1aabe9cfa2b..758852a918b 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js @@ -82,9 +82,17 @@ var onlyT; var r; return r; } - var r1 = foo(function (x) { return 1; }, function (x) { return ''; }); + var r1 = foo(function (x) { + return 1; + }, function (x) { + return ''; + }); function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T // BUG 835518 var r9 = r7(new Date()); // should be ok var r10 = r7(1); // error @@ -94,8 +102,16 @@ var onlyT; return r; } function other3(x) { - var r7 = foo2(function (a) { return a; }, function (b) { return b; }); // error - var r7b = foo2(function (a) { return a; }, function (b) { return b; }); // valid, T is inferred to be Date + var r7 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // error + var r7b = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // valid, T is inferred to be Date } var E; (function (E) { @@ -109,7 +125,11 @@ var onlyT; var r; return r; } - var r7 = foo3(E.A, function (x) { return E.A; }, function (x) { return F.A; }); // error + var r7 = foo3(E.A, function (x) { + return E.A; + }, function (x) { + return F.A; + }); // error })(onlyT || (onlyT = {})); var TU; (function (TU) { @@ -117,9 +137,17 @@ var TU; var r; return r; } - var r1 = foo(function (x) { return 1; }, function (x) { return ''; }); + var r1 = foo(function (x) { + return 1; + }, function (x) { + return ''; + }); function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); var r9 = r7(new Date()); var r10 = r7(1); } @@ -128,8 +156,16 @@ var TU; return r; } function other3(x) { - var r7 = foo2(function (a) { return a; }, function (b) { return b; }); - var r7b = foo2(function (a) { return a; }, function (b) { return b; }); + var r7 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); + var r7b = foo2(function (a) { + return a; + }, function (b) { + return b; + }); } var E; (function (E) { @@ -143,5 +179,9 @@ var TU; var r; return r; } - var r7 = foo3(E.A, function (x) { return E.A; }, function (x) { return F.A; }); + var r7 = foo3(E.A, function (x) { + return E.A; + }, function (x) { + return F.A; + }); })(TU || (TU = {})); diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js index 36566033a48..b7cc833b9d9 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js @@ -40,12 +40,36 @@ function foo(x, a, b) { var r; return r; } -var r1 = foo('', function (x) { return ''; }, function (x) { return null; }); // any => any -var r1ii = foo('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r2 = foo('', function (x) { return ''; }, function (x) { return ''; }); // string => string -var r3 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object -var r4 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r5 = foo(new Object(), function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r1 = foo('', function (x) { + return ''; +}, function (x) { + return null; +}); // any => any +var r1ii = foo('', function (x) { + return ''; +}, function (x) { + return null; +}); // string => string +var r2 = foo('', function (x) { + return ''; +}, function (x) { + return ''; +}); // string => string +var r3 = foo(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object +var r4 = foo(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // any => any +var r5 = foo(new Object(), function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object var E; (function (E) { E[E["A"] = 0] = "A"; @@ -54,14 +78,42 @@ var F; (function (F) { F[F["A"] = 0] = "A"; })(F || (F = {})); -var r6 = foo(E.A, function (x) { return E.A; }, function (x) { return F.A; }); // number => number +var r6 = foo(E.A, function (x) { + return E.A; +}, function (x) { + return F.A; +}); // number => number function foo2(x, a, b) { var r; return r; } -var r8 = foo2('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r9 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r10 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r8 = foo2('', function (x) { + return ''; +}, function (x) { + return null; +}); // string => string +var r9 = foo2(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // any => any +var r10 = foo2(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object var x; -var r11 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // error -var r12 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // error +var r11 = foo2(x, function (a1) { + return function (n) { + return 1; + }; +}, function (a2) { + return 2; +}); // error +var r12 = foo2(x, function (a1) { + return function (n) { + return 1; + }; +}, function (a2) { + return 2; +}); // error diff --git a/tests/baselines/reference/genericCallWithNonGenericArgs1.js b/tests/baselines/reference/genericCallWithNonGenericArgs1.js index 4f5239630ae..2282c64e851 100644 --- a/tests/baselines/reference/genericCallWithNonGenericArgs1.js +++ b/tests/baselines/reference/genericCallWithNonGenericArgs1.js @@ -4,5 +4,6 @@ f(null) //// [genericCallWithNonGenericArgs1.js] -function f(x) { } +function f(x) { +} f(null); diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js index 2515bbef293..17ca4ad937c 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js @@ -12,7 +12,19 @@ var r4 = foo({ bar: 1, baz: '' }); // T = Object function foo(x) { return x; } -var r = foo({ bar: 1, baz: '' }); // error -var r2 = foo({ bar: 1, baz: 1 }); // T = number -var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo -var r4 = foo({ bar: 1, baz: '' }); // T = Object +var r = foo({ + bar: 1, + baz: '' +}); // error +var r2 = foo({ + bar: 1, + baz: 1 +}); // T = number +var r3 = foo({ + bar: foo, + baz: foo +}); // T = typeof foo +var r4 = foo({ + bar: 1, + baz: '' +}); // T = Object diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js index f140caaac61..92564c0a131 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js @@ -8,10 +8,27 @@ var x4 = foo({ x: "", y: 4 }, ""); var x5 = foo({ x: "", y: 4 }, ""); //// [genericCallWithObjectLiteralArguments1.js] -function foo(n, m) { return m; } +function foo(n, m) { + return m; +} // these are all errors -var x = foo({ x: 3, y: "" }, 4); -var x2 = foo({ x: 3, y: "" }, 4); -var x3 = foo({ x: 3, y: "" }, 4); -var x4 = foo({ x: "", y: 4 }, ""); -var x5 = foo({ x: "", y: 4 }, ""); +var x = foo({ + x: 3, + y: "" +}, 4); +var x2 = foo({ + x: 3, + y: "" +}, 4); +var x3 = foo({ + x: 3, + y: "" +}, 4); +var x4 = foo({ + x: "", + y: 4 +}, ""); +var x5 = foo({ + x: "", + y: 4 +}, ""); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 3a72feff979..aa478a7fbed 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -60,13 +60,27 @@ var Derived2 = (function (_super) { })(Base); // returns {}[] function f(a) { - return [a.x, a.y]; + return [ + a.x, + a.y + ]; } -var r = f({ x: new Derived(), y: new Derived2() }); // {}[] -var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] +var r = f({ + x: new Derived(), + y: new Derived2() +}); // {}[] +var r2 = f({ + x: new Base(), + y: new Derived2() +}); // {}[] function f2(a) { - return function (x) { return a.y; }; + return function (x) { + return a.y; + }; } -var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2 +var r3 = f2({ + x: new Derived(), + y: new Derived2() +}); // Derived => Derived2 var i; var r4 = f2(i); // Base => Derived diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index c1f0945ba10..e530187859f 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -63,8 +63,14 @@ function f(x) { var r; return r; } -var r = f({ foo: new Base(), bar: new Derived() }); -var r2 = f({ foo: new Derived(), bar: new Derived() }); +var r = f({ + foo: new Base(), + bar: new Derived() +}); +var r2 = f({ + foo: new Derived(), + bar: new Derived() +}); function f2(x) { var r; return r; @@ -74,7 +80,13 @@ var r3 = f2(i); function f3(x, y) { return y(null); } -var r4 = f3(new Base(), function (x) { return x; }); -var r5 = f3(new Derived(), function (x) { return x; }); +var r4 = f3(new Base(), function (x) { + return x; +}); +var r5 = f3(new Derived(), function (x) { + return x; +}); var r6 = f3(null, null); // any -var r7 = f3(null, function (x) { return x; }); // any +var r7 = f3(null, function (x) { + return x; +}); // any diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index b9c722f80be..9dca38866c6 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -68,17 +68,32 @@ function f(a) { var r; return r; } -var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other +var r1 = f({ + x: new Derived(), + y: new Derived2() +}); // error because neither is supertype of the other function f2(a) { var r; return r; } -var r2 = f2({ x: new Derived(), y: new Derived2() }); // ok -var r3 = f2({ x: new Derived(), y: new Derived2() }); // ok +var r2 = f2({ + x: new Derived(), + y: new Derived2() +}); // ok +var r3 = f2({ + x: new Derived(), + y: new Derived2() +}); // ok function f3(y, x) { return y(null); } // all ok - second argument is processed before x is fixed -var r4 = f3(function (x) { return x; }, new Base()); -var r5 = f3(function (x) { return x; }, new Derived()); -var r6 = f3(function (x) { return x; }, null); +var r4 = f3(function (x) { + return x; +}, new Base()); +var r5 = f3(function (x) { + return x; +}, new Derived()); +var r6 = f3(function (x) { + return x; +}, null); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js index 10d32ddeae7..2872777d1bb 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js @@ -46,19 +46,29 @@ var D = (function () { return D; })(); function foo(t, t2) { - return function (x) { return t2; }; + return function (x) { + return t2; + }; } var c; var d; var r = foo(c, d); var r2 = foo(d, c); // error because C does not extend D -var r3 = foo(c, { x: '', foo: c }); +var r3 = foo(c, { + x: '', + foo: c +}); var r4 = foo(null, null); var r5 = foo({}, null); var r6 = foo(null, {}); var r7 = foo({}, {}); -var r8 = foo(function () { }, function () { }); -var r9 = foo(function () { }, function () { return 1; }); +var r8 = foo(function () { +}, function () { +}); +var r9 = foo(function () { +}, function () { + return 1; +}); function other() { var r4 = foo(c, d); var r5 = foo(c, d); // error diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js index 95b98767a09..c0432cfcacf 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js @@ -37,12 +37,17 @@ var D = (function () { return D; })(); function foo(t, t2) { - return function (x) { return t2; }; + return function (x) { + return t2; + }; } var c; var d; var r2 = foo(d, c); // the constraints are self-referencing, no downstream error -var r9 = foo(function () { return 1; }, function () { }); // the constraints are self-referencing, no downstream error +var r9 = foo(function () { + return 1; +}, function () { +}); // the constraints are self-referencing, no downstream error function other() { var r5 = foo(c, d); // error } diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js index dea5948242b..b66c9ccf6c2 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js @@ -54,28 +54,44 @@ var NonGenericParameter; return cb; } var r = foo4(a); - var r2 = foo4(function (x) { return x; }); - var r4 = foo4(function (x) { return x; }); + var r2 = foo4(function (x) { + return x; + }); + var r4 = foo4(function (x) { + return x; + }); })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { function foo5(cb) { return cb; } - var r5 = foo5(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r5 = foo5(function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any var a; var r7 = foo5(a); // any => string (+1 overload) function foo6(cb) { return cb; } - var r8 = foo6(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any - var r9 = foo6(function (x) { return ''; }); // any => string (+1 overload) - var r11 = foo6(function (x, y) { return ''; }); // any => string (+1 overload) + var r8 = foo6(function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r9 = foo6(function (x) { + return ''; + }); // any => string (+1 overload) + var r11 = foo6(function (x, y) { + return ''; + }); // any => string (+1 overload) function foo7(x, cb) { return cb; } - var r12 = foo7(1, function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] - var r13 = foo7(1, function (x) { return ''; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r12 = foo7(1, function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r13 = foo7(1, function (x) { + return ''; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] var a; var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js index b4f96f67942..e61e2b06b4e 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js @@ -46,22 +46,31 @@ var NonGenericParameter; function foo4(cb) { return cb; } - var r3 = foo4(function (x) { var r; return r; }); // ok + var r3 = foo4(function (x) { + var r; + return r; + }); // ok })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { function foo5(cb) { return cb; } - var r6 = foo5(function (x) { return x; }); // ok + var r6 = foo5(function (x) { + return x; + }); // ok function foo6(cb) { return cb; } - var r10 = foo6(function (x, y) { return ''; }); // error + var r10 = foo6(function (x, y) { + return ''; + }); // error function foo7(x, cb) { return cb; } - var r13 = foo7(1, function (x) { return x; }); // ok + var r13 = foo7(1, function (x) { + return x; + }); // ok var a; var r14 = foo7(1, a); // ok })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithTupleType.js b/tests/baselines/reference/genericCallWithTupleType.js index 296a6dad63b..fa29f01384e 100644 --- a/tests/baselines/reference/genericCallWithTupleType.js +++ b/tests/baselines/reference/genericCallWithTupleType.js @@ -29,18 +29,48 @@ i2.tuple1 = [{}]; var i1; var i2; // no error -i1.tuple1 = ["foo", 5]; +i1.tuple1 = [ + "foo", + 5 +]; var e1 = i1.tuple1[0]; // string var e2 = i1.tuple1[1]; // number -i1.tuple1 = ["foo", 5, false, true]; +i1.tuple1 = [ + "foo", + 5, + false, + true +]; var e3 = i1.tuple1[2]; // {} -i1.tuple1[3] = { a: "string" }; +i1.tuple1[3] = { + a: "string" +}; var e4 = i1.tuple1[3]; // {} -i2.tuple1 = ["foo", 5]; -i2.tuple1 = ["foo", "bar"]; -i2.tuple1 = [5, "bar"]; -i2.tuple1 = [{}, {}]; +i2.tuple1 = [ + "foo", + 5 +]; +i2.tuple1 = [ + "foo", + "bar" +]; +i2.tuple1 = [ + 5, + "bar" +]; +i2.tuple1 = [ + {}, + {} +]; // error -i1.tuple1 = [5, "foo"]; -i1.tuple1 = [{}, {}]; -i2.tuple1 = [{}]; +i1.tuple1 = [ + 5, + "foo" +]; +i1.tuple1 = [ + {}, + {} +]; +i2.tuple1 = [ + {} +]; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index e63c7a98272..682cd6010f1 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -56,11 +56,13 @@ var M; function D() { } D.prototype._subscribe = function (viewModel) { - var f = function (newValue) { }; + var f = function (newValue) { + }; var v = viewModel.value; // both of these should work v.subscribe(f); - v.subscribe(function (newValue) { }); + v.subscribe(function (newValue) { + }); }; return D; })(); diff --git a/tests/baselines/reference/genericCallsWithoutParens.js b/tests/baselines/reference/genericCallsWithoutParens.js index a479fbab375..e51ed55224c 100644 --- a/tests/baselines/reference/genericCallsWithoutParens.js +++ b/tests/baselines/reference/genericCallsWithoutParens.js @@ -10,7 +10,8 @@ var c = new C; // parse error //// [genericCallsWithoutParens.js] -function f() { } +function f() { +} var r = f(); // parse error var C = (function () { function C() { diff --git a/tests/baselines/reference/genericChainedCalls.js b/tests/baselines/reference/genericChainedCalls.js index 71d83a906bf..48bc37101cd 100644 --- a/tests/baselines/reference/genericChainedCalls.js +++ b/tests/baselines/reference/genericChainedCalls.js @@ -15,8 +15,20 @@ var s3 = s2.func(num => num.toString()) //// [genericChainedCalls.js] -var r1 = v1.func(function (num) { return num.toString(); }).func(function (str) { return str.length; }) // error, number doesn't have a length -.func(function (num) { return num.toString(); }); -var s1 = v1.func(function (num) { return num.toString(); }); -var s2 = s1.func(function (str) { return str.length; }); // should also error -var s3 = s2.func(function (num) { return num.toString(); }); +var r1 = v1.func(function (num) { + return num.toString(); +}).func(function (str) { + return str.length; +}) // error, number doesn't have a length +.func(function (num) { + return num.toString(); +}); +var s1 = v1.func(function (num) { + return num.toString(); +}); +var s2 = s1.func(function (str) { + return str.length; +}); // should also error +var s3 = s2.func(function (num) { + return num.toString(); +}); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 4f26e35d1b0..8d1e87cb495 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -91,8 +91,11 @@ var Portal; var Validator = (function () { function Validator(message) { } - Validator.prototype.destroy = function () { }; - Validator.prototype._validate = function (value) { return 0; }; + Validator.prototype.destroy = function () { + }; + Validator.prototype._validate = function (value) { + return 0; + }; return Validator; })(); Validators.Validator = Validator; diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js index 5156c4d6b12..4aab45f5228 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js @@ -78,9 +78,15 @@ var ImmediatelyFix; return C; })(); var c = new C(); - var r = c.foo(function (x) { return ''; }); // {} - var r2 = c.foo(function (x) { return ''; }); // string - var r3 = c.foo(function (x) { return ''; }); // {} + var r = c.foo(function (x) { + return ''; + }); // {} + var r2 = c.foo(function (x) { + return ''; + }); // string + var r3 = c.foo(function (x) { + return ''; + }); // {} var C2 = (function () { function C2() { } @@ -90,8 +96,12 @@ var ImmediatelyFix; return C2; })(); var c2 = new C2(); - var ra = c2.foo(function (x) { return 1; }); // number - var r3a = c2.foo(function (x) { return 1; }); // number + var ra = c2.foo(function (x) { + return 1; + }); // number + var r3a = c2.foo(function (x) { + return 1; + }); // number })(ImmediatelyFix || (ImmediatelyFix = {})); var WithCandidates; (function (WithCandidates) { @@ -104,9 +114,15 @@ var WithCandidates; return C; })(); var c; - var r4 = c.foo2(1, function (a) { return ''; }); // string, contextual signature instantiation is applied to generic functions - var r5 = c.foo2(1, function (a) { return ''; }); // string - var r6 = c.foo2('', function (a) { return 1; }); // number + var r4 = c.foo2(1, function (a) { + return ''; + }); // string, contextual signature instantiation is applied to generic functions + var r5 = c.foo2(1, function (a) { + return ''; + }); // string + var r6 = c.foo2('', function (a) { + return 1; + }); // number var C2 = (function () { function C2() { } @@ -116,8 +132,12 @@ var WithCandidates; return C2; })(); var c2; - var r7 = c2.foo3(1, function (a) { return ''; }, ''); // string - var r8 = c2.foo3(1, function (a) { return ''; }, ''); // string + var r7 = c2.foo3(1, function (a) { + return ''; + }, ''); // string + var r8 = c2.foo3(1, function (a) { + return ''; + }, ''); // string var C3 = (function () { function C3() { } @@ -128,10 +148,20 @@ var WithCandidates; })(); var c3; function other(t, u) { - var r10 = c.foo2(1, function (x) { return ''; }); // error - var r10 = c.foo2(1, function (x) { return ''; }); // string - var r11 = c3.foo3(1, function (x) { return ''; }, ''); // error - var r11b = c3.foo3(1, function (x) { return ''; }, 1); // error - var r12 = c3.foo3(1, function (a) { return ''; }, 1); // error + var r10 = c.foo2(1, function (x) { + return ''; + }); // error + var r10 = c.foo2(1, function (x) { + return ''; + }); // string + var r11 = c3.foo3(1, function (x) { + return ''; + }, ''); // error + var r11b = c3.foo3(1, function (x) { + return ''; + }, 1); // error + var r12 = c3.foo3(1, function (a) { + return ''; + }, 1); // error } })(WithCandidates || (WithCandidates = {})); diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js index 4caeacd19e2..4aca0e37520 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js @@ -25,9 +25,14 @@ var Foo = (function () { Foo.f = function (xs) { return xs.reverse(); }; - Foo.a = function (n) { }; + Foo.a = function (n) { + }; Foo.c = []; - Foo.d = false || (function (x) { return x || undefined; })(null); - Foo.e = function (x) { return null; }; + Foo.d = false || (function (x) { + return x || undefined; + })(null); + Foo.e = function (x) { + return null; + }; return Foo; })(); diff --git a/tests/baselines/reference/genericCloduleInModule.js b/tests/baselines/reference/genericCloduleInModule.js index 92c519aa012..f3938735695 100644 --- a/tests/baselines/reference/genericCloduleInModule.js +++ b/tests/baselines/reference/genericCloduleInModule.js @@ -18,8 +18,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericCloduleInModule2.js b/tests/baselines/reference/genericCloduleInModule2.js index bb8021ffe8c..1cb3bd66403 100644 --- a/tests/baselines/reference/genericCloduleInModule2.js +++ b/tests/baselines/reference/genericCloduleInModule2.js @@ -21,8 +21,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericCombinators2.js b/tests/baselines/reference/genericCombinators2.js index a23f163a906..af11f056197 100644 --- a/tests/baselines/reference/genericCombinators2.js +++ b/tests/baselines/reference/genericCombinators2.js @@ -19,6 +19,10 @@ var r5b = _.map(c2, rf1); //// [genericCombinators2.js] var _; var c2; -var rf1 = function (x, y) { return x.toFixed(); }; -var r5a = _.map(c2, function (x, y) { return x.toFixed(); }); +var rf1 = function (x, y) { + return x.toFixed(); +}; +var r5a = _.map(c2, function (x, y) { + return x.toFixed(); +}); var r5b = _.map(c2, rf1); diff --git a/tests/baselines/reference/genericConstraintDeclaration.js b/tests/baselines/reference/genericConstraintDeclaration.js index 6e3f8d5ff8b..cdf93d676d0 100644 --- a/tests/baselines/reference/genericConstraintDeclaration.js +++ b/tests/baselines/reference/genericConstraintDeclaration.js @@ -12,7 +12,9 @@ class List{ var List = (function () { function List() { } - List.empty = function () { return null; }; + List.empty = function () { + return null; + }; return List; })(); diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.js b/tests/baselines/reference/genericConstraintSatisfaction1.js index 9436e62b3ba..b7438e6c456 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.js +++ b/tests/baselines/reference/genericConstraintSatisfaction1.js @@ -9,4 +9,6 @@ x.f({s: 1}) //// [genericConstraintSatisfaction1.js] var x; -x.f({ s: 1 }); +x.f({ + s: 1 +}); diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.js b/tests/baselines/reference/genericContextualTypingSpecialization.js index 75d8b995fa3..a577db15d32 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.js +++ b/tests/baselines/reference/genericContextualTypingSpecialization.js @@ -4,4 +4,6 @@ b.reduce((c, d) => c + d, 0); // should not error on '+' //// [genericContextualTypingSpecialization.js] var b; -b.reduce(function (c, d) { return c + d; }, 0); // should not error on '+' +b.reduce(function (c, d) { + return c + d; +}, 0); // should not error on '+' diff --git a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js index 30d57403aec..77cad2cc87f 100644 --- a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js +++ b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js @@ -3,6 +3,11 @@ function f(p: (x: T) => void) { }; f(x => f(y => x = y)); //// [genericFunctionHasFreshTypeArgs.js] -function f(p) { } +function f(p) { +} ; -f(function (x) { return f(function (y) { return x = y; }); }); +f(function (x) { + return f(function (y) { + return x = y; + }); +}); diff --git a/tests/baselines/reference/genericFunctionSpecializations1.js b/tests/baselines/reference/genericFunctionSpecializations1.js index c1043f792b6..2935959b69e 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.js +++ b/tests/baselines/reference/genericFunctionSpecializations1.js @@ -6,5 +6,7 @@ function foo4(test: string); // valid function foo4(test: T) { } //// [genericFunctionSpecializations1.js] -function foo3(test) { } -function foo4(test) { } +function foo3(test) { +} +function foo4(test) { +} diff --git a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js index e9db28578f7..c1a8daa6a1b 100644 --- a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js +++ b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js @@ -3,4 +3,8 @@ declare function map(f: (x: T) => U, xs: T[]): U[]; map((a) => a.length, [1]); //// [genericFunctionTypedArgumentsAreFixed.js] -map(function (a) { return a.length; }, [1]); +map(function (a) { + return a.length; +}, [ + 1 +]); diff --git a/tests/baselines/reference/genericFunctions0.js b/tests/baselines/reference/genericFunctions0.js index b52f0583524..408abdb9ce0 100644 --- a/tests/baselines/reference/genericFunctions0.js +++ b/tests/baselines/reference/genericFunctions0.js @@ -4,7 +4,9 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number //// [genericFunctions0.js] -function foo(x) { return x; } +function foo(x) { + return x; +} var x = foo(5); // 'x' should be number diff --git a/tests/baselines/reference/genericFunctions1.js b/tests/baselines/reference/genericFunctions1.js index d9bb3413890..25cc91820b8 100644 --- a/tests/baselines/reference/genericFunctions1.js +++ b/tests/baselines/reference/genericFunctions1.js @@ -4,7 +4,9 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number //// [genericFunctions1.js] -function foo(x) { return x; } +function foo(x) { + return x; +} var x = foo(5); // 'x' should be number diff --git a/tests/baselines/reference/genericFunctions2.js b/tests/baselines/reference/genericFunctions2.js index f14c1be6dc9..ec01cc885bd 100644 --- a/tests/baselines/reference/genericFunctions2.js +++ b/tests/baselines/reference/genericFunctions2.js @@ -8,7 +8,9 @@ var lengths = map(myItems, x => x.length); //// [genericFunctions2.js] var myItems; -var lengths = map(myItems, function (x) { return x.length; }); +var lengths = map(myItems, function (x) { + return x.length; +}); //// [genericFunctions2.d.ts] diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js index 9ad885a899a..2a5ce0a333c 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js @@ -19,13 +19,26 @@ var r5 = utils.mapReduce(c, f1, f2); var Collection = (function () { function Collection() { } - Collection.prototype.add = function (x) { }; + Collection.prototype.add = function (x) { + }; return Collection; })(); var utils; var c = new Collection(); -var r3 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); -var r4 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); -var f1 = function (x) { return 1; }; -var f2 = function (y) { return new Date(); }; +var r3 = utils.mapReduce(c, function (x) { + return 1; +}, function (y) { + return new Date(); +}); +var r4 = utils.mapReduce(c, function (x) { + return 1; +}, function (y) { + return new Date(); +}); +var f1 = function (x) { + return 1; +}; +var f2 = function (y) { + return new Date(); +}; var r5 = utils.mapReduce(c, f1, f2); diff --git a/tests/baselines/reference/genericFunduleInModule.errors.txt b/tests/baselines/reference/genericFunduleInModule.errors.txt index ca82f7d2425..752517667b0 100644 --- a/tests/baselines/reference/genericFunduleInModule.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericFunduleInModule.ts(8,8): error TS2305: Module 'A' has no exported member 'B'. +tests/cases/compiler/genericFunduleInModule.ts(8,10): error TS2305: Module 'A' has no exported member 'B'. ==== tests/cases/compiler/genericFunduleInModule.ts (1 errors) ==== @@ -10,6 +10,6 @@ tests/cases/compiler/genericFunduleInModule.ts(8,8): error TS2305: Module 'A' ha } var b: A.B; - ~~~ + ~ !!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericFunduleInModule.js b/tests/baselines/reference/genericFunduleInModule.js index 95700edecab..5a85a46a395 100644 --- a/tests/baselines/reference/genericFunduleInModule.js +++ b/tests/baselines/reference/genericFunduleInModule.js @@ -12,7 +12,9 @@ A.B(1); //// [genericFunduleInModule.js] var A; (function (A) { - function B(x) { return x; } + function B(x) { + return x; + } A.B = B; var B; (function (B) { diff --git a/tests/baselines/reference/genericFunduleInModule2.errors.txt b/tests/baselines/reference/genericFunduleInModule2.errors.txt index b92b314ece7..156549e8190 100644 --- a/tests/baselines/reference/genericFunduleInModule2.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericFunduleInModule2.ts(11,8): error TS2305: Module 'A' has no exported member 'B'. +tests/cases/compiler/genericFunduleInModule2.ts(11,10): error TS2305: Module 'A' has no exported member 'B'. ==== tests/cases/compiler/genericFunduleInModule2.ts (1 errors) ==== @@ -13,6 +13,6 @@ tests/cases/compiler/genericFunduleInModule2.ts(11,8): error TS2305: Module 'A' } var b: A.B; - ~~~ + ~ !!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericFunduleInModule2.js b/tests/baselines/reference/genericFunduleInModule2.js index 956e9129ec7..6b5a0a74e23 100644 --- a/tests/baselines/reference/genericFunduleInModule2.js +++ b/tests/baselines/reference/genericFunduleInModule2.js @@ -15,7 +15,9 @@ A.B(1); //// [genericFunduleInModule2.js] var A; (function (A) { - function B(x) { return x; } + function B(x) { + return x; + } A.B = B; })(A || (A = {})); var A; diff --git a/tests/baselines/reference/genericImplements.js b/tests/baselines/reference/genericImplements.js index b8d295153a4..17d3d2c0d20 100644 --- a/tests/baselines/reference/genericImplements.js +++ b/tests/baselines/reference/genericImplements.js @@ -37,20 +37,26 @@ var B = (function () { var X = (function () { function X() { } - X.prototype.f = function () { return undefined; }; + X.prototype.f = function () { + return undefined; + }; return X; })(); // { f: () => { b; } } // OK var Y = (function () { function Y() { } - Y.prototype.f = function () { return undefined; }; + Y.prototype.f = function () { + return undefined; + }; return Y; })(); // { f: () => { a; } } // OK var Z = (function () { function Z() { } - Z.prototype.f = function () { return undefined; }; + Z.prototype.f = function () { + return undefined; + }; return Z; })(); // { f: () => T } diff --git a/tests/baselines/reference/genericInference1.js b/tests/baselines/reference/genericInference1.js index dc81b9a9556..26a92970290 100644 --- a/tests/baselines/reference/genericInference1.js +++ b/tests/baselines/reference/genericInference1.js @@ -2,4 +2,10 @@ ['a', 'b', 'c'].map(x => x.length); //// [genericInference1.js] -['a', 'b', 'c'].map(function (x) { return x.length; }); +[ + 'a', + 'b', + 'c' +].map(function (x) { + return x.length; +}); diff --git a/tests/baselines/reference/genericInterfaceTypeCall.js b/tests/baselines/reference/genericInterfaceTypeCall.js index 7f5f586ec12..f171fa6e36d 100644 --- a/tests/baselines/reference/genericInterfaceTypeCall.js +++ b/tests/baselines/reference/genericInterfaceTypeCall.js @@ -17,5 +17,9 @@ test.fail2(arg => foo.reject(arg)); // Error: Supplied parameters do not match a //// [genericInterfaceTypeCall.js] var foo; var test; -test.fail(function (arg) { return foo.reject(arg); }); -test.fail2(function (arg) { return foo.reject(arg); }); // Error: Supplied parameters do not match any signature of call target +test.fail(function (arg) { + return foo.reject(arg); +}); +test.fail2(function (arg) { + return foo.reject(arg); +}); // Error: Supplied parameters do not match any signature of call target diff --git a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js index e1cc5cadbd5..f57f6713c9f 100644 --- a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js +++ b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js @@ -12,4 +12,6 @@ foo((arg: Foo) => { return arg.x; }); function foo(a) { return null; } -foo(function (arg) { return arg.x; }); +foo(function (arg) { + return arg.x; +}); diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js index 9b0fbf4bcad..5d4ecdc0838 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js @@ -7,7 +7,9 @@ module foo { //// [genericMergedDeclarationUsingTypeParameter.js] -function foo(y, z) { return y; } +function foo(y, z) { + return y; +} var foo; (function (foo) { foo.x; diff --git a/tests/baselines/reference/genericMethodOverspecialization.js b/tests/baselines/reference/genericMethodOverspecialization.js index 6ec28922af0..04d1466cfc4 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.js +++ b/tests/baselines/reference/genericMethodOverspecialization.js @@ -27,7 +27,13 @@ var widths:number[] = elements.map(function (e) { // should not error //// [genericMethodOverspecialization.js] -var names = ["list", "table1", "table2", "table3", "summary"]; +var names = [ + "list", + "table1", + "table2", + "table3", + "summary" +]; var elements = names.map(function (name) { return document.getElementById(name); }); diff --git a/tests/baselines/reference/genericObjectLitReturnType.js b/tests/baselines/reference/genericObjectLitReturnType.js index 826f5233b55..327da9ce0f5 100644 --- a/tests/baselines/reference/genericObjectLitReturnType.js +++ b/tests/baselines/reference/genericObjectLitReturnType.js @@ -15,7 +15,11 @@ t1.a = 5; // Should not error: t1 should have type {a: number}, instead has type var X = (function () { function X() { } - X.prototype.f = function (t) { return { a: t }; }; + X.prototype.f = function (t) { + return { + a: t + }; + }; return X; })(); var x; diff --git a/tests/baselines/reference/genericOfACloduleType1.js b/tests/baselines/reference/genericOfACloduleType1.js index 1f115aa486a..435575b0152 100644 --- a/tests/baselines/reference/genericOfACloduleType1.js +++ b/tests/baselines/reference/genericOfACloduleType1.js @@ -16,7 +16,9 @@ var g2 = new G() // was: error Type reference cannot refer to container 'M. var G = (function () { function G() { } - G.prototype.bar = function (x) { return x; }; + G.prototype.bar = function (x) { + return x; + }; return G; })(); var M; @@ -24,7 +26,8 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOfACloduleType2.js b/tests/baselines/reference/genericOfACloduleType2.js index 1d671289cb2..4c73addcf72 100644 --- a/tests/baselines/reference/genericOfACloduleType2.js +++ b/tests/baselines/reference/genericOfACloduleType2.js @@ -19,7 +19,9 @@ module N { var G = (function () { function G() { } - G.prototype.bar = function (x) { return x; }; + G.prototype.bar = function (x) { + return x; + }; return G; })(); var M; @@ -27,7 +29,8 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOverloadSignatures.js b/tests/baselines/reference/genericOverloadSignatures.js index 45a21d5a334..ec4c9ba74dc 100644 --- a/tests/baselines/reference/genericOverloadSignatures.js +++ b/tests/baselines/reference/genericOverloadSignatures.js @@ -31,7 +31,8 @@ interface D { } //// [genericOverloadSignatures.js] -function f(a) { } +function f(a) { +} var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/genericParameterAssignability1.js b/tests/baselines/reference/genericParameterAssignability1.js index a6a465b4089..ae8eb4348d3 100644 --- a/tests/baselines/reference/genericParameterAssignability1.js +++ b/tests/baselines/reference/genericParameterAssignability1.js @@ -4,6 +4,10 @@ var r = (x: T) => x; r = f; // should be allowed //// [genericParameterAssignability1.js] -function f(x) { return null; } -var r = function (x) { return x; }; +function f(x) { + return null; +} +var r = function (x) { + return x; +}; r = f; // should be allowed diff --git a/tests/baselines/reference/genericPrototypeProperty.js b/tests/baselines/reference/genericPrototypeProperty.js index fb6f9b78848..c38cdb753a7 100644 --- a/tests/baselines/reference/genericPrototypeProperty.js +++ b/tests/baselines/reference/genericPrototypeProperty.js @@ -13,7 +13,9 @@ var r3 = r.foo(null); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var r = C.prototype; diff --git a/tests/baselines/reference/genericReduce.js b/tests/baselines/reference/genericReduce.js index ac160e43868..c725df8d8e4 100644 --- a/tests/baselines/reference/genericReduce.js +++ b/tests/baselines/reference/genericReduce.js @@ -14,14 +14,27 @@ n3.toExponential(2); // should error if 'n3' is correctly type 'string' n3.charAt(0); // should not error if 'n3' is correctly type 'string' //// [genericReduce.js] -var a = ["An", "array", "of", "strings"]; -var b = a.map(function (s) { return s.length; }); -var n1 = b.reduce(function (x, y) { return x + y; }); -var n2 = b.reduceRight(function (x, y) { return x + y; }); +var a = [ + "An", + "array", + "of", + "strings" +]; +var b = a.map(function (s) { + return s.length; +}); +var n1 = b.reduce(function (x, y) { + return x + y; +}); +var n2 = b.reduceRight(function (x, y) { + return x + y; +}); n1.x = "fail"; // should error, as 'n1' should be type 'number', not 'any'. n1.toExponential(2); // should not error if 'n1' is correctly number. n2.x = "fail"; // should error, as 'n2' should be type 'number', not 'any'. n2.toExponential(2); // should not error if 'n2' is correctly number. -var n3 = b.reduce(function (x, y) { return x + y; }, ""); // Initial value is of type string +var n3 = b.reduce(function (x, y) { + return x + y; +}, ""); // Initial value is of type string n3.toExponential(2); // should error if 'n3' is correctly type 'string' n3.charAt(0); // should not error if 'n3' is correctly type 'string' diff --git a/tests/baselines/reference/genericRestArgs.js b/tests/baselines/reference/genericRestArgs.js index 75c88d7cbf2..4c2ddcf0cd9 100644 --- a/tests/baselines/reference/genericRestArgs.js +++ b/tests/baselines/reference/genericRestArgs.js @@ -25,7 +25,11 @@ var a1Gb = makeArrayG(1, ""); var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error function makeArrayGOpt(item1, item2, item3) { - return [item1, item2, item3]; + return [ + item1, + item2, + item3 + ]; } var a2Ga = makeArrayGOpt(1, ""); var a2Gb = makeArrayG(1, ""); diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.js b/tests/baselines/reference/genericReturnTypeFromGetter1.js index 741c7218345..208b12308e1 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.js +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.js @@ -14,7 +14,9 @@ define(["require", "exports"], function (require, exports) { function DbSet() { } Object.defineProperty(DbSet.prototype, "entityType", { - get: function () { return this._entityType; } // used to ICE without return type annotation + get: function () { + return this._entityType; + } // used to ICE without return type annotation , enumerable: true, configurable: true diff --git a/tests/baselines/reference/genericReversingTypeParameters.js b/tests/baselines/reference/genericReversingTypeParameters.js index 2a52c2e9ba6..0e51b0256ea 100644 --- a/tests/baselines/reference/genericReversingTypeParameters.js +++ b/tests/baselines/reference/genericReversingTypeParameters.js @@ -14,8 +14,12 @@ var r2b = i.get(1); var BiMap = (function () { function BiMap() { } - BiMap.prototype.get = function (key) { return null; }; - BiMap.prototype.inverse = function () { return null; }; + BiMap.prototype.get = function (key) { + return null; + }; + BiMap.prototype.inverse = function () { + return null; + }; return BiMap; })(); var b = new BiMap(); diff --git a/tests/baselines/reference/genericReversingTypeParameters2.js b/tests/baselines/reference/genericReversingTypeParameters2.js index 4f4bc564f89..eb904f4a2ed 100644 --- a/tests/baselines/reference/genericReversingTypeParameters2.js +++ b/tests/baselines/reference/genericReversingTypeParameters2.js @@ -13,8 +13,12 @@ var r2b = i.get(1); var BiMap = (function () { function BiMap() { } - BiMap.prototype.get = function (key) { return null; }; - BiMap.prototype.inverse = function () { return null; }; + BiMap.prototype.get = function (key) { + return null; + }; + BiMap.prototype.inverse = function () { + return null; + }; return BiMap; })(); var b = new BiMap(); diff --git a/tests/baselines/reference/genericSpecializations1.js b/tests/baselines/reference/genericSpecializations1.js index 3e59fceff97..3df2c5581b9 100644 --- a/tests/baselines/reference/genericSpecializations1.js +++ b/tests/baselines/reference/genericSpecializations1.js @@ -19,18 +19,24 @@ class StringFoo3 implements IFoo { var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); diff --git a/tests/baselines/reference/genericSpecializations2.js b/tests/baselines/reference/genericSpecializations2.js index 8497d2db8b4..666ea43eeba 100644 --- a/tests/baselines/reference/genericSpecializations2.js +++ b/tests/baselines/reference/genericSpecializations2.js @@ -31,18 +31,24 @@ var IFoo = (function () { var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); diff --git a/tests/baselines/reference/genericSpecializations3.js b/tests/baselines/reference/genericSpecializations3.js index 3c582ae31fd..8d157761160 100644 --- a/tests/baselines/reference/genericSpecializations3.js +++ b/tests/baselines/reference/genericSpecializations3.js @@ -41,21 +41,27 @@ iFoo.foo(1); var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var intFooBad; var IntFoo = (function () { function IntFoo() { } - IntFoo.prototype.foo = function (x) { return null; }; + IntFoo.prototype.foo = function (x) { + return null; + }; return IntFoo; })(); var intFoo; var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var stringFoo2; @@ -65,7 +71,9 @@ stringFoo2 = intFoo; // error var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); var stringFoo3; diff --git a/tests/baselines/reference/genericStaticAnyTypeFunction.js b/tests/baselines/reference/genericStaticAnyTypeFunction.js index 6816afec910..055e6b4f683 100644 --- a/tests/baselines/reference/genericStaticAnyTypeFunction.js +++ b/tests/baselines/reference/genericStaticAnyTypeFunction.js @@ -25,7 +25,9 @@ var A = (function () { A.one = function (source, value) { return source; }; - A.goo = function () { return 0; }; + A.goo = function () { + return 0; + }; A.two = function (source) { return this.one(source, 42); // should not error }; diff --git a/tests/baselines/reference/genericTypeArgumentInference1.js b/tests/baselines/reference/genericTypeArgumentInference1.js index 48c279f52c3..8bf6f35cb33 100644 --- a/tests/baselines/reference/genericTypeArgumentInference1.js +++ b/tests/baselines/reference/genericTypeArgumentInference1.js @@ -17,7 +17,16 @@ var r4 = _.all([true], _.identity); //// [genericTypeArgumentInference1.js] -var r = _.all([true, 1, null, 'yes'], _.identity); -var r2 = _.all([true], _.identity); +var r = _.all([ + true, + 1, + null, + 'yes' +], _.identity); +var r2 = _.all([ + true +], _.identity); var r3 = _.all([], _.identity); -var r4 = _.all([true], _.identity); +var r4 = _.all([ + true +], _.identity); diff --git a/tests/baselines/reference/genericTypeAssertions1.js b/tests/baselines/reference/genericTypeAssertions1.js index 54637007d99..02a22aa5c81 100644 --- a/tests/baselines/reference/genericTypeAssertions1.js +++ b/tests/baselines/reference/genericTypeAssertions1.js @@ -8,7 +8,8 @@ var r2: A = >>foo; // error var A = (function () { function A() { } - A.prototype.foo = function (x) { }; + A.prototype.foo = function (x) { + }; return A; })(); var foo = new A(); diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 3c904c7a30e..c7acecb5e43 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function (x) { }; + A.prototype.foo = function (x) { + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/genericTypeAssertions3.js b/tests/baselines/reference/genericTypeAssertions3.js index b67a277654f..19a477c142c 100644 --- a/tests/baselines/reference/genericTypeAssertions3.js +++ b/tests/baselines/reference/genericTypeAssertions3.js @@ -4,5 +4,9 @@ var s = < (x: T) => T > ((x: any) => { return null; }); // no error //// [genericTypeAssertions3.js] -var r = (function (x) { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error -var s = (function (x) { return null; }); // no error +var r = (function (x) { + return null; +}); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error +var s = (function (x) { + return null; +}); // no error diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index a607fb07428..d04b6cbe104 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -35,7 +35,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ""; }; + A.prototype.foo = function () { + return ""; + }; return A; })(); var B = (function (_super) { @@ -43,7 +45,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return 1; }; + B.prototype.bar = function () { + return 1; + }; return B; })(A); var C = (function (_super) { @@ -51,7 +55,9 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.baz = function () { return 1; }; + C.prototype.baz = function () { + return 1; + }; return C; })(A); var a; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt index 6c98d419dec..5ae71fa2a89 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt @@ -8,7 +8,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,23): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,27): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(16,25): error TS2314: Generic type 'C' requires 1 type argument(s). -tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(22,26): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(22,28): error TS2305: Module 'M' has no exported member 'C'. tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(23,28): error TS2314: Generic type 'E' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(25,30): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(26,30): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -57,7 +57,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc } declare class D2 extends M.C { } - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 4be1cce27a9..dbda6074830 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -55,9 +55,18 @@ var c; var a; var b; var d; -var e = function (x) { var y; return y; }; -function f(x) { var y; return y; } -var g = function f(x) { var y; return y; }; +var e = function (x) { + var y; + return y; +}; +function f(x) { + var y; + return y; +} +var g = function f(x) { + var y; + return y; +}; var D = (function (_super) { __extends(D, _super); function D() { @@ -86,7 +95,9 @@ var D3 = (function () { } return D3; })(); -function h(x) { } -function i(x) { } +function h(x) { +} +function i(x) { +} var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt index 745da9aa106..2949ce52ce0 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt @@ -15,9 +15,9 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2314: Generic type 'I' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). -tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,20): error TS2305: Module 'M' has no exported member 'C'. tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). -tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,22): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2305: Module 'M' has no exported member 'C'. tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. @@ -88,13 +88,13 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc } class D2 extends M.C { } - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'C'. interface D3 { } ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). interface I2 extends M.C { } - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'C'. function h(x: T) { } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 803d499705a..f6a22073702 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -50,9 +50,18 @@ var c; var a; var b; var d; -var e = function (x) { var y; return y; }; -function f(x) { var y; return y; } -var g = function f(x) { var y; return y; }; +var e = function (x) { + var y; + return y; +}; +function f(x) { + var y; + return y; +} +var g = function f(x) { + var y; + return y; +}; var D = (function (_super) { __extends(D, _super); function D() { @@ -67,7 +76,9 @@ var D2 = (function (_super) { } return D2; })(M.C); -function h(x) { } -function i(x) { } +function h(x) { +} +function i(x) { +} var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt index 1fec52356a2..c0e41374527 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt @@ -8,7 +8,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,23): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,27): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(16,25): error TS2314: Generic type 'C' requires 1 type argument(s). -tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,26): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,28): error TS2305: Module 'M' has no exported member 'C'. tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(23,28): error TS2314: Generic type 'E' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(25,30): error TS2314: Generic type 'C' requires 1 type argument(s). tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(26,30): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -57,7 +57,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc } declare class D2 extends M.C { } - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ diff --git a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js index 90ad9e1ff93..69bc1c372b3 100644 --- a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js +++ b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js @@ -15,7 +15,9 @@ var i2: I; // should be an error var C = (function () { function C() { } - C.prototype.foo = function () { return null; }; + C.prototype.foo = function () { + return null; + }; return C; })(); var c1; // error diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js index 1a57b866d99..4cd7eb4165b 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js @@ -13,7 +13,8 @@ var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' var X = (function () { function X() { } - X.prototype.f = function (a) { }; + X.prototype.f = function (a) { + }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index fdd2e470a55..f0a57430546 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -33,7 +33,8 @@ define(["require", "exports"], function (require, exports) { function List() { _super.apply(this, arguments); } - List.prototype.Bar = function () { }; + List.prototype.Bar = function () { + }; return List; })(Collection); exports.List = List; diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.js b/tests/baselines/reference/genericWithOpenTypeParameters1.js index 90202767012..afdce73cb11 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.js +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.js @@ -15,12 +15,22 @@ var f4 = (x: B) => { return x.foo(1); } // no error var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var x; x.foo(1); // no error -var f = function (x) { return x.foo(1); }; // error -var f2 = function (x) { return x.foo(1); }; // error -var f3 = function (x) { return x.foo(1); }; // error -var f4 = function (x) { return x.foo(1); }; // no error +var f = function (x) { + return x.foo(1); +}; // error +var f2 = function (x) { + return x.foo(1); +}; // error +var f3 = function (x) { + return x.foo(1); +}; // error +var f4 = function (x) { + return x.foo(1); +}; // no error diff --git a/tests/baselines/reference/genericsAndHigherOrderFunctions.js b/tests/baselines/reference/genericsAndHigherOrderFunctions.js index f2e6ef58f22..ad03dccbca2 100644 --- a/tests/baselines/reference/genericsAndHigherOrderFunctions.js +++ b/tests/baselines/reference/genericsAndHigherOrderFunctions.js @@ -21,11 +21,15 @@ var foo: (g: (x: K) => N) => // no errors expected var combine = function (f) { return function (g) { - return function (x) { return f(g(x)); }; + return function (x) { + return f(g(x)); + }; }; }; var foo = function (g) { return function (h) { - return function (f) { return h(combine(f)(g)); }; + return function (f) { + return h(combine(f)(g)); + }; }; }; diff --git a/tests/baselines/reference/genericsManyTypeParameters.js b/tests/baselines/reference/genericsManyTypeParameters.js index 491f0c41168..09cb7658c17 100644 --- a/tests/baselines/reference/genericsManyTypeParameters.js +++ b/tests/baselines/reference/genericsManyTypeParameters.js @@ -61,22 +61,114 @@ function Foo< //// [genericsManyTypeParameters.js] function Foo(x1, y1, z1, a1, b1, c1, x2, y2, z2, a2, b2, c2, x3, y3, z3, a3, b3, c3, x4, y4, z4, a4, b4, c4, x5, y5, z5, a5, b5, c5, x6, y6, z6, a6, b6, c6, x7, y7, z7, a7, b7, c7, x8, y8, z8, a8, b8, c8, x9, y9, z9, a9, b9, c9, x10, y12, z10, a10, b10, c10, x11, y13, z11, a11, b11, c11, x12, y14, z12, a12, b12, c12, x13, y15, z13, a13, b13, c13, x14, y16, z14, a14, b14, c14, x15, y17, z15, a15, b15, c15, x16, y18, z16, a16, b16, c16, x17, y19, z17, a17, b17, c17, x18, y10, z18, a18, b18, c18) { - return [x1, y1, z1, a1, b1, c1, - x2, y2, z2, a2, b2, c2, - x3, y3, z3, a3, b3, c3, - x4, y4, z4, a4, b4, c4, - x5, y5, z5, a5, b5, c5, - x6, y6, z6, a6, b6, c6, - x7, y7, z7, a7, b7, c7, - x8, y8, z8, a8, b8, c8, - x9, y9, z9, a9, b9, c9, - x10, y12, z10, a10, b10, c10, - x11, y13, z11, a11, b11, c11, - x12, y14, z12, a12, b12, c12, - x13, y15, z13, a13, b13, c13, - x14, y16, z14, a14, b14, c14, - x15, y17, z15, a15, b15, c15, - x16, y18, z16, a16, b16, c16, - x17, y19, z17, a17, b17, c17, - x18, y10, z18, a18, b18, c18]; + return [ + x1, + y1, + z1, + a1, + b1, + c1, + x2, + y2, + z2, + a2, + b2, + c2, + x3, + y3, + z3, + a3, + b3, + c3, + x4, + y4, + z4, + a4, + b4, + c4, + x5, + y5, + z5, + a5, + b5, + c5, + x6, + y6, + z6, + a6, + b6, + c6, + x7, + y7, + z7, + a7, + b7, + c7, + x8, + y8, + z8, + a8, + b8, + c8, + x9, + y9, + z9, + a9, + b9, + c9, + x10, + y12, + z10, + a10, + b10, + c10, + x11, + y13, + z11, + a11, + b11, + c11, + x12, + y14, + z12, + a12, + b12, + c12, + x13, + y15, + z13, + a13, + b13, + c13, + x14, + y16, + z14, + a14, + b14, + c14, + x15, + y17, + z15, + a15, + b15, + c15, + x16, + y18, + z16, + a16, + b16, + c16, + x17, + y19, + z17, + a17, + b17, + c17, + x18, + y10, + z18, + a18, + b18, + c18 + ]; } diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js index 72eeb1ab683..f7f638f10e0 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js @@ -17,16 +17,25 @@ var m = { } //// [genericsWithDuplicateTypeParameters1.js] -function f() { } -function f2(a, b) { return null; } +function f() { +} +function f2(a, b) { + return null; +} var C = (function () { function C() { } - C.prototype.f = function () { }; - C.prototype.f2 = function (a, b) { return null; }; + C.prototype.f = function () { + }; + C.prototype.f2 = function (a, b) { + return null; + }; return C; })(); var m = { - a: function f() { }, - b: function f2(a, b) { return null; } + a: function f() { + }, + b: function f2(a, b) { + return null; + } }; diff --git a/tests/baselines/reference/genericsWithoutTypeParameters1.js b/tests/baselines/reference/genericsWithoutTypeParameters1.js index 41abffcb854..b4bc079cf80 100644 --- a/tests/baselines/reference/genericsWithoutTypeParameters1.js +++ b/tests/baselines/reference/genericsWithoutTypeParameters1.js @@ -37,17 +37,29 @@ function f(x: T): A { var C = (function () { function C() { } - C.prototype.foo = function () { return null; }; + C.prototype.foo = function () { + return null; + }; return C; })(); var c1; var i1; var c2; var i2; -function foo(x, y) { } -function foo2(x, y) { } -var x = { a: new C() }; -var x2 = { a: { bar: function () { return 1; } } }; +function foo(x, y) { +} +function foo2(x, y) { +} +var x = { + a: new C() +}; +var x2 = { + a: { + bar: function () { + return 1; + } + } +}; var D = (function () { function D() { } diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt index a11b0f0ad9e..c25aca342ca 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt @@ -11,12 +11,12 @@ tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(21 declare function _(value: Array): _; ~ !!! error TS2300: Duplicate identifier '_'. - ~~~~ + ~ !!! error TS2304: Cannot find name '_'. declare function _(value: T): _; ~ !!! error TS2300: Duplicate identifier '_'. - ~~~~ + ~ !!! error TS2304: Cannot find name '_'. declare module _ { diff --git a/tests/baselines/reference/getAndSetAsMemberNames.js b/tests/baselines/reference/getAndSetAsMemberNames.js index 8b036cd0f73..22f99920fb1 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.js +++ b/tests/baselines/reference/getAndSetAsMemberNames.js @@ -49,11 +49,16 @@ var C4 = (function () { })(); var C5 = (function () { function C5() { - this.set = function () { return true; }; + this.set = function () { + return true; + }; } - C5.prototype.get = function () { return true; }; + C5.prototype.get = function () { + return true; + }; Object.defineProperty(C5.prototype, "t", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.js b/tests/baselines/reference/getAndSetNotIdenticalType.js index e6eb7fecc86..7e77fc25d0b 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType.js @@ -14,7 +14,8 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getEmitOutputMapRoots.baseline b/tests/baselines/reference/getEmitOutputMapRoots.baseline index 16f39169e23..b4a4ace4d42 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":["../tests/cases/fourslash/inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : declSingleFile.js +{"version":3,"file":"declSingleFile.js","sourceRoot":"","sources":["../tests/cases/fourslash/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 var x = 109; var foo = "hello world"; var M = (function () { diff --git a/tests/baselines/reference/getEmitOutputSourceMap.baseline b/tests/baselines/reference/getEmitOutputSourceMap.baseline index 39cff967d89..1f7056989e9 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js +{"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 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 713aa4f3c08..df59ca00162 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,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":["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 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 5424def98ee..7b56ee5a4d8 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile.js +{"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 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 7948ad99673..9df4711b3e1 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile1.js +{"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 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAGPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : tests/cases/fourslash/inputFile2.js +{"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 var bar = "hello world Typescript"; var C = (function () { function C() { diff --git a/tests/baselines/reference/getsetReturnTypes.js b/tests/baselines/reference/getsetReturnTypes.js index 27b6fc52fe5..55d7e9285b0 100644 --- a/tests/baselines/reference/getsetReturnTypes.js +++ b/tests/baselines/reference/getsetReturnTypes.js @@ -10,7 +10,9 @@ var y: number = makePoint(2).x; //// [getsetReturnTypes.js] function makePoint(x) { return { - get x() { return x; } + get x() { + return x; + } }; } ; diff --git a/tests/baselines/reference/getterSetterNonAccessor.js b/tests/baselines/reference/getterSetterNonAccessor.js index c28337ff7b4..e234574d734 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.js +++ b/tests/baselines/reference/getterSetterNonAccessor.js @@ -10,8 +10,11 @@ Object.defineProperty({}, "0", ({ //// [getterSetterNonAccessor.js] -function getFunc() { return 0; } -function setFunc(v) { } +function getFunc() { + return 0; +} +function setFunc(v) { +} Object.defineProperty({}, "0", ({ get: getFunc, set: setFunc, diff --git a/tests/baselines/reference/gettersAndSetters.js b/tests/baselines/reference/gettersAndSetters.js index 92f959e5988..ded54213401 100644 --- a/tests/baselines/reference/gettersAndSetters.js +++ b/tests/baselines/reference/gettersAndSetters.js @@ -46,21 +46,31 @@ var C = (function () { function C() { this.fooBack = ""; this.bazBack = ""; - this.get = function () { }; // ok - this.set = function () { }; // ok + this.get = function () { + }; // ok + this.set = function () { + }; // ok } Object.defineProperty(C.prototype, "Foo", { - get: function () { return this.fooBack; } // ok + get: function () { + return this.fooBack; + } // ok , - set: function (foo) { this.fooBack = foo; } // ok + set: function (foo) { + this.fooBack = foo; + } // ok , enumerable: true, configurable: true }); Object.defineProperty(C, "Bar", { - get: function () { return C.barBack; } // ok + get: function () { + return C.barBack; + } // ok , - set: function (bar) { C.barBack = bar; } // ok + set: function (bar) { + C.barBack = bar; + } // ok , enumerable: true, configurable: true @@ -76,7 +86,16 @@ C.Bar = "barv"; var baz = c.Baz; c.Baz = "bazv"; // The Foo accessors' return and param types should be contextually typed to the Foo field -var o = { get Foo() { return 0; }, set Foo(val) { val; } }; // o +var o = { + get Foo() { + return 0; + }, + set Foo(val) { + val; + } +}; // o var ofg = o.Foo; o.Foo = 0; -var i = function (n) { return n; }; +var i = function (n) { + return n; +}; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.js b/tests/baselines/reference/gettersAndSettersAccessibility.js index e0cfa3d17c5..9a7564ec96d 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.js +++ b/tests/baselines/reference/gettersAndSettersAccessibility.js @@ -10,8 +10,11 @@ var C99 = (function () { function C99() { } Object.defineProperty(C99.prototype, "Baz", { - get: function () { return 0; }, - set: function (n) { } // error - accessors do not agree in visibility + get: function () { + return 0; + }, + set: function (n) { + } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersErrors.js b/tests/baselines/reference/gettersAndSettersErrors.js index d92f0d833f5..514a69b2513 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.js +++ b/tests/baselines/reference/gettersAndSettersErrors.js @@ -22,17 +22,23 @@ var C = (function () { this.Foo = 0; // error - duplicate identifier Foo - confirmed } Object.defineProperty(C.prototype, "Foo", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (foo) { } // ok + set: function (foo) { + } // ok , enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "Goo", { - get: function (v) { return null; } // error - getters must not have a parameter + get: function (v) { + return null; + } // error - getters must not have a parameter , - set: function (v) { } // error - setters must not specify a return type + set: function (v) { + } // error - setters must not specify a return type , enumerable: true, configurable: true @@ -43,8 +49,11 @@ var E = (function () { function E() { } Object.defineProperty(E.prototype, "Baz", { - get: function () { return 0; }, - set: function (n) { } // error - accessors do not agree in visibility + get: function () { + return 0; + }, + set: function (n) { + } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.js b/tests/baselines/reference/gettersAndSettersTypesAgree.js index 91d3d844981..695a77a001a 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.js +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.js @@ -15,22 +15,40 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (foo) { } // ok - type inferred from getter return statement + set: function (foo) { + } // ok - type inferred from getter return statement , enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "Bar", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (bar) { } // ok - type must be declared + set: function (bar) { + } // ok - type must be declared , enumerable: true, configurable: true }); return C; })(); -var o1 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree (inference) -var o2 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree +var o1 = { + get Foo() { + return 0; + }, + set Foo(val) { + } +}; // ok - types agree (inference) +var o2 = { + get Foo() { + return 0; + }, + set Foo(val) { + } +}; // ok - types agree diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index a5109b6e113..9de46f76b1b 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -697,45 +697,55 @@ define(["require", "exports"], function (require, exports) { MAX DEPTH 3 LEVELS */ var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -746,45 +756,55 @@ define(["require", "exports"], function (require, exports) { var M; (function (_M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -795,7 +815,8 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -806,7 +827,8 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { } + function eF() { + } M.eF = eF; ; var eC = (function () { @@ -823,46 +845,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _M.eV; - function eF() { } + function eF() { + } _M.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -874,7 +906,8 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -885,7 +918,8 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { } + function eF() { + } eM.eF = eF; ; var eC = (function () { @@ -904,46 +938,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); exports.eV; - function eF() { } + function eF() { + } exports.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -955,45 +999,55 @@ define(["require", "exports"], function (require, exports) { var eM; (function (_eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -1004,7 +1058,8 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -1015,7 +1070,8 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { } + function eF() { + } M.eF = eF; ; var eC = (function () { @@ -1032,46 +1088,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _eM.eV; - function eF() { } + function eF() { + } _eM.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -1083,7 +1149,8 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -1094,7 +1161,8 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { } + function eF() { + } eM.eF = eF; ; var eC = (function () { diff --git a/tests/baselines/reference/globalThisCapture.js b/tests/baselines/reference/globalThisCapture.js index b854e754a34..5e724d77e0f 100644 --- a/tests/baselines/reference/globalThisCapture.js +++ b/tests/baselines/reference/globalThisCapture.js @@ -11,7 +11,9 @@ parts[0]; //// [globalThisCapture.js] var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var parts = []; // Ensure that the generated code is correct parts[0]; diff --git a/tests/baselines/reference/grammarAmbiguities.js b/tests/baselines/reference/grammarAmbiguities.js index f603bd1023f..ee81d947ff6 100644 --- a/tests/baselines/reference/grammarAmbiguities.js +++ b/tests/baselines/reference/grammarAmbiguities.js @@ -12,8 +12,12 @@ f(g < A, B > +(7)); // Should error //// [grammarAmbiguities.js] -function f(n) { return null; } -function g(x) { return null; } +function f(n) { + return null; +} +function g(x) { + return null; +} var A, B; f(g(7)); f(g < A, B > 7); // Should error diff --git a/tests/baselines/reference/grammarAmbiguities1.js b/tests/baselines/reference/grammarAmbiguities1.js index 1917acb7128..cb6e4b75473 100644 --- a/tests/baselines/reference/grammarAmbiguities1.js +++ b/tests/baselines/reference/grammarAmbiguities1.js @@ -14,17 +14,23 @@ f(g < A, B > +(7)); var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); -function f(x) { return x; } -function g(x) { return f(x); } +function f(x) { + return x; +} +function g(x) { + return f(x); +} g(7); f(g(7)); f(g < A, B > 7); diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.js b/tests/baselines/reference/heterogeneousArrayAndOverloads.js index b816b87e3d1..f18cef71307 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.js +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.js @@ -15,12 +15,25 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { }; + arrTest.prototype.test = function (arg1) { + }; arrTest.prototype.callTest = function () { - this.test([1, 2, 3, 5]); - this.test(["hi"]); + this.test([ + 1, + 2, + 3, + 5 + ]); + this.test([ + "hi" + ]); this.test([]); - this.test([1, 2, "hi", 5]); // Error + this.test([ + 1, + 2, + "hi", + 5 + ]); // Error }; return arrTest; })(); diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 4ac929305c0..51d316a4f43 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -139,20 +139,106 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var a = [1, '']; // {}[] -var b = [1, null]; // number[] -var c = [1, '', null]; // {}[] -var d = [{}, 1]; // {}[] -var e = [{}, Object]; // {}[] -var f = [[], [1]]; // number[][] -var g = [[1], ['']]; // {}[] -var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[] -var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[] -var j = [function () { return 1; }, function () { return ''; }]; // {}[] -var k = [function () { return 1; }, function () { return 1; }]; // { (): number }[] -var l = [function () { return 1; }, function () { return null; }]; // { (): any }[] -var m = [function () { return 1; }, function () { return ''; }, function () { return null; }]; // { (): any }[] -var n = [[function () { return 1; }], [function () { return ''; }]]; // {}[] +var a = [ + 1, + '' +]; // {}[] +var b = [ + 1, + null +]; // number[] +var c = [ + 1, + '', + null +]; // {}[] +var d = [ + {}, + 1 +]; // {}[] +var e = [ + {}, + Object +]; // {}[] +var f = [ + [], + [ + 1 + ] +]; // number[][] +var g = [ + [ + 1 + ], + [ + '' + ] +]; // {}[] +var h = [ + { + foo: 1, + bar: '' + }, + { + foo: 2 + } +]; // {foo: number}[] +var i = [ + { + foo: 1, + bar: '' + }, + { + foo: '' + } +]; // {}[] +var j = [ + function () { + return 1; + }, + function () { + return ''; + } +]; // {}[] +var k = [ + function () { + return 1; + }, + function () { + return 1; + } +]; // { (): number }[] +var l = [ + function () { + return 1; + }, + function () { + return null; + } +]; // { (): any }[] +var m = [ + function () { + return 1; + }, + function () { + return ''; + }, + function () { + return null; + } +]; // { (): any }[] +var n = [ + [ + function () { + return 1; + } + ], + [ + function () { + return ''; + } + ] +]; // {}[] var Base = (function () { function Base() { } @@ -177,69 +263,312 @@ var derived; var derived2; var Derived; (function (Derived) { - var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[] - var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[] - var j = [function () { return base; }, function () { return derived; }]; // { {}: Base } - var k = [function () { return base; }, function () { return 1; }]; // {}[]~ - var l = [function () { return base; }, function () { return null; }]; // { (): any }[] - var m = [function () { return base; }, function () { return derived; }, function () { return null; }]; // { (): any }[] - var n = [[function () { return base; }], [function () { return derived; }]]; // { (): Base }[] - var o = [derived, derived2]; // {}[] - var p = [derived, derived2, base]; // Base[] - var q = [[function () { return derived2; }], [function () { return derived; }]]; // {}[] + var h = [ + { + foo: base, + basear: derived + }, + { + foo: base + } + ]; // {foo: Base}[] + var i = [ + { + foo: base, + basear: derived + }, + { + foo: derived + } + ]; // {foo: Derived}[] + var j = [ + function () { + return base; + }, + function () { + return derived; + } + ]; // { {}: Base } + var k = [ + function () { + return base; + }, + function () { + return 1; + } + ]; // {}[]~ + var l = [ + function () { + return base; + }, + function () { + return null; + } + ]; // { (): any }[] + var m = [ + function () { + return base; + }, + function () { + return derived; + }, + function () { + return null; + } + ]; // { (): any }[] + var n = [ + [ + function () { + return base; + } + ], + [ + function () { + return derived; + } + ] + ]; // { (): Base }[] + var o = [ + derived, + derived2 + ]; // {}[] + var p = [ + derived, + derived2, + base + ]; // Base[] + var q = [ + [ + function () { + return derived2; + } + ], + [ + function () { + return derived; + } + ] + ]; // {}[] })(Derived || (Derived = {})); var WithContextualType; (function (WithContextualType) { // no errors - var a = [derived, derived2]; - var b = [null]; + var a = [ + derived, + derived2 + ]; + var b = [ + null + ]; var c = []; - var d = [function () { return derived; }, function () { return derived2; }]; + var d = [ + function () { + return derived; + }, + function () { + return derived2; + } + ]; })(WithContextualType || (WithContextualType = {})); function foo(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] } function foo2(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] } function foo3(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] } function foo4(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // BUG 821629 - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] - var k = [t, u]; + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // BUG 821629 + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] + var k = [ + t, + u + ]; } //function foo3(t: T, u: U) { // var a = [t, t]; // T[] diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 793094584bf..db23ea4681c 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -186,8 +186,12 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } -function F2(x) { return x < 42; } +function F(x) { + return 42; +} +function F2(x) { + return x < 42; +} var M; (function (M) { var A = (function () { @@ -196,7 +200,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var N; @@ -207,101 +213,216 @@ var N; return A; })(); N.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } N.F2 = F2; })(N || (N = {})); // literals -if (true) { } -while (true) { } -do { } while (true); -if (null) { } -while (null) { } -do { } while (null); -if (undefined) { } -while (undefined) { } -do { } while (undefined); -if (0.0) { } -while (0.0) { } -do { } while (0.0); -if ('a string') { } -while ('a string') { } -do { } while ('a string'); -if ('') { } -while ('') { } -do { } while (''); -if (/[a-z]/) { } -while (/[a-z]/) { } -do { } while (/[a-z]/); -if ([]) { } -while ([]) { } -do { } while ([]); -if ([1, 2]) { } -while ([1, 2]) { } -do { } while ([1, 2]); -if ({}) { } -while ({}) { } -do { } while ({}); -if ({ x: 1, y: 'a' }) { } -while ({ x: 1, y: 'a' }) { } -do { } while ({ x: 1, y: 'a' }); -if (function () { return 43; }) { } -while (function () { return 43; }) { } -do { } while (function () { return 43; }); -if (new C()) { } -while (new C()) { } -do { } while (new C()); -if (new D()) { } -while (new D()) { } -do { } while (new D()); +if (true) { +} +while (true) { +} +do { +} while (true); +if (null) { +} +while (null) { +} +do { +} while (null); +if (undefined) { +} +while (undefined) { +} +do { +} while (undefined); +if (0.0) { +} +while (0.0) { +} +do { +} while (0.0); +if ('a string') { +} +while ('a string') { +} +do { +} while ('a string'); +if ('') { +} +while ('') { +} +do { +} while (''); +if (/[a-z]/) { +} +while (/[a-z]/) { +} +do { +} while (/[a-z]/); +if ([]) { +} +while ([]) { +} +do { +} while ([]); +if ([ + 1, + 2 +]) { +} +while ([ + 1, + 2 +]) { +} +do { +} while ([ + 1, + 2 +]); +if ({}) { +} +while ({}) { +} +do { +} while ({}); +if ({ + x: 1, + y: 'a' +}) { +} +while ({ + x: 1, + y: 'a' +}) { +} +do { +} while ({ + x: 1, + y: 'a' +}); +if (function () { + return 43; +}) { +} +while (function () { + return 43; +}) { +} +do { +} while (function () { + return 43; +}); +if (new C()) { +} +while (new C()) { +} +do { +} while (new C()); +if (new D()) { +} +while (new D()) { +} +do { +} while (new D()); // references var a = true; -if (a) { } -while (a) { } -do { } while (a); +if (a) { +} +while (a) { +} +do { +} while (a); var b = null; -if (b) { } -while (b) { } -do { } while (b); +if (b) { +} +while (b) { +} +do { +} while (b); var c = undefined; -if (c) { } -while (c) { } -do { } while (c); +if (c) { +} +while (c) { +} +do { +} while (c); var d = 0.0; -if (d) { } -while (d) { } -do { } while (d); +if (d) { +} +while (d) { +} +do { +} while (d); var e = 'a string'; -if (e) { } -while (e) { } -do { } while (e); +if (e) { +} +while (e) { +} +do { +} while (e); var f = ''; -if (f) { } -while (f) { } -do { } while (f); +if (f) { +} +while (f) { +} +do { +} while (f); var g = /[a-z]/; -if (g) { } -while (g) { } -do { } while (g); +if (g) { +} +while (g) { +} +do { +} while (g); var h = []; -if (h) { } -while (h) { } -do { } while (h); -var i = [1, 2]; -if (i) { } -while (i) { } -do { } while (i); +if (h) { +} +while (h) { +} +do { +} while (h); +var i = [ + 1, + 2 +]; +if (i) { +} +while (i) { +} +do { +} while (i); var j = {}; -if (j) { } -while (j) { } -do { } while (j); -var k = { x: 1, y: 'a' }; -if (k) { } -while (k) { } -do { } while (k); -function fn(x) { return null; } -if (fn()) { } -while (fn()) { } -do { } while (fn()); -if (fn) { } -while (fn) { } -do { } while (fn); +if (j) { +} +while (j) { +} +do { +} while (j); +var k = { + x: 1, + y: 'a' +}; +if (k) { +} +while (k) { +} +do { +} while (k); +function fn(x) { + return null; +} +if (fn()) { +} +while (fn()) { +} +do { +} while (fn()); +if (fn) { +} +while (fn) { +} +do { +} while (fn); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 0bdcebed9c5..5fbad149b91 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -35,9 +35,15 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var r2 = function () { return _super.call(this); }; - var r3 = function () { _super.call(this); }; - var r4 = function () { _super.call(this); }; + var r2 = function () { + return _super.call(this); + }; + var r3 = function () { + _super.call(this); + }; + var r4 = function () { + _super.call(this); + }; var r5 = { get foo() { _super.call(this); diff --git a/tests/baselines/reference/implementsClauseAlreadySeen.js b/tests/baselines/reference/implementsClauseAlreadySeen.js index abb28886615..84823c13fa8 100644 --- a/tests/baselines/reference/implementsClauseAlreadySeen.js +++ b/tests/baselines/reference/implementsClauseAlreadySeen.js @@ -15,6 +15,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(); diff --git a/tests/baselines/reference/implicitAnyAmbients.errors.txt b/tests/baselines/reference/implicitAnyAmbients.errors.txt index 699bd4b7f34..e71fd6f72ea 100644 --- a/tests/baselines/reference/implicitAnyAmbients.errors.txt +++ b/tests/baselines/reference/implicitAnyAmbients.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/implicitAnyAmbients.ts(3,9): error TS7005: Variable 'x' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyAmbients.ts(6,5): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(6,14): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyAmbients.ts(6,16): error TS7006: Parameter 'x' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyAmbients.ts(7,5): error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(7,14): error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyAmbients.ts(11,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyAmbients.ts(12,9): error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyAmbients.ts(17,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. @@ -18,12 +18,12 @@ tests/cases/compiler/implicitAnyAmbients.ts(23,13): error TS7005: Variable 'y' i var y: any; function f(x); // error - ~~~~~~~~~~~~~~ + ~ !!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. ~ !!! error TS7006: Parameter 'x' implicitly has an 'any' type. function f2(x: any); // error - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. function f3(x: any): any; diff --git a/tests/baselines/reference/implicitAnyCastedValue.errors.txt b/tests/baselines/reference/implicitAnyCastedValue.errors.txt index 613aa4820d2..773fb2ed94e 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.errors.txt +++ b/tests/baselines/reference/implicitAnyCastedValue.errors.txt @@ -4,7 +4,7 @@ tests/cases/compiler/implicitAnyCastedValue.ts(12,16): error TS1056: Accessors a tests/cases/compiler/implicitAnyCastedValue.ts(26,5): error TS7008: Member 'getValue' implicitly has an 'any' type. tests/cases/compiler/implicitAnyCastedValue.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/implicitAnyCastedValue.ts(32,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/implicitAnyCastedValue.ts(41,1): error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyCastedValue.ts(41,10): error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyCastedValue.ts(53,24): error TS7006: Parameter 'x' implicitly has an 'any' type. tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter 'x' implicitly has an 'any' type. @@ -63,12 +63,10 @@ tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter ' } function notCastedNull() { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - return null; // this should be an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~~~~~~ !!! error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. + return null; // this should be an error + } function returnTypeBar(): any { return null; // this should not be an error diff --git a/tests/baselines/reference/implicitAnyCastedValue.js b/tests/baselines/reference/implicitAnyCastedValue.js index be6bd1bfef3..bc0855c838b 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.js +++ b/tests/baselines/reference/implicitAnyCastedValue.js @@ -160,4 +160,7 @@ function multipleRets2(x) { var bar1 = null; var bar2 = undefined; var bar3 = 0; -var array = [null, undefined]; +var array = [ + null, + undefined +]; diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt index 34aa58c4199..bc2a9437e4a 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt @@ -2,9 +2,9 @@ tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(2,15): e tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(3,15): error TS7006: Parameter 'll1' implicitly has an 'any' type. tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(4,33): error TS7006: Parameter 'myParam' implicitly has an 'any' type. tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(5,14): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(8,15): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(8,24): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(9,15): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(10,15): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(10,24): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(11,15): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. @@ -25,13 +25,13 @@ tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(11,15): // these should be error for implicit any return type var lambda5 = function temp() { return null; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda6 = () => { return null; } ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. var lambda7 = function temp() { return undefined; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda8 = () => { return undefined; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js index 9bfad713d82..cba7602d049 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js @@ -19,15 +19,32 @@ var lambda10 = function temp1() { return 5; } //// [implicitAnyDeclareFunctionExprWithoutFormalType.js] // these should be errors for implicit any parameter -var lambda = function (l1) { }; // Error at "l1" -var lambd2 = function (ll1, ll2) { }; // Error at "ll1" -var lamda3 = function myLambda3(myParam) { }; -var lamda4 = function () { return null; }; +var lambda = function (l1) { +}; // Error at "l1" +var lambd2 = function (ll1, ll2) { +}; // Error at "ll1" +var lamda3 = function myLambda3(myParam) { +}; +var lamda4 = function () { + return null; +}; // these should be error for implicit any return type -var lambda5 = function temp() { return null; }; -var lambda6 = function () { return null; }; -var lambda7 = function temp() { return undefined; }; -var lambda8 = function () { return undefined; }; +var lambda5 = function temp() { + return null; +}; +var lambda6 = function () { + return null; +}; +var lambda7 = function temp() { + return undefined; +}; +var lambda8 = function () { + return undefined; +}; // this shouldn't be an error -var lambda9 = function () { return 5; }; -var lambda10 = function temp1() { return 5; }; +var lambda9 = function () { + return 5; +}; +var lambda10 = function temp1() { + return 5; +}; diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js index c13479daff3..6332f444487 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js @@ -13,11 +13,14 @@ function noError2(x: number, y: string) { }; //// [implicitAnyDeclareFunctionWithoutFormalType.js] // these should be errors -function foo(x) { } +function foo(x) { +} ; -function bar(x, y) { } +function bar(x, y) { +} ; // error at "y"; no error at "x" -function func2(a, b, c) { } +function func2(a, b, c) { +} ; // error at "a,b,c" function func3() { var args = []; @@ -37,5 +40,6 @@ function noError1(x, y) { if (y === void 0) { y = 2; } } ; -function noError2(x, y) { } +function noError2(x, y) { +} ; diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js index 59d625fff4a..1a49449529e 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js @@ -15,6 +15,7 @@ var C = (function () { function C(c1, c2, c3) { this.x = null; // error at "x" } // error at "c1, c2" - C.prototype.funcOfC = function (f1, f2, f3) { }; // error at "f1,f2" + C.prototype.funcOfC = function (f1, f2, f3) { + }; // error at "f1,f2" return C; })(); diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js index e3c44e9b783..ae09bf2e40e 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js @@ -14,7 +14,8 @@ var x1: any; var y1 = new x1; //// [implicitAnyDeclareVariablesWithoutTypeAndInit.js] // this should be an error var x; // error at "x" -function func(k) { } +function func(k) { +} ; //error at "k" func(x); // this shouldn't be an error diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt index 7b80d6405c9..18292c635e6 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt +++ b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt @@ -36,12 +36,10 @@ tests/cases/compiler/implicitAnyFromCircularInference.ts(46,5): error TS7023: 'x // Error expected var f1 = function () { - ~~~~~~~~~~~~~ - return f1(); - ~~~~~~~~~~~~~~~~ - }; - ~ + ~~~~~~~~ !!! error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. + return f1(); + }; // Error expected var f2 = () => f2(); diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.js b/tests/baselines/reference/implicitAnyFromCircularInference.js index d818ea17105..b2ea707d176 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.js +++ b/tests/baselines/reference/implicitAnyFromCircularInference.js @@ -58,15 +58,21 @@ var b; var c; // Error expected var d; -function f() { return f; } +function f() { + return f; +} // Error expected -function g() { return g(); } +function g() { + return g(); +} // Error expected var f1 = function () { return f1(); }; // Error expected -var f2 = function () { return f2(); }; +var f2 = function () { + return f2(); +}; // Error expected function h() { return foo(); @@ -74,7 +80,9 @@ function h() { return h() || "hello"; } } -function foo(x) { return "abc"; } +function foo(x) { + return "abc"; +} var C = (function () { function C() { // Error expected diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js index bc5b9453665..21a3171b439 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js @@ -38,28 +38,42 @@ var newC2 = new C([], null) //// [implicitAnyFunctionInvocationWithAnyArguements.js] // this should be errors var arg0 = null; // error at "arg0" -var anyArray = [null, undefined]; // error at array literal +var anyArray = [ + null, + undefined +]; // error at array literal var objL; // error at "y,z" var funcL; -function temp1(arg1) { } // error at "temp1" -function testFunctionExprC(subReplace) { } -function testFunctionExprC2(eq) { } +function temp1(arg1) { +} // error at "temp1" +function testFunctionExprC(subReplace) { +} +function testFunctionExprC2(eq) { +} ; -function testObjLiteral(objLit) { } +function testObjLiteral(objLit) { +} ; -function testFuncLiteral(funcLit) { } +function testFuncLiteral(funcLit) { +} ; // this should not be an error -testFunctionExprC2(function (v1, v2) { return 1; }); +testFunctionExprC2(function (v1, v2) { + return 1; +}); testObjLiteral(objL); testFuncLiteral(funcL); var k = temp1(null); var result = temp1(arg0); var result1 = temp1(anyArray); -function noError(variable, array) { } +function noError(variable, array) { +} noError(null, []); noError(undefined, []); -noError(null, [null, undefined]); +noError(null, [ + null, + undefined +]); noError(undefined, anyArray); var C = (function () { function C(emtpyArray, variable) { diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt index de1c57dd797..9ad1c550d72 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(2,1): error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(3,1): error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(2,10): error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(3,10): error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(6,5): error TS7010: 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(10,5): error TS7010: 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. @@ -7,10 +7,10 @@ tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(10,5): error TS ==== tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts (4 errors) ==== // this should be an error function nullWidenFunction() { return null;} // error at "nullWidenFunction" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. class C { diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js index 82eb56fbde6..699b57603eb 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js @@ -26,8 +26,12 @@ undefinedWidenFunction(); //// [implicitAnyFunctionReturnNullOrUndefined.js] // this should be an error -function nullWidenFunction() { return null; } // error at "nullWidenFunction" -function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" +function nullWidenFunction() { + return null; +} // error at "nullWidenFunction" +function undefinedWidenFunction() { + return undefined; +} // error at "undefinedWidenFunction" var C = (function () { function C() { } @@ -40,10 +44,18 @@ var C = (function () { return C; })(); // this should not be an error -function foo1() { return null; } -function bar1() { return undefined; } -function fooBar() { return 1; } -function fooFoo() { return 5; } +function foo1() { + return null; +} +function bar1() { + return undefined; +} +function fooBar() { + return 1; +} +function fooFoo() { + return 5; +} // this should not be an error as the error is raised by expr above nullWidenFunction(); undefinedWidenFunction(); diff --git a/tests/baselines/reference/implicitAnyGenericTypeInference.js b/tests/baselines/reference/implicitAnyGenericTypeInference.js index 583ab7f0b01..37ef042f262 100644 --- a/tests/baselines/reference/implicitAnyGenericTypeInference.js +++ b/tests/baselines/reference/implicitAnyGenericTypeInference.js @@ -10,5 +10,9 @@ var r = c.compareTo(1, ''); //// [implicitAnyGenericTypeInference.js] var c; -c = { compareTo: function (x, y) { return y; } }; +c = { + compareTo: function (x, y) { + return y; + } +}; var r = c.compareTo(1, ''); diff --git a/tests/baselines/reference/implicitAnyGenerics.js b/tests/baselines/reference/implicitAnyGenerics.js index daea0dfe54c..a5c98590a8f 100644 --- a/tests/baselines/reference/implicitAnyGenerics.js +++ b/tests/baselines/reference/implicitAnyGenerics.js @@ -46,7 +46,9 @@ var d2 = new D(1); var d3 = new D(1); var d4 = new D(1); var d5 = new D(null); -function foo() { return null; } +function foo() { + return null; +} ; foo(); foo(); diff --git a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt index 260dc6c9899..11f2ae90d35 100644 --- a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt +++ b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(1,1): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(1,18): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(1,22): error TS7006: Parameter 'x' implicitly has an 'any' type. tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(2,13): error TS7005: Variable 'bar' implicitly has an 'any' type. tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(4,5): error TS7008: Member 'publicMember' implicitly has an 'any' type. @@ -10,7 +10,7 @@ tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(13,24): error TS7006: ==== tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts (8 errors) ==== declare function foo(x); // this should be an error - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. ~ !!! error TS7006: Parameter 'x' implicitly has an 'any' type. diff --git a/tests/baselines/reference/implicitAnyInCatch.js b/tests/baselines/reference/implicitAnyInCatch.js index c35e92372e3..29a2e03a130 100644 --- a/tests/baselines/reference/implicitAnyInCatch.js +++ b/tests/baselines/reference/implicitAnyInCatch.js @@ -16,11 +16,14 @@ class C { //// [implicitAnyInCatch.js] // this should not be an error -try { } +try { +} catch (error) { - if (error.number === -2147024809) { } + if (error.number === -2147024809) { + } +} +for (var key in this) { } -for (var key in this) { } var C = (function () { function C() { } diff --git a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js index 9e558122b15..4218d9a9a21 100644 --- a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js +++ b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js @@ -3,5 +3,7 @@ function Point() { this.x = 3; } var x: any = new Point(); // error at "new" //// [implicitAnyNewExprLackConstructorSignature.js] -function Point() { this.x = 3; } +function Point() { + this.x = 3; +} var x = new Point(); // error at "new" diff --git a/tests/baselines/reference/implicitAnyWidenToAny.js b/tests/baselines/reference/implicitAnyWidenToAny.js index 838593a88ef..01ad0dcb9b2 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.js +++ b/tests/baselines/reference/implicitAnyWidenToAny.js @@ -31,7 +31,10 @@ var obj1 = anyReturnFunc(); // these should be errors var x = null; // error at "x" var x1 = undefined; // error at "x1" -var widenArray = [null, undefined]; // error at "widenArray" +var widenArray = [ + null, + undefined +]; // error at "widenArray" var emptyArray = []; // error at "emptyArray" // these should not be error var AnimalObj = (function () { @@ -44,13 +47,28 @@ var bar = "Hello World"; var foo1 = null; var foo2 = undefined; var temp = 5; -var c = { x: null }; -var array1 = ["Bob", 2]; +var c = { + x: null +}; +var array1 = [ + "Bob", + 2 +]; var array2 = []; -var array3 = [null, undefined]; -var array4 = [null, undefined]; -var array5 = [null, undefined]; +var array3 = [ + null, + undefined +]; +var array4 = [ + null, + undefined +]; +var array5 = [ + null, + undefined +]; var objLit; -function anyReturnFunc() { } +function anyReturnFunc() { +} var obj0 = new objLit(1); var obj1 = anyReturnFunc(); diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js index 3329fb810a7..35992b86fec 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js @@ -17,7 +17,8 @@ module m_private { //// [importAliasAnExternalModuleInsideAnInternalModule_file0.js] var m; (function (m) { - function foo() { } + function foo() { + } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [importAliasAnExternalModuleInsideAnInternalModule_file1.js] diff --git a/tests/baselines/reference/importAliasIdentifiers.js b/tests/baselines/reference/importAliasIdentifiers.js index 7bd15b28c66..620fdf13866 100644 --- a/tests/baselines/reference/importAliasIdentifiers.js +++ b/tests/baselines/reference/importAliasIdentifiers.js @@ -69,18 +69,27 @@ var clodule = (function () { })(); var clodule; (function (clodule) { - var Point = { x: 0, y: 0 }; + var Point = { + x: 0, + y: 0 + }; })(clodule || (clodule = {})); var clolias = clodule; var p; var p; var p; function fundule() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } var fundule; (function (fundule) { - var Point = { x: 0, y: 0 }; + var Point = { + x: 0, + y: 0 + }; })(fundule || (fundule = {})); var funlias = fundule; var p; diff --git a/tests/baselines/reference/importAnImport.errors.txt b/tests/baselines/reference/importAnImport.errors.txt index 662655d3a3e..5f79b21f375 100644 --- a/tests/baselines/reference/importAnImport.errors.txt +++ b/tests/baselines/reference/importAnImport.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importAnImport.ts(6,5): error TS2305: Module 'c.a.b' has no exported member 'ma'. +tests/cases/compiler/importAnImport.ts(6,23): error TS2305: Module 'c.a.b' has no exported member 'ma'. ==== tests/cases/compiler/importAnImport.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/importAnImport.ts(6,5): error TS2305: Module 'c.a.b' has no module m0 { import m8 = c.a.b.ma; - ~~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2305: Module 'c.a.b' has no exported member 'ma'. } \ No newline at end of file diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 8114e88ca4b..9e52c4dd067 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -14,7 +14,9 @@ class Hello extends Greeter { } var Greeter = (function () { function Greeter() { } - Greeter.prototype.greet = function () { return 'greet'; }; + Greeter.prototype.greet = function () { + return 'greet'; + }; return Greeter; })(); exports.Greeter = Greeter; diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 9d4839e5e7c..d6f2855908e 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -89,7 +89,9 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require1.js] var d = (function () { @@ -99,7 +101,9 @@ var d = (function () { })(); exports.d = d; var x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require2.js] var d = (function () { @@ -109,7 +113,9 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require3.js] var d = (function () { @@ -119,10 +125,14 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require4.js] -function foo2() { return null; } +function foo2() { + return null; +} exports.foo2 = foo2; //// [importDecl_1.js] /// diff --git a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt index 19d30ae1b63..b7f60881e6e 100644 --- a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt +++ b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/importDeclWithClassModifiers.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. tests/cases/compiler/importDeclWithClassModifiers.ts(5,8): error TS1044: 'public' modifier cannot appear on a module element. -tests/cases/compiler/importDeclWithClassModifiers.ts(6,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithClassModifiers.ts(5,28): error TS2305: Module 'x' has no exported member 'c'. tests/cases/compiler/importDeclWithClassModifiers.ts(6,8): error TS1044: 'private' modifier cannot appear on a module element. -tests/cases/compiler/importDeclWithClassModifiers.ts(7,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithClassModifiers.ts(6,29): error TS2305: Module 'x' has no exported member 'c'. tests/cases/compiler/importDeclWithClassModifiers.ts(7,8): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/compiler/importDeclWithClassModifiers.ts(7,28): error TS2305: Module 'x' has no exported member 'c'. ==== tests/cases/compiler/importDeclWithClassModifiers.ts (6 errors) ==== @@ -12,19 +12,19 @@ tests/cases/compiler/importDeclWithClassModifiers.ts(7,8): error TS1044: 'static } } export public import a = x.c; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2305: Module 'x' has no exported member 'c'. ~~~~~~ !!! error TS1044: 'public' modifier cannot appear on a module element. - export private import b = x.c; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2305: Module 'x' has no exported member 'c'. + export private import b = x.c; ~~~~~~~ !!! error TS1044: 'private' modifier cannot appear on a module element. - export static import c = x.c; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2305: Module 'x' has no exported member 'c'. + export static import c = x.c; ~~~~~~ !!! error TS1044: 'static' modifier cannot appear on a module element. + ~ +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt index dc7462a699f..56da8354977 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier. +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Module 'x' has no exported member 'c'. ==== tests/cases/compiler/importDeclWithDeclareModifier.ts (3 errors) ==== @@ -11,9 +11,9 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'expor declare export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2305: Module 'x' has no exported member 'c'. ~~~~~~ !!! error TS1029: 'export' modifier must precede 'declare' modifier. + ~ +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifier.errors.txt b/tests/baselines/reference/importDeclWithExportModifier.errors.txt index e1d75496a39..9fb53fbd3ea 100644 --- a/tests/baselines/reference/importDeclWithExportModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importDeclWithExportModifier.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithExportModifier.ts(5,21): error TS2305: Module 'x' has no exported member 'c'. ==== tests/cases/compiler/importDeclWithExportModifier.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/importDeclWithExportModifier.ts(5,1): error TS2305: Module } } export import a = x.c; - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt index b7d938fbd58..4d2084b7f08 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,21): error TS2305: Module 'x' has no exported member 'c'. tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(6,1): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -8,7 +8,7 @@ tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(6,1): er } } export import a = x.c; - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2305: Module 'x' has no exported member 'c'. export = x; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/importInTypePosition.js b/tests/baselines/reference/importInTypePosition.js index c0d64a4ef7b..08f7078cca3 100644 --- a/tests/baselines/reference/importInTypePosition.js +++ b/tests/baselines/reference/importInTypePosition.js @@ -39,5 +39,8 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0 }; + var p = { + x: 0, + y: 0 + }; })(C || (C = {})); diff --git a/tests/baselines/reference/importStatements.js b/tests/baselines/reference/importStatements.js index b8d06a3546e..dddbadbcc7a 100644 --- a/tests/baselines/reference/importStatements.js +++ b/tests/baselines/reference/importStatements.js @@ -52,7 +52,10 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0 }; + var p = { + x: 0, + y: 0 + }; })(C || (C = {})); // code gen expected var D; diff --git a/tests/baselines/reference/importStatementsInterfaces.js b/tests/baselines/reference/importStatementsInterfaces.js index 4f7bb447565..bb24aeb0f6b 100644 --- a/tests/baselines/reference/importStatementsInterfaces.js +++ b/tests/baselines/reference/importStatementsInterfaces.js @@ -47,7 +47,11 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0, z: 0 }; + var p = { + x: 0, + y: 0, + z: 0 + }; })(C || (C = {})); // no code gen expected var D; diff --git a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt index 2ffd16ecbf2..8948c67f78b 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt +++ b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt @@ -17,6 +17,6 @@ tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2304: Cannot f module C { import a = A; function hello(): b.B { return null; } - ~~~ + ~ !!! error TS2304: Cannot find name 'b'. } \ No newline at end of file diff --git a/tests/baselines/reference/importedModuleAddToGlobal.js b/tests/baselines/reference/importedModuleAddToGlobal.js index dd7dfcd5fc9..6685bec69e3 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.js +++ b/tests/baselines/reference/importedModuleAddToGlobal.js @@ -28,5 +28,7 @@ var B; })(B || (B = {})); var C; (function (C) { - function hello() { return null; } + function hello() { + return null; + } })(C || (C = {})); diff --git a/tests/baselines/reference/inOperator.js b/tests/baselines/reference/inOperator.js index 10059bcf2b7..1407ef9d59c 100644 --- a/tests/baselines/reference/inOperator.js +++ b/tests/baselines/reference/inOperator.js @@ -14,9 +14,12 @@ if (y in c) { } //// [inOperator.js] var a = []; -for (var x in a) { } -if (3 in a) { } +for (var x in a) { +} +if (3 in a) { +} var b = '' in 0; var c; var y; -if (y in c) { } +if (y in c) { +} diff --git a/tests/baselines/reference/inOperatorWithFunction.js b/tests/baselines/reference/inOperatorWithFunction.js index bc293ca2c43..f06e95ff6b7 100644 --- a/tests/baselines/reference/inOperatorWithFunction.js +++ b/tests/baselines/reference/inOperatorWithFunction.js @@ -4,5 +4,9 @@ fn("a" in { "a": true }); //// [inOperatorWithFunction.js] -var fn = function (val) { return val; }; -fn("a" in { "a": true }); +var fn = function (val) { + return val; +}; +fn("a" in { + "a": true +}); diff --git a/tests/baselines/reference/incompatibleTypes.js b/tests/baselines/reference/incompatibleTypes.js index 7e24afecf5f..a0b4d0f9ca2 100644 --- a/tests/baselines/reference/incompatibleTypes.js +++ b/tests/baselines/reference/incompatibleTypes.js @@ -102,12 +102,18 @@ var C4 = (function () { } return C4; })(); -function if1(a) { } +function if1(a) { +} var c1; var c2; if1(c1); -function of1(a) { return null; } -of1({ e: 0, f: 0 }); +function of1(a) { + return null; +} +of1({ + e: 0, + f: 0 +}); function foo(fn) { } function bar() { @@ -116,7 +122,25 @@ function bar() { map = {}; }); } -var o1 = { e: 0, f: 0 }; -var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; +var o1 = { + e: 0, + f: 0 +}; +var a1 = [ + { + e: 0, + f: 0 + }, + { + e: 0, + f: 0 + }, + { + e: 0, + g: 0 + } +]; var i1c1 = 5; -var fp1 = function (a) { return 0; }; +var fp1 = function (a) { + return 0; +}; diff --git a/tests/baselines/reference/incompleteObjectLiteral1.js b/tests/baselines/reference/incompleteObjectLiteral1.js index ecdbe86604a..6859267fee1 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.js +++ b/tests/baselines/reference/incompleteObjectLiteral1.js @@ -3,5 +3,7 @@ var tt = { aa; } var x = tt; //// [incompleteObjectLiteral1.js] -var tt = { aa: }; +var tt = { + aa: +}; var x = tt; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js index 4c9d570d07f..7fd47a937a8 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js @@ -52,8 +52,14 @@ M.n++; // ++ operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; -var obj = { x: 1, y: null }; +var ANY2 = [ + "", + "" +]; +var obj = { + x: 1, + y: null +}; var A = (function () { function A() { } diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js index 6f76fba6d8c..3e1c47faedc 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -72,9 +72,16 @@ ANY2++; //// [incrementOperatorWithAnyOtherTypeInvalidOperations.js] // ++ operator on any type var ANY1; -var ANY2 = [1, 2]; +var ANY2 = [ + 1, + 2 +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/incrementOperatorWithNumberType.js b/tests/baselines/reference/incrementOperatorWithNumberType.js index 09365833e3b..e8312c5e5f2 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberType.js +++ b/tests/baselines/reference/incrementOperatorWithNumberType.js @@ -42,7 +42,10 @@ objA.a++, M.n++; //// [incrementOperatorWithNumberType.js] // ++ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; +var NUMBER1 = [ + 1, + 2 +]; var A = (function () { function A() { } diff --git a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js index eb9cd949280..4629f10a964 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js @@ -49,12 +49,19 @@ foo()++; //// [incrementOperatorWithNumberTypeInvalidOperations.js] // ++ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -67,11 +74,27 @@ var ResultIsNumber1 = ++NUMBER1; var ResultIsNumber2 = NUMBER1++; // number type literal var ResultIsNumber3 = ++1; -var ResultIsNumber4 = ++{ x: 1, y: 2 }; -var ResultIsNumber5 = ++{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = ++{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = ++{ + x: 1, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = 1++; -var ResultIsNumber7 = { x: 1, y: 2 }++; -var ResultIsNumber8 = { x: 1, y: function (n) { return n; } }++; +var ResultIsNumber7 = { + x: 1, + y: 2 +}++; +var ResultIsNumber8 = { + x: 1, + y: function (n) { + return n; + } +}++; // number type expressions var ResultIsNumber9 = ++foo(); var ResultIsNumber10 = ++A.foo(); diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js index 6a974443f7b..09549a71a0c 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js @@ -57,11 +57,15 @@ objA.a++, M.n++; //// [incrementOperatorWithUnsupportedBooleanType.js] // ++ operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return true; }; + A.foo = function () { + return true; + }; return A; })(); var M; @@ -74,11 +78,27 @@ var ResultIsNumber1 = ++BOOLEAN; var ResultIsNumber2 = BOOLEAN++; // boolean type literal var ResultIsNumber3 = ++true; -var ResultIsNumber4 = ++{ x: true, y: false }; -var ResultIsNumber5 = ++{ x: true, y: function (n) { return n; } }; +var ResultIsNumber4 = ++{ + x: true, + y: false +}; +var ResultIsNumber5 = ++{ + x: true, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = true++; -var ResultIsNumber7 = { x: true, y: false }++; -var ResultIsNumber8 = { x: true, y: function (n) { return n; } }++; +var ResultIsNumber7 = { + x: true, + y: false +}++; +var ResultIsNumber8 = { + x: true, + y: function (n) { + return n; + } +}++; // boolean type expressions var ResultIsNumber9 = ++objA.a; var ResultIsNumber10 = ++M.n; diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js index 82bf03cd83a..5abb2cd8b79 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js @@ -68,12 +68,19 @@ objA.a++, M.n++; //// [incrementOperatorWithUnsupportedStringType.js] // ++ operator on string type var STRING; -var STRING1 = ["", ""]; -function foo() { return ""; } +var STRING1 = [ + "", + "" +]; +function foo() { + return ""; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -88,11 +95,27 @@ var ResultIsNumber3 = STRING++; var ResultIsNumber4 = STRING1++; // string type literal var ResultIsNumber5 = ++""; -var ResultIsNumber6 = ++{ x: "", y: "" }; -var ResultIsNumber7 = ++{ x: "", y: function (s) { return s; } }; +var ResultIsNumber6 = ++{ + x: "", + y: "" +}; +var ResultIsNumber7 = ++{ + x: "", + y: function (s) { + return s; + } +}; var ResultIsNumber8 = ""++; -var ResultIsNumber9 = { x: "", y: "" }++; -var ResultIsNumber10 = { x: "", y: function (s) { return s; } }++; +var ResultIsNumber9 = { + x: "", + y: "" +}++; +var ResultIsNumber10 = { + x: "", + y: function (s) { + return s; + } +}++; // string type expressions var ResultIsNumber11 = ++objA.a; var ResultIsNumber12 = ++M.n; diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.js b/tests/baselines/reference/indexSignaturesInferentialTyping.js index 53636be716c..fc1525eda0f 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.js +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.js @@ -9,9 +9,25 @@ var x4 = bar({ zero: 0, one: 1 }); // type should be number //// [indexSignaturesInferentialTyping.js] -function foo(items) { return undefined; } -function bar(items) { return undefined; } -var x1 = foo({ 0: 0, 1: 1 }); // type should be number -var x2 = foo({ zero: 0, one: 1 }); -var x3 = bar({ 0: 0, 1: 1 }); -var x4 = bar({ zero: 0, one: 1 }); // type should be number +function foo(items) { + return undefined; +} +function bar(items) { + return undefined; +} +var x1 = foo({ + 0: 0, + 1: 1 +}); // type should be number +var x2 = foo({ + zero: 0, + one: 1 +}); +var x3 = bar({ + 0: 0, + 1: 1 +}); +var x4 = bar({ + zero: 0, + one: 1 +}); // type should be number diff --git a/tests/baselines/reference/indexer.js b/tests/baselines/reference/indexer.js index 97e734a029f..12c28236d8d 100644 --- a/tests/baselines/reference/indexer.js +++ b/tests/baselines/reference/indexer.js @@ -11,5 +11,12 @@ var jq:JQuery={ 0: { id : "a" }, 1: { id : "b" } }; jq[0].id; //// [indexer.js] -var jq = { 0: { id: "a" }, 1: { id: "b" } }; +var jq = { + 0: { + id: "a" + }, + 1: { + id: "b" + } +}; jq[0].id; diff --git a/tests/baselines/reference/indexerA.js b/tests/baselines/reference/indexerA.js index 5216026f714..2a377c3436d 100644 --- a/tests/baselines/reference/indexerA.js +++ b/tests/baselines/reference/indexerA.js @@ -21,5 +21,12 @@ var JQuery = (function () { } return JQuery; })(); -var jq = { 0: { id: "a" }, 1: { id: "b" } }; +var jq = { + 0: { + id: "a" + }, + 1: { + id: "b" + } +}; jq[0].id; diff --git a/tests/baselines/reference/indexerWithTuple.js b/tests/baselines/reference/indexerWithTuple.js index 91d90792e6d..b73b5e80a87 100644 --- a/tests/baselines/reference/indexerWithTuple.js +++ b/tests/baselines/reference/indexerWithTuple.js @@ -33,10 +33,25 @@ var eleUnion25 = unionTuple2["0"]; // boolean var eleUnion26 = unionTuple2["1"]; // string | number //// [indexerWithTuple.js] -var strNumTuple = ["foo", 10]; -var numTupleTuple = [10, ["bar", 20]]; -var unionTuple1 = [10, "foo"]; -var unionTuple2 = [true, "foo"]; +var strNumTuple = [ + "foo", + 10 +]; +var numTupleTuple = [ + 10, + [ + "bar", + 20 + ] +]; +var unionTuple1 = [ + 10, + "foo" +]; +var unionTuple2 = [ + true, + "foo" +]; // no error var idx0 = 0; var idx1 = 1; diff --git a/tests/baselines/reference/inferSecondaryParameter.js b/tests/baselines/reference/inferSecondaryParameter.js index 24689aa9495..a02e10b5570 100644 --- a/tests/baselines/reference/inferSecondaryParameter.js +++ b/tests/baselines/reference/inferSecondaryParameter.js @@ -11,7 +11,10 @@ b.m("test", function (bug) { //// [inferSecondaryParameter.js] // type inference on 'bug' should give 'any' -var b = { m: function (test, fn) { } }; +var b = { + m: function (test, fn) { + } +}; b.m("test", function (bug) { var a = bug; }); diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js index 97fefc0571c..194d9198d23 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js @@ -30,8 +30,15 @@ function h(nonarray) { args[_i - 1] = arguments[_i]; } } -function i(array, opt) { } -var a = [1, 2, 3, 4, 5]; +function i(array, opt) { +} +var a = [ + 1, + 2, + 3, + 4, + 5 +]; f(a); // OK g(a); // OK h(a); // OK diff --git a/tests/baselines/reference/inferenceFromParameterlessLambda.js b/tests/baselines/reference/inferenceFromParameterlessLambda.js index 40c18c9afe8..c1b970dee60 100644 --- a/tests/baselines/reference/inferenceFromParameterlessLambda.js +++ b/tests/baselines/reference/inferenceFromParameterlessLambda.js @@ -11,6 +11,11 @@ foo(n => n.length, () => 'hi'); //// [inferenceFromParameterlessLambda.js] -function foo(o, i) { } +function foo(o, i) { +} // Infer string from second argument because it isn't context sensitive -foo(function (n) { return n.length; }, function () { return 'hi'; }); +foo(function (n) { + return n.length; +}, function () { + return 'hi'; +}); diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.js b/tests/baselines/reference/inferentialTypingWithFunctionType2.js index a3215a19e25..758f0e27465 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.js @@ -8,4 +8,8 @@ var x = [1, 2, 3].map(identity)[0]; function identity(a) { return a; } -var x = [1, 2, 3].map(identity)[0]; +var x = [ + 1, + 2, + 3 +].map(identity)[0]; diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js index aeb9a840773..b9b6f9e4bde 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js @@ -5,4 +5,8 @@ declare function identity(y: V): V; var s = map("", () => { return { x: identity }; }); //// [inferentialTypingWithFunctionTypeNested.js] -var s = map("", function () { return { x: identity }; }); +var s = map("", function () { + return { + x: identity + }; +}); diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js index 2f5eea63a8a..b41a9f6240e 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js @@ -36,12 +36,16 @@ s = map("", ("", identity)); //// [inferentialTypingWithFunctionTypeSyntacticScenarios.js] var s; // dotted name -var dottedIdentity = { x: identity }; +var dottedIdentity = { + x: identity +}; s = map("", dottedIdentity.x); // index expression s = map("", dottedIdentity['x']); // function call -s = map("", (function () { return identity; })()); +s = map("", (function () { + return identity; +})()); var ic; s = map("", new ic()); // assignment diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js index 35f0928378c..0e413f9b171 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js @@ -7,5 +7,11 @@ var i = result[0].x; // number //// [inferentialTypingWithFunctionTypeZip.js] var pair; var zipWith; -var result = zipWith([1, 2], ['a', 'b'], pair); +var result = zipWith([ + 1, + 2 +], [ + 'a', + 'b' +], pair); var i = result[0].x; // number diff --git a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js index 216604dd4d5..af2b936b2a8 100644 --- a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js +++ b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js @@ -10,5 +10,21 @@ f({ x: [1] }, { x: [null] }).x[0] = "" // was error TS2011: Cannot convert 'stri function f(x, y) { return x; } -f({ x: [null] }, { x: [1] }).x[0] = ""; // ok -f({ x: [1] }, { x: [null] }).x[0] = ""; // was error TS2011: Cannot convert 'string' to 'number'. +f({ + x: [ + null + ] +}, { + x: [ + 1 + ] +}).x[0] = ""; // ok +f({ + x: [ + 1 + ] +}, { + x: [ + null + ] +}).x[0] = ""; // was error TS2011: Cannot convert 'string' to 'number'. diff --git a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt index 915e75dd6da..99819ecad2c 100644 --- a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt +++ b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt @@ -1,22 +1,15 @@ -tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(1,1): error TS2354: No best common type exists among return expressions. +tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(1,10): error TS2354: No best common type exists among return expressions. ==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (1 errors) ==== function foo() { - ~~~~~~~~~~~~~~~~ - if (true) { - ~~~~~~~~~~~~~~~ - return 42; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - else { - ~~~~~~~~~~ - return "42"; - ~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - }; - ~ + ~~~ !!! error TS2354: No best common type exists among return expressions. + if (true) { + return 42; + } + else { + return "42"; + } + }; \ No newline at end of file diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index f7a274b1990..1fca887a9b1 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -79,9 +79,13 @@ var ND = (function (_super) { })(N); var Good = (function () { function Good() { - this.f = function () { return 0; }; + this.f = function () { + return 0; + }; } - Good.prototype.g = function () { return 0; }; + Good.prototype.g = function () { + return 0; + }; return Good; })(); var Baad = (function (_super) { @@ -89,7 +93,11 @@ var Baad = (function (_super) { function Baad() { _super.apply(this, arguments); } - Baad.prototype.f = function () { return 0; }; - Baad.prototype.g = function (n) { return 0; }; + Baad.prototype.f = function () { + return 0; + }; + Baad.prototype.g = function (n) { + return 0; + }; return Baad; })(Good); diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index f00a46922bf..e6dbd35e0df 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -78,7 +78,8 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { }; + Button.prototype.select = function () { + }; return Button; })(Control); var TextBox = (function (_super) { @@ -86,7 +87,8 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { }; + TextBox.prototype.select = function () { + }; return TextBox; })(Control); var ImageBase = (function (_super) { @@ -106,13 +108,15 @@ var Image1 = (function (_super) { var Locations = (function () { function Locations() { } - Locations.prototype.select = function () { }; + Locations.prototype.select = function () { + }; return Locations; })(); var Locations1 = (function () { function Locations1() { } - Locations1.prototype.select = function () { }; + Locations1.prototype.select = function () { + }; return Locations1; })(); var sc; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 4544df2dcf2..45293ec3021 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index df6e5943173..339511df6ba 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index 682a8ab4402..f69a4962db6 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js index 85801ca704f..49fd1e40582 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js @@ -9,6 +9,11 @@ fn(function (a, b) { return true; }) //// [inheritedFunctionAssignmentCompatibility.js] -function fn(cb) { } -fn(function (a, b) { return true; }); -fn(function (a, b) { return true; }); +function fn(cb) { +} +fn(function (a, b) { + return true; +}); +fn(function (a, b) { + return true; +}); diff --git a/tests/baselines/reference/initializePropertiesWithRenamedLet.js b/tests/baselines/reference/initializePropertiesWithRenamedLet.js new file mode 100644 index 00000000000..902a23f5886 --- /dev/null +++ b/tests/baselines/reference/initializePropertiesWithRenamedLet.js @@ -0,0 +1,46 @@ +//// [initializePropertiesWithRenamedLet.ts] + +var x0; +if (true) { + let x0; + var obj1 = { x0: x0 }; + var obj2 = { x0 }; +} + +var x, y, z; +if (true) { + let { x: x } = { x: 0 }; + let { y } = { y: 0 }; + let z; + ({ z: z } = { z: 0 }); + ({ z } = { z: 0 }); +} + +//// [initializePropertiesWithRenamedLet.js] +var x0; +if (true) { + var _x0; + var obj1 = { + x0: _x0 + }; + var obj2 = { + x0: _x0 + }; +} +var x, y, z; +if (true) { + var _x = ({ + x: 0 + }).x; + var _y = ({ + y: 0 + }).y; + var _z; + (_a = { + z: 0 + }, _z = _a.z, _a); + (_b = { + z: 0 + }, _z = _b.z, _b); +} +var _a, _b; diff --git a/tests/baselines/reference/initializePropertiesWithRenamedLet.types b/tests/baselines/reference/initializePropertiesWithRenamedLet.types new file mode 100644 index 00000000000..77f16756fdb --- /dev/null +++ b/tests/baselines/reference/initializePropertiesWithRenamedLet.types @@ -0,0 +1,58 @@ +=== tests/cases/compiler/initializePropertiesWithRenamedLet.ts === + +var x0; +>x0 : any + +if (true) { + let x0; +>x0 : any + + var obj1 = { x0: x0 }; +>obj1 : { x0: any; } +>{ x0: x0 } : { x0: any; } +>x0 : any +>x0 : any + + var obj2 = { x0 }; +>obj2 : { x0: any; } +>{ x0 } : { x0: any; } +>x0 : any +} + +var x, y, z; +>x : any +>y : any +>z : any + +if (true) { + let { x: x } = { x: 0 }; +>x : unknown +>x : number +>{ x: 0 } : { x: number; } +>x : number + + let { y } = { y: 0 }; +>y : number +>{ y: 0 } : { y: number; } +>y : number + + let z; +>z : any + + ({ z: z } = { z: 0 }); +>({ z: z } = { z: 0 }) : { z: number; } +>{ z: z } = { z: 0 } : { z: number; } +>{ z: z } : { z: any; } +>z : any +>z : any +>{ z: 0 } : { z: number; } +>z : number + + ({ z } = { z: 0 }); +>({ z } = { z: 0 }) : { z: number; } +>{ z } = { z: 0 } : { z: number; } +>{ z } : { z: any; } +>z : any +>{ z: 0 } : { z: number; } +>z : number +} diff --git a/tests/baselines/reference/innerAliases.errors.txt b/tests/baselines/reference/innerAliases.errors.txt index b5135c19d12..e4699c0825b 100644 --- a/tests/baselines/reference/innerAliases.errors.txt +++ b/tests/baselines/reference/innerAliases.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/innerAliases.ts(19,8): error TS2305: Module 'D' has no exported member 'inner'. +tests/cases/compiler/innerAliases.ts(19,10): error TS2305: Module 'D' has no exported member 'inner'. tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 'typeof D'. @@ -22,7 +22,7 @@ tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does } var c: D.inner.Class1; - ~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2305: Module 'D' has no exported member 'inner'. c = new D.inner.Class1(); diff --git a/tests/baselines/reference/innerBoundLambdaEmit.js b/tests/baselines/reference/innerBoundLambdaEmit.js index c09cc8e5a66..2921cad55d0 100644 --- a/tests/baselines/reference/innerBoundLambdaEmit.js +++ b/tests/baselines/reference/innerBoundLambdaEmit.js @@ -18,5 +18,6 @@ var M; return Foo; })(); M.Foo = Foo; - var bar = function () { }; + var bar = function () { + }; })(M || (M = {})); diff --git a/tests/baselines/reference/innerFunc.js b/tests/baselines/reference/innerFunc.js index c790c09e271..1676d0789d1 100644 --- a/tests/baselines/reference/innerFunc.js +++ b/tests/baselines/reference/innerFunc.js @@ -14,13 +14,17 @@ module M { //// [innerFunc.js] function salt() { - function pepper() { return 5; } + function pepper() { + return 5; + } return pepper(); } var M; (function (M) { function tungsten() { - function oxygen() { return 6; } + function oxygen() { + return 6; + } ; return oxygen(); } diff --git a/tests/baselines/reference/innerModExport1.js b/tests/baselines/reference/innerModExport1.js index cbeced37046..d61e79f2396 100644 --- a/tests/baselines/reference/innerModExport1.js +++ b/tests/baselines/reference/innerModExport1.js @@ -28,12 +28,18 @@ var Outer; { var non_export_var = 0; Outer.export_var = 1; - function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } + function NonExportFunc() { + return 0; + } + function ExportFunc() { + return 0; + } Outer.ExportFunc = ExportFunc; } Outer.outer_var_export = 0; - function outerFuncExport() { return 0; } + function outerFuncExport() { + return 0; + } Outer.outerFuncExport = outerFuncExport; })(Outer || (Outer = {})); Outer.ExportFunc(); diff --git a/tests/baselines/reference/innerModExport2.js b/tests/baselines/reference/innerModExport2.js index a1526daf6f3..26399879e6d 100644 --- a/tests/baselines/reference/innerModExport2.js +++ b/tests/baselines/reference/innerModExport2.js @@ -29,13 +29,19 @@ var Outer; { var non_export_var = 0; Outer.export_var = 1; - function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } + function NonExportFunc() { + return 0; + } + function ExportFunc() { + return 0; + } Outer.ExportFunc = ExportFunc; } var export_var; Outer.outer_var_export = 0; - function outerFuncExport() { return 0; } + function outerFuncExport() { + return 0; + } Outer.outerFuncExport = outerFuncExport; })(Outer || (Outer = {})); Outer.NonExportFunc(); diff --git a/tests/baselines/reference/innerOverloads.js b/tests/baselines/reference/innerOverloads.js index 19e3fa78909..184b644406e 100644 --- a/tests/baselines/reference/innerOverloads.js +++ b/tests/baselines/reference/innerOverloads.js @@ -14,7 +14,9 @@ var x = outer(); // should work //// [innerOverloads.js] function outer() { - function inner(a) { return a; } + function inner(a) { + return a; + } return inner(0); } var x = outer(); // should work diff --git a/tests/baselines/reference/instanceAndStaticDeclarations1.js b/tests/baselines/reference/instanceAndStaticDeclarations1.js index 7dbd6dcbe7d..1396e2bcfa8 100644 --- a/tests/baselines/reference/instanceAndStaticDeclarations1.js +++ b/tests/baselines/reference/instanceAndStaticDeclarations1.js @@ -24,7 +24,9 @@ var Point = (function () { var dy = this.y - p.y; return Math.sqrt(dx * dx + dy * dy); }; - Point.distance = function (p1, p2) { return p1.distance(p2); }; + Point.distance = function (p1, p2) { + return p1.distance(p2); + }; Point.origin = new Point(0, 0); return Point; })(); diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js index 51c38282a72..28f7296f0ea 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js @@ -17,12 +17,18 @@ var C = (function () { function C() { } C.prototype.foo = function () { - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; }; C.prototype.bar = function (x) { - C.prototype.bar = function () { }; // error - C.prototype.bar = function (x) { return x; }; // ok - C.prototype.bar = function (x) { return 1; }; // ok + C.prototype.bar = function () { + }; // error + C.prototype.bar = function (x) { + return x; + }; // ok + C.prototype.bar = function (x) { + return 1; + }; // ok return 1; }; return C; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 7ab3b4a0aa3..eca12f7b1ae 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -60,11 +60,14 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var D = (function (_super) { @@ -92,11 +95,14 @@ var Generic; get: function () { return null; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/instancePropertyInClassType.js b/tests/baselines/reference/instancePropertyInClassType.js index 863f18de323..b2df44db6f0 100644 --- a/tests/baselines/reference/instancePropertyInClassType.js +++ b/tests/baselines/reference/instancePropertyInClassType.js @@ -50,11 +50,14 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var c = new C(1, 2); @@ -75,11 +78,14 @@ var Generic; get: function () { return null; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var c = new C(1, ''); diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js index 9f83181a146..8309b7e7c01 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js @@ -50,7 +50,8 @@ var rc1 = '' instanceof {}; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var x; diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js index 3d7d2a7d017..15e4239eb0a 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js @@ -27,7 +27,8 @@ var C = (function () { return C; })(); var c = new C(); -function Foo() { } +function Foo() { +} var r = new Foo(); var f; var r2 = new f(); diff --git a/tests/baselines/reference/instantiateTypeParameter.errors.txt b/tests/baselines/reference/instantiateTypeParameter.errors.txt index e8685251f9c..d3e30665b22 100644 --- a/tests/baselines/reference/instantiateTypeParameter.errors.txt +++ b/tests/baselines/reference/instantiateTypeParameter.errors.txt @@ -8,7 +8,7 @@ tests/cases/compiler/instantiateTypeParameter.ts(3,1): error TS1128: Declaration var x: T<>; ~~~ !!! error TS1131: Property or signature expected. - ~~~ + ~ !!! error TS2304: Cannot find name 'T'. } ~ diff --git a/tests/baselines/reference/instantiatedModule.js b/tests/baselines/reference/instantiatedModule.js index 8cabdeabe49..2b1871aea9d 100644 --- a/tests/baselines/reference/instantiatedModule.js +++ b/tests/baselines/reference/instantiatedModule.js @@ -82,7 +82,10 @@ var M2; function Point() { } Point.Origin = function () { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; }; return Point; })(); diff --git a/tests/baselines/reference/intTypeCheck.js b/tests/baselines/reference/intTypeCheck.js index fbbe1bb5d03..41f648610b5 100644 --- a/tests/baselines/reference/intTypeCheck.js +++ b/tests/baselines/reference/intTypeCheck.js @@ -209,7 +209,8 @@ var obj87: i8 = new {}; var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var anyVar; @@ -219,15 +220,22 @@ var anyVar; var obj0; var obj1 = { p: null, - p3: function () { return 0; }, - p6: function (pa1) { return 0; }, - p7: function (pa1, pa2) { return 0; } + p3: function () { + return 0; + }, + p6: function (pa1) { + return 0; + }, + p7: function (pa1, pa2) { + return 0; + } }; var obj2 = new Object(); var obj3 = new obj0; var obj4 = new Base; var obj5 = null; -var obj6 = function () { }; +var obj6 = function () { +}; //var obj7: i1 = function foo() { }; var obj8 = anyVar; var obj9 = new < i1 > anyVar; @@ -241,7 +249,9 @@ var obj13 = new Object(); var obj14 = new obj11; var obj15 = new Base; var obj16 = null; -var obj17 = function () { return 0; }; +var obj17 = function () { + return 0; +}; //var obj18: i2 = function foo() { }; var obj19 = anyVar; var obj20 = new < i2 > anyVar; @@ -255,7 +265,8 @@ var obj24 = new Object(); var obj25 = new obj22; var obj26 = new Base; var obj27 = null; -var obj28 = function () { }; +var obj28 = function () { +}; //var obj29: i3 = function foo() { }; var obj30 = anyVar; var obj31 = new < i3 > anyVar; @@ -269,7 +280,8 @@ var obj35 = new Object(); var obj36 = new obj33; var obj37 = new Base; var obj38 = null; -var obj39 = function () { }; +var obj39 = function () { +}; //var obj40: i4 = function foo() { }; var obj41 = anyVar; var obj42 = new < i4 > anyVar; @@ -283,7 +295,8 @@ var obj46 = new Object(); var obj47 = new obj44; var obj48 = new Base; var obj49 = null; -var obj50 = function () { }; +var obj50 = function () { +}; //var obj51: i5 = function foo() { }; var obj52 = anyVar; var obj53 = new < i5 > anyVar; @@ -297,7 +310,8 @@ var obj57 = new Object(); var obj58 = new obj55; var obj59 = new Base; var obj60 = null; -var obj61 = function () { }; +var obj61 = function () { +}; //var obj62: i6 = function foo() { }; var obj63 = anyVar; var obj64 = new < i6 > anyVar; @@ -311,7 +325,8 @@ var obj68 = new Object(); var obj69 = new obj66; var obj70 = new Base; var obj71 = null; -var obj72 = function () { }; +var obj72 = function () { +}; //var obj73: i7 = function foo() { }; var obj74 = anyVar; var obj75 = new < i7 > anyVar; @@ -325,7 +340,8 @@ var obj79 = new Object(); var obj80 = new obj77; var obj81 = new Base; var obj82 = null; -var obj83 = function () { }; +var obj83 = function () { +}; //var obj84: i8 = function foo() { }; var obj85 = anyVar; var obj86 = new < i8 > anyVar; diff --git a/tests/baselines/reference/interface0.js b/tests/baselines/reference/interface0.js index aecdb91e8a3..63feadfc4c7 100644 --- a/tests/baselines/reference/interface0.js +++ b/tests/baselines/reference/interface0.js @@ -7,4 +7,6 @@ var y: Generic = { x: 3 }; //// [interface0.js] -var y = { x: 3 }; +var y = { + x: 3 +}; diff --git a/tests/baselines/reference/interfaceAssignmentCompat.js b/tests/baselines/reference/interfaceAssignmentCompat.js index edaebbd38a2..7ddd22ee863 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.js +++ b/tests/baselines/reference/interfaceAssignmentCompat.js @@ -72,9 +72,15 @@ var M; function test() { var x = []; var result = ""; - x[0] = { color: Color.Brown }; - x[1] = { color: Color.Blue }; - x[2] = { color: Color.Green }; + x[0] = { + color: Color.Brown + }; + x[1] = { + color: Color.Blue + }; + x[2] = { + color: Color.Green + }; x = x.sort(CompareYeux); // parameter mismatch // type of z inferred from specialized array type var z = x.sort(CompareEyes); // ok diff --git a/tests/baselines/reference/interfaceContextualType.js b/tests/baselines/reference/interfaceContextualType.js index 2dbdb958d6b..996b8fc98d3 100644 --- a/tests/baselines/reference/interfaceContextualType.js +++ b/tests/baselines/reference/interfaceContextualType.js @@ -27,11 +27,15 @@ var Bug = (function () { } Bug.prototype.ok = function () { this.values = {}; - this.values['comments'] = { italic: true }; + this.values['comments'] = { + italic: true + }; }; Bug.prototype.shouldBeOK = function () { this.values = { - comments: { italic: true } + comments: { + italic: true + } }; }; return Bug; diff --git a/tests/baselines/reference/interfaceDeclaration2.js b/tests/baselines/reference/interfaceDeclaration2.js index 30f9df0fac7..0bd59c065e0 100644 --- a/tests/baselines/reference/interfaceDeclaration2.js +++ b/tests/baselines/reference/interfaceDeclaration2.js @@ -19,5 +19,6 @@ var I2 = (function () { } return I2; })(); -function I3() { } +function I3() { +} var I4; diff --git a/tests/baselines/reference/interfaceDeclaration4.js b/tests/baselines/reference/interfaceDeclaration4.js index 728ef7156e9..576479c2beb 100644 --- a/tests/baselines/reference/interfaceDeclaration4.js +++ b/tests/baselines/reference/interfaceDeclaration4.js @@ -69,4 +69,5 @@ var C3 = (function () { return C3; })(); I1; -{ } +{ +} diff --git a/tests/baselines/reference/interfaceExtendingClass.js b/tests/baselines/reference/interfaceExtendingClass.js index f1232d78245..39db7460915 100644 --- a/tests/baselines/reference/interfaceExtendingClass.js +++ b/tests/baselines/reference/interfaceExtendingClass.js @@ -23,7 +23,8 @@ i = f; var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { }; + Foo.prototype.y = function () { + }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendingClass2.js b/tests/baselines/reference/interfaceExtendingClass2.js index 6e6605e2459..b0958717aa8 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.js +++ b/tests/baselines/reference/interfaceExtendingClass2.js @@ -19,7 +19,8 @@ interface I2 extends Foo { // error var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { }; + Foo.prototype.y = function () { + }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index d376f2dca98..5903726c05d 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -35,7 +35,8 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { }; + Button.prototype.select = function () { + }; return Button; })(Control); var TextBox = (function (_super) { @@ -43,7 +44,8 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { }; + TextBox.prototype.select = function () { + }; return TextBox; })(Control); var Image = (function (_super) { @@ -56,6 +58,7 @@ var Image = (function (_super) { var Location = (function () { function Location() { } - Location.prototype.select = function () { }; + Location.prototype.select = function () { + }; return Location; })(); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 521a71199ad..4cf0281ac7a 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -38,7 +38,9 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D = (function (_super) { @@ -46,9 +48,14 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { return x; }; - D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { }; + D.prototype.foo = function (x) { + return x; + }; + D.prototype.other = function (x) { + return x; + }; + D.prototype.bar = function () { + }; return D; })(C); var c; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index c177f2e7a90..5805302d7d7 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -34,7 +34,9 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D = (function (_super) { @@ -44,9 +46,14 @@ var D = (function (_super) { this.x = 2; this.y = 3; } - D.prototype.foo = function (x) { return x; }; - D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { }; + D.prototype.foo = function (x) { + return x; + }; + D.prototype.other = function (x) { + return x; + }; + D.prototype.bar = function () { + }; return D; })(C); var D2 = (function (_super) { @@ -55,8 +62,13 @@ var D2 = (function (_super) { _super.apply(this, arguments); this.x = ""; } - D2.prototype.foo = function (x) { return x; }; - D2.prototype.other = function (x) { return x; }; - D2.prototype.bar = function () { }; + D2.prototype.foo = function (x) { + return x; + }; + D2.prototype.other = function (x) { + return x; + }; + D2.prototype.bar = function () { + }; return D2; })(C); diff --git a/tests/baselines/reference/interfaceImplementation1.js b/tests/baselines/reference/interfaceImplementation1.js index 8f02596682d..ce82a24f63d 100644 --- a/tests/baselines/reference/interfaceImplementation1.js +++ b/tests/baselines/reference/interfaceImplementation1.js @@ -50,7 +50,8 @@ c["foo"]; var C1 = (function () { function C1() { } - C1.prototype.iFn = function (n, s) { }; + C1.prototype.iFn = function (n, s) { + }; return C1; })(); var C2 = (function () { diff --git a/tests/baselines/reference/interfaceImplementation3.js b/tests/baselines/reference/interfaceImplementation3.js index da85de545cd..626c92e83d1 100644 --- a/tests/baselines/reference/interfaceImplementation3.js +++ b/tests/baselines/reference/interfaceImplementation3.js @@ -19,6 +19,7 @@ class C4 implements I1 { var C4 = (function () { function C4() { } - C4.prototype.iFn = function () { }; + C4.prototype.iFn = function () { + }; return C4; })(); diff --git a/tests/baselines/reference/interfaceImplementation4.js b/tests/baselines/reference/interfaceImplementation4.js index 4a093381b5d..94565d1b22f 100644 --- a/tests/baselines/reference/interfaceImplementation4.js +++ b/tests/baselines/reference/interfaceImplementation4.js @@ -17,6 +17,7 @@ class C5 implements I1 { var C5 = (function () { function C5() { } - C5.prototype.iFn = function () { }; + C5.prototype.iFn = function () { + }; return C5; })(); diff --git a/tests/baselines/reference/interfaceImplementation5.js b/tests/baselines/reference/interfaceImplementation5.js index c710eda84f5..667c5f045ec 100644 --- a/tests/baselines/reference/interfaceImplementation5.js +++ b/tests/baselines/reference/interfaceImplementation5.js @@ -36,7 +36,9 @@ var C1 = (function () { function C1() { } Object.defineProperty(C1.prototype, "getset1", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -46,7 +48,8 @@ var C2 = (function () { function C2() { } Object.defineProperty(C2.prototype, "getset1", { - set: function (baz) { }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -56,8 +59,11 @@ var C3 = (function () { function C3() { } Object.defineProperty(C3.prototype, "getset1", { - get: function () { return 1; }, - set: function (baz) { }, + get: function () { + return 1; + }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -67,7 +73,10 @@ var C4 = (function () { function C4() { } Object.defineProperty(C4.prototype, "getset1", { - get: function () { var x; return x; }, + get: function () { + var x; + return x; + }, enumerable: true, configurable: true }); @@ -77,7 +86,8 @@ var C5 = (function () { function C5() { } Object.defineProperty(C5.prototype, "getset1", { - set: function (baz) { }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -87,8 +97,12 @@ var C6 = (function () { function C6() { } Object.defineProperty(C6.prototype, "getset1", { - get: function () { var x; return x; }, - set: function (baz) { }, + get: function () { + var x; + return x; + }, + set: function (baz) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/interfaceImplementation6.js b/tests/baselines/reference/interfaceImplementation6.js index 4feb6804db3..c9bd9113e7e 100644 --- a/tests/baselines/reference/interfaceImplementation6.js +++ b/tests/baselines/reference/interfaceImplementation6.js @@ -44,7 +44,9 @@ define(["require", "exports"], function (require, exports) { })(); var Test = (function () { function Test() { - this.pt = { item: 1 }; + this.pt = { + item: 1 + }; } return Test; })(); diff --git a/tests/baselines/reference/interfaceImplementation7.js b/tests/baselines/reference/interfaceImplementation7.js index 2813d7ee0fe..6345fe93a33 100644 --- a/tests/baselines/reference/interfaceImplementation7.js +++ b/tests/baselines/reference/interfaceImplementation7.js @@ -14,6 +14,8 @@ class C1 implements i4 { var C1 = (function () { function C1() { } - C1.prototype.name = function () { return ""; }; + C1.prototype.name = function () { + return ""; + }; return C1; })(); diff --git a/tests/baselines/reference/interfaceNaming1.js b/tests/baselines/reference/interfaceNaming1.js index 2abd2106b2f..e16f186379b 100644 --- a/tests/baselines/reference/interfaceNaming1.js +++ b/tests/baselines/reference/interfaceNaming1.js @@ -6,5 +6,6 @@ interface & { } //// [interfaceNaming1.js] interface; -{ } +{ +} interface & {}; diff --git a/tests/baselines/reference/interfaceSubtyping.js b/tests/baselines/reference/interfaceSubtyping.js index 43004985782..840ce79d869 100644 --- a/tests/baselines/reference/interfaceSubtyping.js +++ b/tests/baselines/reference/interfaceSubtyping.js @@ -14,6 +14,8 @@ var Camera = (function () { function Camera(str) { this.str = str; } - Camera.prototype.foo = function () { return "s"; }; + Camera.prototype.foo = function () { + return "s"; + }; return Camera; })(); diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js index 90c0d257d61..e10b83297bc 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js @@ -48,7 +48,8 @@ var C = (function () { } return C; })(); -function f1() { } +function f1() { +} var M; (function (M) { M.y = 1; @@ -63,10 +64,16 @@ var a = { c: true, d: {}, e: null, - f: [1], + f: [ + 1 + ], g: {}, - h: function (x) { return 1; }, - i: function (x) { return x; }, + h: function (x) { + return 1; + }, + i: function (x) { + return x; + }, j: null, k: new C(), l: f1, diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js index d53ec04c183..01907f410e3 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js @@ -19,12 +19,14 @@ interface Foo2 extends Base2 { // error var Base = (function () { function Base() { } - Base.prototype.x = function () { }; + Base.prototype.x = function () { + }; return Base; })(); var Base2 = (function () { function Base2() { } - Base2.prototype.x = function () { }; + Base2.prototype.x = function () { + }; return Base2; })(); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt index 9b5bf66844d..7bd34f1d5d3 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts(11,8): error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. +tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts(11,10): error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. ==== tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== @@ -13,5 +13,5 @@ tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessE } var x: c.b; - ~~~ + ~ !!! error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 33bb8f16331..865929890c0 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts(16,15): error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. +tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts(16,17): error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. ==== tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== @@ -18,5 +18,5 @@ tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExp export var z: c.b.I; - ~~~~~ + ~ !!! error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.js b/tests/baselines/reference/invalidDoWhileBreakStatements.js index 807d58a8fea..e6617ef98cd 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.js +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.js @@ -60,7 +60,8 @@ THREE: do { // break forward do { break FIVE; - FIVE: do { } while (true); + FIVE: do { + } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.js b/tests/baselines/reference/invalidDoWhileContinueStatements.js index 21a10a3451b..d32ccfe0074 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.js +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.js @@ -60,7 +60,8 @@ THREE: do { // continue forward do { continue FIVE; - FIVE: do { } while (true); + FIVE: do { + } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForBreakStatements.js b/tests/baselines/reference/invalidForBreakStatements.js index 5e3430ecb41..abcd078ff2d 100644 --- a/tests/baselines/reference/invalidForBreakStatements.js +++ b/tests/baselines/reference/invalidForBreakStatements.js @@ -58,7 +58,8 @@ THREE: for (;;) { // break forward for (;;) { break FIVE; - FIVE: for (;;) { } + FIVE: for (;;) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForContinueStatements.js b/tests/baselines/reference/invalidForContinueStatements.js index 2db1ce69ede..af0eba2a59a 100644 --- a/tests/baselines/reference/invalidForContinueStatements.js +++ b/tests/baselines/reference/invalidForContinueStatements.js @@ -58,7 +58,8 @@ THREE: for (;;) { // continue forward for (;;) { continue FIVE; - FIVE: for (;;) { } + FIVE: for (;;) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInBreakStatements.js b/tests/baselines/reference/invalidForInBreakStatements.js index 1784b9a57a6..bf383613c3b 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.js +++ b/tests/baselines/reference/invalidForInBreakStatements.js @@ -59,7 +59,8 @@ THREE: for (var x in {}) { // break forward for (var x in {}) { break FIVE; - FIVE: for (var x in {}) { } + FIVE: for (var x in {}) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInContinueStatements.js b/tests/baselines/reference/invalidForInContinueStatements.js index 94020d00f2b..d40dbd80ca0 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.js +++ b/tests/baselines/reference/invalidForInContinueStatements.js @@ -59,7 +59,8 @@ THREE: for (var x in {}) { // continue forward for (var x in {}) { continue FIVE; - FIVE: for (var x in {}) { } + FIVE: for (var x in {}) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt index ea582635856..7794fb027d7 100644 --- a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt +++ b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(5,1): error TS2304: Cannot find name 'V'. -tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(11,1): error TS2304: Cannot find name 'C'. -tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(17,1): error TS2304: Cannot find name 'E'. -tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(23,1): error TS2304: Cannot find name 'I'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(5,12): error TS2304: Cannot find name 'V'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(11,12): error TS2304: Cannot find name 'C'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(17,12): error TS2304: Cannot find name 'E'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(23,12): error TS2304: Cannot find name 'I'. ==== tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts (4 errors) ==== @@ -10,7 +10,7 @@ tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIde var V = 12; import v = V; - ~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'V'. class C { @@ -18,7 +18,7 @@ tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIde } import c = C; - ~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'C'. enum E { @@ -26,7 +26,7 @@ tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIde } import e = E; - ~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'E'. interface I { @@ -34,6 +34,6 @@ tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIde } import i = I; - ~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidInstantiatedModule.errors.txt b/tests/baselines/reference/invalidInstantiatedModule.errors.txt index 5a8ac069803..8bd7e6492c0 100644 --- a/tests/baselines/reference/invalidInstantiatedModule.errors.txt +++ b/tests/baselines/reference/invalidInstantiatedModule.errors.txt @@ -20,7 +20,7 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedMo var m = M2; var p: m.Point; // Error - ~~~~~~~ + ~ !!! error TS2304: Cannot find name 'm'. diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.js b/tests/baselines/reference/invalidModuleWithVarStatements.js index caa6b24f00f..4014709d361 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.js +++ b/tests/baselines/reference/invalidModuleWithVarStatements.js @@ -35,7 +35,8 @@ var Y; })(Y || (Y = {})); var Y2; (function (Y2) { - function fn(x) { } + function fn(x) { + } })(Y2 || (Y2 = {})); var Y4; (function (Y4) { @@ -43,7 +44,8 @@ var Y4; })(Y4 || (Y4 = {})); var YY; (function (YY) { - function fn(x) { } + function fn(x) { + } })(YY || (YY = {})); var YY2; (function (YY2) { @@ -51,5 +53,6 @@ var YY2; })(YY2 || (YY2 = {})); var YY3; (function (YY3) { - function fn(x) { } + function fn(x) { + } })(YY3 || (YY3 = {})); diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 824bee92227..62ea392be28 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -77,7 +77,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -86,7 +88,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); // all of these are errors @@ -100,11 +104,24 @@ var b; var b = new C(); var b = new C2(); var f = F; -var f = function (x) { return ''; }; +var f = function (x) { + return ''; +}; var arr; -var arr = [1, 2, 3, 4]; -var arr = [new C(), new C2(), new D()]; -var arr2 = [new D()]; +var arr = [ + 1, + 2, + 3, + 4 +]; +var arr = [ + new C(), + new C2(), + new D() +]; +var arr2 = [ + new D() +]; var arr2 = new Array(); var m; var m = M.A; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index d637158780a..df6f6da6753 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -28,15 +28,21 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // all the following should be error -function fn1() { } -function fn2() { } -function fn3() { } -function fn4() { } -function fn7() { } // should be valid: any includes void +function fn1() { +} +function fn2() { +} +function fn3() { +} +function fn4() { +} +function fn7() { +} // should be valid: any includes void var C = (function () { function C() { } - C.prototype.dispose = function () { }; + C.prototype.dispose = function () { + }; return C; })(); var D = (function (_super) { @@ -46,5 +52,11 @@ var D = (function (_super) { } return D; })(C); -function fn10() { return { id: 12 }; } -function fn11() { return new C(); } +function fn10() { + return { + id: 12 + }; +} +function fn11() { + return new C(); +} diff --git a/tests/baselines/reference/invalidStaticField.js b/tests/baselines/reference/invalidStaticField.js index 620c019fc18..5521af05c83 100644 --- a/tests/baselines/reference/invalidStaticField.js +++ b/tests/baselines/reference/invalidStaticField.js @@ -6,7 +6,9 @@ class B { static NOT_NULL = new B(); } var A = (function () { function A() { } - A.prototype.foo = function () { return B.NULL; }; + A.prototype.foo = function () { + return B.NULL; + }; return A; })(); var B = (function () { diff --git a/tests/baselines/reference/invalidTryStatements.js b/tests/baselines/reference/invalidTryStatements.js index 343ad6e0584..8afadf41b4d 100644 --- a/tests/baselines/reference/invalidTryStatements.js +++ b/tests/baselines/reference/invalidTryStatements.js @@ -21,10 +21,16 @@ function fn() { var x; // ensure x is 'Any' } // no type annotation allowed - try { } - catch (z) { } - try { } - catch (a) { } - try { } - catch (y) { } + try { + } + catch (z) { + } + try { + } + catch (a) { + } + try { + } + catch (y) { + } } diff --git a/tests/baselines/reference/invalidTryStatements2.js b/tests/baselines/reference/invalidTryStatements2.js index 1b2976dc4e7..d2ef92ac831 100644 --- a/tests/baselines/reference/invalidTryStatements2.js +++ b/tests/baselines/reference/invalidTryStatements2.js @@ -36,16 +36,20 @@ function fn() { } try { } - catch (x) { } // error missing try - finally { } // potential error; can be absorbed by the 'catch' + catch (x) { + } // error missing try + finally { + } // potential error; can be absorbed by the 'catch' } function fn2() { try { } - finally { } // error missing try + finally { + } // error missing try try { } // error missing try - catch (x) { } // error missing try + catch (x) { + } // error missing try // no error try { } diff --git a/tests/baselines/reference/invalidTypeOfTarget.js b/tests/baselines/reference/invalidTypeOfTarget.js index 52b39f3c76a..88128d15e85 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.js +++ b/tests/baselines/reference/invalidTypeOfTarget.js @@ -15,5 +15,6 @@ var x3 = 1; var x4 = ''; var x5; var x6 = null; -var x7 = function f() { }; +var x7 = function f() { +}; var x8 = /123/; diff --git a/tests/baselines/reference/invalidUndefinedAssignments.js b/tests/baselines/reference/invalidUndefinedAssignments.js index dc846900ebb..7617e5eae8e 100644 --- a/tests/baselines/reference/invalidUndefinedAssignments.js +++ b/tests/baselines/reference/invalidUndefinedAssignments.js @@ -44,6 +44,7 @@ var M; M.x = 1; })(M || (M = {})); M = x; -function i(a) { } +function i(a) { +} // BUG 767030 i = x; diff --git a/tests/baselines/reference/invalidUndefinedValues.js b/tests/baselines/reference/invalidUndefinedValues.js index a0ed1b4f98a..9361f43bbae 100644 --- a/tests/baselines/reference/invalidUndefinedValues.js +++ b/tests/baselines/reference/invalidUndefinedValues.js @@ -54,7 +54,10 @@ var M; M.x = 1; })(M || (M = {})); x = M; -x = { f: function () { } }; +x = { + f: function () { + } +}; function f(a) { x = a; } diff --git a/tests/baselines/reference/invalidVoidAssignments.js b/tests/baselines/reference/invalidVoidAssignments.js index 1ce03d1382a..b821b0ca796 100644 --- a/tests/baselines/reference/invalidVoidAssignments.js +++ b/tests/baselines/reference/invalidVoidAssignments.js @@ -59,4 +59,7 @@ var E; })(E || (E = {})); x = E; x = E.A; -x = { f: function () { } }; +x = { + f: function () { + } +}; diff --git a/tests/baselines/reference/invalidVoidValues.js b/tests/baselines/reference/invalidVoidValues.js index 409df03ef37..13f2d681f26 100644 --- a/tests/baselines/reference/invalidVoidValues.js +++ b/tests/baselines/reference/invalidVoidValues.js @@ -46,7 +46,10 @@ var a; x = a; var b; x = b; -x = { f: function () { } }; +x = { + f: function () { + } +}; var M; (function (M) { M.x = 1; diff --git a/tests/baselines/reference/invalidWhileBreakStatements.js b/tests/baselines/reference/invalidWhileBreakStatements.js index 7f10a08d65c..a8e261f036c 100644 --- a/tests/baselines/reference/invalidWhileBreakStatements.js +++ b/tests/baselines/reference/invalidWhileBreakStatements.js @@ -59,7 +59,8 @@ THREE: while (true) { // break forward while (true) { break FIVE; - FIVE: while (true) { } + FIVE: while (true) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidWhileContinueStatements.js b/tests/baselines/reference/invalidWhileContinueStatements.js index b8234bf9604..544314bf68d 100644 --- a/tests/baselines/reference/invalidWhileContinueStatements.js +++ b/tests/baselines/reference/invalidWhileContinueStatements.js @@ -59,7 +59,8 @@ THREE: while (true) { // continue forward while (true) { continue FIVE; - FIVE: while (true) { } + FIVE: while (true) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/ipromise4.js b/tests/baselines/reference/ipromise4.js index 98660aa5824..5b65e0818c2 100644 --- a/tests/baselines/reference/ipromise4.js +++ b/tests/baselines/reference/ipromise4.js @@ -18,5 +18,10 @@ p.then(function (x) { return "hello"; } ).then(function (x) { return x } ); // s //// [ipromise4.js] var p = null; -p.then(function (x) { }); // should not error -p.then(function (x) { return "hello"; }).then(function (x) { return x; }); // should not error +p.then(function (x) { +}); // should not error +p.then(function (x) { + return "hello"; +}).then(function (x) { + return x; +}); // should not error diff --git a/tests/baselines/reference/iterableContextualTyping1.js b/tests/baselines/reference/iterableContextualTyping1.js index 8621bbd8417..12943b46894 100644 --- a/tests/baselines/reference/iterableContextualTyping1.js +++ b/tests/baselines/reference/iterableContextualTyping1.js @@ -2,4 +2,6 @@ var iter: Iterable<(x: string) => number> = [s => s.length]; //// [iterableContextualTyping1.js] -var iter = [s => s.length]; +var iter = [ + s => s.length +]; diff --git a/tests/baselines/reference/keywordField.js b/tests/baselines/reference/keywordField.js index 581d5afa14a..b6b54de2067 100644 --- a/tests/baselines/reference/keywordField.js +++ b/tests/baselines/reference/keywordField.js @@ -13,6 +13,8 @@ var q = a["if"]; //// [keywordField.js] var obj = {}; obj.if = 1; -var a = { if: "test" }; +var a = { + if: "test" +}; var n = a.if; var q = a["if"]; diff --git a/tests/baselines/reference/lambdaExpression.js b/tests/baselines/reference/lambdaExpression.js index dc5c94c8b33..ece70d217f1 100644 --- a/tests/baselines/reference/lambdaExpression.js +++ b/tests/baselines/reference/lambdaExpression.js @@ -6,7 +6,11 @@ var x = 0; //// [lambdaExpression.js] -(function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) +(function () { + return 0; +}); // Needs to be wrapped in parens to be a valid expression (not declaration) var y = 0; -(function () { return 0; }); +(function () { + return 0; +}); var x = 0; diff --git a/tests/baselines/reference/lambdaParamTypes.js b/tests/baselines/reference/lambdaParamTypes.js index 3bd212512e4..bc2858e9b49 100644 --- a/tests/baselines/reference/lambdaParamTypes.js +++ b/tests/baselines/reference/lambdaParamTypes.js @@ -24,16 +24,45 @@ thing.doSomething((x, y) => y.name.toExponential(0)); //// [lambdaParamTypes.js] -var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); +var thing = create([ + { + name: "bob", + id: 24 + }, + { + name: "doug", + id: 32 + } +]); // Below should all be OK -thing.doSomething(function (x, y) { return x.name.charAt(0); }); // x.name should be string, so should be OK -thing.doSomething(function (x, y) { return x.id.toExponential(0); }); // x.id should be string, so should be OK -thing.doSomething(function (x, y) { return y.name.charAt(0); }); // x.name should be string, so should be OK -thing.doSomething(function (x, y) { return y.id.toExponential(0); }); // x.id should be string, so should be OK +thing.doSomething(function (x, y) { + return x.name.charAt(0); +}); // x.name should be string, so should be OK +thing.doSomething(function (x, y) { + return x.id.toExponential(0); +}); // x.id should be string, so should be OK +thing.doSomething(function (x, y) { + return y.name.charAt(0); +}); // x.name should be string, so should be OK +thing.doSomething(function (x, y) { + return y.id.toExponential(0); +}); // x.id should be string, so should be OK // Below should all be in error -thing.doSomething(function (x, y) { return x.foo; }); // no such property on x -thing.doSomething(function (x, y) { return y.foo; }); // no such property on y -thing.doSomething(function (x, y) { return x.id.charAt(0); }); // x.id should be number, no charAt member -thing.doSomething(function (x, y) { return x.name.toExponential(0); }); // x.name should be string, no toExponential member -thing.doSomething(function (x, y) { return y.id.charAt(0); }); -thing.doSomething(function (x, y) { return y.name.toExponential(0); }); +thing.doSomething(function (x, y) { + return x.foo; +}); // no such property on x +thing.doSomething(function (x, y) { + return y.foo; +}); // no such property on y +thing.doSomething(function (x, y) { + return x.id.charAt(0); +}); // x.id should be number, no charAt member +thing.doSomething(function (x, y) { + return x.name.toExponential(0); +}); // x.name should be string, no toExponential member +thing.doSomething(function (x, y) { + return y.id.charAt(0); +}); +thing.doSomething(function (x, y) { + return y.name.toExponential(0); +}); diff --git a/tests/baselines/reference/lambdaPropSelf.js b/tests/baselines/reference/lambdaPropSelf.js index 8d1b16e1431..5211dcc47ca 100644 --- a/tests/baselines/reference/lambdaPropSelf.js +++ b/tests/baselines/reference/lambdaPropSelf.js @@ -28,7 +28,9 @@ var Person = (function () { function Person(name, children) { var _this = this; this.name = name; - this.addChild = function () { return _this.children.push("New child"); }; + this.addChild = function () { + return _this.children.push("New child"); + }; this.children = ko.observableArray(children); } return Person; diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.js b/tests/baselines/reference/lastPropertyInLiteralWins.js index 999fe45841b..19ec4e21000 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.js +++ b/tests/baselines/reference/lastPropertyInLiteralWins.js @@ -21,10 +21,14 @@ function test(thing) { thing.thunk("str"); } test({ - thunk: function (str) { }, - thunk: function (num) { } + thunk: function (str) { + }, + thunk: function (num) { + } }); test({ - thunk: function (num) { }, - thunk: function (str) { } + thunk: function (num) { + }, + thunk: function (str) { + } }); diff --git a/tests/baselines/reference/letAndVarRedeclaration.js b/tests/baselines/reference/letAndVarRedeclaration.js index fd4bfe67cac..35222660b64 100644 --- a/tests/baselines/reference/letAndVarRedeclaration.js +++ b/tests/baselines/reference/letAndVarRedeclaration.js @@ -55,11 +55,13 @@ module M2 { //// [letAndVarRedeclaration.js] let e0; var e0; -function e0() { } +function e0() { +} function f0() { let x1; var x1; - function x1() { } + function x1() { + } } function f1() { let x; @@ -67,14 +69,16 @@ function f1() { var x; } { - function x() { } + function x() { + } } } var M0; (function (M0) { let x2; var x2; - function x2() { } + function x2() { + } })(M0 || (M0 = {})); var M1; (function (M1) { @@ -83,7 +87,8 @@ var M1; var x2; } { - function x2() { } + function x2() { + } } })(M1 || (M1 = {})); let x11; diff --git a/tests/baselines/reference/letConstInCaseClauses.errors.txt b/tests/baselines/reference/letConstInCaseClauses.errors.txt new file mode 100644 index 00000000000..af0777d56a4 --- /dev/null +++ b/tests/baselines/reference/letConstInCaseClauses.errors.txt @@ -0,0 +1,39 @@ +tests/cases/compiler/letConstInCaseClauses.ts(7,5): error TS2304: Cannot find name 'console'. +tests/cases/compiler/letConstInCaseClauses.ts(21,5): error TS2304: Cannot find name 'console'. + + +==== tests/cases/compiler/letConstInCaseClauses.ts (2 errors) ==== + + var x = 10; + var y = 20; + { + let x = 1; + let y = 2; + console.log(x) + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. + switch (x) { + case 10: + let x = 20; + } + switch (y) { + case 10: + let y = 20; + } + } + + { + const x = 1; + const y = 2; + console.log(x) + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. + switch (x) { + case 10: + const x = 20; + } + switch (y) { + case 10: + const y = 20; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/letConstInCaseClauses.js b/tests/baselines/reference/letConstInCaseClauses.js new file mode 100644 index 00000000000..94840a11a2c --- /dev/null +++ b/tests/baselines/reference/letConstInCaseClauses.js @@ -0,0 +1,61 @@ +//// [letConstInCaseClauses.ts] + +var x = 10; +var y = 20; +{ + let x = 1; + let y = 2; + console.log(x) + switch (x) { + case 10: + let x = 20; + } + switch (y) { + case 10: + let y = 20; + } +} + +{ + const x = 1; + const y = 2; + console.log(x) + switch (x) { + case 10: + const x = 20; + } + switch (y) { + case 10: + const y = 20; + } +} + +//// [letConstInCaseClauses.js] +var x = 10; +var y = 20; +{ + var _x = 1; + var _y = 2; + console.log(_x); + switch (_x) { + case 10: + var _x_1 = 20; + } + switch (_y) { + case 10: + var _y_1 = 20; + } +} +{ + var _x_2 = 1; + var _y_2 = 2; + console.log(_x_2); + switch (_x_2) { + case 10: + var _x_3 = 20; + } + switch (_y_2) { + case 10: + var _y_3 = 20; + } +} diff --git a/tests/baselines/reference/letConstMatchingParameterNames.js b/tests/baselines/reference/letConstMatchingParameterNames.js new file mode 100644 index 00000000000..a11405b9f83 --- /dev/null +++ b/tests/baselines/reference/letConstMatchingParameterNames.js @@ -0,0 +1,28 @@ +//// [letConstMatchingParameterNames.ts] +let parent = true; +const parent2 = true; +declare function use(a: any); + +function a() { + + let parent = 1; + const parent2 = 2; + + function b(parent: string, parent2: number) { + use(parent); + use(parent2); + } +} + + +//// [letConstMatchingParameterNames.js] +var parent = true; +var parent2 = true; +function a() { + var _parent = 1; + var _parent2 = 2; + function b(parent, parent2) { + use(parent); + use(parent2); + } +} diff --git a/tests/baselines/reference/letConstMatchingParameterNames.types b/tests/baselines/reference/letConstMatchingParameterNames.types new file mode 100644 index 00000000000..66fccc637df --- /dev/null +++ b/tests/baselines/reference/letConstMatchingParameterNames.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/letConstMatchingParameterNames.ts === +let parent = true; +>parent : boolean + +const parent2 = true; +>parent2 : boolean + +declare function use(a: any); +>use : (a: any) => any +>a : any + +function a() { +>a : () => void + + let parent = 1; +>parent : number + + const parent2 = 2; +>parent2 : number + + function b(parent: string, parent2: number) { +>b : (parent: string, parent2: number) => void +>parent : string +>parent2 : number + + use(parent); +>use(parent) : any +>use : (a: any) => any +>parent : string + + use(parent2); +>use(parent2) : any +>use : (a: any) => any +>parent2 : number + } +} + diff --git a/tests/baselines/reference/letDeclarations-access.js b/tests/baselines/reference/letDeclarations-access.js index 6ae289d220f..404c2876310 100644 --- a/tests/baselines/reference/letDeclarations-access.js +++ b/tests/baselines/reference/letDeclarations-access.js @@ -58,9 +58,11 @@ x--; ++x; --x; var a = x + 1; -function f(v) { } +function f(v) { +} f(x); -if (x) { } +if (x) { +} x; (x); -x; diff --git a/tests/baselines/reference/letDeclarations-es5.js b/tests/baselines/reference/letDeclarations-es5.js index 4ad43d52f76..5246e91edfb 100644 --- a/tests/baselines/reference/letDeclarations-es5.js +++ b/tests/baselines/reference/letDeclarations-es5.js @@ -20,5 +20,7 @@ var l3, l4, l5, l6; var l7 = false; var l8 = 23; var l9 = 0, l10 = "", l11 = null; -for (var _l11 in {}) { } -for (var l12 = 0; l12 < 9; l12++) { } +for (var _l11 in {}) { +} +for (var l12 = 0; l12 < 9; l12++) { +} diff --git a/tests/baselines/reference/letDeclarations-scopes.js b/tests/baselines/reference/letDeclarations-scopes.js index fc721807994..d0489820d0b 100644 --- a/tests/baselines/reference/letDeclarations-scopes.js +++ b/tests/baselines/reference/letDeclarations-scopes.js @@ -259,30 +259,25 @@ var m; lable: let l2 = 0; })(m || (m = {})); // methods -var C = (function () { - function C() { +class C { + constructor() { let l = 0; n = l; } - C.prototype.method = function () { + method() { let l = 0; n = l; - }; - Object.defineProperty(C.prototype, "v", { - get: function () { - let l = 0; - n = l; - return n; - }, - set: function (value) { - let l = 0; - n = l; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + } + get v() { + let l = 0; + n = l; + return n; + } + set v(value) { + let l = 0; + n = l; + } +} // object literals var o = { f() { diff --git a/tests/baselines/reference/letDeclarations-validContexts.js b/tests/baselines/reference/letDeclarations-validContexts.js index f6d404135f6..b11a1922383 100644 --- a/tests/baselines/reference/letDeclarations-validContexts.js +++ b/tests/baselines/reference/letDeclarations-validContexts.js @@ -221,26 +221,21 @@ var m; } })(m || (m = {})); // methods -var C = (function () { - function C() { +class C { + constructor() { let l24 = 0; } - C.prototype.method = function () { + method() { let l25 = 0; - }; - Object.defineProperty(C.prototype, "v", { - get: function () { - let l26 = 0; - return l26; - }, - set: function (value) { - let l27 = value; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + } + get v() { + let l26 = 0; + return l26; + } + set v(value) { + let l27 = value; + } +} // object literals var o = { f() { diff --git a/tests/baselines/reference/letDeclarations.js b/tests/baselines/reference/letDeclarations.js index 8acb82204e3..bc186b732f5 100644 --- a/tests/baselines/reference/letDeclarations.js +++ b/tests/baselines/reference/letDeclarations.js @@ -20,8 +20,10 @@ let l3, l4, l5, l6; let l7 = false; let l8 = 23; let l9 = 0, l10 = "", l11 = null; -for (let l11 in {}) { } -for (let l12 = 0; l12 < 9; l12++) { } +for (let l11 in {}) { +} +for (let l12 = 0; l12 < 9; l12++) { +} //// [letDeclarations.d.ts] diff --git a/tests/baselines/reference/letInLetOrConstDeclarations.js b/tests/baselines/reference/letInLetOrConstDeclarations.js index ee23abc4e4f..6560ea84911 100644 --- a/tests/baselines/reference/letInLetOrConstDeclarations.js +++ b/tests/baselines/reference/letInLetOrConstDeclarations.js @@ -14,7 +14,8 @@ //// [letInLetOrConstDeclarations.js] { let let = 1; // should error - for (let let in []) { } // should error + for (let let in []) { + } // should error } { const let = 1; // should error diff --git a/tests/baselines/reference/letInNonStrictMode.js b/tests/baselines/reference/letInNonStrictMode.js new file mode 100644 index 00000000000..af21ce3281c --- /dev/null +++ b/tests/baselines/reference/letInNonStrictMode.js @@ -0,0 +1,11 @@ +//// [letInNonStrictMode.ts] +let [x] = [1]; +let {a: y} = {a: 1}; + +//// [letInNonStrictMode.js] +var x = ([ + 1 +])[0]; +var y = ({ + a: 1 +}).a; diff --git a/tests/baselines/reference/letInNonStrictMode.types b/tests/baselines/reference/letInNonStrictMode.types new file mode 100644 index 00000000000..4f2cbe4a703 --- /dev/null +++ b/tests/baselines/reference/letInNonStrictMode.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/letInNonStrictMode.ts === +let [x] = [1]; +>x : number +>[1] : [number] + +let {a: y} = {a: 1}; +>a : unknown +>y : number +>{a: 1} : { a: number; } +>a : number + diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 33f8200530b..21c09aaeb53 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -37,7 +37,11 @@ var C = (function (_super) { var x = 10 + w; var ll = x * w; } - C.prototype.liftxyz = function () { return x + z + this.y; }; - C.prototype.liftxylocllz = function () { return x + z + this.y + this.ll; }; + C.prototype.liftxyz = function () { + return x + z + this.y; + }; + C.prototype.liftxylocllz = function () { + return x + z + this.y + this.ll; + }; return C; })(B); diff --git a/tests/baselines/reference/literals-negative.js b/tests/baselines/reference/literals-negative.js index 39fd4ea38a5..c0c9624e6f2 100644 --- a/tests/baselines/reference/literals-negative.js +++ b/tests/baselines/reference/literals-negative.js @@ -17,6 +17,8 @@ if(null === isVoid()) { } var n = (null); var s = (null); var b = (n); -function isVoid() { } +function isVoid() { +} // Expected error: Values of type null and void cannot be compared -if (null === isVoid()) { } +if (null === isVoid()) { +} diff --git a/tests/baselines/reference/localImportNameVsGlobalName.js b/tests/baselines/reference/localImportNameVsGlobalName.js index 45ecdc4745e..8ba7ec567a0 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.js +++ b/tests/baselines/reference/localImportNameVsGlobalName.js @@ -27,7 +27,8 @@ var Keyboard; var App; (function (App) { var Key = Keyboard.Key; - function foo(key) { } + function foo(key) { + } App.foo = foo; foo(Key.UP); foo(Key.DOWN); diff --git a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js index 28366739233..891faacd4a4 100644 --- a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js @@ -63,9 +63,16 @@ var ResultIsBoolean21 = !!!(ANY + ANY1); // ! operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/logicalNotOperatorWithBooleanType.js b/tests/baselines/reference/logicalNotOperatorWithBooleanType.js index 107bd9a88ec..6f16fbfa2e4 100644 --- a/tests/baselines/reference/logicalNotOperatorWithBooleanType.js +++ b/tests/baselines/reference/logicalNotOperatorWithBooleanType.js @@ -41,11 +41,15 @@ var ResultIsBoolean = !!BOOLEAN; //// [logicalNotOperatorWithBooleanType.js] // ! operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsBoolean1 = !BOOLEAN; // boolean type literal var ResultIsBoolean2 = !true; -var ResultIsBoolean3 = !{ x: true, y: false }; +var ResultIsBoolean3 = !{ + x: true, + y: false +}; // boolean type expressions var ResultIsBoolean4 = !objA.a; var ResultIsBoolean5 = !M.n; diff --git a/tests/baselines/reference/logicalNotOperatorWithNumberType.js b/tests/baselines/reference/logicalNotOperatorWithNumberType.js index 0d0601cad23..7beba45ba0b 100644 --- a/tests/baselines/reference/logicalNotOperatorWithNumberType.js +++ b/tests/baselines/reference/logicalNotOperatorWithNumberType.js @@ -48,12 +48,19 @@ var ResultIsBoolean13 = !!!(NUMBER + NUMBER); //// [logicalNotOperatorWithNumberType.js] // ! operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -66,8 +73,16 @@ var ResultIsBoolean1 = !NUMBER; var ResultIsBoolean2 = !NUMBER1; // number type literal var ResultIsBoolean3 = !1; -var ResultIsBoolean4 = !{ x: 1, y: 2 }; -var ResultIsBoolean5 = !{ x: 1, y: function (n) { return n; } }; +var ResultIsBoolean4 = !{ + x: 1, + y: 2 +}; +var ResultIsBoolean5 = !{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsBoolean6 = !objA.a; var ResultIsBoolean7 = !M.n; diff --git a/tests/baselines/reference/logicalNotOperatorWithStringType.js b/tests/baselines/reference/logicalNotOperatorWithStringType.js index 7f75814d601..571857cb6b3 100644 --- a/tests/baselines/reference/logicalNotOperatorWithStringType.js +++ b/tests/baselines/reference/logicalNotOperatorWithStringType.js @@ -47,12 +47,19 @@ var ResultIsBoolean14 = !!!(STRING + STRING); //// [logicalNotOperatorWithStringType.js] // ! operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsBoolean1 = !STRING; var ResultIsBoolean2 = !STRING1; // string type literal var ResultIsBoolean3 = !""; -var ResultIsBoolean4 = !{ x: "", y: "" }; -var ResultIsBoolean5 = !{ x: "", y: function (s) { return s; } }; +var ResultIsBoolean4 = !{ + x: "", + y: "" +}; +var ResultIsBoolean5 = !{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsBoolean6 = !objA.a; var ResultIsBoolean7 = !M.n; diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js index 64bdc871571..12e55119c35 100644 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js +++ b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js @@ -11,4 +11,10 @@ var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; // If the || expression is contextually typed, the operands are contextually typed by the // same type and the result is of the best common type of the contextual type and the two // operand types. -var r = { a: '', b: 123 } || { a: '', b: true }; +var r = { + a: '', + b: 123 +} || { + a: '', + b: true +}; diff --git a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js index 73e1c33a4e0..0731cb620a5 100644 --- a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js +++ b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js @@ -17,4 +17,6 @@ var r = a || ((a) => a.toLowerCase()); // operand types. var a; // bug 786110 -var r = a || (function (a) { return a.toLowerCase(); }); +var r = a || (function (a) { + return a.toLowerCase(); +}); diff --git a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js index e0fca87efa8..b73a3144064 100644 --- a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js +++ b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js @@ -42,6 +42,8 @@ function fn2(t, u, v) { function fn3(t, u) { var r1 = t || u; var r2 = t || u; - var r3 = t || { a: '' }; + var r3 = t || { + a: '' + }; var r4 = t || u; } diff --git a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js index 1d19359894d..13d9e0e05e8 100644 --- a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js +++ b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js @@ -5,5 +5,8 @@ foo2({ y: "foo" }, "foo"); //// [matchingOfObjectLiteralConstraints.js] -function foo2(x, z) { } -foo2({ y: "foo" }, "foo"); +function foo2(x, z) { +} +foo2({ + y: "foo" +}, "foo"); diff --git a/tests/baselines/reference/maxConstraints.js b/tests/baselines/reference/maxConstraints.js index b2098ccaf2b..4ea37d30501 100644 --- a/tests/baselines/reference/maxConstraints.js +++ b/tests/baselines/reference/maxConstraints.js @@ -9,5 +9,7 @@ var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); //// [maxConstraints.js] -var max2 = function (x, y) { return (x.compareTo(y) > 0) ? x : y; }; +var max2 = function (x, y) { + return (x.compareTo(y) > 0) ? x : y; +}; var maxResult = max2(1, 2); diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js index 584bafad6f6..dc347e95580 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js @@ -53,19 +53,27 @@ var r4 = D.bar(''); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.bar = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.bar = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; return D; })(); var c; diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js index efdd6efaffa..5eaf894f549 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js @@ -44,18 +44,26 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.bar = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.bar = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; return D; })(); diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js index 7738bf4fe4e..2726756c803 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js @@ -66,23 +66,35 @@ var r2 = d.foo(2); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.prototype.baz = function (x, y) { }; - C.bar = function (x, y) { }; - C.baz = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.prototype.baz = function (x, y) { + }; + C.bar = function (x, y) { + }; + C.baz = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.prototype.baz = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; - D.baz = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.prototype.baz = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; + D.baz = function (x, y) { + }; return D; })(); var c; diff --git a/tests/baselines/reference/mergedDeclarations1.js b/tests/baselines/reference/mergedDeclarations1.js index 641ff031ded..9dc432f94a6 100644 --- a/tests/baselines/reference/mergedDeclarations1.js +++ b/tests/baselines/reference/mergedDeclarations1.js @@ -18,7 +18,10 @@ var b = point.equals(p1, p2); //// [mergedDeclarations1.js] function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } var point; (function (point) { diff --git a/tests/baselines/reference/mergedDeclarations4.js b/tests/baselines/reference/mergedDeclarations4.js index 64fad6bd598..a3dab29ff75 100644 --- a/tests/baselines/reference/mergedDeclarations4.js +++ b/tests/baselines/reference/mergedDeclarations4.js @@ -21,7 +21,8 @@ M.f.hello; //// [mergedDeclarations4.js] var M; (function (M) { - function f() { } + function f() { + } M.f = f; f(); M.f(); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js index bb0e846d063..457bd12b8f0 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js @@ -15,7 +15,8 @@ var my; (function (data) { var foo; (function (foo) { - function buz() { } + function buz() { + } foo.buz = buz; })(foo = data.foo || (data.foo = {})); })(data = my.data || (my.data = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js index a03b418fcc9..0618346dd75 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js @@ -13,7 +13,8 @@ var my; (function (my) { var data; (function (data) { - function buz() { } + function buz() { + } data.buz = buz; })(data = my.data || (my.data = {})); })(my || (my = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js index 9efba74a27b..2463c9cae90 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js @@ -27,7 +27,8 @@ var superContain; (function (buz) { var data; (function (data) { - function foo() { } + function foo() { + } data.foo = foo; })(data = buz.data || (buz.data = {})); })(buz = my.buz || (my.buz = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index ce453264f78..2c8e0bb79e4 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -25,9 +25,11 @@ var M; (function (buz) { var plop; (function (plop) { - function doom() { } + function doom() { + } plop.doom = doom; - function M() { } + function M() { + } plop.M = M; })(plop = buz.plop || (buz.plop = {})); })(buz = _M.buz || (_M.buz = {})); @@ -38,8 +40,10 @@ var M; (function (_buz) { var plop; (function (_plop) { - function gunk() { } - function buz() { } + function gunk() { + } + function buz() { + } var fudge = (function () { function fudge() { } diff --git a/tests/baselines/reference/methodContainingLocalFunction.js b/tests/baselines/reference/methodContainingLocalFunction.js index f2f336d38b7..36487e3ad7c 100644 --- a/tests/baselines/reference/methodContainingLocalFunction.js +++ b/tests/baselines/reference/methodContainingLocalFunction.js @@ -56,7 +56,8 @@ var BugExhibition = (function () { function BugExhibition() { } BugExhibition.prototype.exhibitBug = function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; }; @@ -67,7 +68,8 @@ var BugExhibition2 = (function () { } Object.defineProperty(BugExhibition2, "exhibitBug", { get: function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; return null; @@ -81,7 +83,8 @@ var BugExhibition3 = (function () { function BugExhibition3() { } BugExhibition3.prototype.exhibitBug = function () { - function localGenericFunction(u) { } + function localGenericFunction(u) { + } var x; x = localGenericFunction; }; @@ -91,7 +94,8 @@ var C = (function () { function C() { } C.prototype.exhibit = function () { - var funcExpr = function (u) { }; + var funcExpr = function (u) { + }; var x; x = funcExpr; }; @@ -100,7 +104,8 @@ var C = (function () { var M; (function (M) { function exhibitBug() { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; } @@ -109,7 +114,8 @@ var M; var E; (function (E) { E[E["A"] = (function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; return 0; diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js index 0465ea46f55..0315f0c7a63 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js @@ -15,12 +15,44 @@ var r8 = map([1, ""], (x) => x.toString()); //// [mismatchedExplicitTypeParameterAndArgumentType.js] function map(xs, f) { var ys = []; - xs.forEach(function (x) { return ys.push(f(x)); }); + xs.forEach(function (x) { + return ys.push(f(x)); + }); return ys; } -var r0 = map([1, ""], function (x) { return x.toString(); }); -var r5 = map([1, ""], function (x) { return x.toString(); }); -var r6 = map([1, ""], function (x) { return x.toString(); }); -var r7 = map([1, ""], function (x) { return x.toString(); }); // error -var r7b = map([1, ""], function (x) { return x.toString(); }); // error -var r8 = map([1, ""], function (x) { return x.toString(); }); +var r0 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r5 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r6 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r7 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); // error +var r7b = map([ + 1, + "" +], function (x) { + return x.toString(); +}); // error +var r8 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); diff --git a/tests/baselines/reference/missingSelf.js b/tests/baselines/reference/missingSelf.js index 56dcc4f9fa0..a0400aa4b2e 100644 --- a/tests/baselines/reference/missingSelf.js +++ b/tests/baselines/reference/missingSelf.js @@ -22,8 +22,11 @@ c2.b(); var CalcButton = (function () { function CalcButton() { } - CalcButton.prototype.a = function () { this.onClick(); }; - CalcButton.prototype.onClick = function () { }; + CalcButton.prototype.a = function () { + this.onClick(); + }; + CalcButton.prototype.onClick = function () { + }; return CalcButton; })(); var CalcButton2 = (function () { @@ -31,9 +34,12 @@ var CalcButton2 = (function () { } CalcButton2.prototype.b = function () { var _this = this; - (function () { return _this.onClick(); }); + (function () { + return _this.onClick(); + }); + }; + CalcButton2.prototype.onClick = function () { }; - CalcButton2.prototype.onClick = function () { }; return CalcButton2; })(); var c = new CalcButton(); diff --git a/tests/baselines/reference/missingTypeArguments2.js b/tests/baselines/reference/missingTypeArguments2.js index bc5c1d88f46..fe4b7c7dd79 100644 --- a/tests/baselines/reference/missingTypeArguments2.js +++ b/tests/baselines/reference/missingTypeArguments2.js @@ -13,6 +13,9 @@ var A = (function () { return A; })(); var x; -(function (a) { }); +(function (a) { +}); var y; -(function () { return null; }); +(function () { + return null; +}); diff --git a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js index db1bc28a144..3105c923304 100644 --- a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js +++ b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js @@ -45,11 +45,13 @@ module E { //// [mixingFunctionAndAmbientModule1.js] var A; (function (A) { - function My(s) { } + function My(s) { + } })(A || (A = {})); var B; (function (B) { - function My(s) { } + function My(s) { + } })(B || (B = {})); var C; (function (C) { diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js index 22367461c2c..59495280771 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js @@ -39,31 +39,37 @@ class C5 { var C1 = (function () { function C1() { } - C1.foo1 = function (a) { }; + C1.foo1 = function (a) { + }; return C1; })(); var C2 = (function () { function C2() { } - C2.prototype.foo2 = function (a) { }; + C2.prototype.foo2 = function (a) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo3 = function (a) { }; + C3.prototype.foo3 = function (a) { + }; return C3; })(); var C4 = (function () { function C4() { } - C4.foo4 = function (a) { }; + C4.foo4 = function (a) { + }; return C4; })(); var C5 = (function () { function C5() { } - C5.prototype.foo5 = function (a) { }; - C5.foo5 = function (a) { }; + C5.prototype.foo5 = function (a) { + }; + C5.foo5 = function (a) { + }; return C5; })(); diff --git a/tests/baselines/reference/modFunctionCrash.js b/tests/baselines/reference/modFunctionCrash.js index 0d4f62eae63..f216788c0eb 100644 --- a/tests/baselines/reference/modFunctionCrash.js +++ b/tests/baselines/reference/modFunctionCrash.js @@ -7,4 +7,6 @@ declare module Q { Q.f(function() {this;}); //// [modFunctionCrash.js] -Q.f(function () { this; }); +Q.f(function () { + this; +}); diff --git a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt index 3e52f51445d..702beffa290 100644 --- a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt +++ b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,9): error TS2305: Module 'M' has no exported member 'B'. +tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,11): error TS2305: Module 'M' has no exported member 'B'. ==== tests/cases/compiler/moduleClassArrayCodeGenTest.ts (1 errors) ==== @@ -12,5 +12,5 @@ tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,9): error TS2305: Module var t: M.A[] = []; var t2: M.B[] = []; - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index afc1ce23e37..6f56f44c684 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -24,14 +24,17 @@ var v = E2.B; //// [moduleCodeGenTest5.js] exports.x = 0; var y = 0; -function f1() { } +function f1() { +} exports.f1 = f1; -function f2() { } +function f2() { +} var C1 = (function () { function C1() { this.p1 = 0; } - C1.prototype.p2 = function () { }; + C1.prototype.p2 = function () { + }; return C1; })(); exports.C1 = C1; @@ -39,7 +42,8 @@ var C2 = (function () { function C2() { this.p1 = 0; } - C2.prototype.p2 = function () { }; + C2.prototype.p2 = function () { + }; return C2; })(); (function (E1) { diff --git a/tests/baselines/reference/moduleImport.errors.txt b/tests/baselines/reference/moduleImport.errors.txt index 95163ef119f..7b18c80ba24 100644 --- a/tests/baselines/reference/moduleImport.errors.txt +++ b/tests/baselines/reference/moduleImport.errors.txt @@ -1,11 +1,14 @@ -tests/cases/compiler/moduleImport.ts(2,2): error TS2305: Module 'X' has no exported member 'Y'. +tests/cases/compiler/moduleImport.ts(2,17): error TS2305: Module 'X' has no exported member 'Y'. +tests/cases/compiler/moduleImport.ts(2,17): error TS2339: Property 'Y' does not exist on type 'typeof X'. -==== tests/cases/compiler/moduleImport.ts (1 errors) ==== +==== tests/cases/compiler/moduleImport.ts (2 errors) ==== module A.B.C { import XYZ = X.Y.Z; - ~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2305: Module 'X' has no exported member 'Y'. + ~ +!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. export function ping(x: number) { if (x>0) XYZ.pong (x-1); } diff --git a/tests/baselines/reference/moduleInTypePosition1.js b/tests/baselines/reference/moduleInTypePosition1.js index 972bbae63d1..92fcd5b16e2 100644 --- a/tests/baselines/reference/moduleInTypePosition1.js +++ b/tests/baselines/reference/moduleInTypePosition1.js @@ -19,4 +19,5 @@ var Promise = (function () { })(); exports.Promise = Promise; //// [moduleInTypePosition1_1.js] -var x = function (w1) { }; +var x = function (w1) { +}; diff --git a/tests/baselines/reference/moduleKeywordRepeatError.js b/tests/baselines/reference/moduleKeywordRepeatError.js index 385bce001a2..8ec656f22ae 100644 --- a/tests/baselines/reference/moduleKeywordRepeatError.js +++ b/tests/baselines/reference/moduleKeywordRepeatError.js @@ -6,4 +6,5 @@ module.module { } //// [moduleKeywordRepeatError.js] // "module.module { }" should raise a syntax error module.module; -{ } +{ +} diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js index 1467ec18b91..63ccf613a77 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js @@ -102,7 +102,8 @@ var TypeScript; (function (TypeScript) { var Syntax; (function (Syntax) { - function childIndex() { } + function childIndex() { + } Syntax.childIndex = childIndex; var VariableWidthTokenWithTrailingTrivia = (function () { function VariableWidthTokenWithTrailingTrivia() { diff --git a/tests/baselines/reference/moduleNewExportBug.errors.txt b/tests/baselines/reference/moduleNewExportBug.errors.txt index 829fe83ae7b..779d51e4699 100644 --- a/tests/baselines/reference/moduleNewExportBug.errors.txt +++ b/tests/baselines/reference/moduleNewExportBug.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/moduleNewExportBug.ts(10,9): error TS2305: Module 'mod1' has no exported member 'C'. +tests/cases/compiler/moduleNewExportBug.ts(10,14): error TS2305: Module 'mod1' has no exported member 'C'. ==== tests/cases/compiler/moduleNewExportBug.ts (1 errors) ==== @@ -12,7 +12,7 @@ tests/cases/compiler/moduleNewExportBug.ts(10,9): error TS2305: Module 'mod1' ha } var c : mod1.C; // ERROR: C should not be visible - ~~~~~~ + ~ !!! error TS2305: Module 'mod1' has no exported member 'C'. diff --git a/tests/baselines/reference/moduleNewExportBug.js b/tests/baselines/reference/moduleNewExportBug.js index ce40915b2f6..51e1bb24144 100644 --- a/tests/baselines/reference/moduleNewExportBug.js +++ b/tests/baselines/reference/moduleNewExportBug.js @@ -19,7 +19,8 @@ var mod1; var C = (function () { function C() { } - C.prototype.moo = function () { }; + C.prototype.moo = function () { + }; return C; })(); })(mod1 || (mod1 = {})); diff --git a/tests/baselines/reference/moduleReopenedTypeOtherBlock.js b/tests/baselines/reference/moduleReopenedTypeOtherBlock.js index 951c558ddfd..d2dc938872a 100644 --- a/tests/baselines/reference/moduleReopenedTypeOtherBlock.js +++ b/tests/baselines/reference/moduleReopenedTypeOtherBlock.js @@ -23,7 +23,9 @@ var M; var C2 = (function () { function C2() { } - C2.prototype.f = function () { return null; }; + C2.prototype.f = function () { + return null; + }; return C2; })(); M.C2 = C2; diff --git a/tests/baselines/reference/moduleReopenedTypeSameBlock.js b/tests/baselines/reference/moduleReopenedTypeSameBlock.js index 92e7e9e5228..c3546f20b2f 100644 --- a/tests/baselines/reference/moduleReopenedTypeSameBlock.js +++ b/tests/baselines/reference/moduleReopenedTypeSameBlock.js @@ -21,7 +21,9 @@ var M; var C2 = (function () { function C2() { } - C2.prototype.f = function () { return null; }; + C2.prototype.f = function () { + return null; + }; return C2; })(); M.C2 = C2; diff --git a/tests/baselines/reference/moduleScoping.js b/tests/baselines/reference/moduleScoping.js index cbe435e570c..1bcf1dbea0a 100644 --- a/tests/baselines/reference/moduleScoping.js +++ b/tests/baselines/reference/moduleScoping.js @@ -26,15 +26,24 @@ var x = v2; // Should be global v2 of type number again var v1 = "sausages"; // Global scope //// [file2.js] var v2 = 42; // Global scope -var v4 = function () { return 5; }; +var v4 = function () { + return 5; +}; //// [file3.js] exports.v3 = true; -var v2 = [1, 2, 3]; // Module scope. Should not appear in global scope +var v2 = [ + 1, + 2, + 3 +]; // Module scope. Should not appear in global scope //// [file4.js] var file3 = require('./file3'); var t1 = v1; var t2 = v2; var t3 = file3.v3; -var v4 = { a: true, b: NaN }; // Should shadow global v2 in this module +var v4 = { + a: true, + b: NaN +}; // Should shadow global v2 in this module //// [file5.js] var x = v2; // Should be global v2 of type number again diff --git a/tests/baselines/reference/moduleSymbolMerging.js b/tests/baselines/reference/moduleSymbolMerging.js index d43fff1378a..0a812a62e09 100644 --- a/tests/baselines/reference/moduleSymbolMerging.js +++ b/tests/baselines/reference/moduleSymbolMerging.js @@ -22,7 +22,9 @@ var A; })(A || (A = {})); var B; (function (B) { - function f() { return null; } + function f() { + return null; + } B.f = f; })(B || (B = {})); diff --git a/tests/baselines/reference/moduleUnassignedVariable.js b/tests/baselines/reference/moduleUnassignedVariable.js index 1765342efcd..179a2577adf 100644 --- a/tests/baselines/reference/moduleUnassignedVariable.js +++ b/tests/baselines/reference/moduleUnassignedVariable.js @@ -12,7 +12,11 @@ module Bar { var Bar; (function (Bar) { Bar.a = 1; - function fooA() { return Bar.a; } // Correct: return Bar.a + function fooA() { + return Bar.a; + } // Correct: return Bar.a Bar.b; - function fooB() { return Bar.b; } // Incorrect: return b + function fooB() { + return Bar.b; + } // Incorrect: return b })(Bar || (Bar = {})); diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index f4655513bec..8f129f545de 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -70,11 +70,15 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest1.js] var OuterMod; (function (OuterMod) { - function someExportedOuterFunc() { return -1; } + function someExportedOuterFunc() { + return -1; + } OuterMod.someExportedOuterFunc = someExportedOuterFunc; var OuterInnerMod; (function (OuterInnerMod) { - function someExportedOuterInnerFunc() { return "foo"; } + function someExportedOuterInnerFunc() { + return "foo"; + } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); @@ -83,7 +87,9 @@ var M; (function (M) { var InnerMod; (function (InnerMod) { - function someExportedInnerFunc() { return -2; } + function someExportedInnerFunc() { + return -2; + } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod = M.InnerMod || (M.InnerMod = {})); (function (E) { @@ -103,18 +109,30 @@ var M; var C = (function () { function C() { this.someProp = 1; - function someInnerFunc() { return 2; } + function someInnerFunc() { + return 2; + } var someInnerVar = 3; } - C.prototype.someMethodThatCallsAnOuterMethod = function () { return OuterInnerAlias.someExportedOuterInnerFunc(); }; - C.prototype.someMethodThatCallsAnInnerMethod = function () { return InnerMod.someExportedInnerFunc(); }; - C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { return OuterMod.someExportedOuterFunc(); }; - C.prototype.someMethod = function () { return 0; }; + C.prototype.someMethodThatCallsAnOuterMethod = function () { + return OuterInnerAlias.someExportedOuterInnerFunc(); + }; + C.prototype.someMethodThatCallsAnInnerMethod = function () { + return InnerMod.someExportedInnerFunc(); + }; + C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { + return OuterMod.someExportedOuterFunc(); + }; + C.prototype.someMethod = function () { + return 0; + }; return C; })(); M.C = C; var someModuleVar = 4; - function someModuleFunction() { return 5; } + function someModuleFunction() { + return 5; + } })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/moduleVisibilityTest2.errors.txt b/tests/baselines/reference/moduleVisibilityTest2.errors.txt index 9620b48cdfb..9ff92604392 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest2.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/moduleVisibilityTest2.ts(57,17): error TS2304: Cannot find name 'x'. tests/cases/compiler/moduleVisibilityTest2.ts(58,21): error TS2339: Property 'E' does not exist on type 'typeof M'. -tests/cases/compiler/moduleVisibilityTest2.ts(61,14): error TS2305: Module 'M' has no exported member 'I'. -tests/cases/compiler/moduleVisibilityTest2.ts(61,21): error TS2305: Module 'M' has no exported member 'I'. +tests/cases/compiler/moduleVisibilityTest2.ts(61,16): error TS2305: Module 'M' has no exported member 'I'. +tests/cases/compiler/moduleVisibilityTest2.ts(61,23): error TS2305: Module 'M' has no exported member 'I'. tests/cases/compiler/moduleVisibilityTest2.ts(64,11): error TS2339: Property 'x' does not exist on type 'typeof M'. tests/cases/compiler/moduleVisibilityTest2.ts(65,15): error TS2339: Property 'E' does not exist on type 'typeof M'. @@ -72,9 +72,9 @@ tests/cases/compiler/moduleVisibilityTest2.ts(65,15): error TS2339: Property 'E' } var cprime : M.I = null; - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'I'. - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'I'. var c = new M.C(); diff --git a/tests/baselines/reference/moduleVisibilityTest2.js b/tests/baselines/reference/moduleVisibilityTest2.js index 9102bd17ae2..63ecaf0c135 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.js +++ b/tests/baselines/reference/moduleVisibilityTest2.js @@ -71,11 +71,15 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest2.js] var OuterMod; (function (OuterMod) { - function someExportedOuterFunc() { return -1; } + function someExportedOuterFunc() { + return -1; + } OuterMod.someExportedOuterFunc = someExportedOuterFunc; var OuterInnerMod; (function (OuterInnerMod) { - function someExportedOuterInnerFunc() { return "foo"; } + function someExportedOuterInnerFunc() { + return "foo"; + } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); @@ -84,7 +88,9 @@ var M; (function (M) { var InnerMod; (function (InnerMod) { - function someExportedInnerFunc() { return -2; } + function someExportedInnerFunc() { + return -2; + } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod || (InnerMod = {})); var E; @@ -104,18 +110,30 @@ var M; var C = (function () { function C() { this.someProp = 1; - function someInnerFunc() { return 2; } + function someInnerFunc() { + return 2; + } var someInnerVar = 3; } - C.prototype.someMethodThatCallsAnOuterMethod = function () { return OuterInnerAlias.someExportedOuterInnerFunc(); }; - C.prototype.someMethodThatCallsAnInnerMethod = function () { return InnerMod.someExportedInnerFunc(); }; - C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { return OuterMod.someExportedOuterFunc(); }; - C.prototype.someMethod = function () { return 0; }; + C.prototype.someMethodThatCallsAnOuterMethod = function () { + return OuterInnerAlias.someExportedOuterInnerFunc(); + }; + C.prototype.someMethodThatCallsAnInnerMethod = function () { + return InnerMod.someExportedInnerFunc(); + }; + C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { + return OuterMod.someExportedOuterFunc(); + }; + C.prototype.someMethod = function () { + return 0; + }; return C; })(); M.C = C; var someModuleVar = 4; - function someModuleFunction() { return 5; } + function someModuleFunction() { + return 5; + } })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/moduleVisibilityTest3.errors.txt b/tests/baselines/reference/moduleVisibilityTest3.errors.txt index 581d96fc1df..0ad8a789a8f 100644 --- a/tests/baselines/reference/moduleVisibilityTest3.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest3.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/moduleVisibilityTest3.ts(20,22): error TS2304: Cannot find name 'modes'. -tests/cases/compiler/moduleVisibilityTest3.ts(20,33): error TS2305: Module '_modes' has no exported member 'Mode'. -tests/cases/compiler/moduleVisibilityTest3.ts(21,16): error TS2305: Module '_modes' has no exported member 'Mode'. +tests/cases/compiler/moduleVisibilityTest3.ts(20,39): error TS2305: Module '_modes' has no exported member 'Mode'. +tests/cases/compiler/moduleVisibilityTest3.ts(21,22): error TS2305: Module '_modes' has no exported member 'Mode'. ==== tests/cases/compiler/moduleVisibilityTest3.ts (3 errors) ==== @@ -26,10 +26,10 @@ tests/cases/compiler/moduleVisibilityTest3.ts(21,16): error TS2305: Module '_mod constructor(p1: modes, p2: modes.Mode) {// should be an error on p2 - it's not exported ~~~~~ !!! error TS2304: Cannot find name 'modes'. - ~~~~~~~~~~ + ~~~~ !!! error TS2305: Module '_modes' has no exported member 'Mode'. var x:modes.Mode; - ~~~~~~~~~~ + ~~~~ !!! error TS2305: Module '_modes' has no exported member 'Mode'. } diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 8496588c5bb..5161f72d5f0 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -112,7 +112,11 @@ var A; var fn = function (s) { return 'hello ' + s; }; - var ol = { s: 'hello', id: 2, isvalid: true }; + var ol = { + s: 'hello', + id: 2, + isvalid: true + }; })(A || (A = {})); var Y; (function (Y) { @@ -166,5 +170,9 @@ var Y; Y.fn = function (s) { return 'hello ' + s; }; - Y.ol = { s: 'hello', id: 2, isvalid: true }; + Y.ol = { + s: 'hello', + id: 2, + isvalid: true + }; })(Y || (Y = {})); diff --git a/tests/baselines/reference/multiCallOverloads.js b/tests/baselines/reference/multiCallOverloads.js index d4e765c5514..85b008d52b7 100644 --- a/tests/baselines/reference/multiCallOverloads.js +++ b/tests/baselines/reference/multiCallOverloads.js @@ -14,10 +14,15 @@ load(function(z?) {}) // this shouldn't be an error //// [multiCallOverloads.js] -function load(f) { } -var f1 = function (z) { }; -var f2 = function (z) { }; +function load(f) { +} +var f1 = function (z) { +}; +var f2 = function (z) { +}; load(f1); // ok load(f2); // ok -load(function () { }); // this shouldn’t be an error -load(function (z) { }); // this shouldn't be an error +load(function () { +}); // this shouldn’t be an error +load(function (z) { +}); // this shouldn't be an error diff --git a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt new file mode 100644 index 00000000000..c85e7584139 --- /dev/null +++ b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(2,18): error TS2304: Cannot find name 'Role'. +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(4,26): error TS2304: Cannot find name 'ng'. + + +==== tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts (3 errors) ==== + return this.edit(role) + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + .then((role: Role) => + ~~~~ +!!! error TS2304: Cannot find name 'Role'. + this.roleService.add(role) + .then((data: ng.IHttpPromiseCallbackArg) => data.data)); + ~~ +!!! error TS2304: Cannot find name 'ng'. + \ No newline at end of file diff --git a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js new file mode 100644 index 00000000000..4d0317a50a5 --- /dev/null +++ b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js @@ -0,0 +1,14 @@ +//// [multiLinePropertyAccessAndArrowFunctionIndent1.ts] +return this.edit(role) + .then((role: Role) => + this.roleService.add(role) + .then((data: ng.IHttpPromiseCallbackArg) => data.data)); + + +//// [multiLinePropertyAccessAndArrowFunctionIndent1.js] +var _this = this; +return this.edit(role).then(function (role) { + return _this.roleService.add(role).then(function (data) { + return data.data; + }); +}); diff --git a/tests/baselines/reference/multiModuleClodule1.js b/tests/baselines/reference/multiModuleClodule1.js index 9f6d7b5014c..a64abd81680 100644 --- a/tests/baselines/reference/multiModuleClodule1.js +++ b/tests/baselines/reference/multiModuleClodule1.js @@ -22,9 +22,12 @@ c.foo = C.foo; var C = (function () { function C(x) { } - C.prototype.foo = function () { }; - C.prototype.bar = function () { }; - C.boo = function () { }; + C.prototype.foo = function () { + }; + C.prototype.bar = function () { + }; + C.boo = function () { + }; return C; })(); var C; @@ -34,9 +37,12 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; - function baz() { return ''; } + function baz() { + return ''; + } })(C || (C = {})); var c = new C(C.x); c.foo = C.foo; diff --git a/tests/baselines/reference/multiModuleFundule1.js b/tests/baselines/reference/multiModuleFundule1.js index 6aa9cb959ba..f643ed5ee4d 100644 --- a/tests/baselines/reference/multiModuleFundule1.js +++ b/tests/baselines/reference/multiModuleFundule1.js @@ -13,14 +13,16 @@ var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); //// [multiModuleFundule1.js] -function C(x) { } +function C(x) { +} var C; (function (C) { C.x = 1; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; })(C || (C = {})); var r = C(2); diff --git a/tests/baselines/reference/multipleExportAssignments.errors.txt b/tests/baselines/reference/multipleExportAssignments.errors.txt index d5af20073c7..604236a0516 100644 --- a/tests/baselines/reference/multipleExportAssignments.errors.txt +++ b/tests/baselines/reference/multipleExportAssignments.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/multipleExportAssignments.ts(13,1): error TS2308: A module cannot have more than one export assignment. -tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/compiler/multipleExportAssignments.ts(13,1): error TS2300: Duplicate identifier 'default'. +tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2300: Duplicate identifier 'default'. ==== tests/cases/compiler/multipleExportAssignments.ts (2 errors) ==== @@ -17,9 +17,9 @@ tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2308: A module }; export = server; ~~~~~~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = connectExport; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt index c2475f0ff14..ac076e7016c 100644 --- a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(4,5): error TS2308: A module cannot have more than one export assignment. -tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): error TS2308: A module cannot have more than one export assignment. +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(4,5): error TS2300: Duplicate identifier 'default'. +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): error TS2300: Duplicate identifier 'default'. ==== tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts (2 errors) ==== @@ -8,8 +8,8 @@ tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): erro var b: number; export = a; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. export = b; ~~~~~~~~~~~ -!!! error TS2308: A module cannot have more than one export assignment. +!!! error TS2300: Duplicate identifier 'default'. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 269d5c2ea19..9cab77f3dba 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -97,9 +97,13 @@ var ND = (function (_super) { })(N); var Good = (function () { function Good() { - this.f = function () { return 0; }; + this.f = function () { + return 0; + }; } - Good.prototype.g = function () { return 0; }; + Good.prototype.g = function () { + return 0; + }; return Good; })(); var Baad = (function (_super) { @@ -107,7 +111,11 @@ var Baad = (function (_super) { function Baad() { _super.apply(this, arguments); } - Baad.prototype.f = function () { return 0; }; - Baad.prototype.g = function (n) { return 0; }; + Baad.prototype.f = function () { + return 0; + }; + Baad.prototype.g = function (n) { + return 0; + }; return Baad; })(Good); diff --git a/tests/baselines/reference/multipleNumericIndexers.js b/tests/baselines/reference/multipleNumericIndexers.js index 638cf01569a..31bd84e5356 100644 --- a/tests/baselines/reference/multipleNumericIndexers.js +++ b/tests/baselines/reference/multipleNumericIndexers.js @@ -40,7 +40,10 @@ var C = (function () { return C; })(); var a; -var b = { 1: '', "2": '' }; +var b = { + 1: '', + "2": '' +}; var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/multipleStringIndexers.js b/tests/baselines/reference/multipleStringIndexers.js index 55dd816e42b..b914b205654 100644 --- a/tests/baselines/reference/multipleStringIndexers.js +++ b/tests/baselines/reference/multipleStringIndexers.js @@ -39,7 +39,9 @@ var C = (function () { return C; })(); var a; -var b = { y: '' }; +var b = { + y: '' +}; var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/mutrec.js b/tests/baselines/reference/mutrec.js index 1d1ccb4e90b..ba6c8ade036 100644 --- a/tests/baselines/reference/mutrec.js +++ b/tests/baselines/reference/mutrec.js @@ -43,11 +43,15 @@ g(i4); //// [mutrec.js] -function f(p) { return p; } +function f(p) { + return p; +} ; var b; f(b); -function g(p) { return p; } +function g(p) { + return p; +} ; var i2; g(i2); diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 76fd13aa320..585a3d2178b 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -20,7 +20,9 @@ var __extends = this.__extends || function (d, b) { var foo = (function () { function foo() { } - foo.prototype.bar = function () { return null; }; + foo.prototype.bar = function () { + return null; + }; return foo; })(); var foo2 = (function (_super) { diff --git a/tests/baselines/reference/nameCollisions.js b/tests/baselines/reference/nameCollisions.js index 2cfaba94993..51b66adcefe 100644 --- a/tests/baselines/reference/nameCollisions.js +++ b/tests/baselines/reference/nameCollisions.js @@ -76,8 +76,10 @@ var T; })(); // error var w; var f; - function f() { } //error - function f2() { } + function f() { + } //error + function f2() { + } var f2; // error var i; var C = (function () { @@ -85,14 +87,17 @@ var T; } return C; })(); - function C() { } // error - function C2() { } + function C() { + } // error + function C2() { + } var C2 = (function () { function C2() { } return C2; })(); // error - function fi() { } + function fi() { + } var cli = (function () { function cli() { } diff --git a/tests/baselines/reference/nameCollisionsInPropertyAssignments.js b/tests/baselines/reference/nameCollisionsInPropertyAssignments.js index 1f3631e03ba..4c2634d881d 100644 --- a/tests/baselines/reference/nameCollisionsInPropertyAssignments.js +++ b/tests/baselines/reference/nameCollisionsInPropertyAssignments.js @@ -4,4 +4,8 @@ var y = { x() { x++; } }; //// [nameCollisionsInPropertyAssignments.js] var x = 1; -var y = { x: function () { x++; } }; +var y = { + x: function () { + x++; + } +}; diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.js b/tests/baselines/reference/negateOperatorWithAnyOtherType.js index 8418bbbe467..453b032e004 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.js @@ -57,9 +57,16 @@ var ResultIsNumber15 = -(ANY - ANY1); // - operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/negateOperatorWithBooleanType.js b/tests/baselines/reference/negateOperatorWithBooleanType.js index 9442f54490f..f50382de652 100644 --- a/tests/baselines/reference/negateOperatorWithBooleanType.js +++ b/tests/baselines/reference/negateOperatorWithBooleanType.js @@ -38,11 +38,15 @@ var ResultIsNumber7 = -A.foo(); //// [negateOperatorWithBooleanType.js] // - operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -54,7 +58,10 @@ var objA = new A(); var ResultIsNumber1 = -BOOLEAN; // boolean type literal var ResultIsNumber2 = -true; -var ResultIsNumber3 = -{ x: true, y: false }; +var ResultIsNumber3 = -{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = -objA.a; var ResultIsNumber5 = -M.n; diff --git a/tests/baselines/reference/negateOperatorWithNumberType.js b/tests/baselines/reference/negateOperatorWithNumberType.js index 5fa83e088c8..90cb9c073b3 100644 --- a/tests/baselines/reference/negateOperatorWithNumberType.js +++ b/tests/baselines/reference/negateOperatorWithNumberType.js @@ -44,12 +44,19 @@ var ResultIsNumber11 = -(NUMBER - NUMBER); //// [negateOperatorWithNumberType.js] // - operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -62,8 +69,16 @@ var ResultIsNumber1 = -NUMBER; var ResultIsNumber2 = -NUMBER1; // number type literal var ResultIsNumber3 = -1; -var ResultIsNumber4 = -{ x: 1, y: 2 }; -var ResultIsNumber5 = -{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = -{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = -{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = -objA.a; var ResultIsNumber7 = -M.n; diff --git a/tests/baselines/reference/negateOperatorWithStringType.js b/tests/baselines/reference/negateOperatorWithStringType.js index bdbc4a3d664..153a5921094 100644 --- a/tests/baselines/reference/negateOperatorWithStringType.js +++ b/tests/baselines/reference/negateOperatorWithStringType.js @@ -43,12 +43,19 @@ var ResultIsNumber12 = -STRING.charAt(0); //// [negateOperatorWithStringType.js] // - operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -61,8 +68,16 @@ var ResultIsNumber1 = -STRING; var ResultIsNumber2 = -STRING1; // string type literal var ResultIsNumber3 = -""; -var ResultIsNumber4 = -{ x: "", y: "" }; -var ResultIsNumber5 = -{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = -{ + x: "", + y: "" +}; +var ResultIsNumber5 = -{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = -objA.a; var ResultIsNumber7 = -M.n; diff --git a/tests/baselines/reference/nestedClassDeclaration.js b/tests/baselines/reference/nestedClassDeclaration.js index 70445b3372f..c7f0ffe34fc 100644 --- a/tests/baselines/reference/nestedClassDeclaration.js +++ b/tests/baselines/reference/nestedClassDeclaration.js @@ -30,11 +30,13 @@ var C2 = (function () { } return C2; })(); -function foo() { } +function foo() { +} var C3 = (function () { function C3() { } return C3; })(); var x = { - class: C4 }, _a = void 0; + class: C4 +}, _a = void 0; diff --git a/tests/baselines/reference/nestedModules.js b/tests/baselines/reference/nestedModules.js index f146990ec82..fe3af5ae69c 100644 --- a/tests/baselines/reference/nestedModules.js +++ b/tests/baselines/reference/nestedModules.js @@ -37,7 +37,10 @@ var A; (function (A) { var B; (function (B) { - var Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' + var Point = { + x: 0, + y: 0 + }; // bug 832088: could not find module 'C' })(B = A.B || (A.B = {})); })(A || (A = {})); var M2; diff --git a/tests/baselines/reference/nestedRecursiveLambda.js b/tests/baselines/reference/nestedRecursiveLambda.js index 0273b5691e6..eff3da0e216 100644 --- a/tests/baselines/reference/nestedRecursiveLambda.js +++ b/tests/baselines/reference/nestedRecursiveLambda.js @@ -8,8 +8,26 @@ void(r =>(r => r)); //// [nestedRecursiveLambda.js] function f(a) { - void (function (r) { return (function (r) { return r; }); }); + void (function (r) { + return (function (r) { + return r; + }); + }); } -f((function (r) { return (function (r) { return r; }); })); -void (function (r) { return (function (r) { return r; }); }); -[(function (r) { return (function (r) { return r; }); })]; +f((function (r) { + return (function (r) { + return r; + }); +})); +void (function (r) { + return (function (r) { + return r; + }); +}); +[ + (function (r) { + return (function (r) { + return r; + }); + }) +]; diff --git a/tests/baselines/reference/nestedSelf.js b/tests/baselines/reference/nestedSelf.js index 9c0feaa887f..b61a0956676 100644 --- a/tests/baselines/reference/nestedSelf.js +++ b/tests/baselines/reference/nestedSelf.js @@ -17,7 +17,13 @@ var M; } C.prototype.foo = function () { var _this = this; - [1, 2, 3].map(function (x) { return _this.n * x; }); + [ + 1, + 2, + 3 + ].map(function (x) { + return _this.n * x; + }); }; return C; })(); diff --git a/tests/baselines/reference/newExpressionWithCast.js b/tests/baselines/reference/newExpressionWithCast.js index 8743d9b83bc..6ce025a4267 100644 --- a/tests/baselines/reference/newExpressionWithCast.js +++ b/tests/baselines/reference/newExpressionWithCast.js @@ -15,12 +15,15 @@ var test3 = new (Test3)(); //// [newExpressionWithCast.js] -function Test() { } +function Test() { +} // valid but error with noImplicitAny var test = new Test(); -function Test2() { } +function Test2() { +} // parse error var test2 = new < any > Test2(); -function Test3() { } +function Test3() { +} // valid with noImplicitAny var test3 = new Test3(); diff --git a/tests/baselines/reference/newFunctionImplicitAny.js b/tests/baselines/reference/newFunctionImplicitAny.js index 459c7d581d8..9f8d303680b 100644 --- a/tests/baselines/reference/newFunctionImplicitAny.js +++ b/tests/baselines/reference/newFunctionImplicitAny.js @@ -6,5 +6,6 @@ var test = new Test(); //// [newFunctionImplicitAny.js] // No implicit any error given when newing a function (up for debate) -function Test() { } +function Test() { +} var test = new Test(); diff --git a/tests/baselines/reference/newOperatorConformance.js b/tests/baselines/reference/newOperatorConformance.js index a04b10dc8fe..4e5c209bbff 100644 --- a/tests/baselines/reference/newOperatorConformance.js +++ b/tests/baselines/reference/newOperatorConformance.js @@ -104,7 +104,8 @@ function newFn2(s) { var p; } // Construct expression of void returning function -function fnVoid() { } +function fnVoid() { +} var t = new fnVoid(); var t; // Chained new expressions diff --git a/tests/baselines/reference/newOperatorErrorCases.js b/tests/baselines/reference/newOperatorErrorCases.js index b893beba02a..8a44d51fb5c 100644 --- a/tests/baselines/reference/newOperatorErrorCases.js +++ b/tests/baselines/reference/newOperatorErrorCases.js @@ -65,5 +65,7 @@ var c1 = new T; var c1; var c2 = new T(); // Parse error // Construct expression of non-void returning function -function fnNumber() { return 32; } +function fnNumber() { + return 32; +} var s = new fnNumber(); // Error diff --git a/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js index 8a485a2ebe2..4ddb34b094c 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js @@ -9,4 +9,6 @@ var _this = (function () { } return _this; })(); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js index 727b1b6087a..4e746582364 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js @@ -50,19 +50,23 @@ var class1 = (function () { Object.defineProperty(class1.prototype, "a", { get: function () { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; return 10; }, set: function (val) { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }, enumerable: true, @@ -77,18 +81,22 @@ var class2 = (function () { get: function () { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; return 10; }, set: function (val) { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }, enumerable: true, diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js index a01996848b1..ce86ca47301 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js @@ -25,10 +25,12 @@ class class2 { var class1 = (function () { function class1() { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -37,9 +39,11 @@ var class2 = (function () { function class2() { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return class2; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js index bdb55633682..d144a78fae3 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js @@ -11,5 +11,7 @@ function x() { var console; function x() { var _this = 5; - (function (x) { console.log(_this); }); + (function (x) { + console.log(_this); + }); } diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js index 83f21d10425..487751bd493 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js @@ -10,9 +10,13 @@ alert(x.doStuff(x => alert(x))); //// [noCollisionThisExpressionAndLocalVarInLambda.js] var x = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; -alert(x.doStuff(function (x) { return alert(x); })); +alert(x.doStuff(function (x) { + return alert(x); +})); diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js index b7e9cc7561f..f91039b6c61 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js @@ -26,18 +26,22 @@ var a = (function () { } a.prototype.method1 = function () { return { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }; a.prototype.method2 = function () { var _this = 2; return { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }; return a; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js index da989bed263..374a812ba4b 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js @@ -23,10 +23,12 @@ class class2 { var class1 = (function () { function class1() { this.prop1 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -34,9 +36,11 @@ var class1 = (function () { var class2 = (function () { function class2() { this.prop1 = { - doStuff: function (callback) { return function () { - return callback(10); - }; } + doStuff: function (callback) { + return function () { + return callback(10); + }; + } }; var _this = 2; } diff --git a/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js index bea476ed09f..c0377976e9b 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js @@ -4,4 +4,6 @@ var f = () => _this; //// [noCollisionThisExpressionAndVarInGlobal.js] var _this = 1; -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js index b3677681822..c34ad4c97bd 100644 --- a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js @@ -12,5 +12,7 @@ var console; var _this = 5; function x() { var _this = this; - (function (x) { console.log(_this); }); + (function (x) { + console.log(_this); + }); } diff --git a/tests/baselines/reference/noConstraintInReturnType1.js b/tests/baselines/reference/noConstraintInReturnType1.js index 0402f9d83cb..747cbfdf758 100644 --- a/tests/baselines/reference/noConstraintInReturnType1.js +++ b/tests/baselines/reference/noConstraintInReturnType1.js @@ -8,7 +8,9 @@ class List { var List = (function () { function List() { } - List.empty = function () { return null; }; + List.empty = function () { + return null; + }; return List; })(); diff --git a/tests/baselines/reference/noImplicitAnyForIn.js b/tests/baselines/reference/noImplicitAnyForIn.js index c8743936a9a..067a553e2dd 100644 --- a/tests/baselines/reference/noImplicitAnyForIn.js +++ b/tests/baselines/reference/noImplicitAnyForIn.js @@ -32,7 +32,16 @@ var n = [[]] || []; for (n[idx++] in m); //// [noImplicitAnyForIn.js] -var x = [[1, 2, 3], ["hello"]]; +var x = [ + [ + 1, + 2, + 3 + ], + [ + "hello" + ] +]; for (var i in x) { for (var j in x[i]) { //Should yield an implicit 'any' error @@ -50,8 +59,16 @@ for (var a in x) { var c = a || b; } var idx = 0; -var m = [1, 2, 3, 4, 5]; +var m = [ + 1, + 2, + 3, + 4, + 5 +]; // Should yield an implicit 'any' error. -var n = [[]] || []; +var n = [ + [] +] || []; for (n[idx++] in m) ; diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.js b/tests/baselines/reference/noImplicitAnyForMethodParameters.js index fc5b94d4768..379cf85b5e2 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.js +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.js @@ -18,12 +18,14 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (a) { }; // OK - non-ambient class and private method - error + C.prototype.foo = function (a) { + }; // OK - non-ambient class and private method - error return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (a) { }; // OK - non-ambient class and public method - error + D.prototype.foo = function (a) { + }; // OK - non-ambient class and public method - error return D; })(); diff --git a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt index 622dd953150..158690deef0 100644 --- a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/noImplicitAnyFunctions.ts(2,1): error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(2,18): error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/noImplicitAnyFunctions.ts(6,13): error TS7006: Parameter 'x' implicitly has an 'any' type. -tests/cases/compiler/noImplicitAnyFunctions.ts(17,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/noImplicitAnyFunctions.ts(19,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(17,10): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(19,10): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/noImplicitAnyFunctions.ts(19,24): error TS7006: Parameter 'y' implicitly has an 'any' type. ==== tests/cases/compiler/noImplicitAnyFunctions.ts (5 errors) ==== declare function f1(); - ~~~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. declare function f2(): any; @@ -27,15 +27,13 @@ tests/cases/compiler/noImplicitAnyFunctions.ts(19,24): error TS7006: Parameter ' } function f6(x: string, y: number); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. function f6(x: string, y: string): any; function f6(x: string, y) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ +!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. ~ !!! error TS7006: Parameter 'y' implicitly has an 'any' type. return null; - ~~~~~~~~~~~~~~~~ - } - ~ -!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file + } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.js b/tests/baselines/reference/noImplicitAnyInCastExpression.js index 1b7cc59c7c0..4e23b91527b 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.js +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.js @@ -19,8 +19,15 @@ interface IFoo { //// [noImplicitAnyInCastExpression.js] // verify no noImplictAny errors reported with cast expression // Expr type not assignable to target type -{ a: null }; +{ + a: null +}; // Expr type assignable to target type -{ a: 2, b: undefined }; +{ + a: 2, + b: undefined +}; // Neither types is assignable to each other -{ c: null }; +{ + c: null +}; diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js index 7722165fd23..f14810c8013 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js @@ -5,5 +5,10 @@ regexMatchList.forEach(match => ''.replace(match, '')); //// [noImplicitAnyInContextuallyTypesFunctionParamter.js] -var regexMatchList = ['', '']; -regexMatchList.forEach(function (match) { return ''.replace(match, ''); }); +var regexMatchList = [ + '', + '' +]; +regexMatchList.forEach(function (match) { + return ''.replace(match, ''); +}); diff --git a/tests/baselines/reference/noImplicitAnyModule.errors.txt b/tests/baselines/reference/noImplicitAnyModule.errors.txt index ec1af2346cc..cb2dfbe5793 100644 --- a/tests/baselines/reference/noImplicitAnyModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyModule.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/noImplicitAnyModule.ts(5,9): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/noImplicitAnyModule.ts(10,18): error TS7006: Parameter 'x' implicitly has an 'any' type. tests/cases/compiler/noImplicitAnyModule.ts(11,9): error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/noImplicitAnyModule.ts(18,5): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyModule.ts(18,14): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. ==== tests/cases/compiler/noImplicitAnyModule.ts (4 errors) ==== @@ -29,7 +29,7 @@ tests/cases/compiler/noImplicitAnyModule.ts(18,5): error TS7010: 'f', which lack // Should return error for implicit any on return type. function f(x: number); - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js index 8efe32d3140..6be61702143 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js @@ -46,15 +46,20 @@ var f14 = (x, ...r) => ""; //// [noImplicitAnyParametersInBareFunctions.js] // No implicit-'any' errors. -function f1() { } +function f1() { +} // Implicit-'any' error for x. -function f2(x) { } +function f2(x) { +} // No implicit-'any' errors. -function f3(x) { } +function f3(x) { +} // Implicit-'any' errors for x, y, and z. -function f4(x, y, z) { } +function f4(x, y, z) { +} // Implicit-'any' errors for x, and z. -function f5(x, y, z) { } +function f5(x, y, z) { +} // Implicit-'any[]' error for r. function f6() { var r = []; @@ -69,15 +74,24 @@ function f7(x) { r[_i - 1] = arguments[_i]; } } -function f8(x3, y3) { } +function f8(x3, y3) { +} // No implicit-'any' errors. -var f9 = function () { return ""; }; +var f9 = function () { + return ""; +}; // Implicit-'any' errors for x. -var f10 = function (x) { return ""; }; +var f10 = function (x) { + return ""; +}; // Implicit-'any' errors for x, y, and z. -var f11 = function (x, y, z) { return ""; }; +var f11 = function (x, y, z) { + return ""; +}; // Implicit-'any' errors for x and z. -var f12 = function (x, y, z) { return ""; }; +var f12 = function (x, y, z) { + return ""; +}; // Implicit-'any[]' error for r. var f13 = function () { var r = []; diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.js b/tests/baselines/reference/noImplicitAnyParametersInClass.js index 0873935b600..1460d07b729 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.js +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.js @@ -96,13 +96,21 @@ class C { var C = (function () { function C() { // No implicit-'any' errors. - this.pub_f9 = function () { return ""; }; + this.pub_f9 = function () { + return ""; + }; // Implicit-'any' errors for x. - this.pub_f10 = function (x) { return ""; }; + this.pub_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - this.pub_f11 = function (x, y, z) { return ""; }; + this.pub_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - this.pub_f12 = function (x, y, z) { return ""; }; + this.pub_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' error for r. this.pub_f13 = function () { var r = []; @@ -120,13 +128,21 @@ var C = (function () { return ""; }; // No implicit-'any' errors. - this.priv_f9 = function () { return ""; }; + this.priv_f9 = function () { + return ""; + }; // Implicit-'any' errors for x. - this.priv_f10 = function (x) { return ""; }; + this.priv_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - this.priv_f11 = function (x, y, z) { return ""; }; + this.priv_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - this.priv_f12 = function (x, y, z) { return ""; }; + this.priv_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' error for r. this.priv_f13 = function () { var r = []; @@ -145,15 +161,20 @@ var C = (function () { }; } // No implicit-'any' errors. - C.prototype.pub_f1 = function () { }; + C.prototype.pub_f1 = function () { + }; // Implicit-'any' errors for x. - C.prototype.pub_f2 = function (x) { }; + C.prototype.pub_f2 = function (x) { + }; // No implicit-'any' errors. - C.prototype.pub_f3 = function (x) { }; + C.prototype.pub_f3 = function (x) { + }; // Implicit-'any' errors for x, y, and z. - C.prototype.pub_f4 = function (x, y, z) { }; + C.prototype.pub_f4 = function (x, y, z) { + }; // Implicit-'any' errors for x, and z. - C.prototype.pub_f5 = function (x, y, z) { }; + C.prototype.pub_f5 = function (x, y, z) { + }; // Implicit-'any[]' errors for r. C.prototype.pub_f6 = function () { var r = []; @@ -168,18 +189,24 @@ var C = (function () { r[_i - 1] = arguments[_i]; } }; - C.prototype.pub_f8 = function (x3, y3) { }; + C.prototype.pub_f8 = function (x3, y3) { + }; /////////////////////////////////////////// // No implicit-'any' errors. - C.prototype.priv_f1 = function () { }; + C.prototype.priv_f1 = function () { + }; // Implicit-'any' errors for x. - C.prototype.priv_f2 = function (x) { }; + C.prototype.priv_f2 = function (x) { + }; // No implicit-'any' errors. - C.prototype.priv_f3 = function (x) { }; + C.prototype.priv_f3 = function (x) { + }; // Implicit-'any' errors for x, y, and z. - C.prototype.priv_f4 = function (x, y, z) { }; + C.prototype.priv_f4 = function (x, y, z) { + }; // Implicit-'any' errors for x, and z. - C.prototype.priv_f5 = function (x, y, z) { }; + C.prototype.priv_f5 = function (x, y, z) { + }; // Implicit-'any[]' errors for r. C.prototype.priv_f6 = function () { var r = []; @@ -194,6 +221,7 @@ var C = (function () { r[_i - 1] = arguments[_i]; } }; - C.prototype.priv_f8 = function (x3, y3) { }; + C.prototype.priv_f8 = function (x3, y3) { + }; return C; })(); diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.js b/tests/baselines/reference/noImplicitAnyParametersInModule.js index e7f30205559..d89c4229c7b 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.js +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.js @@ -50,15 +50,20 @@ module M { var M; (function (M) { // No implicit-'any' errors. - function m_f1() { } + function m_f1() { + } // Implicit-'any' error for x. - function m_f2(x) { } + function m_f2(x) { + } // No implicit-'any' errors. - function m_f3(x) { } + function m_f3(x) { + } // Implicit-'any' errors for x, y, and z. - function m_f4(x, y, z) { } + function m_f4(x, y, z) { + } // Implicit-'any' errors for x and z. - function m_f5(x, y, z) { } + function m_f5(x, y, z) { + } // Implicit-'any[]' error for r. function m_f6() { var r = []; @@ -73,15 +78,24 @@ var M; r[_i - 1] = arguments[_i]; } } - function m_f8(x3, y3) { } + function m_f8(x3, y3) { + } // No implicit-'any' errors. - var m_f9 = function () { return ""; }; + var m_f9 = function () { + return ""; + }; // Implicit-'any' error for x. - var m_f10 = function (x) { return ""; }; + var m_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - var m_f11 = function (x, y, z) { return ""; }; + var m_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - var m_f12 = function (x, y, z) { return ""; }; + var m_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' errors for r. var m_f13 = function () { var r = []; diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt index 21845261f35..806cfd39a34 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/noImplicitAnyWithOverloads.ts(2,5): error TS7008: Member 'foo' implicitly has an 'any' type. -tests/cases/compiler/noImplicitAnyWithOverloads.ts(6,1): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/compiler/noImplicitAnyWithOverloads.ts(7,1): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyWithOverloads.ts(6,10): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyWithOverloads.ts(7,10): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/noImplicitAnyWithOverloads.ts(8,16): error TS7006: Parameter 'a' implicitly has an 'any' type. @@ -13,10 +13,10 @@ tests/cases/compiler/noImplicitAnyWithOverloads.ts(8,16): error TS7006: Paramete interface B { } function callb(lam: (l: A) => void); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(lam: (n: B) => void); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(a) { } ~ diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.js b/tests/baselines/reference/noImplicitAnyWithOverloads.js index fd56b6e0d73..3bce6e18ba3 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.js +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.js @@ -10,5 +10,8 @@ function callb(a) { } callb((a) => { a.foo; }); // error, chose first overload //// [noImplicitAnyWithOverloads.js] -function callb(a) { } -callb(function (a) { a.foo; }); // error, chose first overload +function callb(a) { +} +callb(function (a) { + a.foo; +}); // error, chose first overload diff --git a/tests/baselines/reference/noSelfOnVars.js b/tests/baselines/reference/noSelfOnVars.js index 913e3a23ba2..2e1f5080c26 100644 --- a/tests/baselines/reference/noSelfOnVars.js +++ b/tests/baselines/reference/noSelfOnVars.js @@ -9,6 +9,7 @@ function foo() { //// [noSelfOnVars.js] function foo() { - function bar() { } + function bar() { + } var x = bar; } diff --git a/tests/baselines/reference/nonInstantiatedModule.js b/tests/baselines/reference/nonInstantiatedModule.js index fc3ad19546f..ff7ea10358b 100644 --- a/tests/baselines/reference/nonInstantiatedModule.js +++ b/tests/baselines/reference/nonInstantiatedModule.js @@ -62,7 +62,10 @@ var M2; var Point; (function (Point) { function Origin() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } Point.Origin = Origin; })(Point = M2.Point || (M2.Point = {})); diff --git a/tests/baselines/reference/null.js b/tests/baselines/reference/null.js index 499d6901847..c82cb3ab432 100644 --- a/tests/baselines/reference/null.js +++ b/tests/baselines/reference/null.js @@ -38,4 +38,7 @@ function g() { return null; return 3; } -var w = { x: null, y: 3 }; +var w = { + x: null, + y: 3 +}; diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js index 646a3474536..b47a591444c 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js @@ -108,12 +108,22 @@ var r4 = true ? new Date() : null; var r4 = true ? null : new Date(); var r5 = true ? /1/ : null; var r5 = true ? null : /1/; -var r6 = true ? { foo: 1 } : null; -var r6 = true ? null : { foo: 1 }; -var r7 = true ? function () { } : null; -var r7 = true ? null : function () { }; -var r8 = true ? function (x) { return x; } : null; -var r8b = true ? null : function (x) { return x; }; // type parameters not identical across declarations +var r6 = true ? { + foo: 1 +} : null; +var r6 = true ? null : { + foo: 1 +}; +var r7 = true ? function () { +} : null; +var r7 = true ? null : function () { +}; +var r8 = true ? function (x) { + return x; +} : null; +var r8b = true ? null : function (x) { + return x; +}; // type parameters not identical across declarations var i1; var r9 = true ? i1 : null; var r9 = true ? null : i1; @@ -141,7 +151,8 @@ var r13 = true ? E : null; var r13 = true ? null : E; var r14 = true ? E.A : null; var r14 = true ? null : E.A; -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/numberAsInLHS.js b/tests/baselines/reference/numberAsInLHS.js index d2fee353ab4..bcc1bcf7b84 100644 --- a/tests/baselines/reference/numberAsInLHS.js +++ b/tests/baselines/reference/numberAsInLHS.js @@ -2,4 +2,7 @@ 3 in [0, 1] //// [numberAsInLHS.js] -3 in [0, 1]; +3 in [ + 0, + 1 +]; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js index cf08bb98217..339f674b9da 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js @@ -106,7 +106,8 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { } // ok + set: function (v) { + } // ok , enumerable: true, configurable: true @@ -114,7 +115,8 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { }; // ok + C.foo = function () { + }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -129,7 +131,8 @@ var a; var b = { a: '', b: 1, - c: function () { }, + c: function () { + }, "d": '', "e": 1, 1.0: '', @@ -140,7 +143,8 @@ var b = { get X() { return ''; }, - set X(v) { }, + set X(v) { + }, foo: function () { return ''; } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 0474abef393..1cfd94a0c97 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -56,7 +56,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { @@ -64,7 +66,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return ''; }; + B.prototype.bar = function () { + return ''; + }; return B; })(A); var Foo = (function () { diff --git a/tests/baselines/reference/numericIndexerConstraint1.js b/tests/baselines/reference/numericIndexerConstraint1.js index ed51e3af066..9587863a035 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.js +++ b/tests/baselines/reference/numericIndexerConstraint1.js @@ -8,7 +8,8 @@ var result: Foo = x["one"]; // error var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { }; + Foo.prototype.foo = function () { + }; return Foo; })(); var x; diff --git a/tests/baselines/reference/numericIndexerConstraint2.js b/tests/baselines/reference/numericIndexerConstraint2.js index 4d8ce742e73..edc9df36a13 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.js +++ b/tests/baselines/reference/numericIndexerConstraint2.js @@ -8,7 +8,8 @@ x = a; var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { }; + Foo.prototype.foo = function () { + }; return Foo; })(); var x; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 531c450e7e1..cbbf6b68c4e 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -30,4 +30,6 @@ var B = (function (_super) { } return B; })(A); -var x = { data: new B() }; +var x = { + data: new B() +}; diff --git a/tests/baselines/reference/numericIndexerConstraint5.js b/tests/baselines/reference/numericIndexerConstraint5.js index 3ad19f75d0b..b0684454394 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.js +++ b/tests/baselines/reference/numericIndexerConstraint5.js @@ -3,5 +3,8 @@ var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; //// [numericIndexerConstraint5.js] -var x = { name: "x", 0: new Date() }; +var x = { + name: "x", + 0: new Date() +}; var z = x; diff --git a/tests/baselines/reference/numericIndexingResults.js b/tests/baselines/reference/numericIndexingResults.js index 70c6e15d15a..043bf3265e9 100644 --- a/tests/baselines/reference/numericIndexingResults.js +++ b/tests/baselines/reference/numericIndexingResults.js @@ -85,14 +85,20 @@ var r3 = a['3']; var r4 = a[1]; var r5 = a[2]; var r6 = a[3]; -var b = { 1: '', "2": '' }; +var b = { + 1: '', + "2": '' +}; var r1a = b['1']; var r2a = b['2']; var r3 = b['3']; var r4 = b[1]; var r5 = b[2]; var r6 = b[3]; -var b2 = { 1: '', "2": '' }; +var b2 = { + 1: '', + "2": '' +}; var r1b = b2['1']; var r2b = b2['2']; var r3 = b2['3']; diff --git a/tests/baselines/reference/objectLitIndexerContextualType.js b/tests/baselines/reference/objectLitIndexerContextualType.js index f0cf90724b3..a6124814cff 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.js +++ b/tests/baselines/reference/objectLitIndexerContextualType.js @@ -26,14 +26,22 @@ y = { var x; var y; x = { - s: function (t) { return t * t; } + s: function (t) { + return t * t; + } }; x = { - 0: function (t) { return t * t; } + 0: function (t) { + return t * t; + } }; y = { - s: function (t) { return t * t; } + s: function (t) { + return t * t; + } }; y = { - 0: function (t) { return t * t; } + 0: function (t) { + return t * t; + } }; diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.js b/tests/baselines/reference/objectLitStructuralTypeMismatch.js index 380b8a2aacf..c24f742f082 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.js +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.js @@ -4,4 +4,6 @@ var x: { a: number; } = { b: 5 }; //// [objectLitStructuralTypeMismatch.js] // Shouldn't compile -var x = { b: 5 }; +var x = { + b: 5 +}; diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.js b/tests/baselines/reference/objectLitTargetTypeCallSite.js index 999b889e415..76cd4c660dc 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.js +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.js @@ -9,4 +9,7 @@ process({a:true,b:"y"}); function process(x) { return x.a; } -process({ a: true, b: "y" }); +process({ + a: true, + b: "y" +}); diff --git a/tests/baselines/reference/objectLiteral1.js b/tests/baselines/reference/objectLiteral1.js index ebeabd011b5..7d625c8e815 100644 --- a/tests/baselines/reference/objectLiteral1.js +++ b/tests/baselines/reference/objectLiteral1.js @@ -2,4 +2,7 @@ var v30 = {a:1, b:2}; //// [objectLiteral1.js] -var v30 = { a: 1, b: 2 }; +var v30 = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/objectLiteral2.js b/tests/baselines/reference/objectLiteral2.js index 189e495c5f5..b517d99b05d 100644 --- a/tests/baselines/reference/objectLiteral2.js +++ b/tests/baselines/reference/objectLiteral2.js @@ -2,4 +2,7 @@ var v30 = {a:1, b:2}, v31; //// [objectLiteral2.js] -var v30 = { a: 1, b: 2 }, v31; +var v30 = { + a: 1, + b: 2 +}, v31; diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.js b/tests/baselines/reference/objectLiteralArraySpecialization.js index 0a48a3dccdd..9f704adba0e 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.js +++ b/tests/baselines/reference/objectLiteralArraySpecialization.js @@ -9,5 +9,16 @@ thing.doSomething((x, y) => x.name === "bob"); // should not error //// [objectLiteralArraySpecialization.js] -var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // should not error -thing.doSomething(function (x, y) { return x.name === "bob"; }); // should not error +var thing = create([ + { + name: "bob", + id: 24 + }, + { + name: "doug", + id: 32 + } +]); // should not error +thing.doSomething(function (x, y) { + return x.name === "bob"; +}); // should not error diff --git a/tests/baselines/reference/objectLiteralContextualTyping.js b/tests/baselines/reference/objectLiteralContextualTyping.js index 48686042754..c61452c2057 100644 --- a/tests/baselines/reference/objectLiteralContextualTyping.js +++ b/tests/baselines/reference/objectLiteralContextualTyping.js @@ -29,13 +29,23 @@ var b: {}; //// [objectLiteralContextualTyping.js] // Tests related to #1774 -var x = foo({ name: "Sprocket" }); +var x = foo({ + name: "Sprocket" +}); var x; -var y = foo({ name: "Sprocket", description: "Bumpy wheel" }); +var y = foo({ + name: "Sprocket", + description: "Bumpy wheel" +}); var y; -var z = foo({ name: "Sprocket", description: false }); +var z = foo({ + name: "Sprocket", + description: false +}); var z; -var w = foo({ a: 10 }); +var w = foo({ + a: 10 +}); var w; var b = bar({}); var b; diff --git a/tests/baselines/reference/objectLiteralErrors.js b/tests/baselines/reference/objectLiteralErrors.js index 4dccc78b67d..ac1ab2ec10e 100644 --- a/tests/baselines/reference/objectLiteralErrors.js +++ b/tests/baselines/reference/objectLiteralErrors.js @@ -48,44 +48,210 @@ var g3 = { get a(): number { return undefined; }, set a(n: string) { } }; //// [objectLiteralErrors.js] // Multiple properties with the same name -var e1 = { a: 0, a: 0 }; -var e2 = { a: '', a: '' }; -var e3 = { a: 0, a: '' }; -var e4 = { a: true, a: false }; -var e5 = { a: {}, a: {} }; -var e6 = { a: 0, 'a': 0 }; -var e7 = { 'a': 0, a: 0 }; -var e8 = { 'a': 0, "a": 0 }; -var e9 = { 'a': 0, 'a': 0 }; -var e10 = { "a": 0, 'a': 0 }; -var e11 = { 1.0: 0, '1': 0 }; -var e12 = { 0: 0, 0: 0 }; -var e13 = { 0: 0, 0: 0 }; -var e14 = { 0: 0, 0x0: 0 }; -var e14 = { 0: 0, 000: 0 }; -var e15 = { "100": 0, 1e2: 0 }; -var e16 = { 0x20: 0, 3.2e1: 0 }; -var e17 = { a: 0, b: 1, a: 0 }; +var e1 = { + a: 0, + a: 0 +}; +var e2 = { + a: '', + a: '' +}; +var e3 = { + a: 0, + a: '' +}; +var e4 = { + a: true, + a: false +}; +var e5 = { + a: {}, + a: {} +}; +var e6 = { + a: 0, + 'a': 0 +}; +var e7 = { + 'a': 0, + a: 0 +}; +var e8 = { + 'a': 0, + "a": 0 +}; +var e9 = { + 'a': 0, + 'a': 0 +}; +var e10 = { + "a": 0, + 'a': 0 +}; +var e11 = { + 1.0: 0, + '1': 0 +}; +var e12 = { + 0: 0, + 0: 0 +}; +var e13 = { + 0: 0, + 0: 0 +}; +var e14 = { + 0: 0, + 0x0: 0 +}; +var e14 = { + 0: 0, + 000: 0 +}; +var e15 = { + "100": 0, + 1e2: 0 +}; +var e16 = { + 0x20: 0, + 3.2e1: 0 +}; +var e17 = { + a: 0, + b: 1, + a: 0 +}; // Accessor and property with the same name -var f1 = { a: 0, get a() { return 0; } }; -var f2 = { a: '', get a() { return ''; } }; -var f3 = { a: 0, get a() { return ''; } }; -var f4 = { a: true, get a() { return false; } }; -var f5 = { a: {}, get a() { return {}; } }; -var f6 = { a: 0, get 'a'() { return 0; } }; -var f7 = { 'a': 0, get a() { return 0; } }; -var f8 = { 'a': 0, get "a"() { return 0; } }; -var f9 = { 'a': 0, get 'a'() { return 0; } }; -var f10 = { "a": 0, get 'a'() { return 0; } }; -var f11 = { 1.0: 0, get '1'() { return 0; } }; -var f12 = { 0: 0, get 0() { return 0; } }; -var f13 = { 0: 0, get 0() { return 0; } }; -var f14 = { 0: 0, get 0x0() { return 0; } }; -var f14 = { 0: 0, get 000() { return 0; } }; -var f15 = { "100": 0, get 1e2() { return 0; } }; -var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; -var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; +var f1 = { + a: 0, + get a() { + return 0; + } +}; +var f2 = { + a: '', + get a() { + return ''; + } +}; +var f3 = { + a: 0, + get a() { + return ''; + } +}; +var f4 = { + a: true, + get a() { + return false; + } +}; +var f5 = { + a: {}, + get a() { + return {}; + } +}; +var f6 = { + a: 0, + get 'a'() { + return 0; + } +}; +var f7 = { + 'a': 0, + get a() { + return 0; + } +}; +var f8 = { + 'a': 0, + get "a"() { + return 0; + } +}; +var f9 = { + 'a': 0, + get 'a'() { + return 0; + } +}; +var f10 = { + "a": 0, + get 'a'() { + return 0; + } +}; +var f11 = { + 1.0: 0, + get '1'() { + return 0; + } +}; +var f12 = { + 0: 0, + get 0() { + return 0; + } +}; +var f13 = { + 0: 0, + get 0() { + return 0; + } +}; +var f14 = { + 0: 0, + get 0x0() { + return 0; + } +}; +var f14 = { + 0: 0, + get 000() { + return 0; + } +}; +var f15 = { + "100": 0, + get 1e2() { + return 0; + } +}; +var f16 = { + 0x20: 0, + get 3.2e1() { + return 0; + } +}; +var f17 = { + a: 0, + get b() { + return 1; + }, + get a() { + return 0; + } +}; // Get and set accessor with mismatched type annotations -var g1 = { get a() { return 4; }, set a(n) { } }; -var g2 = { get a() { return 4; }, set a(n) { } }; -var g3 = { get a() { return undefined; }, set a(n) { } }; +var g1 = { + get a() { + return 4; + }, + set a(n) { + } +}; +var g2 = { + get a() { + return 4; + }, + set a(n) { + } +}; +var g3 = { + get a() { + return undefined; + }, + set a(n) { + } +}; diff --git a/tests/baselines/reference/objectLiteralErrorsES3.js b/tests/baselines/reference/objectLiteralErrorsES3.js index 031a68fd109..f2910c37c3e 100644 --- a/tests/baselines/reference/objectLiteralErrorsES3.js +++ b/tests/baselines/reference/objectLiteralErrorsES3.js @@ -7,6 +7,19 @@ var e3 = { get a() { return ''; }, set a(n) { } }; //// [objectLiteralErrorsES3.js] -var e1 = { get a() { return 4; } }; -var e2 = { set a(n) { } }; -var e3 = { get a() { return ''; }, set a(n) { } }; +var e1 = { + get a() { + return 4; + } +}; +var e2 = { + set a(n) { + } +}; +var e3 = { + get a() { + return ''; + }, + set a(n) { + } +}; diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js index 7f9bdc5c54a..b0f18da34df 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js @@ -14,10 +14,31 @@ f2({ toString: (s: string) => s }) // error, missing property value from ArgsStr f2({ value: '', toString: (s) => s.uhhh }) // error //// [objectLiteralFunctionArgContextualTyping.js] -function f2(args) { } -f2({ hello: 1 }); // error -f2({ value: '' }); // missing toString satisfied by Object's member -f2({ value: '', what: 1 }); // missing toString satisfied by Object's member -f2({ toString: function (s) { return s; } }); // error, missing property value from ArgsString -f2({ toString: function (s) { return s; } }); // error, missing property value from ArgsString -f2({ value: '', toString: function (s) { return s.uhhh; } }); // error +function f2(args) { +} +f2({ + hello: 1 +}); // error +f2({ + value: '' +}); // missing toString satisfied by Object's member +f2({ + value: '', + what: 1 +}); // missing toString satisfied by Object's member +f2({ + toString: function (s) { + return s; + } +}); // error, missing property value from ArgsString +f2({ + toString: function (s) { + return s; + } +}); // error, missing property value from ArgsString +f2({ + value: '', + toString: function (s) { + return s.uhhh; + } +}); // error diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js index 96d1106e1ff..73d22c8dd51 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js @@ -14,10 +14,31 @@ f2({ toString: (s: string) => s }) f2({ value: '', toString: (s) => s.uhhh }) //// [objectLiteralFunctionArgContextualTyping2.js] -function f2(args) { } -f2({ hello: 1 }); -f2({ value: '' }); -f2({ value: '', what: 1 }); -f2({ toString: function (s) { return s; } }); -f2({ toString: function (s) { return s; } }); -f2({ value: '', toString: function (s) { return s.uhhh; } }); +function f2(args) { +} +f2({ + hello: 1 +}); +f2({ + value: '' +}); +f2({ + value: '', + what: 1 +}); +f2({ + toString: function (s) { + return s; + } +}); +f2({ + toString: function (s) { + return s; + } +}); +f2({ + value: '', + toString: function (s) { + return s.uhhh; + } +}); diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.js b/tests/baselines/reference/objectLiteralGettersAndSetters.js index d226c2c5569..bdaf0966e10 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.js +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.js @@ -85,40 +85,139 @@ var getParamType3 = { //// [objectLiteralGettersAndSetters.js] // Get and set accessor with the same name -var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p; } }; -var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p; } }; -var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p; } }; -var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p; } }; -var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p; } }; -var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p; } }; +var sameName1a = { + get 'a'() { + return ''; + }, + set a(n) { + var p = n; + var p; + } +}; +var sameName2a = { + get 0.0() { + return ''; + }, + set 0(n) { + var p = n; + var p; + } +}; +var sameName3a = { + get 0x20() { + return ''; + }, + set 3.2e1(n) { + var p = n; + var p; + } +}; +var sameName4a = { + get ''() { + return ''; + }, + set ""(n) { + var p = n; + var p; + } +}; +var sameName5a = { + get '\t'() { + return ''; + }, + set '\t'(n) { + var p = n; + var p; + } +}; +var sameName6a = { + get 'a'() { + return ''; + }, + set a(n) { + var p = n; + var p; + } +}; // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num: function (n) { return ''; } }; +var callSig1 = { + num: function (n) { + return ''; + } +}; var callSig1; -var callSig2 = { num: function (n) { return ''; } }; +var callSig2 = { + num: function (n) { + return ''; + } +}; var callSig2; -var callSig3 = { num: function (n) { return ''; } }; +var callSig3 = { + num: function (n) { + return ''; + } +}; var callSig3; // Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x() { return undefined; } }; +var getter1 = { + get x() { + return undefined; + } +}; var getter1; // Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x() { return ''; } }; +var getter2 = { + get x() { + return ''; + } +}; var getter2; // Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n) { } }; +var setter1 = { + set x(n) { + } +}; var setter1; // Set accessor only, type of the property is Any for an unannotated set accessor -var setter2 = { set x(n) { } }; +var setter2 = { + set x(n) { + } +}; var setter2; var anyVar; // Get and set accessor with matching type annotations -var sameType1 = { get x() { return undefined; }, set x(n) { } }; -var sameType2 = { get x() { return undefined; }, set x(n) { } }; -var sameType3 = { get x() { return undefined; }, set x(n) { } }; -var sameType4 = { get x() { return undefined; }, set x(n) { } }; +var sameType1 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType2 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType3 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType4 = { + get x() { + return undefined; + }, + set x(n) { + } +}; // Type of unannotated get accessor return type is the type annotation of the set accessor param var setParamType1 = { - set n(x) { }, + set n(x) { + }, get n() { return function (t) { var p; @@ -133,7 +232,8 @@ var setParamType2 = { var p = t; }; }, - set n(x) { } + set n(x) { + } }; // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { @@ -141,10 +241,14 @@ var getParamType1 = { var y = x; var y; }, - get n() { return ''; } + get n() { + return ''; + } }; var getParamType2 = { - get n() { return ''; }, + get n() { + return ''; + }, set n(x) { var y = x; var y; @@ -152,7 +256,9 @@ var getParamType2 = { }; // Type of unannotated accessors is the inferred return type of the get accessor var getParamType3 = { - get n() { return ''; }, + get n() { + return ''; + }, set n(x) { var y = x; var y; diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.js b/tests/baselines/reference/objectLiteralIndexerErrors.js index 5e0159015d5..2c619743094 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.js +++ b/tests/baselines/reference/objectLiteralIndexerErrors.js @@ -18,5 +18,11 @@ o1 = { x: c, 0: a }; // string indexer is any, number indexer is A var a; var b; var c; -var o1 = { x: b, 0: a }; // both indexers are A -o1 = { x: c, 0: a }; // string indexer is any, number indexer is A +var o1 = { + x: b, + 0: a +}; // both indexers are A +o1 = { + x: c, + 0: a +}; // string indexer is any, number indexer is A diff --git a/tests/baselines/reference/objectLiteralIndexers.js b/tests/baselines/reference/objectLiteralIndexers.js index c36cbfc7571..97bb3ee78cc 100644 --- a/tests/baselines/reference/objectLiteralIndexers.js +++ b/tests/baselines/reference/objectLiteralIndexers.js @@ -19,6 +19,15 @@ o1 = { x: c, 0: b }; // string indexer is any, number indexer is B var a; var b; var c; -var o1 = { x: a, 0: b }; // string indexer is A, number indexer is B -o1 = { x: b, 0: c }; // both indexers are any -o1 = { x: c, 0: b }; // string indexer is any, number indexer is B +var o1 = { + x: a, + 0: b +}; // string indexer is A, number indexer is B +o1 = { + x: b, + 0: c +}; // both indexers are any +o1 = { + x: c, + 0: b +}; // string indexer is any, number indexer is B diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js index a4389d49bdf..998bc292740 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js @@ -2,4 +2,7 @@ var v = { public foo() { } } //// [objectLiteralMemberWithModifiers1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js index ffe2b6678df..d8cb4a3ad49 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js @@ -2,4 +2,7 @@ var v = { public get foo() { } } //// [objectLiteralMemberWithModifiers2.js] -var v = { get foo() { } }; +var v = { + get foo() { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js index 62f7a6eefe2..539c7a1cca9 100644 --- a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js +++ b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js @@ -2,4 +2,7 @@ var v = { foo?() { } } //// [objectLiteralMemberWithQuestionMark1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js b/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js index d6a8579be04..b8cd54803a5 100644 --- a/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js +++ b/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js @@ -2,4 +2,6 @@ var v = { foo(); } //// [objectLiteralMemberWithoutBlock1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { } +}; diff --git a/tests/baselines/reference/objectLiteralParameterResolution.js b/tests/baselines/reference/objectLiteralParameterResolution.js index 5912a2229b1..1d680623600 100644 --- a/tests/baselines/reference/objectLiteralParameterResolution.js +++ b/tests/baselines/reference/objectLiteralParameterResolution.js @@ -23,7 +23,9 @@ var s = $.extend({ success: wrapSuccessCallback(requestContext, callback), error: wrapErrorCallback(requestContext, errorCallback), dataType: "json", - converters: { "text json": "" }, + converters: { + "text json": "" + }, traditional: true, timeout: 12 }, ""); diff --git a/tests/baselines/reference/objectLiteralReferencingInternalProperties.js b/tests/baselines/reference/objectLiteralReferencingInternalProperties.js index 793fa0c588a..1215dda92a7 100644 --- a/tests/baselines/reference/objectLiteralReferencingInternalProperties.js +++ b/tests/baselines/reference/objectLiteralReferencingInternalProperties.js @@ -2,4 +2,7 @@ var a = { b: 10, c: b }; // Should give error for attempting to reference b. //// [objectLiteralReferencingInternalProperties.js] -var a = { b: 10, c: b }; // Should give error for attempting to reference b. +var a = { + b: 10, + c: b +}; // Should give error for attempting to reference b. diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.js b/tests/baselines/reference/objectLiteralShorthandProperties.js index bc18ecfb948..776b2bbe454 100644 --- a/tests/baselines/reference/objectLiteralShorthandProperties.js +++ b/tests/baselines/reference/objectLiteralShorthandProperties.js @@ -32,7 +32,8 @@ var x3 = { a: 0, b: b, c: c, - d: function () { }, + d: function () { + }, x3: x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js index 251098eb6c8..f9b1e2caa9a 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js @@ -17,12 +17,30 @@ var person3: { name: string; id:number } = bar("Hello", 5); //// [objectLiteralShorthandPropertiesAssignment.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(obj) { } +var person = { + name: name, + id: id +}; +function foo(obj) { +} ; -function bar(name, id) { return { name: name, id: id }; } -function bar1(name, id) { return { name: name }; } -function baz(name, id) { return { name: name, id: id }; } +function bar(name, id) { + return { + name: name, + id: id + }; +} +function bar1(name, id) { + return { + name: name + }; +} +function baz(name, id) { + return { + name: name, + id: id + }; +} foo(person); var person1 = bar("Hello", 5); var person2 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js index 247ec56d127..4b21d8052ea 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js @@ -17,12 +17,30 @@ var person3: { name: string; id: number } = bar("Hello", 5); //// [objectLiteralShorthandPropertiesAssignmentES6.js] var id = 10000; var name = "my name"; -var person = { name, id }; -function foo(obj) { } +var person = { + name, + id +}; +function foo(obj) { +} ; -function bar(name, id) { return { name, id }; } -function bar1(name, id) { return { name }; } -function baz(name, id) { return { name, id }; } +function bar(name, id) { + return { + name, + id + }; +} +function bar1(name, id) { + return { + name + }; +} +function baz(name, id) { + return { + name, + id + }; +} foo(person); var person1 = bar("Hello", 5); var person2 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js index 8e2d7f80356..4f99576c30e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js @@ -13,9 +13,21 @@ bar({ name, id }); // error //// [objectLiteralShorthandPropertiesAssignmentError.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; // error +var person = { + name: name, + id: id +}; // error var person1 = name, id; ; // error: can't use short-hand property assignment in type position -function foo(name, id) { return { name: name, id: id }; } // error -function bar(obj) { } -bar({ name: name, id: id }); // error +function foo(name, id) { + return { + name: name, + id: id + }; +} // error +function bar(obj) { +} +bar({ + name: name, + id: id +}); // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js index 71449746add..1ccdb274865 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js @@ -11,9 +11,22 @@ var person2: { name: string, id: number } = bar("hello", 5); //// [objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; // error -function bar(name, id) { return { name: name, id: id }; } // error -function foo(name, id) { return { name: name, id: id }; } // error +var person = { + name: name, + id: id +}; // error +function bar(name, id) { + return { + name: name, + id: id + }; +} // error +function foo(name, id) { + return { + name: name, + id: id + }; +} // error var person1 = name, id; ; // error : Can't use shorthand in the type position var person2 = bar("hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js index 9b19bdc8b5e..c65087a8da7 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js @@ -32,7 +32,8 @@ var x3 = { a: 0, b, c, - d() { }, + d() { + }, x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index b72f0351b9c..3c457178b3e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -25,8 +25,10 @@ var v = { class }; // error var y = { "stringLiteral": , 42: , - get e() { }, - set f() { }, + get e() { + }, + set f() { + }, this: , super: , var: , @@ -35,7 +37,13 @@ var y = { }; var x = { a: .b, - a: ["ss"], - a: [1] + a: [ + "ss" + ], + a: [ + 1 + ] }; -var v = { class: }; // error +var v = { + class: +}; // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js index 860abc24b19..65eed2eace7 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js @@ -13,7 +13,14 @@ var obj = { name: name, id: id }; //// [objectLiteralShorthandPropertiesFunctionArgument.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(p) { } +var person = { + name: name, + id: id +}; +function foo(p) { +} foo(person); -var obj = { name: name, id: id }; +var obj = { + name: name, + id: id +}; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js index 7e9d2e7ca8b..3f396091d05 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js @@ -11,6 +11,10 @@ foo(person); // error //// [objectLiteralShorthandPropertiesFunctionArgument2.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(p) { } +var person = { + name: name, + id: id +}; +function foo(p) { +} foo(person); // error diff --git a/tests/baselines/reference/objectLiteralWithSemicolons1.js b/tests/baselines/reference/objectLiteralWithSemicolons1.js index b820b14428c..85aa5f268c5 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons1.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons1.js @@ -2,4 +2,8 @@ var v = { a; b; c } //// [objectLiteralWithSemicolons1.js] -var v = { a: , b: , c: c }; +var v = { + a: , + b: , + c: c +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.js b/tests/baselines/reference/objectLiteralWithSemicolons4.js index a01d52548ee..9e1e3dea4b9 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons4.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.js @@ -5,4 +5,5 @@ var v = { //// [objectLiteralWithSemicolons4.js] var v = { - a: }; + a: +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons5.js b/tests/baselines/reference/objectLiteralWithSemicolons5.js index 1c9c4ddf544..36fef30ad75 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons5.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons5.js @@ -2,4 +2,10 @@ var v = { foo() { }; a: b; get baz() { }; } //// [objectLiteralWithSemicolons5.js] -var v = { foo: function () { }, a: b, get baz() { } }; +var v = { + foo: function () { + }, + a: b, + get baz() { + } +}; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 16268c1331c..fa41e57e22e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -76,7 +76,8 @@ var B = (function (_super) { var C = (function () { function C() { } - C.prototype.valueOf = function () { }; + C.prototype.valueOf = function () { + }; return C; })(); var c; @@ -90,7 +91,8 @@ var r2b = i.data; var r2c = r2b['hm']; // should be 'Object' var r2d = i['hm']; // should be 'any' var a = { - valueOf: function () { }, + valueOf: function () { + }, data: new B() }; var r3 = a.valueOf(); diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObject.js b/tests/baselines/reference/objectTypeHidingMembersOfObject.js index 291cc1858fd..113329cf8b6 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObject.js @@ -32,7 +32,8 @@ var r4: void = b.valueOf(); var C = (function () { function C() { } - C.prototype.valueOf = function () { }; + C.prototype.valueOf = function () { + }; return C; })(); var c; @@ -40,7 +41,8 @@ var r1 = c.valueOf(); var i; var r2 = i.valueOf(); var a = { - valueOf: function () { } + valueOf: function () { + } }; var r3 = a.valueOf(); var b; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js index 5ae0c2fb1bb..93d985f7987 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js @@ -29,14 +29,16 @@ i = o; // ok var C = (function () { function C() { } - C.prototype.toString = function () { }; + C.prototype.toString = function () { + }; return C; })(); var c; o = c; // error c = o; // ok var a = { - toString: function () { } + toString: function () { + } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js index 7a2b5e2ec2f..b8a5aa87aef 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js @@ -29,14 +29,17 @@ i = o; // error var C = (function () { function C() { } - C.prototype.toString = function () { return 1; }; + C.prototype.toString = function () { + return 1; + }; return C; })(); var c; o = c; // error c = o; // error var a = { - toString: function () { } + toString: function () { + } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypesIdentity.js b/tests/baselines/reference/objectTypesIdentity.js index 7eccee23651..b757c18ac4f 100644 --- a/tests/baselines/reference/objectTypesIdentity.js +++ b/tests/baselines/reference/objectTypesIdentity.js @@ -106,21 +106,40 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentity2.js b/tests/baselines/reference/objectTypesIdentity2.js index 87057754cab..f721fb04b52 100644 --- a/tests/baselines/reference/objectTypesIdentity2.js +++ b/tests/baselines/reference/objectTypesIdentity2.js @@ -87,15 +87,28 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -var b = { foo: E.A }; -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: E.A +}; +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js index 0c6952291f9..3465085bdaf 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js index 43473d88e0a..5a45e4b5af0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js index f4cfc8dc605..289ba25bf6e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js @@ -42,10 +42,17 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures3.js] // object types are identical structurally var a; -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js index 498867f0a02..c258bc277d7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js index 98b17767b75..fe84b3e6b92 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js @@ -46,11 +46,19 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js] // object types are identical structurally var a; -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js index 54400ad81d1..29cb6f3cd54 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js @@ -121,41 +121,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; var b = { - foo: function (x) { return ''; } + foo: function (x) { + return ''; + } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js index ca9db28223a..9f16153da37 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js @@ -15,4 +15,5 @@ function foo(x: B); // error after constraints above made illegal function foo(x: any) { } //// [objectTypesIdentityWithComplexConstraints.js] -function foo(x) { } +function foo(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js index 91208da5b90..caf28cd05de 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js @@ -105,19 +105,35 @@ var C = (function () { return C; })(); var a; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 87067b6be28..641524de5a6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -91,18 +91,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index c95159ed997..171dd5c3513 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -91,18 +91,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js index c8bed1a47ab..f366e79341f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js index 6ef5d15fd98..9d184204345 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js index 2b83064afed..b5b7f6414e0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js index 1f9c5fa5256..cc1957eef3d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js @@ -121,47 +121,80 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { return null; }; + D.prototype.foo = function (x, y) { + return null; + }; return D; })(); var a; -var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js index 21106b56b00..9774cbd2b41 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js @@ -140,47 +140,80 @@ var Two = (function () { var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { return null; }; + D.prototype.foo = function (x, y) { + return null; + }; return D; })(); var a; -var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js index 99188347d36..ac686014aa6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return null; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return null; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js index 10d72bde0b3..e25e379bde8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return null; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return null; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js index 5a20dfdecb6..48e98f904b0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js index 6bfd019dc86..944fb7d9846 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js @@ -43,10 +43,17 @@ function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js] // object types are identical structurally var a; -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js index ec9c786b890..518bbe550ec 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js index a4af2bc820e..f84341e589b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js index 28b2f978b55..ea385109821 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js index de9b4859fa1..34acdef8599 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index fdc67d4b84a..b252fc7f8fe 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -92,17 +92,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index 11dcdf0a609..e6450471a47 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -109,19 +109,38 @@ var D = (function () { return D; })(); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 5c6f59eef24..0a276be9f7a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -128,19 +128,38 @@ var D = (function () { return D; })(); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index 556d1bcaee0..e1c64ed0ec6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -99,19 +99,38 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return null; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index 68c32cb0e71..ade431026d5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -95,18 +95,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return null; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index 789e02d2d7b..014b4126f2c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -87,17 +87,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return x; } }; -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return x; + } +}; +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index 5a501d05834..d30a3a798a2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -87,17 +87,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return new C(x); } }; -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return new C(x); + } +}; +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 685a8441d97..f71ef509ca9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index f16d69acaa1..00994a57fc8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index 25c628e9e15..572a9db5d33 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 1dc6505456a..e49566c5531 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index e2fd1b99bfa..ae00306f397 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -175,27 +175,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: null }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: null +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 11d64efc9d5..cc9d605153c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.js b/tests/baselines/reference/objectTypesIdentityWithOptionality.js index 2a61cda1bb9..4fe529a1342 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.js +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.js @@ -74,13 +74,24 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo2(x) { } -function foo3(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo10(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo2(x) { +} +function foo3(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo10(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 5c8a0afed72..e8072e7f186 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -158,27 +158,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 36c3e67c70e..4e62e7b551a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -58,11 +58,17 @@ var D = (function (_super) { } return D; })(C); -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} var r = foo4(new C()); var r = foo4(new D()); -function foo5(x) { } -function foo6(x) { } +function foo5(x) { +} +function foo6(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.js b/tests/baselines/reference/objectTypesIdentityWithPublics.js index 7c36eb48f2c..59b6e315c10 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.js +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.js @@ -106,21 +106,40 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 37c5537aa4b..f9abb678959 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index e90dc8598e4..6bb5369122a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -175,27 +175,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: null }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: null +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.js b/tests/baselines/reference/objectTypesWithOptionalProperties2.js index cf0d113c244..3faa10447b6 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.js +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.js @@ -42,5 +42,7 @@ var C2 = (function () { return C2; })(); var b = { - x: function () { }, 1: // error + x: function () { + }, + 1: // error }; diff --git a/tests/baselines/reference/optionalAccessorsInInterface1.js b/tests/baselines/reference/optionalAccessorsInInterface1.js index dd274b133e5..cf6a795b6bd 100644 --- a/tests/baselines/reference/optionalAccessorsInInterface1.js +++ b/tests/baselines/reference/optionalAccessorsInInterface1.js @@ -17,5 +17,13 @@ defineMyProperty2({}, "name", { get: function () { return 5; } }); //// [optionalAccessorsInInterface1.js] -defineMyProperty({}, "name", { get: function () { return 5; } }); -defineMyProperty2({}, "name", { get: function () { return 5; } }); +defineMyProperty({}, "name", { + get: function () { + return 5; + } +}); +defineMyProperty2({}, "name", { + get: function () { + return 5; + } +}); diff --git a/tests/baselines/reference/optionalBindingParameters1.js b/tests/baselines/reference/optionalBindingParameters1.js index 536cb1e567a..e2286bf40bd 100644 --- a/tests/baselines/reference/optionalBindingParameters1.js +++ b/tests/baselines/reference/optionalBindingParameters1.js @@ -12,5 +12,13 @@ foo([false, 0, ""]); function foo(_a) { var x = _a[0], y = _a[1], z = _a[2]; } -foo(["", 0, false]); -foo([false, 0, ""]); +foo([ + "", + 0, + false +]); +foo([ + false, + 0, + "" +]); diff --git a/tests/baselines/reference/optionalBindingParameters2.js b/tests/baselines/reference/optionalBindingParameters2.js index 04e1138561a..f9c55ebd4a3 100644 --- a/tests/baselines/reference/optionalBindingParameters2.js +++ b/tests/baselines/reference/optionalBindingParameters2.js @@ -12,5 +12,13 @@ foo({ x: false, y: 0, z: "" }); function foo(_a) { var x = _a.x, y = _a.y, z = _a.z; } -foo({ x: "", y: 0, z: false }); -foo({ x: false, y: 0, z: "" }); +foo({ + x: "", + y: 0, + z: false +}); +foo({ + x: false, + y: 0, + z: "" +}); diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads1.js b/tests/baselines/reference/optionalBindingParametersInOverloads1.js index 3658efa72c6..40f60108aa7 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads1.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads1.js @@ -16,5 +16,13 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -foo(["", 0, false]); -foo([false, 0, ""]); +foo([ + "", + 0, + false +]); +foo([ + false, + 0, + "" +]); diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads2.js b/tests/baselines/reference/optionalBindingParametersInOverloads2.js index 1ddfdae4f07..18e4c10fc93 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads2.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads2.js @@ -16,5 +16,13 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -foo({ x: "", y: 0, z: false }); -foo({ x: false, y: 0, z: "" }); +foo({ + x: "", + y: 0, + z: false +}); +foo({ + x: false, + y: 0, + z: "" +}); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 5204d7f8307..45c0e032cd8 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(opt) { } - Base.prototype.foo = function (other) { }; + Base.prototype.foo = function (other) { + }; return Base; })(); var Derived = (function (_super) { diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.js b/tests/baselines/reference/optionalFunctionArgAssignability.js index c82a47e88da..bca42060066 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.js +++ b/tests/baselines/reference/optionalFunctionArgAssignability.js @@ -9,6 +9,10 @@ a = b; // error because number is not assignable to string //// [optionalFunctionArgAssignability.js] -var a = function then(onFulfill, onReject) { return null; }; -var b = function then(onFulFill, onReject) { return null; }; +var a = function then(onFulfill, onReject) { + return null; +}; +var b = function then(onFulFill, onReject) { + return null; +}; a = b; // error because number is not assignable to string diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 5598f8d0872..6837c024ffb 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -139,8 +139,12 @@ var C1 = (function () { if (p === void 0) { p = 0; } this.n = 0; } - C1.prototype.C1M1 = function () { return 0; }; // returning C1M1A1 will result in "Unresolved symbol C1M1A1" - C1.prototype.C1M2 = function (C1M2A1) { return C1M2A1; }; // will return C1M1A2 without complaint + C1.prototype.C1M1 = function () { + return 0; + }; // returning C1M1A1 will result in "Unresolved symbol C1M1A1" + C1.prototype.C1M2 = function (C1M2A1) { + return C1M2A1; + }; // will return C1M1A2 without complaint // C1M3 contains all optional parameters C1.prototype.C1M3 = function (C1M3A1, C1M3A2) { if (C1M3A1 === void 0) { C1M3A1 = 0; } @@ -148,7 +152,9 @@ var C1 = (function () { return C1M3A1 + C1M3A2; }; // C1M4 contains a mix of optional and non-optional parameters - C1.prototype.C1M4 = function (C1M4A1, C1M4A2) { return C1M4A1 + C1M4A2; }; + C1.prototype.C1M4 = function (C1M4A1, C1M4A2) { + return C1M4A1 + C1M4A2; + }; C1.prototype.C1M5 = function (C1M5A1, C1M5A2, C1M5A3) { if (C1M5A2 === void 0) { C1M5A2 = 0; } return C1M5A1 + C1M5A2; @@ -169,22 +175,34 @@ var C2 = (function (_super) { } return C2; })(C1); -function F1() { return 0; } -function F2(F2A1) { return F2A1; } +function F1() { + return 0; +} +function F2(F2A1) { + return F2A1; +} function F3(F3A1, F3A2) { if (F3A1 === void 0) { F3A1 = 0; } if (F3A2 === void 0) { F3A2 = F3A1; } return F3A1 + F3A2; } -function F4(F4A1, F4A2) { return F4A1 + F4A2; } -var L1 = function () { return 0; }; -var L2 = function (L2A1) { return L2A1; }; +function F4(F4A1, F4A2) { + return F4A1 + F4A2; +} +var L1 = function () { + return 0; +}; +var L2 = function (L2A1) { + return L2A1; +}; var L3 = function (L3A1, L3A2) { if (L3A1 === void 0) { L3A1 = 0; } if (L3A2 === void 0) { L3A2 = L3A1; } return L3A1 + L3A2; }; -var L4 = function (L4A1, L4A2) { return L4A1 + L4A2; }; +var L4 = function (L4A1, L4A2) { + return L4A1 + L4A2; +}; var c1o1 = new C1(5); var i1o1 = new C1(5); // Valid @@ -246,6 +264,17 @@ function fnOpt1(id, children, expectedPath, isRoot) { if (children === void 0) { children = []; } if (expectedPath === void 0) { expectedPath = []; } } -function fnOpt2(id, children, expectedPath, isRoot) { } -fnOpt1(1, [2, 3], [1], true); -fnOpt2(1, [2, 3], [1], true); +function fnOpt2(id, children, expectedPath, isRoot) { +} +fnOpt1(1, [ + 2, + 3 +], [ + 1 +], true); +fnOpt2(1, [ + 2, + 3 +], [ + 1 +], true); diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index cfdfce368d0..0a094c6534c 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -17,7 +17,8 @@ var __extends = this.__extends || function (d, b) { var Z = (function () { function Z() { } - Z.prototype.func = function () { }; + Z.prototype.func = function () { + }; return Z; })(); var Y = (function (_super) { @@ -25,6 +26,7 @@ var Y = (function (_super) { function Y() { _super.apply(this, arguments); } - Y.prototype.func = function (value) { }; + Y.prototype.func = function (value) { + }; return Y; })(Z); diff --git a/tests/baselines/reference/optionalPropertiesTest.js b/tests/baselines/reference/optionalPropertiesTest.js index 617db8d6185..3c68b90fdd8 100644 --- a/tests/baselines/reference/optionalPropertiesTest.js +++ b/tests/baselines/reference/optionalPropertiesTest.js @@ -43,10 +43,21 @@ test10_1 = test10_2; //// [optionalPropertiesTest.js] var x; var foo; -foo = { id: 1234 }; // Ok -foo = { id: 1234, name: "test" }; // Ok -foo = { name: "test" }; // Error, id missing -foo = { id: 1234, print: function () { } }; // Ok +foo = { + id: 1234 +}; // Ok +foo = { + id: 1234, + name: "test" +}; // Ok +foo = { + name: "test" +}; // Error, id missing +foo = { + id: 1234, + print: function () { + } +}; // Ok var s = foo.name || "default"; if (foo.print !== undefined) foo.print(); @@ -58,11 +69,21 @@ var test1 = {}; var test2 = {}; var test3 = {}; var test4 = {}; -var test5 = { M: function () { } }; -var test6 = { M: 5 }; -var test7 = { M: function () { } }; +var test5 = { + M: function () { + } +}; +var test6 = { + M: 5 +}; +var test7 = { + M: function () { + } +}; test7 = {}; -var test8 = { M: 5 }; +var test8 = { + M: 5 +}; test8 = {}; var test9_1; var test9_2; diff --git a/tests/baselines/reference/optionalSetterParam.js b/tests/baselines/reference/optionalSetterParam.js index 1632f33be9f..4b9b7f01360 100644 --- a/tests/baselines/reference/optionalSetterParam.js +++ b/tests/baselines/reference/optionalSetterParam.js @@ -10,7 +10,8 @@ var foo = (function () { function foo() { } Object.defineProperty(foo.prototype, "bar", { - set: function (param) { }, + set: function (param) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js index 9a04ea28fba..66129a5d0be 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js @@ -27,7 +27,13 @@ w({ s: "", n: 0 }).toLowerCase(); //// [orderMattersForSignatureGroupIdentity.js] var v; var v; -v({ s: "", n: 0 }).toLowerCase(); +v({ + s: "", + n: 0 +}).toLowerCase(); var w; var w; -w({ s: "", n: 0 }).toLowerCase(); +w({ + s: "", + n: 0 +}).toLowerCase(); diff --git a/tests/baselines/reference/out-flag.js.map b/tests/baselines/reference/out-flag.js.map index 9247af9d5d4..ec4c14aac2b 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;AAGf,AADA,oBAAoB;IACd,OAAO;IAAbA,SAAMA,OAAOA;IAYbC,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":["MyClass","MyClass.constructor","MyClass.Count","MyClass.SetCount"],"mappings":"AAAA,eAAe;AAGf,AADA,oBAAoB;;IACpBA;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 diff --git a/tests/baselines/reference/out-flag.sourcemap.txt b/tests/baselines/reference/out-flag.sourcemap.txt index c0289140552..0e69e34d62f 100644 --- a/tests/baselines/reference/out-flag.sourcemap.txt +++ b/tests/baselines/reference/out-flag.sourcemap.txt @@ -33,31 +33,18 @@ sourceFile:out-flag.ts 3 >Emitted(2, 21) Source(3, 21) + SourceIndex(0) --- >>>var MyClass = (function () { -1->^^^^ -2 > ^^^^^^^ -3 > ^^^^^^^^^^^^^^-> -1-> - >class -2 > MyClass -1->Emitted(3, 5) Source(4, 7) + SourceIndex(0) -2 >Emitted(3, 12) Source(4, 14) + SourceIndex(0) ---- >>> function MyClass() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -1-> -2 > class -3 > MyClass +2 > ^^-> +1-> + > 1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(4, 14) Source(4, 7) + SourceIndex(0) name (MyClass) -3 >Emitted(4, 21) Source(4, 14) + SourceIndex(0) name (MyClass) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +1->class MyClass >{ > // my function comments > public Count(): number @@ -71,7 +58,7 @@ sourceFile:out-flag.ts > } > 2 > } -1 >Emitted(5, 5) Source(16, 1) + SourceIndex(0) name (MyClass.constructor) +1->Emitted(5, 5) Source(16, 1) + SourceIndex(0) name (MyClass.constructor) 2 >Emitted(5, 6) Source(16, 2) + SourceIndex(0) name (MyClass.constructor) --- >>> // my function comments diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.js b/tests/baselines/reference/overEagerReturnTypeSpecialization.js index 67d2005eca9..3d91a6f2fa6 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.js +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.js @@ -16,7 +16,15 @@ var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 -.func(function (str) { return str.length; }); // should error -var r2 = v1.func(function (num) { return num.toString(); }) // Correctly returns an I1 -.func(function (str) { return str.length; }); // should be ok +var r1 = v1.func(function (num) { + return num.toString(); +}) // Correctly returns an I1 +.func(function (str) { + return str.length; +}); // should error +var r2 = v1.func(function (num) { + return num.toString(); +}) // Correctly returns an I1 +.func(function (str) { + return str.length; +}); // should be ok diff --git a/tests/baselines/reference/overloadAssignmentCompat.errors.txt b/tests/baselines/reference/overloadAssignmentCompat.errors.txt index aa25558203b..446f9ce614f 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.errors.txt +++ b/tests/baselines/reference/overloadAssignmentCompat.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overloadAssignmentCompat.ts(35,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadAssignmentCompat.ts(35,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/overloadAssignmentCompat.ts (1 errors) ==== @@ -37,7 +37,7 @@ tests/cases/compiler/overloadAssignmentCompat.ts(35,1): error TS2394: Overload s // error - signatures are not assignment compatible function foo():number; - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" }; diff --git a/tests/baselines/reference/overloadAssignmentCompat.js b/tests/baselines/reference/overloadAssignmentCompat.js index 2d4bd931844..f6767f6f33e 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.js +++ b/tests/baselines/reference/overloadAssignmentCompat.js @@ -65,5 +65,7 @@ function attr2(nameOrMap, value) { return "s"; } } -function foo() { return "a"; } +function foo() { + return "a"; +} ; diff --git a/tests/baselines/reference/overloadCallTest.js b/tests/baselines/reference/overloadCallTest.js index 38930b7aea3..f7eb97fc9eb 100644 --- a/tests/baselines/reference/overloadCallTest.js +++ b/tests/baselines/reference/overloadCallTest.js @@ -18,7 +18,9 @@ class foo { //// [overloadCallTest.js] var foo = (function () { function foo() { - function bar(foo) { return "foo"; } + function bar(foo) { + return "foo"; + } ; var test = bar("test"); var goo = bar(); diff --git a/tests/baselines/reference/overloadModifiersMustAgree.js b/tests/baselines/reference/overloadModifiersMustAgree.js index 3f9f7eb1415..8cb537c4410 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.js +++ b/tests/baselines/reference/overloadModifiersMustAgree.js @@ -19,7 +19,9 @@ interface I { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { }; // error - access modifiers do not agree + baz.prototype.foo = function (bar) { + }; // error - access modifiers do not agree return baz; })(); -function bar(s) { } +function bar(s) { +} diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index eb613586118..a59ca2ceda1 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -32,7 +32,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -40,7 +41,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -48,7 +50,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -56,7 +59,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); var D = (function () { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 25759d0a839..071b9372636 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -35,7 +35,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 5980c852f41..961411bf6e5 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -37,7 +37,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt index 9ac9e2253f0..7a8037b3dd7 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overloadOnConstConstraintChecks4.ts(9,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadOnConstConstraintChecks4.ts(9,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/compiler/overloadOnConstConstraintChecks4.ts (1 errors) ==== @@ -11,7 +11,7 @@ tests/cases/compiler/overloadOnConstConstraintChecks4.ts(9,1): error TS2394: Ove function foo(name: 'hi'): B; function foo(name: 'bye'): C; function foo(name: string): A; // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. function foo(name: any): Z { return null; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index b2ae1125750..5192afc35a2 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -45,7 +45,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt index 4714c06ee73..0f5126b5920 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(1,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(2,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(1,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ==== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts (2 errors) ==== function foo(a: 'hi', x: string); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: any, x: any) { } diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js index 9bd8ca3a274..4ef71de6d3b 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js @@ -6,4 +6,7 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error //// [overloadOnConstInObjectLiteralImplementingAnInterface.js] -var i2 = { x1: function (a, cb) { } }; // error +var i2 = { + x1: function (a, cb) { + } +}; // error diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js index 0c2f330b5ed..a17acae9354 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js @@ -24,7 +24,13 @@ function x1(a, cb) { cb('uh'); cb(1); // error } -var cb = function (x) { return 1; }; +var cb = function (x) { + return 1; +}; x1(1, cb); -x1(1, function (x) { return 1; }); // error -x1(1, function (x) { return 1; }); +x1(1, function (x) { + return 1; +}); // error +x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js index 52f6639e352..6c66c23f1f8 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js @@ -35,7 +35,15 @@ var C = (function () { return C; })(); var c; -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js index 980dfcb2145..33cc9c81b2c 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.x1 = function (a) { }; + C.prototype.x1 = function (a) { + }; return C; })(); diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.js b/tests/baselines/reference/overloadOnConstNoStringImplementation.js index 65fd6d07567..1fbf18d854d 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.js @@ -24,7 +24,13 @@ function x2(a, cb) { cb('uh'); cb(1); } -var cb = function (x) { return 1; }; +var cb = function (x) { + return 1; +}; x2(1, cb); // error -x2(1, function (x) { return 1; }); // error -x2(1, function (x) { return 1; }); +x2(1, function (x) { + return 1; +}); // error +x2(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js index 71d7a4e4a3f..f51f84acb2a 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js @@ -34,7 +34,15 @@ var C = (function () { return C; })(); var c; -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index bfdb66aa437..1676a2fb426 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(7,1): error TS2381: A signature with an implementation cannot use a string literal type. +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"'. @@ -10,15 +10,13 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: class Derived3 extends Base { biz() { } } function foo(name: "SPAN"): Derived1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(name: "DIV"): Derived2 { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return null; - ~~~~~~~~~~~~~~~~ - } - ~ + ~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. + return null; + } foo("HI"); ~~~~ diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index cf9bc526b51..f4037c3f668 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -21,7 +21,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -29,7 +30,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -37,7 +39,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -45,7 +48,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(name) { diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 1ee5e077c08..db042846c77 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -127,12 +127,16 @@ var SomeDerived3 = (function (_super) { } return SomeDerived3; })(SomeBase); -function fn1() { return null; } +function fn1() { + return null; +} var s = fn1(undefined); var s; // No candidate overloads found fn1({}); // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d = fn2(0, undefined); var d; // Generic and non - generic overload where generic overload is the only candidate when called without type arguments @@ -141,7 +145,9 @@ var s = fn2(0, ''); fn2('', 0); // Error // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments fn2('', 0); // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = fn3(3); var s = fn3('', 3, ''); var n = fn3(5, 5, 5); @@ -152,7 +158,8 @@ var s = fn3('', '', ''); var n = fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error -function fn4() { } +function fn4() { +} fn4('', 3); fn4(3, ''); // Error fn4('', 3); // Error @@ -167,6 +174,12 @@ fn4(null, null); // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error fn4(null, true); // Error -function fn5() { return undefined; } -var n = fn5(function (n) { return n.toFixed(); }); -var s = fn5(function (n) { return n.substr(0); }); +function fn5() { + return undefined; +} +var n = fn5(function (n) { + return n.toFixed(); +}); +var s = fn5(function (n) { + return n.substr(0); +}); diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 2571a0e02db..8b4e4316faf 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -198,6 +198,12 @@ var fn5 = (function () { } return fn5; })(); -new fn5(function (n) { return n.toFixed(); }); -new fn5(function (n) { return n.substr(0); }); -new fn5(function (n) { return n.blah; }); // Error +new fn5(function (n) { + return n.toFixed(); +}); +new fn5(function (n) { + return n.substr(0); +}); +new fn5(function (n) { + return n.blah; +}); // Error diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 9e10215b1cb..39670160759 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -177,5 +177,9 @@ new fn4(null, null); // Error new fn4(true, null); // Error new fn4(null, true); // Error var fn5; -var n = new fn5(function (n) { return n.toFixed(); }); -var s = new fn5(function (n) { return n.substr(0); }); +var n = new fn5(function (n) { + return n.toFixed(); +}); +var s = new fn5(function (n) { + return n.substr(0); +}); diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.js b/tests/baselines/reference/overloadResolutionOverCTLambda.js index 18ad08c9c82..84e8bb56ec7 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.js +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.js @@ -3,5 +3,8 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number //// [overloadResolutionOverCTLambda.js] -function foo(b) { } -foo(function (a) { return a; }); // can not convert (number)=>bool to (number)=>number +function foo(b) { +} +foo(function (a) { + return a; +}); // can not convert (number)=>bool to (number)=>number diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js index e77e8d3371f..d0ced992146 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js @@ -39,8 +39,8 @@ var Bugs; } var result = message.replace(/\{(\d+)\}/g, function (match) { var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; + for (var _a = 1; _a < arguments.length; _a++) { + rest[_a - 1] = arguments[_a]; } var index = rest[0]; return typeof args[index] !== 'undefined' ? args[index] : match; @@ -48,7 +48,13 @@ var Bugs; return result; } })(Bugs || (Bugs = {})); -function bug3(f) { return f("s"); } -function fprime(x) { return x; } +function bug3(f) { + return f("s"); +} +function fprime(x) { + return x; +} bug3(fprime); -bug3(function (x) { return x; }); +bug3(function (x) { + return x; +}); diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js index cf125bebbf5..e2b11529c36 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js @@ -26,7 +26,17 @@ var Bugs; (function (Bugs) { function bug3() { var tokens = []; - tokens.push({ startIndex: 1, type: '', bracket: 3 }); - tokens.push(({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 })); + tokens.push({ + startIndex: 1, + type: '', + bracket: 3 + }); + tokens.push(({ + startIndex: 1, + type: '', + bracket: 3, + state: null, + length: 10 + })); } })(Bugs || (Bugs = {})); diff --git a/tests/baselines/reference/overloadResolutionTest1.js b/tests/baselines/reference/overloadResolutionTest1.js index 60b99ebf7b9..2d813e6effe 100644 --- a/tests/baselines/reference/overloadResolutionTest1.js +++ b/tests/baselines/reference/overloadResolutionTest1.js @@ -26,17 +26,47 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error //// [overloadResolutionTest1.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} ; -var x1 = foo([{ a: true }]); // works -var x11 = foo([{ a: 0 }]); // works -var x111 = foo([{ a: "s" }]); // error - does not match any signature -var x1111 = foo([{ a: null }]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string -function foo2(bar) { return bar; } +var x1 = foo([ + { + a: true + } +]); // works +var x11 = foo([ + { + a: 0 + } +]); // works +var x111 = foo([ + { + a: "s" + } +]); // error - does not match any signature +var x1111 = foo([ + { + a: null + } +]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string +function foo2(bar) { + return bar; +} ; -var x2 = foo2({ a: 0 }); // works -var x3 = foo2({ a: true }); // works -var x4 = foo2({ a: "s" }); // error -function foo4(bar) { return bar; } +var x2 = foo2({ + a: 0 +}); // works +var x3 = foo2({ + a: true +}); // works +var x4 = foo2({ + a: "s" +}); // error +function foo4(bar) { + return bar; +} ; -var x = foo4({ a: true }); // error +var x = foo4({ + a: true +}); // error diff --git a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js index 03063855267..0a1a87091c1 100644 --- a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js +++ b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js @@ -7,6 +7,11 @@ x2((x) => 1 ); //// [overloadWithCallbacksWithDifferingOptionalityOnArgs.js] -function x2(callback) { } -x2(function () { return 1; }); -x2(function (x) { return 1; }); +function x2(callback) { +} +x2(function () { + return 1; +}); +x2(function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 7ebeeb2890f..e325e7ad8c0 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -35,7 +35,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -43,7 +44,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -51,7 +53,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -59,7 +62,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); var d2; diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index 1d7d2c8ecab..c6d63523576 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/overloadingOnConstants2.ts(8,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstants2.ts(9,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +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(19,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ==== tests/cases/compiler/overloadingOnConstants2.ts (4 errors) ==== @@ -13,10 +13,10 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,1): error TS2382: Specialized private y = 1; } function foo(x: "hi", items: string[]): D; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: "bye", items: string[]): E; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): C { return null; @@ -30,7 +30,7 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,1): error TS2382: Specialized //function bar(x: "hi", items: string[]): D; function bar(x: "bye", items: string[]): E; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function bar(x: string, items: string[]): C; function bar(x: string, items: string[]): C { diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt index e3a8bb08628..19afdb26806 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt @@ -1,17 +1,16 @@ -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(1,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(2,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(3,1): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(1,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. ==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ==== function foo(a: 'hi', x: string); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: any) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. \ No newline at end of file + ~~~ +!!! error TS2381: A signature with an implementation cannot use a string literal type. + } \ No newline at end of file diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js index 591826725b1..7e926a6250a 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js @@ -10,5 +10,6 @@ function boo() { test(); test(name, string); test(name ? : any); - { } + { + } } diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js index 63b4a2b1e93..1eff021f569 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js @@ -28,8 +28,12 @@ var G = (function () { } return G; })(); -var result = foo(function (x) { return new G(x); }); // x has type D, new G(x) fails, so first overload is picked. -var result2 = foo(function (x) { return new G(x); }); // x has type D, new G(x) fails, so first overload is picked. +var result = foo(function (x) { + return new G(x); +}); // x has type D, new G(x) fails, so first overload is picked. +var result2 = foo(function (x) { + return new G(x); +}); // x has type D, new G(x) fails, so first overload is picked. var result3 = foo(function (x) { var y; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error return y; diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js index 42c371dd218..4d0ac15c717 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js @@ -11,6 +11,7 @@ module M { //// [overloadsInDifferentContainersDisagreeOnAmbient.js] var M; (function (M) { - function f() { } + function f() { + } M.f = f; })(M || (M = {})); diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.js b/tests/baselines/reference/overloadsWithProvisionalErrors.js index c7fb4785d09..f684f1b12a9 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.js +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.js @@ -10,6 +10,17 @@ func(s => ({ a: blah })); // Two errors here, one for blah not being defined, an //// [overloadsWithProvisionalErrors.js] var func; -func(function (s) { return ({}); }); // Error for no applicable overload (object type is missing a and b) -func(function (s) { return ({ a: blah, b: 3 }); }); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) -func(function (s) { return ({ a: blah }); }); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway +func(function (s) { + return ({}); +}); // Error for no applicable overload (object type is missing a and b) +func(function (s) { + return ({ + a: blah, + b: 3 + }); +}); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) +func(function (s) { + return ({ + a: blah + }); +}); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway diff --git a/tests/baselines/reference/overloadsWithinClasses.js b/tests/baselines/reference/overloadsWithinClasses.js index 4ac612502c7..79f3c332be5 100644 --- a/tests/baselines/reference/overloadsWithinClasses.js +++ b/tests/baselines/reference/overloadsWithinClasses.js @@ -27,14 +27,17 @@ class X { var foo = (function () { function foo() { } - foo.fnOverload = function () { }; - foo.fnOverload = function (foo) { }; // error + foo.fnOverload = function () { + }; + foo.fnOverload = function (foo) { + }; // error return foo; })(); var bar = (function () { function bar() { } - bar.fnOverload = function (foo) { }; // no error + bar.fnOverload = function (foo) { + }; // no error return bar; })(); var X = (function () { diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing.js b/tests/baselines/reference/parameterInitializersForwardReferencing.js index 188a104f3af..61b116980ae 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing.js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing.js @@ -74,11 +74,17 @@ function outside() { } } function defaultArgFunction(a, b) { - if (a === void 0) { a = function () { return b; }; } + if (a === void 0) { a = function () { + return b; + }; } if (b === void 0) { b = 1; } } function defaultArgArrow(a, b) { - if (a === void 0) { a = function () { return function () { return b; }; }; } + if (a === void 0) { a = function () { + return function () { + return b; + }; + }; } if (b === void 0) { b = 3; } } var C = (function () { @@ -101,6 +107,8 @@ var x = function (a, b, c) { }; // Should not produce errors - can reference later parameters if they occur within a function expression initializer. function f(a, b, c) { - if (b === void 0) { b = function () { return c; }; } + if (b === void 0) { b = function () { + return c; + }; } if (c === void 0) { c = b(); } } diff --git a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js index a8d06125d25..d0b48460649 100644 --- a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js +++ b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js @@ -30,10 +30,18 @@ var b = { } //// [parametersWithNoAnnotationAreAny.js] -function foo(x) { return x; } -var f = function foo(x) { return x; }; -var f2 = function (x) { return x; }; -var f3 = function (x) { return x; }; +function foo(x) { + return x; +} +var f = function foo(x) { + return x; +}; +var f2 = function (x) { + return x; +}; +var f3 = function (x) { + return x; +}; var C = (function () { function C() { } @@ -50,5 +58,7 @@ var b = { a: function foo(x) { return x; }, - b: function (x) { return x; } + b: function (x) { + return x; + } }; diff --git a/tests/baselines/reference/parenthesizedContexualTyping1.js b/tests/baselines/reference/parenthesizedContexualTyping1.js index 2f1e9ff62fc..cd3a2937395 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping1.js +++ b/tests/baselines/reference/parenthesizedContexualTyping1.js @@ -33,20 +33,82 @@ var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) }); function fun(g, x) { return g(x); } -var a = fun(function (x) { return x; }, 10); -var b = fun((function (x) { return x; }), 10); -var c = fun(((function (x) { return x; })), 10); -var d = fun((((function (x) { return x; }))), 10); -var e = fun(function (x) { return x; }, function (x) { return x; }, 10); -var f = fun((function (x) { return x; }), (function (x) { return x; }), 10); -var g = fun(((function (x) { return x; })), ((function (x) { return x; })), 10); -var h = fun((((function (x) { return x; }))), ((function (x) { return x; })), 10); +var a = fun(function (x) { + return x; +}, 10); +var b = fun((function (x) { + return x; +}), 10); +var c = fun(((function (x) { + return x; +})), 10); +var d = fun((((function (x) { + return x; +}))), 10); +var e = fun(function (x) { + return x; +}, function (x) { + return x; +}, 10); +var f = fun((function (x) { + return x; +}), (function (x) { + return x; +}), 10); +var g = fun(((function (x) { + return x; +})), ((function (x) { + return x; +})), 10); +var h = fun((((function (x) { + return x; +}))), ((function (x) { + return x; +})), 10); // Ternaries in parens -var i = fun((Math.random() < 0.5 ? function (x) { return x; } : function (x) { return undefined; }), 10); -var j = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), 10); -var k = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), function (x) { return x; }, 10); -var l = fun(((Math.random() < 0.5 ? ((function (x) { return x; })) : ((function (x) { return undefined; })))), ((function (x) { return x; })), 10); -var lambda1 = function (x) { return x; }; -var lambda2 = (function (x) { return x; }); -var obj1 = { x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }; -var obj2 = ({ x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }); +var i = fun((Math.random() < 0.5 ? function (x) { + return x; +} : function (x) { + return undefined; +}), 10); +var j = fun((Math.random() < 0.5 ? (function (x) { + return x; +}) : (function (x) { + return undefined; +})), 10); +var k = fun((Math.random() < 0.5 ? (function (x) { + return x; +}) : (function (x) { + return undefined; +})), function (x) { + return x; +}, 10); +var l = fun(((Math.random() < 0.5 ? ((function (x) { + return x; +})) : ((function (x) { + return undefined; +})))), ((function (x) { + return x; +})), 10); +var lambda1 = function (x) { + return x; +}; +var lambda2 = (function (x) { + return x; +}); +var obj1 = { + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}; +var obj2 = ({ + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}); diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.js b/tests/baselines/reference/parenthesizedContexualTyping2.js index 993a10ba49c..68aa28386e9 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.js +++ b/tests/baselines/reference/parenthesizedContexualTyping2.js @@ -49,20 +49,102 @@ function fun() { } return undefined; } -var a = fun(function (x) { x(undefined); return x; }, 10); -var b = fun((function (x) { x(undefined); return x; }), 10); -var c = fun(((function (x) { x(undefined); return x; })), 10); -var d = fun((((function (x) { x(undefined); return x; }))), 10); -var e = fun(function (x) { x(undefined); return x; }, function (x) { x(undefined); return x; }, 10); -var f = fun((function (x) { x(undefined); return x; }), (function (x) { x(undefined); return x; }), 10); -var g = fun(((function (x) { x(undefined); return x; })), ((function (x) { x(undefined); return x; })), 10); -var h = fun((((function (x) { x(undefined); return x; }))), ((function (x) { x(undefined); return x; })), 10); +var a = fun(function (x) { + x(undefined); + return x; +}, 10); +var b = fun((function (x) { + x(undefined); + return x; +}), 10); +var c = fun(((function (x) { + x(undefined); + return x; +})), 10); +var d = fun((((function (x) { + x(undefined); + return x; +}))), 10); +var e = fun(function (x) { + x(undefined); + return x; +}, function (x) { + x(undefined); + return x; +}, 10); +var f = fun((function (x) { + x(undefined); + return x; +}), (function (x) { + x(undefined); + return x; +}), 10); +var g = fun(((function (x) { + x(undefined); + return x; +})), ((function (x) { + x(undefined); + return x; +})), 10); +var h = fun((((function (x) { + x(undefined); + return x; +}))), ((function (x) { + x(undefined); + return x; +})), 10); // Ternaries in parens -var i = fun((Math.random() < 0.5 ? function (x) { x(undefined); return x; } : function (x) { return undefined; }), 10); -var j = fun((Math.random() < 0.5 ? (function (x) { x(undefined); return x; }) : (function (x) { return undefined; })), 10); -var k = fun((Math.random() < 0.5 ? (function (x) { x(undefined); return x; }) : (function (x) { return undefined; })), function (x) { x(undefined); return x; }, 10); -var l = fun(((Math.random() < 0.5 ? ((function (x) { x(undefined); return x; })) : ((function (x) { return undefined; })))), ((function (x) { x(undefined); return x; })), 10); -var lambda1 = function (x) { x(undefined); return x; }; -var lambda2 = (function (x) { x(undefined); return x; }); -var obj1 = { x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }; -var obj2 = ({ x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }); +var i = fun((Math.random() < 0.5 ? function (x) { + x(undefined); + return x; +} : function (x) { + return undefined; +}), 10); +var j = fun((Math.random() < 0.5 ? (function (x) { + x(undefined); + return x; +}) : (function (x) { + return undefined; +})), 10); +var k = fun((Math.random() < 0.5 ? (function (x) { + x(undefined); + return x; +}) : (function (x) { + return undefined; +})), function (x) { + x(undefined); + return x; +}, 10); +var l = fun(((Math.random() < 0.5 ? ((function (x) { + x(undefined); + return x; +})) : ((function (x) { + return undefined; +})))), ((function (x) { + x(undefined); + return x; +})), 10); +var lambda1 = function (x) { + x(undefined); + return x; +}; +var lambda2 = (function (x) { + x(undefined); + return x; +}); +var obj1 = { + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}; +var obj2 = ({ + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}); diff --git a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt new file mode 100644 index 00000000000..d109b048085 --- /dev/null +++ b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(4,16): error TS1100: Invalid use of 'arguments' in strict mode. +tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(5,17): error TS1100: Invalid use of 'eval' in strict mode. +tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. +tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS2322: Type 'string' is not assignable to type 'IArguments'. + Property 'callee' is missing in type 'String'. + + +==== tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts (4 errors) ==== + class C { + interface = 10; + public implements() { } + public foo(arguments: any) { } + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + private bar(eval:any) { + ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'IArguments'. +!!! error TS2322: Property 'callee' is missing in type 'String'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.js b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.js new file mode 100644 index 00000000000..2a8d75dde60 --- /dev/null +++ b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.js @@ -0,0 +1,23 @@ +//// [parseClassDeclarationInStrictModeByDefaultInES6.ts] +class C { + interface = 10; + public implements() { } + public foo(arguments: any) { } + private bar(eval:any) { + arguments = "hello"; + } +} + +//// [parseClassDeclarationInStrictModeByDefaultInES6.js] +class C { + constructor() { + this.interface = 10; + } + implements() { + } + foo(arguments) { + } + bar(eval) { + arguments = "hello"; + } +} diff --git a/tests/baselines/reference/parseTypes.js b/tests/baselines/reference/parseTypes.js index 08cc9f2a6bd..193533de04a 100644 --- a/tests/baselines/reference/parseTypes.js +++ b/tests/baselines/reference/parseTypes.js @@ -18,9 +18,13 @@ var x = null; var y = null; var z = null; var w = null; -function f() { return 3; } +function f() { + return 3; +} ; -function g(s) { true; } +function g(s) { + true; +} ; y = f; y = g; diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.js b/tests/baselines/reference/parser15.4.4.14-9-2.js index 0f533cd9a26..e9a29e7eead 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.js +++ b/tests/baselines/reference/parser15.4.4.14-9-2.js @@ -37,14 +37,15 @@ runTestCase(testcase); * @description Array.prototype.indexOf must return correct index (Number) */ function testcase() { - var obj = { toString: function () { return 0; } }; + var obj = { + toString: function () { + return 0; + } + }; var one = 1; var _float = -(4 / 3); var a = new Array(false, undefined, null, "0", obj, -1.3333333333333, "str", -0, true, +0, one, 1, 0, false, _float, -(4 / 3)); - if (a.indexOf(-(4 / 3)) === 14 && - a.indexOf(0) === 7 && - a.indexOf(-0) === 7 && - a.indexOf(1) === 10) { + if (a.indexOf(-(4 / 3)) === 14 && a.indexOf(0) === 7 && a.indexOf(-0) === 7 && a.indexOf(1) === 10) { return true; } } diff --git a/tests/baselines/reference/parser509669.js b/tests/baselines/reference/parser509669.js index 3fa4cf696c0..e4ce2b90312 100644 --- a/tests/baselines/reference/parser509669.js +++ b/tests/baselines/reference/parser509669.js @@ -5,5 +5,6 @@ function foo():any { //// [parser509669.js] function foo() { - return function () { }; + return function () { + }; } diff --git a/tests/baselines/reference/parser512097.js b/tests/baselines/reference/parser512097.js index ce73dadf3bc..c495e68c847 100644 --- a/tests/baselines/reference/parser512097.js +++ b/tests/baselines/reference/parser512097.js @@ -5,6 +5,8 @@ if (true) { } //// [parser512097.js] -var tt = { aa: }; // After this point, no useful parsing occurs in the entire file +var tt = { + aa: +}; // After this point, no useful parsing occurs in the entire file if (true) { } diff --git a/tests/baselines/reference/parser519458.errors.txt b/tests/baselines/reference/parser519458.errors.txt index 792d0463d4c..e618e38723f 100644 --- a/tests/baselines/reference/parser519458.errors.txt +++ b/tests/baselines/reference/parser519458.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,1): error TS2304: Cannot find name 'module'. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,15): error TS2304: Cannot find name 'module'. tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,21): error TS1005: ';' expected. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts (2 errors) ==== import rect = module("rect"); var bar = new rect.Rect(); - ~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2304: Cannot find name 'module'. ~ !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/parser521128.js b/tests/baselines/reference/parser521128.js index 2471f740d77..e16cbad6c33 100644 --- a/tests/baselines/reference/parser521128.js +++ b/tests/baselines/reference/parser521128.js @@ -3,4 +3,5 @@ module.module { } //// [parser521128.js] module.module; -{ } +{ +} diff --git a/tests/baselines/reference/parser536727.js b/tests/baselines/reference/parser536727.js index fe086d8d3be..39b0d66f6c8 100644 --- a/tests/baselines/reference/parser536727.js +++ b/tests/baselines/reference/parser536727.js @@ -13,8 +13,14 @@ foo(x); function foo(f) { return f(""); } -var g = function (x) { return x + "blah"; }; -var x = function () { return g; }; +var g = function (x) { + return x + "blah"; +}; +var x = function () { + return g; +}; foo(g); -foo(function () { return g; }); +foo(function () { + return g; +}); foo(x); diff --git a/tests/baselines/reference/parser553699.js b/tests/baselines/reference/parser553699.js index 8570780e74a..f245ecc3446 100644 --- a/tests/baselines/reference/parser553699.js +++ b/tests/baselines/reference/parser553699.js @@ -12,7 +12,8 @@ class Bar { var Foo = (function () { function Foo() { } - Foo.prototype.banana = function (x) { }; + Foo.prototype.banana = function (x) { + }; return Foo; })(); var Bar = (function () { diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic10.js b/tests/baselines/reference/parserAccessibilityAfterStatic10.js index 6756a57ce7e..feded66fe95 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic10.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic10.js @@ -9,6 +9,7 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { }; + Outer.intI = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic11.js b/tests/baselines/reference/parserAccessibilityAfterStatic11.js index 8b16153b797..094202014a1 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic11.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic11.js @@ -9,6 +9,7 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { }; + Outer.public = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic14.js b/tests/baselines/reference/parserAccessibilityAfterStatic14.js index 4455936a859..b2a6be7464c 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic14.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic14.js @@ -9,6 +9,7 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { }; + Outer.public = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic7.js b/tests/baselines/reference/parserAccessibilityAfterStatic7.js index 2d94be8ea50..a2bc5c7fba3 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic7.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic7.js @@ -9,6 +9,7 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { }; + Outer.intI = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessors1.js b/tests/baselines/reference/parserAccessors1.js index 6b47a46ede1..b4cc809e7b2 100644 --- a/tests/baselines/reference/parserAccessors1.js +++ b/tests/baselines/reference/parserAccessors1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors10.js b/tests/baselines/reference/parserAccessors10.js index d5d7e89a7d0..f1bed41edee 100644 --- a/tests/baselines/reference/parserAccessors10.js +++ b/tests/baselines/reference/parserAccessors10.js @@ -5,5 +5,6 @@ var v = { //// [parserAccessors10.js] var v = { - get foo() { } + get foo() { + } }; diff --git a/tests/baselines/reference/parserAccessors2.js b/tests/baselines/reference/parserAccessors2.js index 482daa74a64..71cbd6f466b 100644 --- a/tests/baselines/reference/parserAccessors2.js +++ b/tests/baselines/reference/parserAccessors2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors3.js b/tests/baselines/reference/parserAccessors3.js index 287f607725a..f5f9c43fb4f 100644 --- a/tests/baselines/reference/parserAccessors3.js +++ b/tests/baselines/reference/parserAccessors3.js @@ -2,4 +2,7 @@ var v = { get Foo() { } }; //// [parserAccessors3.js] -var v = { get Foo() { } }; +var v = { + get Foo() { + } +}; diff --git a/tests/baselines/reference/parserAccessors4.js b/tests/baselines/reference/parserAccessors4.js index 0716078a8c8..24ee1bbcdcd 100644 --- a/tests/baselines/reference/parserAccessors4.js +++ b/tests/baselines/reference/parserAccessors4.js @@ -2,4 +2,7 @@ var v = { set Foo(a) { } }; //// [parserAccessors4.js] -var v = { set Foo(a) { } }; +var v = { + set Foo(a) { + } +}; diff --git a/tests/baselines/reference/parserAccessors7.js b/tests/baselines/reference/parserAccessors7.js index 4b7f2d55860..be3802979b6 100644 --- a/tests/baselines/reference/parserAccessors7.js +++ b/tests/baselines/reference/parserAccessors7.js @@ -2,4 +2,7 @@ var v = { get foo(v: number) { } }; //// [parserAccessors7.js] -var v = { get foo(v) { } }; +var v = { + get foo(v) { + } +}; diff --git a/tests/baselines/reference/parserAccessors8.js b/tests/baselines/reference/parserAccessors8.js index 18fb4454071..3bb926521e9 100644 --- a/tests/baselines/reference/parserAccessors8.js +++ b/tests/baselines/reference/parserAccessors8.js @@ -2,4 +2,7 @@ var v = { set foo() { } } //// [parserAccessors8.js] -var v = { set foo() { } }; +var v = { + set foo() { + } +}; diff --git a/tests/baselines/reference/parserAccessors9.js b/tests/baselines/reference/parserAccessors9.js index 448d93a2c01..ad52d9827b3 100644 --- a/tests/baselines/reference/parserAccessors9.js +++ b/tests/baselines/reference/parserAccessors9.js @@ -2,4 +2,7 @@ var v = { set foo(a, b) { } } //// [parserAccessors9.js] -var v = { set foo(a, b) { } }; +var v = { + set foo(a, b) { + } +}; diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js index 6c74814917a..18a1dee3e9f 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js @@ -7,5 +7,6 @@ function f1() { //// [parserAmbiguityWithBinaryOperator1.js] function f1() { var a, b, c; - if (a < b || b > (c + 1)) { } + if (a < b || b > (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js index 6cd6de58d47..9589d57e3af 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js @@ -7,5 +7,6 @@ function f() { //// [parserAmbiguityWithBinaryOperator2.js] function f() { var a, b, c; - if (a < b && b > (c + 1)) { } + if (a < b && b > (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js index e3df2894777..95745263c71 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js @@ -8,5 +8,6 @@ function f() { //// [parserAmbiguityWithBinaryOperator3.js] function f() { var a, b, c; - if (a < b && b < (c + 1)) { } + if (a < b && b < (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js index a6ba380112b..cdcec030ae7 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js @@ -7,5 +7,6 @@ function g() { //// [parserAmbiguityWithBinaryOperator4.js] function g() { var a, b, c; - if (a(c + 1)) { } + if (a(c + 1)) { + } } diff --git a/tests/baselines/reference/parserArgumentList1.errors.txt b/tests/baselines/reference/parserArgumentList1.errors.txt index 5146650dbff..f20b47fa964 100644 --- a/tests/baselines/reference/parserArgumentList1.errors.txt +++ b/tests/baselines/reference/parserArgumentList1.errors.txt @@ -1,21 +1,17 @@ -tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,35): error TS2304: Cannot find name 'HTMLElement'. tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error TS2304: Cannot find name '_classNameRegexp'. ==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (3 errors) ==== export function removeClass (node:HTMLElement, className:string) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ !!! error TS2304: Cannot find name 'HTMLElement'. node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name '_classNameRegexp'. return leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : ''; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); - ~~~~ - } - ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file + } \ No newline at end of file diff --git a/tests/baselines/reference/parserArrayLiteralExpression10.js b/tests/baselines/reference/parserArrayLiteralExpression10.js index 986d3045dc0..5f49958b862 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression10.js +++ b/tests/baselines/reference/parserArrayLiteralExpression10.js @@ -2,4 +2,7 @@ var v = [1,1,]; //// [parserArrayLiteralExpression10.js] -var v = [1, 1,]; +var v = [ + 1, + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression11.js b/tests/baselines/reference/parserArrayLiteralExpression11.js index 24ab8968fea..79b4bf35182 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression11.js +++ b/tests/baselines/reference/parserArrayLiteralExpression11.js @@ -2,4 +2,8 @@ var v = [1,,1]; //// [parserArrayLiteralExpression11.js] -var v = [1, , 1]; +var v = [ + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression12.js b/tests/baselines/reference/parserArrayLiteralExpression12.js index 6795ef29908..1ad1bc40121 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression12.js +++ b/tests/baselines/reference/parserArrayLiteralExpression12.js @@ -2,4 +2,9 @@ var v = [1,,,1]; //// [parserArrayLiteralExpression12.js] -var v = [1, , , 1]; +var v = [ + 1, + , + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression13.js b/tests/baselines/reference/parserArrayLiteralExpression13.js index 504663e5ced..78b08548288 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression13.js +++ b/tests/baselines/reference/parserArrayLiteralExpression13.js @@ -2,4 +2,10 @@ var v = [1,,1,,1]; //// [parserArrayLiteralExpression13.js] -var v = [1, , 1, , 1]; +var v = [ + 1, + , + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression14.js b/tests/baselines/reference/parserArrayLiteralExpression14.js index eeb13dc53a5..188b9e734ff 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression14.js +++ b/tests/baselines/reference/parserArrayLiteralExpression14.js @@ -2,4 +2,16 @@ var v = [,,1,1,,1,,1,1,,1]; //// [parserArrayLiteralExpression14.js] -var v = [, , 1, 1, , 1, , 1, 1, , 1]; +var v = [ + , + , + 1, + 1, + , + 1, + , + 1, + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression15.js b/tests/baselines/reference/parserArrayLiteralExpression15.js index 84ab9dac240..4894a874bef 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression15.js +++ b/tests/baselines/reference/parserArrayLiteralExpression15.js @@ -2,4 +2,16 @@ var v = [,,1,1,,1,,1,1,,1,]; //// [parserArrayLiteralExpression15.js] -var v = [, , 1, 1, , 1, , 1, 1, , 1,]; +var v = [ + , + , + 1, + 1, + , + 1, + , + 1, + 1, + , + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression2.js b/tests/baselines/reference/parserArrayLiteralExpression2.js index 1fb26155eb5..587b4180ec6 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression2.js +++ b/tests/baselines/reference/parserArrayLiteralExpression2.js @@ -2,4 +2,6 @@ var v = [,]; //// [parserArrayLiteralExpression2.js] -var v = [,]; +var v = [ + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression3.js b/tests/baselines/reference/parserArrayLiteralExpression3.js index 2d7d19fc2c3..45a9c945ba8 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression3.js +++ b/tests/baselines/reference/parserArrayLiteralExpression3.js @@ -2,4 +2,7 @@ var v = [,,]; //// [parserArrayLiteralExpression3.js] -var v = [, ,]; +var v = [ + , + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression4.js b/tests/baselines/reference/parserArrayLiteralExpression4.js index 2287897338e..7a69500ba74 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression4.js +++ b/tests/baselines/reference/parserArrayLiteralExpression4.js @@ -2,4 +2,8 @@ var v = [,,,]; //// [parserArrayLiteralExpression4.js] -var v = [, , ,]; +var v = [ + , + , + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression5.js b/tests/baselines/reference/parserArrayLiteralExpression5.js index 43b784b2e5e..1affdb1ac38 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression5.js +++ b/tests/baselines/reference/parserArrayLiteralExpression5.js @@ -2,4 +2,6 @@ var v = [1]; //// [parserArrayLiteralExpression5.js] -var v = [1]; +var v = [ + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression6.js b/tests/baselines/reference/parserArrayLiteralExpression6.js index 28cd901f4ac..b5831c7345e 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression6.js +++ b/tests/baselines/reference/parserArrayLiteralExpression6.js @@ -2,4 +2,7 @@ var v = [,1]; //// [parserArrayLiteralExpression6.js] -var v = [, 1]; +var v = [ + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression7.js b/tests/baselines/reference/parserArrayLiteralExpression7.js index b302e87e352..e10cf021a73 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression7.js +++ b/tests/baselines/reference/parserArrayLiteralExpression7.js @@ -2,4 +2,6 @@ var v = [1,]; //// [parserArrayLiteralExpression7.js] -var v = [1,]; +var v = [ + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression8.js b/tests/baselines/reference/parserArrayLiteralExpression8.js index 223a86db229..6d8b252521d 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression8.js +++ b/tests/baselines/reference/parserArrayLiteralExpression8.js @@ -2,4 +2,7 @@ var v = [,1,]; //// [parserArrayLiteralExpression8.js] -var v = [, 1,]; +var v = [ + , + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression9.js b/tests/baselines/reference/parserArrayLiteralExpression9.js index 5043f522dde..d44d072eb57 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression9.js +++ b/tests/baselines/reference/parserArrayLiteralExpression9.js @@ -2,4 +2,7 @@ var v = [1,1]; //// [parserArrayLiteralExpression9.js] -var v = [1, 1]; +var v = [ + 1, + 1 +]; diff --git a/tests/baselines/reference/parserArrowFunctionExpression1.js b/tests/baselines/reference/parserArrowFunctionExpression1.js index e4ae59fdb99..5ab29fee64c 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression1.js +++ b/tests/baselines/reference/parserArrowFunctionExpression1.js @@ -2,4 +2,5 @@ var v = (public x: string) => { }; //// [parserArrowFunctionExpression1.js] -var v = function (x) { }; +var v = function (x) { +}; diff --git a/tests/baselines/reference/parserArrowFunctionExpression2.js b/tests/baselines/reference/parserArrowFunctionExpression2.js index 9004468ec76..5059cf32182 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression2.js +++ b/tests/baselines/reference/parserArrowFunctionExpression2.js @@ -2,5 +2,6 @@ a = () => { } || a //// [parserArrowFunctionExpression2.js] -a = function () { }; +a = function () { +}; || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression3.js b/tests/baselines/reference/parserArrowFunctionExpression3.js index 9e6b2706108..68ea230d87b 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression3.js +++ b/tests/baselines/reference/parserArrowFunctionExpression3.js @@ -2,4 +2,5 @@ a = (() => { } || a) //// [parserArrowFunctionExpression3.js] -a = (function () { }) || a; +a = (function () { +}) || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression4.js b/tests/baselines/reference/parserArrowFunctionExpression4.js index e77a42162cd..53aaee9e6ff 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression4.js +++ b/tests/baselines/reference/parserArrowFunctionExpression4.js @@ -2,4 +2,5 @@ a = (() => { }, a) //// [parserArrowFunctionExpression4.js] -a = (function () { }, a); +a = (function () { +}, a); diff --git a/tests/baselines/reference/parserCastVersusArrowFunction1.js b/tests/baselines/reference/parserCastVersusArrowFunction1.js index df46753b9e4..63a19924d3e 100644 --- a/tests/baselines/reference/parserCastVersusArrowFunction1.js +++ b/tests/baselines/reference/parserCastVersusArrowFunction1.js @@ -11,10 +11,16 @@ var v = (a, b); var v = (a = 1, b = 2); //// [parserCastVersusArrowFunction1.js] -var v = function () { return 1; }; +var v = function () { + return 1; +}; var v = a; -var v = function (a) { return 1; }; -var v = function (a, b) { return 1; }; +var v = function (a) { + return 1; +}; +var v = function (a, b) { + return 1; +}; var v = function (a, b) { if (a === void 0) { a = 1; } if (b === void 0) { b = 2; } diff --git a/tests/baselines/reference/parserClass1.js b/tests/baselines/reference/parserClass1.js index eb1d17566aa..1245da3363f 100644 --- a/tests/baselines/reference/parserClass1.js +++ b/tests/baselines/reference/parserClass1.js @@ -13,11 +13,21 @@ var NullLogger = (function () { function NullLogger() { } - NullLogger.prototype.information = function () { return false; }; - NullLogger.prototype.debug = function () { return false; }; - NullLogger.prototype.warning = function () { return false; }; - NullLogger.prototype.error = function () { return false; }; - NullLogger.prototype.fatal = function () { return false; }; + NullLogger.prototype.information = function () { + return false; + }; + NullLogger.prototype.debug = function () { + return false; + }; + NullLogger.prototype.warning = function () { + return false; + }; + NullLogger.prototype.error = function () { + return false; + }; + NullLogger.prototype.fatal = function () { + return false; + }; NullLogger.prototype.log = function (s) { }; return NullLogger; diff --git a/tests/baselines/reference/parserClassDeclaration11.js b/tests/baselines/reference/parserClassDeclaration11.js index 078d3553a43..80a27d71e6c 100644 --- a/tests/baselines/reference/parserClassDeclaration11.js +++ b/tests/baselines/reference/parserClassDeclaration11.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration13.js b/tests/baselines/reference/parserClassDeclaration13.js index 93ce76fb168..dcb704ae1d3 100644 --- a/tests/baselines/reference/parserClassDeclaration13.js +++ b/tests/baselines/reference/parserClassDeclaration13.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration16.js b/tests/baselines/reference/parserClassDeclaration16.js index a6a92d73afa..7048980597e 100644 --- a/tests/baselines/reference/parserClassDeclaration16.js +++ b/tests/baselines/reference/parserClassDeclaration16.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration19.js b/tests/baselines/reference/parserClassDeclaration19.js index 7900aa4d552..5b77e263ec9 100644 --- a/tests/baselines/reference/parserClassDeclaration19.js +++ b/tests/baselines/reference/parserClassDeclaration19.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["foo"] = function () { }; + C.prototype["foo"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration20.js b/tests/baselines/reference/parserClassDeclaration20.js index 7c99f2d8ee6..68d97b66bb9 100644 --- a/tests/baselines/reference/parserClassDeclaration20.js +++ b/tests/baselines/reference/parserClassDeclaration20.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["0"] = function () { }; + C.prototype["0"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration21.js b/tests/baselines/reference/parserClassDeclaration21.js index fa4cef46e0e..248f10e8681 100644 --- a/tests/baselines/reference/parserClassDeclaration21.js +++ b/tests/baselines/reference/parserClassDeclaration21.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { }; + C.prototype[1] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration22.js b/tests/baselines/reference/parserClassDeclaration22.js index 596f7a4474b..60f708d4835 100644 --- a/tests/baselines/reference/parserClassDeclaration22.js +++ b/tests/baselines/reference/parserClassDeclaration22.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { }; + C.prototype["bar"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserCommaInTypeMemberList2.js b/tests/baselines/reference/parserCommaInTypeMemberList2.js index fd79326b7b0..9593bdea98f 100644 --- a/tests/baselines/reference/parserCommaInTypeMemberList2.js +++ b/tests/baselines/reference/parserCommaInTypeMemberList2.js @@ -3,4 +3,6 @@ var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ workIte //// [parserCommaInTypeMemberList2.js] -var s = $.extend({ workItem: this._workItem }, {}); +var s = $.extend({ + workItem: this._workItem +}, {}); diff --git a/tests/baselines/reference/parserComputedPropertyName1.js b/tests/baselines/reference/parserComputedPropertyName1.js index ee5b0a22cb6..4a42b2e97e7 100644 --- a/tests/baselines/reference/parserComputedPropertyName1.js +++ b/tests/baselines/reference/parserComputedPropertyName1.js @@ -2,4 +2,6 @@ var v = { [e] }; //// [parserComputedPropertyName1.js] -var v = { [e]: }; +var v = { + [e]: +}; diff --git a/tests/baselines/reference/parserComputedPropertyName10.js b/tests/baselines/reference/parserComputedPropertyName10.js index c00d3292f7e..eba480ba810 100644 --- a/tests/baselines/reference/parserComputedPropertyName10.js +++ b/tests/baselines/reference/parserComputedPropertyName10.js @@ -4,9 +4,8 @@ class C { } //// [parserComputedPropertyName10.js] -var C = (function () { - function C() { +class C { + constructor() { this[e] = 1; } - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName11.js b/tests/baselines/reference/parserComputedPropertyName11.js index 1b9575184f2..dc63d6385d8 100644 --- a/tests/baselines/reference/parserComputedPropertyName11.js +++ b/tests/baselines/reference/parserComputedPropertyName11.js @@ -4,8 +4,5 @@ class C { } //// [parserComputedPropertyName11.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserComputedPropertyName12.js b/tests/baselines/reference/parserComputedPropertyName12.js index f879d4166dd..71cf1d352f4 100644 --- a/tests/baselines/reference/parserComputedPropertyName12.js +++ b/tests/baselines/reference/parserComputedPropertyName12.js @@ -4,9 +4,7 @@ class C { } //// [parserComputedPropertyName12.js] -var C = (function () { - function C() { +class C { + [e]() { } - C.prototype[e] = function () { }; - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName17.js b/tests/baselines/reference/parserComputedPropertyName17.js index f1fc4caacb3..cfff46e52fc 100644 --- a/tests/baselines/reference/parserComputedPropertyName17.js +++ b/tests/baselines/reference/parserComputedPropertyName17.js @@ -2,4 +2,7 @@ var v = { set [e](v) { } } //// [parserComputedPropertyName17.js] -var v = { set [e](v) { } }; +var v = { + set [e](v) { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName2.js b/tests/baselines/reference/parserComputedPropertyName2.js index f3c41f963f5..ea8532945a1 100644 --- a/tests/baselines/reference/parserComputedPropertyName2.js +++ b/tests/baselines/reference/parserComputedPropertyName2.js @@ -2,4 +2,6 @@ var v = { [e]: 1 }; //// [parserComputedPropertyName2.js] -var v = { [e]: 1 }; +var v = { + [e]: 1 +}; diff --git a/tests/baselines/reference/parserComputedPropertyName24.js b/tests/baselines/reference/parserComputedPropertyName24.js index 13f14f2e466..8fc0a5be3a5 100644 --- a/tests/baselines/reference/parserComputedPropertyName24.js +++ b/tests/baselines/reference/parserComputedPropertyName24.js @@ -4,13 +4,7 @@ class C { } //// [parserComputedPropertyName24.js] -var C = (function () { - function C() { +class C { + set [e](v) { } - Object.defineProperty(C.prototype, e, { - set: function (v) { }, - enumerable: true, - configurable: true - }); - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName25.js b/tests/baselines/reference/parserComputedPropertyName25.js index a00cec2e6dd..47670fe14b8 100644 --- a/tests/baselines/reference/parserComputedPropertyName25.js +++ b/tests/baselines/reference/parserComputedPropertyName25.js @@ -6,10 +6,9 @@ class C { } //// [parserComputedPropertyName25.js] -var C = (function () { - function C() { +class C { + constructor() { // No ASI this[e] = 0[e2] = 1; } - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName27.js b/tests/baselines/reference/parserComputedPropertyName27.js index 03b156af840..f872e95e7e6 100644 --- a/tests/baselines/reference/parserComputedPropertyName27.js +++ b/tests/baselines/reference/parserComputedPropertyName27.js @@ -6,10 +6,9 @@ class C { } //// [parserComputedPropertyName27.js] -var C = (function () { - function C() { +class C { + constructor() { // No ASI this[e] = 0[e2]; } - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName28.js b/tests/baselines/reference/parserComputedPropertyName28.js index 60fb25dfa20..998f60db914 100644 --- a/tests/baselines/reference/parserComputedPropertyName28.js +++ b/tests/baselines/reference/parserComputedPropertyName28.js @@ -5,9 +5,8 @@ class C { } //// [parserComputedPropertyName28.js] -var C = (function () { - function C() { +class C { + constructor() { this[e] = 0; } - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName29.js b/tests/baselines/reference/parserComputedPropertyName29.js index 05ced020aff..a100cbf1791 100644 --- a/tests/baselines/reference/parserComputedPropertyName29.js +++ b/tests/baselines/reference/parserComputedPropertyName29.js @@ -6,10 +6,9 @@ class C { } //// [parserComputedPropertyName29.js] -var C = (function () { - function C() { +class C { + constructor() { // yes ASI this[e] = id++; } - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName3.js b/tests/baselines/reference/parserComputedPropertyName3.js index 70273ed501d..b3c8cc27bf8 100644 --- a/tests/baselines/reference/parserComputedPropertyName3.js +++ b/tests/baselines/reference/parserComputedPropertyName3.js @@ -2,4 +2,7 @@ var v = { [e]() { } }; //// [parserComputedPropertyName3.js] -var v = { [e]() { } }; +var v = { + [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName31.js b/tests/baselines/reference/parserComputedPropertyName31.js index 2a07155a2f0..cee09fb0ab7 100644 --- a/tests/baselines/reference/parserComputedPropertyName31.js +++ b/tests/baselines/reference/parserComputedPropertyName31.js @@ -6,8 +6,5 @@ class C { } //// [parserComputedPropertyName31.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserComputedPropertyName33.js b/tests/baselines/reference/parserComputedPropertyName33.js index 924bb872115..64239bc1284 100644 --- a/tests/baselines/reference/parserComputedPropertyName33.js +++ b/tests/baselines/reference/parserComputedPropertyName33.js @@ -6,11 +6,11 @@ class C { } //// [parserComputedPropertyName33.js] -var C = (function () { - function C() { +class C { + constructor() { // No ASI this[e] = 0[e2](); } - return C; -})(); -{ } +} +{ +} diff --git a/tests/baselines/reference/parserComputedPropertyName36.errors.txt b/tests/baselines/reference/parserComputedPropertyName36.errors.txt index 07e937b3b42..8c647be13c9 100644 --- a/tests/baselines/reference/parserComputedPropertyName36.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName36.errors.txt @@ -1,12 +1,15 @@ -tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. -tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS1109: Expression expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,14): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts (3 errors) ==== class C { [public ]: string; - ~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol. ~~~~~~ -!!! error TS2304: Cannot find name 'public'. +!!! error TS1109: Expression expected. + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName36.js b/tests/baselines/reference/parserComputedPropertyName36.js index 264a3512075..fd6f376ef2b 100644 --- a/tests/baselines/reference/parserComputedPropertyName36.js +++ b/tests/baselines/reference/parserComputedPropertyName36.js @@ -4,8 +4,5 @@ class C { } //// [parserComputedPropertyName36.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserComputedPropertyName38.errors.txt b/tests/baselines/reference/parserComputedPropertyName38.errors.txt index 4322abf44ed..28daf322748 100644 --- a/tests/baselines/reference/parserComputedPropertyName38.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName38.errors.txt @@ -1,9 +1,21 @@ -tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS1109: Expression expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,12): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,16): error TS1005: '=>' expected. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(3,1): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (5 errors) ==== class C { [public]() { } ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file +!!! error TS1109: Expression expected. + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + ~ +!!! error TS1005: '=>' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName38.js b/tests/baselines/reference/parserComputedPropertyName38.js index 6fc40f0802a..e5c9512ad2d 100644 --- a/tests/baselines/reference/parserComputedPropertyName38.js +++ b/tests/baselines/reference/parserComputedPropertyName38.js @@ -4,9 +4,7 @@ class C { } //// [parserComputedPropertyName38.js] -var C = (function () { - function C() { - } - C.prototype[public] = function () { }; - return C; -})(); +class C { +} +(() => { +}); diff --git a/tests/baselines/reference/parserComputedPropertyName39.js b/tests/baselines/reference/parserComputedPropertyName39.js index 2849acd0562..cee81ccc3d0 100644 --- a/tests/baselines/reference/parserComputedPropertyName39.js +++ b/tests/baselines/reference/parserComputedPropertyName39.js @@ -6,9 +6,7 @@ class C { //// [parserComputedPropertyName39.js] "use strict"; -var C = (function () { - function C() { - } - return C; -})(); -(() => { }); +class C { +} +(() => { +}); diff --git a/tests/baselines/reference/parserComputedPropertyName4.js b/tests/baselines/reference/parserComputedPropertyName4.js index e456ca74f93..679733529a3 100644 --- a/tests/baselines/reference/parserComputedPropertyName4.js +++ b/tests/baselines/reference/parserComputedPropertyName4.js @@ -2,4 +2,7 @@ var v = { get [e]() { } }; //// [parserComputedPropertyName4.js] -var v = { get [e]() { } }; +var v = { + get [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName40.js b/tests/baselines/reference/parserComputedPropertyName40.js index dc77466492d..417e37067d1 100644 --- a/tests/baselines/reference/parserComputedPropertyName40.js +++ b/tests/baselines/reference/parserComputedPropertyName40.js @@ -4,9 +4,7 @@ class C { } //// [parserComputedPropertyName40.js] -var C = (function () { - function C() { +class C { + [a ? "" : ""]() { } - C.prototype[a ? "" : ""] = function () { }; - return C; -})(); +} diff --git a/tests/baselines/reference/parserComputedPropertyName5.js b/tests/baselines/reference/parserComputedPropertyName5.js index b94acd5523b..956b885bffb 100644 --- a/tests/baselines/reference/parserComputedPropertyName5.js +++ b/tests/baselines/reference/parserComputedPropertyName5.js @@ -2,4 +2,7 @@ var v = { public get [e]() { } }; //// [parserComputedPropertyName5.js] -var v = { get [e]() { } }; +var v = { + get [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName6.js b/tests/baselines/reference/parserComputedPropertyName6.js index b60ad66a9d8..b18bb6ff305 100644 --- a/tests/baselines/reference/parserComputedPropertyName6.js +++ b/tests/baselines/reference/parserComputedPropertyName6.js @@ -2,4 +2,7 @@ var v = { [e]: 1, [e + e]: 2 }; //// [parserComputedPropertyName6.js] -var v = { [e]: 1, [e + e]: 2 }; +var v = { + [e]: 1, + [e + e]: 2 +}; diff --git a/tests/baselines/reference/parserComputedPropertyName7.js b/tests/baselines/reference/parserComputedPropertyName7.js index 70ed8b7b073..aa18db09bc6 100644 --- a/tests/baselines/reference/parserComputedPropertyName7.js +++ b/tests/baselines/reference/parserComputedPropertyName7.js @@ -4,8 +4,5 @@ class C { } //// [parserComputedPropertyName7.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserComputedPropertyName8.js b/tests/baselines/reference/parserComputedPropertyName8.js index 4b79c459663..bab7c3198bd 100644 --- a/tests/baselines/reference/parserComputedPropertyName8.js +++ b/tests/baselines/reference/parserComputedPropertyName8.js @@ -4,8 +4,5 @@ class C { } //// [parserComputedPropertyName8.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserComputedPropertyName9.js b/tests/baselines/reference/parserComputedPropertyName9.js index 4b62cc0ecd9..3ba028a4a1c 100644 --- a/tests/baselines/reference/parserComputedPropertyName9.js +++ b/tests/baselines/reference/parserComputedPropertyName9.js @@ -4,8 +4,5 @@ class C { } //// [parserComputedPropertyName9.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/parserES3Accessors1.js b/tests/baselines/reference/parserES3Accessors1.js index b4d0b9d6576..4900c1f32d9 100644 --- a/tests/baselines/reference/parserES3Accessors1.js +++ b/tests/baselines/reference/parserES3Accessors1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors2.js b/tests/baselines/reference/parserES3Accessors2.js index 3d18e8ac280..08259f2655e 100644 --- a/tests/baselines/reference/parserES3Accessors2.js +++ b/tests/baselines/reference/parserES3Accessors2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors3.js b/tests/baselines/reference/parserES3Accessors3.js index f623fc546fd..c7dc2e3cea6 100644 --- a/tests/baselines/reference/parserES3Accessors3.js +++ b/tests/baselines/reference/parserES3Accessors3.js @@ -2,4 +2,7 @@ var v = { get Foo() { } }; //// [parserES3Accessors3.js] -var v = { get Foo() { } }; +var v = { + get Foo() { + } +}; diff --git a/tests/baselines/reference/parserES3Accessors4.js b/tests/baselines/reference/parserES3Accessors4.js index 2bc5c9d1f78..9133c29a02a 100644 --- a/tests/baselines/reference/parserES3Accessors4.js +++ b/tests/baselines/reference/parserES3Accessors4.js @@ -2,4 +2,7 @@ var v = { set Foo(a) { } }; //// [parserES3Accessors4.js] -var v = { set Foo(a) { } }; +var v = { + set Foo(a) { + } +}; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName3.js b/tests/baselines/reference/parserES5ComputedPropertyName3.js index 26067467953..85a031fdfa3 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName3.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName3.js @@ -3,6 +3,7 @@ var v = { [e]() { } }; //// [parserES5ComputedPropertyName3.js] var v = (_a = {}, - _a[e] = function () { }, + _a[e] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.js b/tests/baselines/reference/parserES5ComputedPropertyName4.js index 378624af08b..5233471b6ff 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.js @@ -3,6 +3,11 @@ var v = { get [e]() { } }; //// [parserES5ComputedPropertyName4.js] var v = (_a = {}, - _a[e] = Object.defineProperty({ get: function () { }, enumerable: true, configurable: true }), + _a[e] = Object.defineProperty({ + get: function () { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/parserES5ForOfStatement1.d.errors.txt b/tests/baselines/reference/parserES5ForOfStatement1.d.errors.txt index c280b597b2c..d8e186b4d57 100644 --- a/tests/baselines/reference/parserES5ForOfStatement1.d.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement1.d.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,15): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts (2 errors) ==== for (var i of e) { ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +!!! error TS1036: Statements are not allowed in ambient contexts. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement10.errors.txt b/tests/baselines/reference/parserES5ForOfStatement10.errors.txt index 5cee7472d24..e0ea8928be1 100644 --- a/tests/baselines/reference/parserES5ForOfStatement10.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement10.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,17): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts (1 errors) ==== for (const v of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement10.js b/tests/baselines/reference/parserES5ForOfStatement10.js index 2b9dc843887..cac70523022 100644 --- a/tests/baselines/reference/parserES5ForOfStatement10.js +++ b/tests/baselines/reference/parserES5ForOfStatement10.js @@ -3,5 +3,6 @@ for (const v of X) { } //// [parserES5ForOfStatement10.js] -for (var v of X) { +for (var _i = 0; _i < X.length; _i++) { + var v = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement11.errors.txt b/tests/baselines/reference/parserES5ForOfStatement11.errors.txt index 79b16ed1ad6..098d895e6c3 100644 --- a/tests/baselines/reference/parserES5ForOfStatement11.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement11.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,22): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts (1 errors) ==== for (const [a, b] of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement11.js b/tests/baselines/reference/parserES5ForOfStatement11.js index 45a24b109c0..40e4ca68d6b 100644 --- a/tests/baselines/reference/parserES5ForOfStatement11.js +++ b/tests/baselines/reference/parserES5ForOfStatement11.js @@ -3,5 +3,6 @@ for (const [a, b] of X) { } //// [parserES5ForOfStatement11.js] -for (var _a = void 0, a = _a[0], b = _a[1] of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a[0], b = _a[1]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement12.errors.txt b/tests/baselines/reference/parserES5ForOfStatement12.errors.txt index cdb6db690cf..63916799810 100644 --- a/tests/baselines/reference/parserES5ForOfStatement12.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement12.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,22): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts (1 errors) ==== for (const {a, b} of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement12.js b/tests/baselines/reference/parserES5ForOfStatement12.js index 30beac5118c..f877ebdb757 100644 --- a/tests/baselines/reference/parserES5ForOfStatement12.js +++ b/tests/baselines/reference/parserES5ForOfStatement12.js @@ -3,5 +3,6 @@ for (const {a, b} of X) { } //// [parserES5ForOfStatement12.js] -for (var _a = void 0, a = _a.a, b = _a.b of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a.a, b = _a.b; } diff --git a/tests/baselines/reference/parserES5ForOfStatement13.errors.txt b/tests/baselines/reference/parserES5ForOfStatement13.errors.txt index 9d97fd9e249..e197c0c42ee 100644 --- a/tests/baselines/reference/parserES5ForOfStatement13.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement13.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,20): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts (1 errors) ==== for (let {a, b} of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement13.js b/tests/baselines/reference/parserES5ForOfStatement13.js index 3fac359c675..45199480518 100644 --- a/tests/baselines/reference/parserES5ForOfStatement13.js +++ b/tests/baselines/reference/parserES5ForOfStatement13.js @@ -3,5 +3,6 @@ for (let {a, b} of X) { } //// [parserES5ForOfStatement13.js] -for (var _a = void 0, a = _a.a, b = _a.b of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a.a, b = _a.b; } diff --git a/tests/baselines/reference/parserES5ForOfStatement14.errors.txt b/tests/baselines/reference/parserES5ForOfStatement14.errors.txt index 303439ec447..f48a17cbc43 100644 --- a/tests/baselines/reference/parserES5ForOfStatement14.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement14.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,20): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts (1 errors) ==== for (let [a, b] of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement14.js b/tests/baselines/reference/parserES5ForOfStatement14.js index 6d1fbbddd67..d05fdb96e57 100644 --- a/tests/baselines/reference/parserES5ForOfStatement14.js +++ b/tests/baselines/reference/parserES5ForOfStatement14.js @@ -3,5 +3,6 @@ for (let [a, b] of X) { } //// [parserES5ForOfStatement14.js] -for (var _a = void 0, a = _a[0], b = _a[1] of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a[0], b = _a[1]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement15.errors.txt b/tests/baselines/reference/parserES5ForOfStatement15.errors.txt index f0eab288fa7..dd4d61c420b 100644 --- a/tests/baselines/reference/parserES5ForOfStatement15.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement15.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts(1,20): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts (1 errors) ==== for (var [a, b] of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement15.js b/tests/baselines/reference/parserES5ForOfStatement15.js index efca0b289f6..0af74961145 100644 --- a/tests/baselines/reference/parserES5ForOfStatement15.js +++ b/tests/baselines/reference/parserES5ForOfStatement15.js @@ -3,5 +3,6 @@ for (var [a, b] of X) { } //// [parserES5ForOfStatement15.js] -for (var _a = void 0, a = _a[0], b = _a[1] of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a[0], b = _a[1]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement16.errors.txt b/tests/baselines/reference/parserES5ForOfStatement16.errors.txt index b9248140f33..3879fb64e70 100644 --- a/tests/baselines/reference/parserES5ForOfStatement16.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement16.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts(1,20): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts (1 errors) ==== for (var {a, b} of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement16.js b/tests/baselines/reference/parserES5ForOfStatement16.js index 102e91685c3..1e7c6e005a8 100644 --- a/tests/baselines/reference/parserES5ForOfStatement16.js +++ b/tests/baselines/reference/parserES5ForOfStatement16.js @@ -3,5 +3,6 @@ for (var {a, b} of X) { } //// [parserES5ForOfStatement16.js] -for (var _a = void 0, a = _a.a, b = _a.b of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i], a = _a.a, b = _a.b; } diff --git a/tests/baselines/reference/parserES5ForOfStatement17.js b/tests/baselines/reference/parserES5ForOfStatement17.js index 7995c4c689e..29b4f32b912 100644 --- a/tests/baselines/reference/parserES5ForOfStatement17.js +++ b/tests/baselines/reference/parserES5ForOfStatement17.js @@ -2,4 +2,5 @@ for (var of; ;) { } //// [parserES5ForOfStatement17.js] -for (var of;;) { } +for (var of;;) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement18.errors.txt b/tests/baselines/reference/parserES5ForOfStatement18.errors.txt deleted file mode 100644 index e123be9c4f7..00000000000 --- a/tests/baselines/reference/parserES5ForOfStatement18.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. - - -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts (1 errors) ==== - for (var of of of) { } - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement18.js b/tests/baselines/reference/parserES5ForOfStatement18.js index 1df3e0bed7b..905ba9c1d1e 100644 --- a/tests/baselines/reference/parserES5ForOfStatement18.js +++ b/tests/baselines/reference/parserES5ForOfStatement18.js @@ -2,4 +2,6 @@ for (var of of of) { } //// [parserES5ForOfStatement18.js] -for (var of of of) { } +for (var _i = 0; _i < of.length; _i++) { + var of = of[_i]; +} diff --git a/tests/baselines/reference/parserES5ForOfStatement18.types b/tests/baselines/reference/parserES5ForOfStatement18.types new file mode 100644 index 00000000000..f9544e39a31 --- /dev/null +++ b/tests/baselines/reference/parserES5ForOfStatement18.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts === +for (var of of of) { } +>of : any +>of : any + diff --git a/tests/baselines/reference/parserES5ForOfStatement19.js b/tests/baselines/reference/parserES5ForOfStatement19.js index 7ed0d5a333a..3838461a640 100644 --- a/tests/baselines/reference/parserES5ForOfStatement19.js +++ b/tests/baselines/reference/parserES5ForOfStatement19.js @@ -2,4 +2,5 @@ for (var of in of) { } //// [parserES5ForOfStatement19.js] -for (var of in of) { } +for (var of in of) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement2.errors.txt b/tests/baselines/reference/parserES5ForOfStatement2.errors.txt index 618e2f3f0ae..cb249e83785 100644 --- a/tests/baselines/reference/parserES5ForOfStatement2.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,9): error TS1123: Variable declaration list cannot be empty. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts (1 errors) ==== for (var of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + +!!! error TS1123: Variable declaration list cannot be empty. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement2.js b/tests/baselines/reference/parserES5ForOfStatement2.js index dfcfb476172..287602dfb9c 100644 --- a/tests/baselines/reference/parserES5ForOfStatement2.js +++ b/tests/baselines/reference/parserES5ForOfStatement2.js @@ -3,5 +3,6 @@ for (var of X) { } //// [parserES5ForOfStatement2.js] -for ( of X) { +for (var _i = 0; _i < X.length; _i++) { + var _a = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement20.js b/tests/baselines/reference/parserES5ForOfStatement20.js index c51cbbc2a3a..74fceaef68c 100644 --- a/tests/baselines/reference/parserES5ForOfStatement20.js +++ b/tests/baselines/reference/parserES5ForOfStatement20.js @@ -2,4 +2,5 @@ for (var of = 0 in of) { } //// [parserES5ForOfStatement20.js] -for (var of = 0 in of) { } +for (var of = 0 in of) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement21.errors.txt b/tests/baselines/reference/parserES5ForOfStatement21.errors.txt index 14d97f49faf..76f87978cf1 100644 --- a/tests/baselines/reference/parserES5ForOfStatement21.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement21.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,9): error TS1123: Variable declaration list cannot be empty. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts (1 errors) ==== for (var of of) { } - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. \ No newline at end of file + +!!! error TS1123: Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement21.js b/tests/baselines/reference/parserES5ForOfStatement21.js index e02ed853cb5..dcdffbc3cf0 100644 --- a/tests/baselines/reference/parserES5ForOfStatement21.js +++ b/tests/baselines/reference/parserES5ForOfStatement21.js @@ -2,4 +2,6 @@ for (var of of) { } //// [parserES5ForOfStatement21.js] -for ( of of) { } +for (var _i = 0; _i < of.length; _i++) { + var _a = of[_i]; +} diff --git a/tests/baselines/reference/parserES5ForOfStatement3.errors.txt b/tests/baselines/reference/parserES5ForOfStatement3.errors.txt index dd888a3120a..7388676a703 100644 --- a/tests/baselines/reference/parserES5ForOfStatement3.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement3.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,13): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,18): error TS2304: Cannot find name 'X'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts (2 errors) ==== for (var a, b of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement3.js b/tests/baselines/reference/parserES5ForOfStatement3.js index 64892eb5094..a99e96a23b8 100644 --- a/tests/baselines/reference/parserES5ForOfStatement3.js +++ b/tests/baselines/reference/parserES5ForOfStatement3.js @@ -3,5 +3,6 @@ for (var a, b of X) { } //// [parserES5ForOfStatement3.js] -for (var a of X) { +for (var _i = 0; _i < X.length; _i++) { + var a = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement4.errors.txt b/tests/baselines/reference/parserES5ForOfStatement4.errors.txt index b94de56b17c..8a0d7abf0d0 100644 --- a/tests/baselines/reference/parserES5ForOfStatement4.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement4.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,10): error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,19): error TS2304: Cannot find name 'X'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts (2 errors) ==== for (var a = 1 of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement4.js b/tests/baselines/reference/parserES5ForOfStatement4.js index e17699a8662..f1558005f20 100644 --- a/tests/baselines/reference/parserES5ForOfStatement4.js +++ b/tests/baselines/reference/parserES5ForOfStatement4.js @@ -3,5 +3,6 @@ for (var a = 1 of X) { } //// [parserES5ForOfStatement4.js] -for (var a = 1 of X) { +for (var _i = 0; _i < X.length; _i++) { + var a = 1 = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement5.errors.txt b/tests/baselines/reference/parserES5ForOfStatement5.errors.txt index 0b8dafc0b90..43c9161156a 100644 --- a/tests/baselines/reference/parserES5ForOfStatement5.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement5.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,10): error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,23): error TS2304: Cannot find name 'X'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts (2 errors) ==== for (var a: number of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement5.js b/tests/baselines/reference/parserES5ForOfStatement5.js index 2eeb504365e..328b2fba0a7 100644 --- a/tests/baselines/reference/parserES5ForOfStatement5.js +++ b/tests/baselines/reference/parserES5ForOfStatement5.js @@ -3,5 +3,6 @@ for (var a: number of X) { } //// [parserES5ForOfStatement5.js] -for (var a of X) { +for (var _i = 0; _i < X.length; _i++) { + var a = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement6.errors.txt b/tests/baselines/reference/parserES5ForOfStatement6.errors.txt index 04ac84fbd73..8ddf2273ba8 100644 --- a/tests/baselines/reference/parserES5ForOfStatement6.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement6.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,17): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,26): error TS2304: Cannot find name 'X'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts (2 errors) ==== for (var a = 1, b = 2 of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement6.js b/tests/baselines/reference/parserES5ForOfStatement6.js index 575368fcd20..15747b93ba9 100644 --- a/tests/baselines/reference/parserES5ForOfStatement6.js +++ b/tests/baselines/reference/parserES5ForOfStatement6.js @@ -3,5 +3,6 @@ for (var a = 1, b = 2 of X) { } //// [parserES5ForOfStatement6.js] -for (var a = 1 of X) { +for (var _i = 0; _i < X.length; _i++) { + var a = 1 = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement7.errors.txt b/tests/baselines/reference/parserES5ForOfStatement7.errors.txt index 1def5279f65..6bf7f300183 100644 --- a/tests/baselines/reference/parserES5ForOfStatement7.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement7.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,25): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,43): error TS2304: Cannot find name 'X'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts (2 errors) ==== for (var a: number = 1, b: string = "" of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement7.js b/tests/baselines/reference/parserES5ForOfStatement7.js index ac240494c18..29e4de8787f 100644 --- a/tests/baselines/reference/parserES5ForOfStatement7.js +++ b/tests/baselines/reference/parserES5ForOfStatement7.js @@ -3,5 +3,6 @@ for (var a: number = 1, b: string = "" of X) { } //// [parserES5ForOfStatement7.js] -for (var a = 1 of X) { +for (var _i = 0; _i < X.length; _i++) { + var a = 1 = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement8.errors.txt b/tests/baselines/reference/parserES5ForOfStatement8.errors.txt index 829fea57e6e..53b263ad6e1 100644 --- a/tests/baselines/reference/parserES5ForOfStatement8.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts(1,15): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts (1 errors) ==== for (var v of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement8.js b/tests/baselines/reference/parserES5ForOfStatement8.js index c926784adfe..5c449fc6433 100644 --- a/tests/baselines/reference/parserES5ForOfStatement8.js +++ b/tests/baselines/reference/parserES5ForOfStatement8.js @@ -3,5 +3,6 @@ for (var v of X) { } //// [parserES5ForOfStatement8.js] -for (var v of X) { +for (var _i = 0; _i < X.length; _i++) { + var v = X[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement9.errors.txt b/tests/baselines/reference/parserES5ForOfStatement9.errors.txt index 4cf082b4f15..869cdfdf647 100644 --- a/tests/baselines/reference/parserES5ForOfStatement9.errors.txt +++ b/tests/baselines/reference/parserES5ForOfStatement9.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,15): error TS2304: Cannot find name 'X'. ==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts (1 errors) ==== for (let v of X) { - ~~~ -!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher. + ~ +!!! error TS2304: Cannot find name 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ForOfStatement9.js b/tests/baselines/reference/parserES5ForOfStatement9.js index 856dd5982af..6b63d58a88a 100644 --- a/tests/baselines/reference/parserES5ForOfStatement9.js +++ b/tests/baselines/reference/parserES5ForOfStatement9.js @@ -3,5 +3,6 @@ for (let v of X) { } //// [parserES5ForOfStatement9.js] -for (var v of X) { +for (var _i = 0; _i < X.length; _i++) { + var v = X[_i]; } diff --git a/tests/baselines/reference/parserES5SymbolProperty7.js b/tests/baselines/reference/parserES5SymbolProperty7.js index 102d10af417..b6096b798df 100644 --- a/tests/baselines/reference/parserES5SymbolProperty7.js +++ b/tests/baselines/reference/parserES5SymbolProperty7.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.toStringTag] = function () { }; + C.prototype[Symbol.toStringTag] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.js b/tests/baselines/reference/parserErrantSemicolonInClass1.js index f761b04ca78..56eb3427168 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.js +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.js @@ -39,7 +39,8 @@ class a { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { }; + a.prototype.pgF = function () { + }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; @@ -51,7 +52,10 @@ var a = (function () { }); Object.defineProperty(a, "p2", { get: function () { - return { x: 30, y: 40 }; + return { + x: 30, + y: 40 + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js index c33dbc2a626..bea1ae993a5 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js @@ -3,5 +3,12 @@ var v = [1, 2, 3 4, 5, 6, 7]; //// [parserErrorRecoveryArrayLiteralExpression1.js] -var v = [1, 2, 3, - 4, 5, 6, 7]; +var v = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 +]; diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js index 0bfe59964db..c56dcd4ad9e 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js @@ -5,5 +5,13 @@ var points = [-0.6961439251899719, 1.207661509513855, 0.19374050199985504, -0 //// [parserErrorRecoveryArrayLiteralExpression2.js] -var points = [-0.6961439251899719, 1.207661509513855, 0.19374050199985504, -0, - .7042760848999023, 1.1955541372299194, 0.19600726664066315, -0.7120069861412048]; +var points = [ + -0.6961439251899719, + 1.207661509513855, + 0.19374050199985504, + -0, + .7042760848999023, + 1.1955541372299194, + 0.19600726664066315, + -0.7120069861412048 +]; diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js index c366c750cc7..a40433ba461 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js @@ -4,6 +4,11 @@ var texCoords = [2, 2, 0.5000001192092895, 0.8749999 ; 403953552, 0.500000119209 //// [parserErrorRecoveryArrayLiteralExpression3.js] -var texCoords = [2, 2, 0.5000001192092895, 0.8749999]; +var texCoords = [ + 2, + 2, + 0.5000001192092895, + 0.8749999 +]; 403953552, 0.5000001192092895, 0.8749999403953552; ; diff --git a/tests/baselines/reference/parserErrorRecovery_Block1.js b/tests/baselines/reference/parserErrorRecovery_Block1.js index e2bc5f89a39..cdcd5856fa6 100644 --- a/tests/baselines/reference/parserErrorRecovery_Block1.js +++ b/tests/baselines/reference/parserErrorRecovery_Block1.js @@ -6,7 +6,6 @@ function f() { //// [parserErrorRecovery_Block1.js] function f() { - 1 + - ; + 1 + ; return; } diff --git a/tests/baselines/reference/parserErrorRecovery_Block3.js b/tests/baselines/reference/parserErrorRecovery_Block3.js index 55b0a4d65e7..30183fb7d8b 100644 --- a/tests/baselines/reference/parserErrorRecovery_Block3.js +++ b/tests/baselines/reference/parserErrorRecovery_Block3.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.prototype.a = function () { }; + C.prototype.a = function () { + }; C.prototype.b = function () { }; return C; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js index ae2509c3f49..c26b16b5a0a 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js @@ -41,7 +41,9 @@ var Shapes; this.con = "hello"; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js index 4936b1ea8bc..866f96a8030 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js @@ -41,7 +41,9 @@ var Shapes; this.con = "hello"; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js index dbf89fec52b..04085a4b595 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js @@ -2,4 +2,7 @@ var v = { a: 1 b: 2 } //// [parserErrorRecovery_ObjectLiteral1.js] -var v = { a: 1, b: 2 }; +var v = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js index 6a703759fff..3c258ef406e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js @@ -3,5 +3,7 @@ var v = { a return; //// [parserErrorRecovery_ObjectLiteral2.js] -var v = { a: , - return: }; +var v = { + a: , + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js index eecf45fea4f..49902122ac3 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js @@ -3,5 +3,7 @@ var v = { a: return; //// [parserErrorRecovery_ObjectLiteral3.js] -var v = { a: , - return: }; +var v = { + a: , + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js index 87a1a31437e..b0962100500 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js @@ -3,5 +3,7 @@ var v = { a: 1 return; //// [parserErrorRecovery_ObjectLiteral4.js] -var v = { a: 1, - return: }; +var v = { + a: 1, + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js index 97e618946a0..6b691e376ce 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js @@ -3,5 +3,7 @@ var v = { a: 1, return; //// [parserErrorRecovery_ObjectLiteral5.js] -var v = { a: 1, - return: }; +var v = { + a: 1, + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js index 060ad14766b..e83c045208d 100644 --- a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js +++ b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js @@ -11,4 +11,5 @@ var Foo = (function () { return Foo; })(); break ; -{ } +{ +} diff --git a/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js b/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js index 4d8008639c9..63591985d1e 100644 --- a/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js +++ b/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js @@ -10,10 +10,8 @@ switch (e) { //// [parserErrorRecovery_SwitchStatement1.js] switch (e) { case 1: - 1 + - ; + 1 + ; case 2: - 1 + - ; + 1 + ; default: } diff --git a/tests/baselines/reference/parserExportAssignment1.errors.txt b/tests/baselines/reference/parserExportAssignment1.errors.txt index 79edd5069f0..e6711946d25 100644 --- a/tests/baselines/reference/parserExportAssignment1.errors.txt +++ b/tests/baselines/reference/parserExportAssignment1.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS2304: Cannot find name 'foo'. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,10): error TS2304: Cannot find name 'foo'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts (2 errors) ==== export = foo ~~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. - ~~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment2.errors.txt b/tests/baselines/reference/parserExportAssignment2.errors.txt index f9ad377bbd7..8a376dbe6d3 100644 --- a/tests/baselines/reference/parserExportAssignment2.errors.txt +++ b/tests/baselines/reference/parserExportAssignment2.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS2304: Cannot find name 'foo'. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,10): error TS2304: Cannot find name 'foo'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts (2 errors) ==== export = foo; ~~~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. - ~~~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment3.errors.txt b/tests/baselines/reference/parserExportAssignment3.errors.txt index d02c6d20182..9836671be1e 100644 --- a/tests/baselines/reference/parserExportAssignment3.errors.txt +++ b/tests/baselines/reference/parserExportAssignment3.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,9): error TS1003: Identifier expected. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,9): error TS1109: Expression expected. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts (2 errors) ==== @@ -7,4 +7,4 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm ~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. -!!! error TS1003: Identifier expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment4.errors.txt b/tests/baselines/reference/parserExportAssignment4.errors.txt index 06563ac1195..b6815753962 100644 --- a/tests/baselines/reference/parserExportAssignment4.errors.txt +++ b/tests/baselines/reference/parserExportAssignment4.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,10): error TS1109: Expression expected. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts (2 errors) ==== @@ -7,4 +7,4 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm ~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~ -!!! error TS1003: Identifier expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment5.errors.txt b/tests/baselines/reference/parserExportAssignment5.errors.txt index b463034f621..8444cdbce64 100644 --- a/tests/baselines/reference/parserExportAssignment5.errors.txt +++ b/tests/baselines/reference/parserExportAssignment5.errors.txt @@ -1,12 +1,9 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts(2,5): error TS1063: An export assignment cannot be used in an internal module. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts(2,5): error TS2304: Cannot find name 'A'. -==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts (1 errors) ==== module M { export = A; ~~~~~~~~~~~ !!! error TS1063: An export assignment cannot be used in an internal module. - ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment6.errors.txt b/tests/baselines/reference/parserExportAssignment6.errors.txt index 41b5baed87b..fa49490a7f8 100644 --- a/tests/baselines/reference/parserExportAssignment6.errors.txt +++ b/tests/baselines/reference/parserExportAssignment6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment6.ts(2,5): error TS2304: Cannot find name 'A'. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment6.ts(2,14): error TS2304: Cannot find name 'A'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment6.ts (1 errors) ==== declare module "M" { export = A; - ~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment7.errors.txt b/tests/baselines/reference/parserExportAssignment7.errors.txt index 401eb1355a2..a6650c23540 100644 --- a/tests/baselines/reference/parserExportAssignment7.errors.txt +++ b/tests/baselines/reference/parserExportAssignment7.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,1): error TS2304: Cannot find name 'B'. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts (3 errors) ==== @@ -11,6 +11,6 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm export = B; ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'B'. - ~~~~~~~~~~~ -!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + ~ +!!! error TS2304: Cannot find name 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment8.errors.txt b/tests/baselines/reference/parserExportAssignment8.errors.txt index 2ad8e7b2739..ac8feeeec58 100644 --- a/tests/baselines/reference/parserExportAssignment8.errors.txt +++ b/tests/baselines/reference/parserExportAssignment8.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS2304: Cannot find name 'B'. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts (3 errors) ==== @@ -8,9 +8,9 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm ~~~~~~~~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'B'. - ~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. + ~ +!!! error TS2304: Cannot find name 'B'. export class C { } \ No newline at end of file diff --git a/tests/baselines/reference/parserForOfStatement17.js b/tests/baselines/reference/parserForOfStatement17.js index a6e2aee79a4..38ee81e71fc 100644 --- a/tests/baselines/reference/parserForOfStatement17.js +++ b/tests/baselines/reference/parserForOfStatement17.js @@ -2,4 +2,5 @@ for (var of; ;) { } //// [parserForOfStatement17.js] -for (var of;;) { } +for (var of;;) { +} diff --git a/tests/baselines/reference/parserForOfStatement18.js b/tests/baselines/reference/parserForOfStatement18.js index c30fbb60857..519d92f3357 100644 --- a/tests/baselines/reference/parserForOfStatement18.js +++ b/tests/baselines/reference/parserForOfStatement18.js @@ -2,4 +2,5 @@ for (var of of of) { } //// [parserForOfStatement18.js] -for (var of of of) { } +for (var of of of) { +} diff --git a/tests/baselines/reference/parserForOfStatement19.js b/tests/baselines/reference/parserForOfStatement19.js index c838e8c71e0..9b6a5c8da27 100644 --- a/tests/baselines/reference/parserForOfStatement19.js +++ b/tests/baselines/reference/parserForOfStatement19.js @@ -2,4 +2,5 @@ for (var of in of) { } //// [parserForOfStatement19.js] -for (var of in of) { } +for (var of in of) { +} diff --git a/tests/baselines/reference/parserForOfStatement20.js b/tests/baselines/reference/parserForOfStatement20.js index 8599238d853..7190bbeb1d2 100644 --- a/tests/baselines/reference/parserForOfStatement20.js +++ b/tests/baselines/reference/parserForOfStatement20.js @@ -2,4 +2,5 @@ for (var of = 0 in of) { } //// [parserForOfStatement20.js] -for (var of = 0 in of) { } +for (var of = 0 in of) { +} diff --git a/tests/baselines/reference/parserForOfStatement21.js b/tests/baselines/reference/parserForOfStatement21.js index 5db883e18a0..593582e035a 100644 --- a/tests/baselines/reference/parserForOfStatement21.js +++ b/tests/baselines/reference/parserForOfStatement21.js @@ -2,4 +2,5 @@ for (var of of) { } //// [parserForOfStatement21.js] -for ( of of) { } +for ( of of) { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration4.js b/tests/baselines/reference/parserFunctionDeclaration4.js index a36a41e0809..285f36e6838 100644 --- a/tests/baselines/reference/parserFunctionDeclaration4.js +++ b/tests/baselines/reference/parserFunctionDeclaration4.js @@ -3,4 +3,5 @@ function foo(); function bar() { } //// [parserFunctionDeclaration4.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration5.js b/tests/baselines/reference/parserFunctionDeclaration5.js index fd35c14675e..1c80f842c0d 100644 --- a/tests/baselines/reference/parserFunctionDeclaration5.js +++ b/tests/baselines/reference/parserFunctionDeclaration5.js @@ -3,4 +3,5 @@ function foo(); function foo() { } //// [parserFunctionDeclaration5.js] -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration6.js b/tests/baselines/reference/parserFunctionDeclaration6.js index 05afe2d33a8..6f877b07b14 100644 --- a/tests/baselines/reference/parserFunctionDeclaration6.js +++ b/tests/baselines/reference/parserFunctionDeclaration6.js @@ -6,5 +6,6 @@ //// [parserFunctionDeclaration6.js] { - function bar() { } + function bar() { + } } diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment1.js b/tests/baselines/reference/parserFunctionPropertyAssignment1.js index ea7b20f05d5..c66c134ac48 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment1.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment1.js @@ -2,4 +2,7 @@ var v = { foo() { } }; //// [parserFunctionPropertyAssignment1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment2.js b/tests/baselines/reference/parserFunctionPropertyAssignment2.js index 668e8df2cfc..7f6b3001c9b 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment2.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment2.js @@ -2,4 +2,7 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment2.js] -var v = { 0: function () { } }; +var v = { + 0: function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment3.js b/tests/baselines/reference/parserFunctionPropertyAssignment3.js index 87a98ac402c..2ed2152ae19 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment3.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment3.js @@ -2,4 +2,7 @@ var v = { "foo"() { } }; //// [parserFunctionPropertyAssignment3.js] -var v = { "foo": function () { } }; +var v = { + "foo": function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment4.js b/tests/baselines/reference/parserFunctionPropertyAssignment4.js index e9b41e754e6..eb95d79ac40 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment4.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment4.js @@ -2,4 +2,7 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment4.js] -var v = { 0: function () { } }; +var v = { + 0: function () { + } +}; diff --git a/tests/baselines/reference/parserFuzz1.js b/tests/baselines/reference/parserFuzz1.js index b9ffb540049..969c07c1659 100644 --- a/tests/baselines/reference/parserFuzz1.js +++ b/tests/baselines/reference/parserFuzz1.js @@ -6,6 +6,8 @@ cla > { ~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericConstraint3.errors.txt b/tests/baselines/reference/parserGenericConstraint3.errors.txt index 8ab92c1e271..1dc7ea4e080 100644 --- a/tests/baselines/reference/parserGenericConstraint3.errors.txt +++ b/tests/baselines/reference/parserGenericConstraint3.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts( class C> { ~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericConstraint4.errors.txt b/tests/baselines/reference/parserGenericConstraint4.errors.txt index cea9267587f..3109bca9a2f 100644 --- a/tests/baselines/reference/parserGenericConstraint4.errors.txt +++ b/tests/baselines/reference/parserGenericConstraint4.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts( class C > > { ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericConstraint5.errors.txt b/tests/baselines/reference/parserGenericConstraint5.errors.txt index 0bf17ca4213..db8fea938b8 100644 --- a/tests/baselines/reference/parserGenericConstraint5.errors.txt +++ b/tests/baselines/reference/parserGenericConstraint5.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts( class C> > { ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericConstraint6.errors.txt b/tests/baselines/reference/parserGenericConstraint6.errors.txt index d8e082109f1..032ed7fafb3 100644 --- a/tests/baselines/reference/parserGenericConstraint6.errors.txt +++ b/tests/baselines/reference/parserGenericConstraint6.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts( class C >> { ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericConstraint7.errors.txt b/tests/baselines/reference/parserGenericConstraint7.errors.txt index 0c97e9adff5..62dc8373e63 100644 --- a/tests/baselines/reference/parserGenericConstraint7.errors.txt +++ b/tests/baselines/reference/parserGenericConstraint7.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts( class C>> { ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. - ~~~~~~~~~~~~~ + ~~~~ !!! error TS2304: Cannot find name 'List'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserGenericsInInterfaceDeclaration1.errors.txt b/tests/baselines/reference/parserGenericsInInterfaceDeclaration1.errors.txt index 1c27ba1afbf..a4abd191aeb 100644 --- a/tests/baselines/reference/parserGenericsInInterfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/parserGenericsInInterfaceDeclaration1.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInInterfaceDec ==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInInterfaceDeclaration1.ts (1 errors) ==== interface I { v: A; - ~~~~ + ~ !!! error TS2304: Cannot find name 'A'. f1(): T; f2?(): T; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.errors.txt b/tests/baselines/reference/parserGenericsInTypeContexts1.errors.txt index 5edf06ff762..8b9304d9165 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.errors.txt +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.errors.txt @@ -12,9 +12,9 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts ==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts (10 errors) ==== class C extends A implements B { - ~~~~ + ~ !!! error TS2304: Cannot find name 'A'. - ~~~~ + ~ !!! error TS2304: Cannot find name 'B'. } @@ -22,26 +22,26 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts ~~~~ !!! error TS2315: Type 'C' is not generic. var v2: D = null; - ~~~~ + ~ !!! error TS2304: Cannot find name 'D'. var v3: E.F; - ~~~~~~ + ~ !!! error TS2304: Cannot find name 'E'. var v3: G.H.I; - ~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'G'. var v6: K[]; - ~~~~ + ~ !!! error TS2304: Cannot find name 'K'. function f1(a: E) { - ~~~~ + ~ !!! error TS2304: Cannot find name 'E'. } function f2(): F { - ~~~~ + ~ !!! error TS2304: Cannot find name 'F'. ~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.errors.txt b/tests/baselines/reference/parserGenericsInTypeContexts2.errors.txt index be93850a07c..0ef716d1804 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.errors.txt +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.errors.txt @@ -12,9 +12,9 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts ==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts (10 errors) ==== class C extends A, Y>> implements B, Y>> { - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'A'. - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'B'. } @@ -22,26 +22,26 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts ~~~~~~~~~~~~~~~~ !!! error TS2315: Type 'C' is not generic. var v2: D, Y>> = null; - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'D'. var v3: E.F, Y>>; - ~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'E'. var v4: G.H.I, Y>>; - ~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'G'. var v6: K, Y>>[]; - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'K'. function f1(a: E, Y>>) { - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'E'. } function f2(): F, Y>> { - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2304: Cannot find name 'F'. ~~~~~~~~~~~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. diff --git a/tests/baselines/reference/parserGenericsInVariableDeclaration1.errors.txt b/tests/baselines/reference/parserGenericsInVariableDeclaration1.errors.txt index 6569cfe89bf..42f013cb250 100644 --- a/tests/baselines/reference/parserGenericsInVariableDeclaration1.errors.txt +++ b/tests/baselines/reference/parserGenericsInVariableDeclaration1.errors.txt @@ -8,22 +8,22 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInVariableDecl ==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInVariableDeclaration1.ts (6 errors) ==== var v : Foo = 1; - ~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. var v : Foo= 1; - ~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. var v : Foo> = 1; - ~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. var v : Foo>= 1; - ~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. var v : Foo>> = 1; - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. var v : Foo>>= 1; - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js b/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js index 5a226dab628..16daadea82b 100644 --- a/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js +++ b/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js index a558407de43..4ff1f26d890 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity10.js] -1 >>> - 2; +1 >>> 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js index b2eba6d5873..5cc8bb3b88e 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js @@ -3,6 +3,5 @@ = 2; //// [parserGreaterThanTokenAmbiguity14.js] -1 >> -; +1 >> ; 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js index 83f2cda2364..df9e55b7e3c 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity15.js] -1 >>= - 2; +1 >>= 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js index d0671d8649f..52035691c84 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js @@ -3,6 +3,5 @@ = 2; //// [parserGreaterThanTokenAmbiguity19.js] -1 >>> -; +1 >>> ; 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js index 9ac06e9644f..e6043febcd1 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity20.js] -1 >>>= - 2; +1 >>>= 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js index c0b8fc45cc1..5ef065681dc 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js @@ -3,5 +3,4 @@ > 2; //// [parserGreaterThanTokenAmbiguity4.js] -1 > - > 2; +1 > > 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js index cde18d5c63d..a707e808b4a 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity5.js] -1 >> - 2; +1 >> 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js index 757ddf38a7f..25c5ed53a7c 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js @@ -3,5 +3,4 @@ > 2; //// [parserGreaterThanTokenAmbiguity9.js] -1 >> - > 2; +1 >> > 2; diff --git a/tests/baselines/reference/parserImportDeclaration1.errors.txt b/tests/baselines/reference/parserImportDeclaration1.errors.txt index 51cfbea320b..ec3397cd196 100644 --- a/tests/baselines/reference/parserImportDeclaration1.errors.txt +++ b/tests/baselines/reference/parserImportDeclaration1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/parserImportDeclaration1.ts(1,1): error TS2304: Cannot find name 'TypeScriptServices'. +tests/cases/conformance/parser/ecmascript5/parserImportDeclaration1.ts(1,21): error TS2304: Cannot find name 'TypeScriptServices'. ==== tests/cases/conformance/parser/ecmascript5/parserImportDeclaration1.ts (1 errors) ==== import TypeScript = TypeScriptServices.TypeScript; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScriptServices'. \ No newline at end of file diff --git a/tests/baselines/reference/parserInExpression1.js b/tests/baselines/reference/parserInExpression1.js index d6100b9b57f..21538288049 100644 --- a/tests/baselines/reference/parserInExpression1.js +++ b/tests/baselines/reference/parserInExpression1.js @@ -2,4 +2,6 @@ console.log("a" in { "a": true }); //// [parserInExpression1.js] -console.log("a" in { "a": true }); +console.log("a" in { + "a": true +}); diff --git a/tests/baselines/reference/parserMemberAccessor1.js b/tests/baselines/reference/parserMemberAccessor1.js index 866a171bc43..3d4690d58e9 100644 --- a/tests/baselines/reference/parserMemberAccessor1.js +++ b/tests/baselines/reference/parserMemberAccessor1.js @@ -9,8 +9,10 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - get: function () { }, - set: function (a) { }, + get: function () { + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration1.js b/tests/baselines/reference/parserMemberAccessorDeclaration1.js index 30534735cfc..1f0b5eb3bd9 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration1.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration10.js b/tests/baselines/reference/parserMemberAccessorDeclaration10.js index d778b192279..dba06544963 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration10.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration10.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { } + get: function () { + } exports.Foo = Foo;, enumerable: true, configurable: true diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration11.js b/tests/baselines/reference/parserMemberAccessorDeclaration11.js index da8d7fc6425..2a286b8ca6b 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration11.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration11.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration12.js b/tests/baselines/reference/parserMemberAccessorDeclaration12.js index 72923e060c4..aea6eccfbc2 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration12.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration12.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function (a) { }, + get: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration13.js b/tests/baselines/reference/parserMemberAccessorDeclaration13.js index 14b0f1b0a05..f6ca4ee6a02 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration13.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration13.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function () { }, + set: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration14.js b/tests/baselines/reference/parserMemberAccessorDeclaration14.js index 21b11219ca1..62877d402d1 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration14.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration14.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a, b) { }, + set: function (a, b) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration15.js b/tests/baselines/reference/parserMemberAccessorDeclaration15.js index 0d01c75840c..59ff360d432 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration15.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration15.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration17.js b/tests/baselines/reference/parserMemberAccessorDeclaration17.js index d61fa2e8409..6c99c7ddae6 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration17.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration17.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration2.js b/tests/baselines/reference/parserMemberAccessorDeclaration2.js index f29efc846ee..00cc2812014 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration2.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "b", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration3.js b/tests/baselines/reference/parserMemberAccessorDeclaration3.js index 9c64bf02522..86fc2c3e532 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration3.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration3.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "0", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration4.js b/tests/baselines/reference/parserMemberAccessorDeclaration4.js index e65f6431a7c..552c2c1d27a 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration4.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration4.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration5.js b/tests/baselines/reference/parserMemberAccessorDeclaration5.js index d304a44d64d..309df8b68ec 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration5.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration5.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration6.js b/tests/baselines/reference/parserMemberAccessorDeclaration6.js index 9c6f3ce8a55..0b44673f146 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration6.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration6.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "0", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration7.js b/tests/baselines/reference/parserMemberAccessorDeclaration7.js index ce103accf61..0d2d24092e5 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration7.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration7.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration8.js b/tests/baselines/reference/parserMemberAccessorDeclaration8.js index 07f12acae40..dd93fa4852e 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration8.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration8.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration9.js b/tests/baselines/reference/parserMemberAccessorDeclaration9.js index 02183d46ef1..5fca86f689b 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration9.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration9.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration1.js b/tests/baselines/reference/parserMemberFunctionDeclaration1.js index 1d40fa94700..564245157b0 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration1.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { }; + C.prototype.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration2.js b/tests/baselines/reference/parserMemberFunctionDeclaration2.js index fed1a6a0743..0f103c90b7d 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration2.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration2.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.Foo = function () { }; + C.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration3.js b/tests/baselines/reference/parserMemberFunctionDeclaration3.js index 18bbec7ba5f..46243f08dad 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration3.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration3.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.Foo = function () { }; + C.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration4.js b/tests/baselines/reference/parserMemberFunctionDeclaration4.js index cd12f23442c..bcf00aeb1bc 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration4.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration4.js @@ -7,7 +7,8 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { } + C.prototype.Foo = function () { + } exports.Foo = Foo;; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration5.js b/tests/baselines/reference/parserMemberFunctionDeclaration5.js index 75630d34551..da2d2281999 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration5.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration5.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { }; + C.prototype.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js index e0a0f7860cc..59017d97fe2 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js +++ b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js @@ -17,13 +17,21 @@ class C { var C = (function () { function C() { } - C.prototype.public = function () { }; - C.prototype.static = function () { }; - C.prototype.public = function () { }; - C.prototype.static = function () { }; - C.public = function () { }; - C.static = function () { }; - C.public = function () { }; - C.static = function () { }; + C.prototype.public = function () { + }; + C.prototype.static = function () { + }; + C.prototype.public = function () { + }; + C.prototype.static = function () { + }; + C.public = function () { + }; + C.static = function () { + }; + C.public = function () { + }; + C.static = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMissingLambdaOpenBrace1.errors.txt b/tests/baselines/reference/parserMissingLambdaOpenBrace1.errors.txt index 3b70ab37522..d39986c9c01 100644 --- a/tests/baselines/reference/parserMissingLambdaOpenBrace1.errors.txt +++ b/tests/baselines/reference/parserMissingLambdaOpenBrace1.errors.txt @@ -8,9 +8,9 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpen ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts (5 errors) ==== class C { where(filter: Iterator): Query { - ~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Iterator'. - ~~~~~~~~ + ~~~~~ !!! error TS2304: Cannot find name 'Query'. return fromDoWhile(test => ~~~~~~~~~~~ diff --git a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js index 8280d8dc9b2..1c532f3d4b4 100644 --- a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js +++ b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js @@ -16,7 +16,9 @@ var C = (function () { var _this = this; return fromDoWhile(function (test) { var index = 0; - return _this.doWhile(function (item, i) { return filter(item, i) ? test(item, index++) : true; }); + return _this.doWhile(function (item, i) { + return filter(item, i) ? test(item, index++) : true; + }); }); }; return C; diff --git a/tests/baselines/reference/parserMissingToken1.js b/tests/baselines/reference/parserMissingToken1.js index 7017d9d0b17..506e628fa38 100644 --- a/tests/baselines/reference/parserMissingToken1.js +++ b/tests/baselines/reference/parserMissingToken1.js @@ -3,5 +3,7 @@ a / finally //// [parserMissingToken1.js] a / ; -try { } -finally { } +try { +} +finally { +} diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt b/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt index 5fa104a0e83..1530281b36b 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt +++ b/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt @@ -1,15 +1,13 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(2,4): error TS1184: Modifiers cannot appear here. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts (2 errors) ==== export function foo() { - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export var x = this; - ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ !!! error TS1184: Modifiers cannot appear here. } - ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt b/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt index 5bc5a49670e..cff0ba1d50d 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt +++ b/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt @@ -1,17 +1,14 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(2,4): error TS1184: Modifiers cannot appear here. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts (2 errors) ==== export function foo() { - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function bar() { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ !!! error TS1184: Modifiers cannot appear here. } - ~~~~ } - ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js index 51581b1c74f..83df05206ce 100644 --- a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js +++ b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js @@ -4,4 +4,5 @@ var x = function () { } //// [parserNoASIOnCallAfterFunctionExpression1.js] -var x = function () { }(window).foo; +var x = function () { +}(window).foo; diff --git a/tests/baselines/reference/parserNotHexLiteral1.js b/tests/baselines/reference/parserNotHexLiteral1.js index 89b978fcaa8..eadbf8da275 100644 --- a/tests/baselines/reference/parserNotHexLiteral1.js +++ b/tests/baselines/reference/parserNotHexLiteral1.js @@ -7,7 +7,10 @@ console.info (x.e0); //// [parserNotHexLiteral1.js] -var x = { e0: 'cat', x0: 'dog' }; +var x = { + e0: 'cat', + x0: 'dog' +}; console.info(x.x0); // tsc dies on this next line with "bug.ts (5,16): Expected ')'" // tsc seems to be parsing the e0 as a hex constant. diff --git a/tests/baselines/reference/parserObjectLiterals1.js b/tests/baselines/reference/parserObjectLiterals1.js index 426b8107d3b..2224809474b 100644 --- a/tests/baselines/reference/parserObjectLiterals1.js +++ b/tests/baselines/reference/parserObjectLiterals1.js @@ -2,4 +2,7 @@ var v = { a: 1, b: 2 }; //// [parserObjectLiterals1.js] -var v = { a: 1, b: 2 }; +var v = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/parserParameterList1.js b/tests/baselines/reference/parserParameterList1.js index 86b0690728d..49af7780b1f 100644 --- a/tests/baselines/reference/parserParameterList1.js +++ b/tests/baselines/reference/parserParameterList1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.F = function (A, B) { }; + C.prototype.F = function (A, B) { + }; return C; })(); diff --git a/tests/baselines/reference/parserParameterList15.errors.txt b/tests/baselines/reference/parserParameterList15.errors.txt index 0b062ee6ee1..7a1a8af9093 100644 --- a/tests/baselines/reference/parserParameterList15.errors.txt +++ b/tests/baselines/reference/parserParameterList15.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. ==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts (2 errors) ==== function foo(a = 4); - ~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~ !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. diff --git a/tests/baselines/reference/parserParameterList15.js b/tests/baselines/reference/parserParameterList15.js index 83216f12568..289c65c88c2 100644 --- a/tests/baselines/reference/parserParameterList15.js +++ b/tests/baselines/reference/parserParameterList15.js @@ -3,4 +3,5 @@ function foo(a = 4); function foo(a, b) {} //// [parserParameterList15.js] -function foo(a, b) { } +function foo(a, b) { +} diff --git a/tests/baselines/reference/parserParameterList16.js b/tests/baselines/reference/parserParameterList16.js index 50c58215478..368939bbcdc 100644 --- a/tests/baselines/reference/parserParameterList16.js +++ b/tests/baselines/reference/parserParameterList16.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function (a, b) { }; + C.prototype.foo = function (a, b) { + }; return C; })(); diff --git a/tests/baselines/reference/parserParameterList3.js b/tests/baselines/reference/parserParameterList3.js index 3992dc548ef..01135f0ceff 100644 --- a/tests/baselines/reference/parserParameterList3.js +++ b/tests/baselines/reference/parserParameterList3.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.F = function (A, B) { }; + C.prototype.F = function (A, B) { + }; return C; })(); diff --git a/tests/baselines/reference/parserRealSource1.js b/tests/baselines/reference/parserRealSource1.js index d19c2242f0b..c62897c9aff 100644 --- a/tests/baselines/reference/parserRealSource1.js +++ b/tests/baselines/reference/parserRealSource1.js @@ -189,11 +189,21 @@ var TypeScript; var NullLogger = (function () { function NullLogger() { } - NullLogger.prototype.information = function () { return false; }; - NullLogger.prototype.debug = function () { return false; }; - NullLogger.prototype.warning = function () { return false; }; - NullLogger.prototype.error = function () { return false; }; - NullLogger.prototype.fatal = function () { return false; }; + NullLogger.prototype.information = function () { + return false; + }; + NullLogger.prototype.debug = function () { + return false; + }; + NullLogger.prototype.warning = function () { + return false; + }; + NullLogger.prototype.error = function () { + return false; + }; + NullLogger.prototype.fatal = function () { + return false; + }; NullLogger.prototype.log = function (s) { }; return NullLogger; @@ -208,11 +218,21 @@ var TypeScript; this._error = this.logger.error(); this._fatal = this.logger.fatal(); } - LoggerAdapter.prototype.information = function () { return this._information; }; - LoggerAdapter.prototype.debug = function () { return this._debug; }; - LoggerAdapter.prototype.warning = function () { return this._warning; }; - LoggerAdapter.prototype.error = function () { return this._error; }; - LoggerAdapter.prototype.fatal = function () { return this._fatal; }; + LoggerAdapter.prototype.information = function () { + return this._information; + }; + LoggerAdapter.prototype.debug = function () { + return this._debug; + }; + LoggerAdapter.prototype.warning = function () { + return this._warning; + }; + LoggerAdapter.prototype.error = function () { + return this._error; + }; + LoggerAdapter.prototype.fatal = function () { + return this._fatal; + }; LoggerAdapter.prototype.log = function (s) { this.logger.log(s); }; @@ -223,11 +243,21 @@ var TypeScript; function BufferedLogger() { this.logContents = []; } - BufferedLogger.prototype.information = function () { return false; }; - BufferedLogger.prototype.debug = function () { return false; }; - BufferedLogger.prototype.warning = function () { return false; }; - BufferedLogger.prototype.error = function () { return false; }; - BufferedLogger.prototype.fatal = function () { return false; }; + BufferedLogger.prototype.information = function () { + return false; + }; + BufferedLogger.prototype.debug = function () { + return false; + }; + BufferedLogger.prototype.warning = function () { + return false; + }; + BufferedLogger.prototype.error = function () { + return false; + }; + BufferedLogger.prototype.fatal = function () { + return false; + }; BufferedLogger.prototype.log = function (s) { this.logContents.push(s); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 2ddc7a8dce2..871b9019edc 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -813,8 +813,7 @@ var TypeScript; else { var tokenInfo = lookupToken(this.tokenId); if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - (tokenInfo.binopNodeType != NodeType.None)) { + if ((tokenInfo.unopNodeType != NodeType.None) || (tokenInfo.binopNodeType != NodeType.None)) { return TokenClass.Operator; } } diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 72fec692184..89c38a96fdf 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2397,10 +2397,18 @@ var TypeScript; this.postComments = null; this.isParenthesized = false; } - AST.prototype.isExpression = function () { return false; }; - AST.prototype.isStatementOrExpression = function () { return false; }; - AST.prototype.isCompoundStatement = function () { return false; }; - AST.prototype.isLeaf = function () { return this.isStatementOrExpression() && (!this.isCompoundStatement()); }; + AST.prototype.isExpression = function () { + return false; + }; + AST.prototype.isStatementOrExpression = function () { + return false; + }; + AST.prototype.isCompoundStatement = function () { + return false; + }; + AST.prototype.isLeaf = function () { + return this.isStatementOrExpression() && (!this.isCompoundStatement()); + }; AST.prototype.typeCheck = function (typeFlow) { switch (this.nodeType) { case NodeType.Error: @@ -2483,13 +2491,18 @@ var TypeScript; }; AST.prototype.print = function (context) { context.startLine(); - var lineCol = { line: -1, col: -1 }; - var limLineCol = { line: -1, col: -1 }; + var lineCol = { + line: -1, + col: -1 + }; + var limLineCol = { + line: -1, + col: -1 + }; if (context.parser !== null) { context.parser.getSourceLineCol(lineCol, this.minChar); context.parser.getSourceLineCol(limLineCol, this.limChar); - context.write("(" + lineCol.line + "," + lineCol.col + ")--" + - "(" + limLineCol.line + "," + limLineCol.col + "): "); + context.write("(" + lineCol.line + "," + lineCol.col + ")--" + "(" + limLineCol.line + "," + limLineCol.col + "): "); } var lab = this.printLabel(); if (hasFlag(this.flags, ASTFlags.Error)) { @@ -2636,8 +2649,12 @@ var TypeScript; this.text = actualText; } }; - Identifier.prototype.isMissing = function () { return false; }; - Identifier.prototype.isLeaf = function () { return true; }; + Identifier.prototype.isMissing = function () { + return false; + }; + Identifier.prototype.isLeaf = function () { + return true; + }; Identifier.prototype.treeViewLabel = function () { return "id: " + this.actualText; }; @@ -2681,7 +2698,9 @@ var TypeScript; _super.call(this, NodeType.Label); this.id = id; } - Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; + Label.prototype.printLabel = function () { + return this.id.actualText + ":"; + }; Label.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.voidType; return this; @@ -2704,8 +2723,12 @@ var TypeScript; function Expression(nodeType) { _super.call(this, nodeType); } - Expression.prototype.isExpression = function () { return true; }; - Expression.prototype.isStatementOrExpression = function () { return true; }; + Expression.prototype.isExpression = function () { + return true; + }; + Expression.prototype.isStatementOrExpression = function () { + return true; + }; return Expression; })(AST); TypeScript.Expression = Expression; @@ -3166,7 +3189,9 @@ var TypeScript; this.varFlags = VarFlags.None; this.isDynamicImport = false; } - ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; + ImportDeclaration.prototype.isStatementOrExpression = function () { + return true; + }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { var mod = this.alias.type; // REVIEW: Only modules may be aliased for now, though there's no real @@ -3227,10 +3252,18 @@ var TypeScript; this.varFlags = VarFlags.None; this.sym = null; } - BoundDecl.prototype.isStatementOrExpression = function () { return true; }; - BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); }; - BoundDecl.prototype.isPublic = function () { return hasFlag(this.varFlags, VarFlags.Public); }; - BoundDecl.prototype.isProperty = function () { return hasFlag(this.varFlags, VarFlags.Property); }; + BoundDecl.prototype.isStatementOrExpression = function () { + return true; + }; + BoundDecl.prototype.isPrivate = function () { + return hasFlag(this.varFlags, VarFlags.Private); + }; + BoundDecl.prototype.isPublic = function () { + return hasFlag(this.varFlags, VarFlags.Public); + }; + BoundDecl.prototype.isProperty = function () { + return hasFlag(this.varFlags, VarFlags.Property); + }; BoundDecl.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckBoundDecl(this); }; @@ -3245,9 +3278,15 @@ var TypeScript; function VarDecl(id, nest) { _super.call(this, id, NodeType.VarDecl, nest); } - VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; - VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; - VarDecl.prototype.isStatic = function () { return hasFlag(this.varFlags, VarFlags.Static); }; + VarDecl.prototype.isAmbient = function () { + return hasFlag(this.varFlags, VarFlags.Ambient); + }; + VarDecl.prototype.isExported = function () { + return hasFlag(this.varFlags, VarFlags.Exported); + }; + VarDecl.prototype.isStatic = function () { + return hasFlag(this.varFlags, VarFlags.Static); + }; VarDecl.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitJavascriptVarDecl(this, tokenId); }; @@ -3264,7 +3303,9 @@ var TypeScript; this.isOptional = false; this.parameterPropertySym = null; } - ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; }; + ArgDecl.prototype.isOptionalArg = function () { + return this.isOptional || this.init; + }; ArgDecl.prototype.treeViewLabel = function () { return "arg: " + this.id.actualText; }; @@ -3325,8 +3366,12 @@ var TypeScript; } return this.internalNameCache; }; - FuncDecl.prototype.hasSelfReference = function () { return hasFlag(this.fncFlags, FncFlags.HasSelfReference); }; - FuncDecl.prototype.setHasSelfReference = function () { this.fncFlags |= FncFlags.HasSelfReference; }; + FuncDecl.prototype.hasSelfReference = function () { + return hasFlag(this.fncFlags, FncFlags.HasSelfReference); + }; + FuncDecl.prototype.setHasSelfReference = function () { + this.fncFlags |= FncFlags.HasSelfReference; + }; FuncDecl.prototype.addCloRef = function (id, sym) { if (this.envids == null) { this.envids = new Identifier[]; @@ -3380,19 +3425,45 @@ var TypeScript; FuncDecl.prototype.isMethod = function () { return (this.fncFlags & FncFlags.Method) != FncFlags.None; }; - FuncDecl.prototype.isCallMember = function () { return hasFlag(this.fncFlags, FncFlags.CallMember); }; - FuncDecl.prototype.isConstructMember = function () { return hasFlag(this.fncFlags, FncFlags.ConstructMember); }; - FuncDecl.prototype.isIndexerMember = function () { return hasFlag(this.fncFlags, FncFlags.IndexerMember); }; - FuncDecl.prototype.isSpecialFn = function () { return this.isCallMember() || this.isIndexerMember() || this.isConstructMember(); }; - FuncDecl.prototype.isAnonymousFn = function () { return this.name === null; }; - FuncDecl.prototype.isAccessor = function () { return hasFlag(this.fncFlags, FncFlags.GetAccessor) || hasFlag(this.fncFlags, FncFlags.SetAccessor); }; - FuncDecl.prototype.isGetAccessor = function () { return hasFlag(this.fncFlags, FncFlags.GetAccessor); }; - FuncDecl.prototype.isSetAccessor = function () { return hasFlag(this.fncFlags, FncFlags.SetAccessor); }; - FuncDecl.prototype.isAmbient = function () { return hasFlag(this.fncFlags, FncFlags.Ambient); }; - FuncDecl.prototype.isExported = function () { return hasFlag(this.fncFlags, FncFlags.Exported); }; - FuncDecl.prototype.isPrivate = function () { return hasFlag(this.fncFlags, FncFlags.Private); }; - FuncDecl.prototype.isPublic = function () { return hasFlag(this.fncFlags, FncFlags.Public); }; - FuncDecl.prototype.isStatic = function () { return hasFlag(this.fncFlags, FncFlags.Static); }; + FuncDecl.prototype.isCallMember = function () { + return hasFlag(this.fncFlags, FncFlags.CallMember); + }; + FuncDecl.prototype.isConstructMember = function () { + return hasFlag(this.fncFlags, FncFlags.ConstructMember); + }; + FuncDecl.prototype.isIndexerMember = function () { + return hasFlag(this.fncFlags, FncFlags.IndexerMember); + }; + FuncDecl.prototype.isSpecialFn = function () { + return this.isCallMember() || this.isIndexerMember() || this.isConstructMember(); + }; + FuncDecl.prototype.isAnonymousFn = function () { + return this.name === null; + }; + FuncDecl.prototype.isAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.GetAccessor) || hasFlag(this.fncFlags, FncFlags.SetAccessor); + }; + FuncDecl.prototype.isGetAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.GetAccessor); + }; + FuncDecl.prototype.isSetAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.SetAccessor); + }; + FuncDecl.prototype.isAmbient = function () { + return hasFlag(this.fncFlags, FncFlags.Ambient); + }; + FuncDecl.prototype.isExported = function () { + return hasFlag(this.fncFlags, FncFlags.Exported); + }; + FuncDecl.prototype.isPrivate = function () { + return hasFlag(this.fncFlags, FncFlags.Private); + }; + FuncDecl.prototype.isPublic = function () { + return hasFlag(this.fncFlags, FncFlags.Public); + }; + FuncDecl.prototype.isStatic = function () { + return hasFlag(this.fncFlags, FncFlags.Static); + }; FuncDecl.prototype.treeViewLabel = function () { if (this.name == null) { return "funcExpr"; @@ -3404,8 +3475,12 @@ var TypeScript; FuncDecl.prototype.ClearFlags = function () { this.fncFlags = FncFlags.None; }; - FuncDecl.prototype.isSignature = function () { return (this.fncFlags & FncFlags.Signature) != FncFlags.None; }; - FuncDecl.prototype.hasStaticDeclarations = function () { return (!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0)); }; + FuncDecl.prototype.isSignature = function () { + return (this.fncFlags & FncFlags.Signature) != FncFlags.None; + }; + FuncDecl.prototype.hasStaticDeclarations = function () { + return (!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0)); + }; return FuncDecl; })(AST); TypeScript.FuncDecl = FuncDecl; @@ -3514,9 +3589,15 @@ var TypeScript; this.scopes = scopes; this.prettyName = this.name.actualText; } - ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); }; - ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); }; - ModuleDeclaration.prototype.isEnum = function () { return hasFlag(this.modFlags, ModuleFlags.IsEnum); }; + ModuleDeclaration.prototype.isExported = function () { + return hasFlag(this.modFlags, ModuleFlags.Exported); + }; + ModuleDeclaration.prototype.isAmbient = function () { + return hasFlag(this.modFlags, ModuleFlags.Ambient); + }; + ModuleDeclaration.prototype.isEnum = function () { + return hasFlag(this.modFlags, ModuleFlags.IsEnum); + }; ModuleDeclaration.prototype.recordNonInterface = function () { this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl; }; @@ -3589,9 +3670,15 @@ var TypeScript; _super.call(this, nodeType); this.flags |= ASTFlags.IsStatement; } - Statement.prototype.isLoop = function () { return false; }; - Statement.prototype.isStatementOrExpression = function () { return true; }; - Statement.prototype.isCompoundStatement = function () { return this.isLoop(); }; + Statement.prototype.isLoop = function () { + return false; + }; + Statement.prototype.isStatementOrExpression = function () { + return true; + }; + Statement.prototype.isCompoundStatement = function () { + return this.isLoop(); + }; Statement.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.voidType; return this; @@ -3695,7 +3782,9 @@ var TypeScript; this.target = null; this.resolvedTarget = null; } - Jump.prototype.hasExplicitTarget = function () { return (this.target); }; + Jump.prototype.hasExplicitTarget = function () { + return (this.target); + }; Jump.prototype.setResolvedTarget = function (parser, stmt) { if (stmt.isLoop()) { this.resolvedTarget = stmt; @@ -3746,7 +3835,9 @@ var TypeScript; this.cond = cond; this.body = null; } - WhileStatement.prototype.isLoop = function () { return true; }; + WhileStatement.prototype.isLoop = function () { + return true; + }; WhileStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3799,7 +3890,9 @@ var TypeScript; this.whileAST = null; this.cond = null; } - DoWhileStatement.prototype.isLoop = function () { return true; }; + DoWhileStatement.prototype.isLoop = function () { + return true; + }; DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3855,7 +3948,9 @@ var TypeScript; this.elseBod = null; this.statement = new ASTSpan(); } - IfStatement.prototype.isCompoundStatement = function () { return true; }; + IfStatement.prototype.isCompoundStatement = function () { + return true; + }; IfStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3975,7 +4070,9 @@ var TypeScript; this.lval.varFlags |= VarFlags.AutoInit; } } - ForInStatement.prototype.isLoop = function () { return true; }; + ForInStatement.prototype.isLoop = function () { + return true; + }; ForInStatement.prototype.isFiltered = function () { if (this.body) { var singleItem = null; @@ -4002,16 +4099,13 @@ var TypeScript; var target = cond.target; if (target.nodeType == NodeType.Dot) { var binex = target; - if ((binex.operand1.nodeType == NodeType.Name) && - (this.obj.nodeType == NodeType.Name) && - (binex.operand1.actualText == this.obj.actualText)) { + if ((binex.operand1.nodeType == NodeType.Name) && (this.obj.nodeType == NodeType.Name) && (binex.operand1.actualText == this.obj.actualText)) { var prop = binex.operand2; if (prop.actualText == "hasOwnProperty") { var args = cond.arguments; if ((args !== null) && (args.members.length == 1)) { var arg = args.members[0]; - if ((arg.nodeType == NodeType.Name) && - (this.lval.nodeType == NodeType.Name)) { + if ((arg.nodeType == NodeType.Name) && (this.lval.nodeType == NodeType.Name)) { if ((this.lval.actualText) == arg.actualText) { return true; } @@ -4085,7 +4179,9 @@ var TypeScript; _super.call(this, NodeType.For); this.init = init; } - ForStatement.prototype.isLoop = function () { return true; }; + ForStatement.prototype.isLoop = function () { + return true; + }; ForStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4177,7 +4273,9 @@ var TypeScript; this.expr = expr; this.withSym = null; } - WithStatement.prototype.isCompoundStatement = function () { return true; }; + WithStatement.prototype.isCompoundStatement = function () { + return true; + }; WithStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4204,7 +4302,9 @@ var TypeScript; this.defaultCase = null; this.statement = new ASTSpan(); } - SwitchStatement.prototype.isCompoundStatement = function () { return true; }; + SwitchStatement.prototype.isCompoundStatement = function () { + return true; + }; SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4358,7 +4458,9 @@ var TypeScript; this.tryNode = tryNode; this.finallyNode = finallyNode; } - TryFinally.prototype.isCompoundStatement = function () { return true; }; + TryFinally.prototype.isCompoundStatement = function () { + return true; + }; TryFinally.prototype.emit = function (emitter, tokenId, startLine) { emitter.recordSourceMappingStart(this); emitter.emitJavascript(this.tryNode, TokenID.Try, false); @@ -4403,7 +4505,9 @@ var TypeScript; this.tryNode = tryNode; this.catchNode = catchNode; } - TryCatch.prototype.isCompoundStatement = function () { return true; }; + TryCatch.prototype.isCompoundStatement = function () { + return true; + }; TryCatch.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4593,7 +4697,9 @@ var TypeScript; } } else { - this.text = [(this.content.replace(/^\s+|\s+$/g, ''))]; + this.text = [ + (this.content.replace(/^\s+|\s+$/g, '')) + ]; } } return this.text; diff --git a/tests/baselines/reference/parserRealSource14.errors.txt b/tests/baselines/reference/parserRealSource14.errors.txt index 85ed1e0a7d3..bc32a8e585b 100644 --- a/tests/baselines/reference/parserRealSource14.errors.txt +++ b/tests/baselines/reference/parserRealSource14.errors.txt @@ -1,30 +1,30 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(24,22): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(38,23): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(48,26): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(68,28): error TS2305: Module 'TypeScript' has no exported member 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(24,33): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(38,34): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(48,37): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(68,39): error TS2305: Module 'TypeScript' has no exported member 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(75,21): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(79,21): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(86,36): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(75,32): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(79,32): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(86,47): error TS2305: Module 'TypeScript' has no exported member 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(96,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(96,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(105,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(105,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(114,20): error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(114,31): error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(123,20): error TS2305: Module 'TypeScript' has no exported member 'VarDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(123,31): error TS2305: Module 'TypeScript' has no exported member 'VarDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(132,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(132,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(141,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(141,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. @@ -35,128 +35,128 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(172,65): error tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(176,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(177,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(178,20): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(176,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(177,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(178,31): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,38): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,49): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(199,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(199,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,38): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,49): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(206,20): error TS2305: Module 'TypeScript' has no exported member 'Script'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(206,31): error TS2305: Module 'TypeScript' has no exported member 'Script'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(212,20): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(212,31): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(218,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(218,31): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(224,20): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(224,31): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(230,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(230,31): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(236,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(236,31): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(242,19): error TS2305: Module 'TypeScript' has no exported member 'Block'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(242,30): error TS2305: Module 'TypeScript' has no exported member 'Block'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(248,19): error TS2305: Module 'TypeScript' has no exported member 'ForStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(248,30): error TS2305: Module 'TypeScript' has no exported member 'ForStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(254,19): error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(254,30): error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(260,19): error TS2305: Module 'TypeScript' has no exported member 'Try'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(260,30): error TS2305: Module 'TypeScript' has no exported member 'Try'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(266,19): error TS2305: Module 'TypeScript' has no exported member 'Catch'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(266,30): error TS2305: Module 'TypeScript' has no exported member 'Catch'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(272,19): error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(272,30): error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(278,19): error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(278,30): error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(284,19): error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(284,30): error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(290,19): error TS2305: Module 'TypeScript' has no exported member 'WithStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(290,30): error TS2305: Module 'TypeScript' has no exported member 'WithStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(296,19): error TS2305: Module 'TypeScript' has no exported member 'Finally'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(296,30): error TS2305: Module 'TypeScript' has no exported member 'Finally'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(303,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(303,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(310,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(311,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(310,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(311,30): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(318,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(318,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(329,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(330,19): error TS2305: Module 'TypeScript' has no exported member 'ASTList'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(329,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(330,30): error TS2305: Module 'TypeScript' has no exported member 'ASTList'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(338,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(338,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(347,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(347,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(354,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(354,30): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(360,19): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(360,30): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(366,19): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(366,30): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(378,19): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(378,30): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(384,19): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(384,30): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(394,19): error TS2305: Module 'TypeScript' has no exported member 'ASTList'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(394,30): error TS2305: Module 'TypeScript' has no exported member 'ASTList'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(401,19): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(401,30): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(408,19): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(408,30): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(415,19): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(415,30): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(422,19): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(422,30): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(428,19): error TS2305: Module 'TypeScript' has no exported member 'Block'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(432,41): error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(462,50): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(463,41): error TS2305: Module 'TypeScript' has no exported member 'Comment'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,34): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,58): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(428,30): error TS2305: Module 'TypeScript' has no exported member 'Block'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(432,52): error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(462,61): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(463,52): error TS2305: Module 'TypeScript' has no exported member 'Comment'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,45): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,69): error TS2305: Module 'TypeScript' has no exported member 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(533,51): error TS2305: Module 'TypeScript' has no exported member 'Script'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,25): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,49): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,73): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,97): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(533,62): error TS2305: Module 'TypeScript' has no exported member 'Script'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,36): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,60): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,84): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,108): error TS2305: Module 'TypeScript' has no exported member 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,34): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,84): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,34): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,58): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,82): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,35): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,59): error TS2305: Module 'TypeScript' has no exported member 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,83): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,45): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,95): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,45): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,69): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,93): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,46): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,70): error TS2305: Module 'TypeScript' has no exported member 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,94): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. @@ -187,7 +187,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error // export class AstPath { public asts: TypeScript.AST[] = []; - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. public top: number = -1; @@ -203,7 +203,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error } public pop(): TypeScript.AST { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. var head = this.ast(); this.up(); @@ -215,7 +215,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error } public push(ast: TypeScript.AST) { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. while (this.asts.length > this.count()) { this.asts.pop(); @@ -237,7 +237,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error } public nodeType(): TypeScript.NodeType { - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'NodeType'. if (this.ast() == null) return TypeScript.NodeType.None; @@ -248,13 +248,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error public ast() { return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. } public parent() { return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. } @@ -263,7 +263,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error } public get(index: number): TypeScript.AST { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. return this.asts[index]; } @@ -279,7 +279,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. } @@ -294,7 +294,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. } @@ -309,7 +309,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).id === this.ast()); - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'. } @@ -324,7 +324,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).id === this.ast()); - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'VarDecl'. } @@ -339,7 +339,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. } @@ -354,7 +354,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. } @@ -411,13 +411,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. ((this.asts[this.top - 2]).isConstructor) && - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. } @@ -441,7 +441,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); ~~~~~~~ !!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. ~~~~~~~~~~~ !!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. @@ -456,12 +456,12 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).members == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); ~~~~~~~ !!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. ~~~~~~~~~~~ !!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. @@ -473,7 +473,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Script'. } @@ -483,7 +483,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. } @@ -493,7 +493,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'. } @@ -503,7 +503,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'. } @@ -513,7 +513,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. } @@ -523,7 +523,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'. } @@ -533,7 +533,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Block'. } @@ -543,7 +543,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ForStatement'. } @@ -553,7 +553,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'. } @@ -563,7 +563,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Try'. } @@ -573,7 +573,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Catch'. } @@ -583,7 +583,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'. } @@ -593,7 +593,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'. } @@ -603,7 +603,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'. } @@ -613,7 +613,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'WithStatement'. } @@ -623,7 +623,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Finally'. } @@ -636,7 +636,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. } @@ -649,10 +649,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'. } @@ -665,7 +665,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. } @@ -682,10 +682,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. (this.asts[this.top - 0]).members.length == 0; - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'. } @@ -701,7 +701,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. } @@ -720,7 +720,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. } @@ -733,7 +733,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'. } @@ -743,7 +743,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. } @@ -753,7 +753,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'. } @@ -771,7 +771,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. } @@ -781,7 +781,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'. } @@ -795,7 +795,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top]).members.length === 1; - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'. } @@ -808,7 +808,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. } @@ -821,7 +821,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'. } @@ -834,7 +834,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. } @@ -847,7 +847,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'. } @@ -857,13 +857,13 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error ~~~~~~~~ !!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. (this.asts[this.top - 0]).isStatementBlock === false; - ~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Block'. } } export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'. if (ast === null) return false; @@ -895,10 +895,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error /// Return the stack of AST nodes containing "position" /// export function getAstPathToPosition(script: TypeScript.AST, pos: number, options = GetAstPathOptions.Default): TypeScript.AstPath { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. var lookInComments = (comments: TypeScript.Comment[]) => { - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Comment'. if (comments && comments.length > 0) { for (var i = 0; i < comments.length; i++) { @@ -915,9 +915,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error } var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'IAstWalker'. @@ -984,17 +984,17 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error // This is used when "position" might be inside a comment or string, etc. // export function getTokenizationOffset(script: TypeScript.Script, position: number): number { - ~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'Script'. var bestOffset = 0; var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. if (TypeScript.isValidAstNode(cur)) { // Did we find a closer offset? @@ -1021,16 +1021,16 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error /// Simple function to Walk an AST using a simple callback function. /// export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. var path: TypeScript.AstPath = walker.state; path.push(cur); @@ -1038,11 +1038,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error return cur; } var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'. var path: TypeScript.AstPath = walker.state; path.pop(); diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index 4312cb38517..f36f00235ff 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -607,7 +607,9 @@ var TypeScript; }; AstPath.prototype.clone = function () { var clone = new AstPath(); - clone.asts = this.asts.map(function (value) { return value; }); + clone.asts = this.asts.map(function (value) { + return value; + }); clone.top = this.top; return clone; }; @@ -656,288 +658,167 @@ var TypeScript; AstPath.prototype.isNameOfClass = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfInterface = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfArgument = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - (this.parent().id === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && (this.parent().id === this.ast()); }; AstPath.prototype.isNameOfVariable = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - (this.parent().id === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.VarDecl) && (this.parent().id === this.ast()); }; AstPath.prototype.isNameOfModule = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfFunction = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && (this.parent().name === this.ast()); }; AstPath.prototype.isChildOfScript = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; }; AstPath.prototype.isChildOfModule = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; }; AstPath.prototype.isChildOfClass = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; }; AstPath.prototype.isArgumentOfClassConstructor = function () { var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - (this.asts[this.top - 2].isConstructor) && - (this.asts[this.top - 2].arguments === this.asts[this.top - 1]) && - (this.asts[this.top - 4].constructorDecl === this.asts[this.top - 2]); + return this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && (this.asts[this.top - 2].isConstructor) && (this.asts[this.top - 2].arguments === this.asts[this.top - 1]) && (this.asts[this.top - 4].constructorDecl === this.asts[this.top - 2]); }; AstPath.prototype.isChildOfInterface = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; }; AstPath.prototype.isTopLevelImplicitModule = function () { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - TypeScript.hasFlag(this.asts[this.top].modFlags, TypeScript.ModuleFlags.IsWholeFile); + return this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && TypeScript.hasFlag(this.asts[this.top].modFlags, TypeScript.ModuleFlags.IsWholeFile); }; AstPath.prototype.isBodyOfTopLevelImplicitModule = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0] && - TypeScript.hasFlag(this.asts[this.top - 1].modFlags, TypeScript.ModuleFlags.IsWholeFile); + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0] && TypeScript.hasFlag(this.asts[this.top - 1].modFlags, TypeScript.ModuleFlags.IsWholeFile); }; AstPath.prototype.isBodyOfScript = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - this.asts[this.top - 1].bod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && this.asts[this.top - 1].bod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfSwitch = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].caseList == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].caseList == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfModule = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfClass = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFunction = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 1].bod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 1].bod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfInterface = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfBlock = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - this.asts[this.top - 1].statements == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && this.asts[this.top - 1].statements == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFor = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfCase = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfTry = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfCatch = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfDoWhile = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfWhile = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfForIn = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfWith = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFinally = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isCaseOfSwitch = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].caseList == this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].caseList == this.asts[this.top - 1]; }; AstPath.prototype.isDefaultCaseOfSwitch = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].caseList == this.asts[this.top - 1] && - this.asts[this.top - 2].defaultCase == this.asts[this.top - 0]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].caseList == this.asts[this.top - 1] && this.asts[this.top - 2].defaultCase == this.asts[this.top - 0]; }; AstPath.prototype.isListOfObjectLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfObjectLit = function () { return this.isListOfObjectLit(); }; AstPath.prototype.isEmptyListOfObjectLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0] && - this.asts[this.top - 0].members.length == 0; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0] && this.asts[this.top - 0].members.length == 0; }; AstPath.prototype.isMemberOfObjectLit = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 2].operand == this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 2].operand == this.asts[this.top - 1]; }; AstPath.prototype.isNameOfMemberOfObjectLit = function () { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - this.asts[this.top - 3].operand == this.asts[this.top - 2]; + return this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && this.asts[this.top - 3].operand == this.asts[this.top - 2]; }; AstPath.prototype.isListOfArrayLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0]; }; AstPath.prototype.isTargetOfMember = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 1].operand1 === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 1].operand1 === this.asts[this.top - 0]; }; AstPath.prototype.isMemberOfMember = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 1].operand2 === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 1].operand2 === this.asts[this.top - 0]; }; AstPath.prototype.isItemOfList = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; }; AstPath.prototype.isThenOfIf = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - this.asts[this.top - 1].thenBod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && this.asts[this.top - 1].thenBod == this.asts[this.top - 0]; }; AstPath.prototype.isElseOfIf = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - this.asts[this.top - 1].elseBod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && this.asts[this.top - 1].elseBod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfDefaultCase = function () { return this.isBodyOfCase(); }; AstPath.prototype.isSingleStatementList = function () { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - this.asts[this.top].members.length === 1; + return this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.List && this.asts[this.top].members.length === 1; }; AstPath.prototype.isArgumentListOfFunction = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isArgumentOfFunction = function () { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 2].arguments === this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 2].arguments === this.asts[this.top - 1]; }; AstPath.prototype.isArgumentListOfCall = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isArgumentListOfNew = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isSynthesizedBlock = function () { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - this.asts[this.top - 0].isStatementBlock === false; + return this.count() >= 1 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && this.asts[this.top - 0].isStatementBlock === false; }; return AstPath; })(); @@ -998,9 +879,7 @@ var TypeScript; // bar // 0123 // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = hasFlag(options, GetAstPathOptions.EdgeInclusive) || - cur.nodeType === TypeScript.NodeType.Name || - pos === script.limChar; // Special "EOF" case + var inclusive = hasFlag(options, GetAstPathOptions.EdgeInclusive) || cur.nodeType === TypeScript.NodeType.Name || pos === script.limChar; // Special "EOF" case var minChar = cur.minChar; var limChar = cur.limChar + (inclusive ? 1 : 0); if (pos >= minChar && pos < limChar) { diff --git a/tests/baselines/reference/parserRealSource4.js b/tests/baselines/reference/parserRealSource4.js index 563e9e92a08..1d6ed0aaf13 100644 --- a/tests/baselines/reference/parserRealSource4.js +++ b/tests/baselines/reference/parserRealSource4.js @@ -377,7 +377,9 @@ var TypeScript; } return false; }; - StringHashTable.prototype.count = function () { return this.itemCount; }; + StringHashTable.prototype.count = function () { + return this.itemCount; + }; StringHashTable.prototype.lookup = function (key) { var data = this.table[key]; if (data != undefined) { @@ -513,7 +515,9 @@ var TypeScript; } return result; }; - HashTable.prototype.count = function () { return this.itemCount; }; + HashTable.prototype.count = function () { + return this.itemCount; + }; HashTable.prototype.lookup = function (key) { var current; var val = this.hashFn(key); diff --git a/tests/baselines/reference/parserRealSource6.js b/tests/baselines/reference/parserRealSource6.js index d65207b8c77..e747b95e610 100644 --- a/tests/baselines/reference/parserRealSource6.js +++ b/tests/baselines/reference/parserRealSource6.js @@ -329,8 +329,7 @@ var TypeScript; // is has not been fully re-parsed yet. if (ast.nodeType == NodeType.Script && context.pos > limChar) limChar = context.pos; - if ((minChar <= context.pos) && - (limChar >= context.pos)) { + if ((minChar <= context.pos) && (limChar >= context.pos)) { switch (ast.nodeType) { case NodeType.Script: var script = ast; diff --git a/tests/baselines/reference/parserRealSource7.js b/tests/baselines/reference/parserRealSource7.js index 5073c33febd..73b9aab5017 100644 --- a/tests/baselines/reference/parserRealSource7.js +++ b/tests/baselines/reference/parserRealSource7.js @@ -962,7 +962,11 @@ var TypeScript; var importDecl = ast; var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported); // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers - var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: context }); + var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { + topLevelScope: scopeChain, + members: null, + tcContext: context + }); var isGlobal = context.scopeChain.container == context.checker.gloMod; if (aliasedModSymbol) { var aliasedModType = aliasedModSymbol.getType(); @@ -1053,8 +1057,7 @@ var TypeScript; if (isExported) { typeSymbol.flags |= SymbolFlags.Exported; } - if ((context.scopeChain.moduleDecl) || - (context.scopeChain.container == context.checker.gloMod)) { + if ((context.scopeChain.moduleDecl) || (context.scopeChain.container == context.checker.gloMod)) { typeSymbol.flags |= SymbolFlags.ModuleMember; } moduleDecl.mod = modType; @@ -1080,11 +1083,7 @@ var TypeScript; // REVIEW-CLASSES if (!typeSymbol) { var valTypeSymbol = scopeChain.scope.findLocal(className, false, false); - if (valTypeSymbol && - valTypeSymbol.isType() && - valTypeSymbol.declAST && - valTypeSymbol.declAST.nodeType == NodeType.FuncDecl && - valTypeSymbol.declAST.isSignature()) { + if (valTypeSymbol && valTypeSymbol.isType() && valTypeSymbol.declAST && valTypeSymbol.declAST.nodeType == NodeType.FuncDecl && valTypeSymbol.declAST.isSignature()) { typeSymbol = valTypeSymbol; foundValSymbol = true; if (isExported) { @@ -1238,10 +1237,7 @@ var TypeScript; if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } - if (isProperty || - isExported || - (context.scopeChain.container == context.checker.gloMod) || - context.scopeChain.moduleDecl) { + if (isProperty || isExported || (context.scopeChain.container == context.checker.gloMod) || context.scopeChain.moduleDecl) { if (isAmbient) { var existingSym = scopeChain.scope.findLocal(varDecl.id.text, false, false); if (existingSym) { @@ -1262,8 +1258,7 @@ var TypeScript; } field.symbol = fieldSymbol; fieldSymbol.declAST = ast; - if ((context.scopeChain.moduleDecl) || - (context.scopeChain.container == context.checker.gloMod)) { + if ((context.scopeChain.moduleDecl) || (context.scopeChain.container == context.checker.gloMod)) { fieldSymbol.flags |= SymbolFlags.ModuleMember; fieldSymbol.declModule = context.scopeChain.moduleDecl; } @@ -1314,12 +1309,7 @@ var TypeScript; // If the parent is the constructor, and this isn't an instance method, skip it. // That way, we'll set the type during scope assignment, and can be sure that the // function will be placed in the constructor-local scope - if (!funcDecl.isConstructor && - containerSym && - containerSym.declAST && - containerSym.declAST.nodeType == NodeType.FuncDecl && - containerSym.declAST.isConstructor && - !funcDecl.isMethod()) { + if (!funcDecl.isConstructor && containerSym && containerSym.declAST && containerSym.declAST.nodeType == NodeType.FuncDecl && containerSym.declAST.isConstructor && !funcDecl.isMethod()) { return go; } // Interfaces and overloads @@ -1408,14 +1398,7 @@ var TypeScript; } } // REVIEW: Move this check into the typecheck phase? It's only being run over properties... - if (fgSym && - !fgSym.isAccessor() && - fgSym.type && - fgSym.type.construct && - fgSym.type.construct.signatures != [] && - (fgSym.type.construct.signatures[0].declAST == null || - !hasFlag(fgSym.type.construct.signatures[0].declAST.fncFlags, FncFlags.Ambient)) && - !funcDecl.isConstructor) { + if (fgSym && !fgSym.isAccessor() && fgSym.type && fgSym.type.construct && fgSym.type.construct.signatures != [] && (fgSym.type.construct.signatures[0].declAST == null || !hasFlag(fgSym.type.construct.signatures[0].declAST.fncFlags, FncFlags.Ambient)) && !funcDecl.isConstructor) { context.checker.errorReporter.simpleError(funcDecl, "Functions may not have class overloads"); } if (fgSym && !(fgSym.kind() == SymbolKind.Type) && funcDecl.isMethod() && !funcDecl.isAccessor() && !funcDecl.isConstructor) { diff --git a/tests/baselines/reference/parserRealSource8.js b/tests/baselines/reference/parserRealSource8.js index 8a667ad6dbe..fcdb170ae12 100644 --- a/tests/baselines/reference/parserRealSource8.js +++ b/tests/baselines/reference/parserRealSource8.js @@ -632,8 +632,7 @@ var TypeScript; // the enclosing scope // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed // - if it's a new class, always use the contained scope, since we initialize the constructor scope below - if (context.scopeChain.thisType && - (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { + if (context.scopeChain.thisType && (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { var instType = context.scopeChain.thisType; if (!(instType.typeFlags & TypeFlags.IsClass) && !hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod)) { if (!funcDecl.isMethod() || isStatic) { @@ -645,10 +644,7 @@ var TypeScript; } } else { - if (context.scopeChain.previous.scope.container && - context.scopeChain.previous.scope.container.declAST && - context.scopeChain.previous.scope.container.declAST.nodeType == NodeType.FuncDecl && - context.scopeChain.previous.scope.container.declAST.isConstructor) { + if (context.scopeChain.previous.scope.container && context.scopeChain.previous.scope.container.declAST && context.scopeChain.previous.scope.container.declAST.nodeType == NodeType.FuncDecl && context.scopeChain.previous.scope.container.declAST.isConstructor) { // if the parent is the class constructor, use the constructor scope parentScope = instType.constructorScope; } @@ -685,12 +681,7 @@ var TypeScript; outerFnc.innerStaticFuncs[outerFnc.innerStaticFuncs.length] = funcDecl; } else { - if (!funcDecl.isConstructor && - container && - container.declAST && - container.declAST.nodeType == NodeType.FuncDecl && - container.declAST.isConstructor && - !funcDecl.isMethod()) { + if (!funcDecl.isConstructor && container && container.declAST && container.declAST.nodeType == NodeType.FuncDecl && container.declAST.isConstructor && !funcDecl.isMethod()) { funcScope = context.scopeChain.thisType.constructorScope; //locals; } else { @@ -711,11 +702,7 @@ var TypeScript; } context.typeFlow.checker.createFunctionSignature(funcDecl, container, funcScope, fgSym, fgSym == null); // it's a getter or setter for a class property - if (!funcDecl.accessorSymbol && - (funcDecl.fncFlags & FncFlags.ClassMethod) && - container && - ((!fgSym || fgSym.declAST.nodeType != NodeType.FuncDecl) && funcDecl.isAccessor()) || - (fgSym && fgSym.isAccessor())) { + if (!funcDecl.accessorSymbol && (funcDecl.fncFlags & FncFlags.ClassMethod) && container && ((!fgSym || fgSym.declAST.nodeType != NodeType.FuncDecl) && funcDecl.isAccessor()) || (fgSym && fgSym.isAccessor())) { funcDecl.accessorSymbol = context.typeFlow.checker.createAccessorSymbol(funcDecl, fgSym, container.getType(), (funcDecl.isMethod() && isStatic), true, funcScope, container); } funcDecl.type.symbol.flags |= SymbolFlags.TypeSetDuringScopeAssignment; diff --git a/tests/baselines/reference/parserRealSource9.js b/tests/baselines/reference/parserRealSource9.js index dba28c4f295..5b1423bff39 100644 --- a/tests/baselines/reference/parserRealSource9.js +++ b/tests/baselines/reference/parserRealSource9.js @@ -364,7 +364,9 @@ var TypeScript; // context of a given module (E.g., an outer import statement) if (typeSymbol.aliasLink && !typeSymbol.type && typeSymbol.aliasLink.alias.nodeType == NodeType.Name) { var modPath = typeSymbol.aliasLink.alias.text; - var modSym = this.checker.findSymbolForDynamicModule(modPath, this.checker.locationInfo.filename, function (id) { return scope.find(id, false, true); }); + var modSym = this.checker.findSymbolForDynamicModule(modPath, this.checker.locationInfo.filename, function (id) { + return scope.find(id, false, true); + }); if (modSym) { typeSymbol.type = modSym.getType(); } diff --git a/tests/baselines/reference/parserReturnStatement4.js b/tests/baselines/reference/parserReturnStatement4.js index f6800cbb8fd..aab5215ba07 100644 --- a/tests/baselines/reference/parserReturnStatement4.js +++ b/tests/baselines/reference/parserReturnStatement4.js @@ -2,4 +2,8 @@ var v = { get foo() { return } }; //// [parserReturnStatement4.js] -var v = { get foo() { return; } }; +var v = { + get foo() { + return; + } +}; diff --git a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js index 651640c6466..a19675167c8 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js +++ b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment1.js b/tests/baselines/reference/parserShorthandPropertyAssignment1.js index 0ef3c50d78f..2aabfc906ae 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment1.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment1.js @@ -4,6 +4,10 @@ var name:any, id: any; foo({ name?, id? }); //// [parserShorthandPropertyAssignment1.js] -function foo(obj) { } +function foo(obj) { +} var name, id; -foo({ name: name, id: id }); +foo({ + name: name, + id: id +}); diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment2.js b/tests/baselines/reference/parserShorthandPropertyAssignment2.js index 0de0fa3829f..f05c9b08b33 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment2.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment2.js @@ -2,4 +2,6 @@ var v = { class }; //// [parserShorthandPropertyAssignment2.js] -var v = { class: }; +var v = { + class: +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment3.js b/tests/baselines/reference/parserShorthandPropertyAssignment3.js index 814a725dcba..a1d5ad3e646 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment3.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment3.js @@ -2,4 +2,6 @@ var v = { "" }; //// [parserShorthandPropertyAssignment3.js] -var v = { "": }; +var v = { + "": +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment4.js b/tests/baselines/reference/parserShorthandPropertyAssignment4.js index e10928ae2ab..b0f05e2d9e3 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment4.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment4.js @@ -2,4 +2,6 @@ var v = { 0 }; //// [parserShorthandPropertyAssignment4.js] -var v = { 0: }; +var v = { + 0: +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment5.js b/tests/baselines/reference/parserShorthandPropertyAssignment5.js index 90d74722a99..9dc4c781123 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment5.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment5.js @@ -4,4 +4,6 @@ var obj = { greet? }; //// [parserShorthandPropertyAssignment5.js] var greet = "hello"; -var obj = { greet: greet }; +var obj = { + greet: greet +}; diff --git a/tests/baselines/reference/parserSkippedTokens16.js b/tests/baselines/reference/parserSkippedTokens16.js index dfbd8a4277a..a31d0e7e248 100644 --- a/tests/baselines/reference/parserSkippedTokens16.js +++ b/tests/baselines/reference/parserSkippedTokens16.js @@ -11,12 +11,15 @@ var x = //// [parserSkippedTokens16.js] foo(); Bar; -{ } -{ } +{ +} +{ +} 4 + ; 5; var M; (function (M) { - function a(T) { } + function a(T) { + } })(M || (M = {})); var x = ; diff --git a/tests/baselines/reference/parserSkippedTokens20.errors.txt b/tests/baselines/reference/parserSkippedTokens20.errors.txt index ba932f15346..4e66b51f48d 100644 --- a/tests/baselines/reference/parserSkippedTokens20.errors.txt +++ b/tests/baselines/reference/parserSkippedTokens20.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens20.t ==== tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens20.ts (3 errors) ==== var v: X' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt b/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt index ad65f138c7a..a2be22d5ee0 100644 --- a/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt +++ b/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt @@ -48,9 +48,9 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGener interface IQService { all(promises: IPromise < any > []): IPromise< - ~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'IPromise'. - ~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'IPromise'. !!! error TS1005: '>' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js index ebf5663573c..c239bbe3c31 100644 --- a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js +++ b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js @@ -41,7 +41,8 @@ //// [parserUsingConstructorAsIdentifier.js] function define(constructor, instanceMembers, staticMembers) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; PluginUtilities.Utilities.markSupportedForProcessing(constructor); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); @@ -53,11 +54,17 @@ function define(constructor, instanceMembers, staticMembers) { } function derive(baseClass, constructor, instanceMembers, staticMembers) { if (baseClass) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; var basePrototype = baseClass.prototype; constructor.prototype = Object.create(basePrototype); PluginUtilities.Utilities.markSupportedForProcessing(constructor); - Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + configurable: true, + enumerable: true + }); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); } @@ -71,7 +78,8 @@ function derive(baseClass, constructor, instanceMembers, staticMembers) { } } function mix(constructor) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; var i, len; for (i = 1, len = arguments.length; i < len; i++) { initializeProperties(constructor.prototype, arguments[i]); diff --git a/tests/baselines/reference/parserVariableDeclaration3.errors.txt b/tests/baselines/reference/parserVariableDeclaration3.errors.txt index 146dcba5b92..bb4e5eceaf6 100644 --- a/tests/baselines/reference/parserVariableDeclaration3.errors.txt +++ b/tests/baselines/reference/parserVariableDeclaration3.errors.txt @@ -13,7 +13,7 @@ tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDe ~~~~~~~ !!! error TS2304: Cannot find name 'Harness'. , compiler = new TypeScript.TypeScriptCompiler(outerr) - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. diff --git a/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index 14ea953dad5..2452cd76a18 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(16,1): err tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(17,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/compiler/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(18,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/services/typescriptServices.ts' not found. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(19,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/RealWorld/diff.ts' not found. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(21,21): error TS2305: Module 'Harness' has no exported member 'Assert'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(21,29): error TS2305: Module 'Harness' has no exported member 'Assert'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2304: Cannot find name 'require'. @@ -140,7 +140,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): !!! error TS6053: File 'diff.ts' not found. declare var assert: Harness.Assert; - ~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2305: Module 'Harness' has no exported member 'Assert'. declare var it; declare var describe; @@ -857,7 +857,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** Mimics having multiple files, later concatenated to a single file. */ export class EmitterIOHost implements TypeScript.EmitterIOHost { - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. private fileCollection = {}; @@ -913,7 +913,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export function makeDefaultCompilerForTest(c?: TypeScript.TypeScriptCompiler) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var compiler = c || new TypeScript.TypeScriptCompiler(stderr); ~~~~~~~~~~ @@ -940,7 +940,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } var compiler: TypeScript.TypeScriptCompiler; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. recreate(); @@ -1156,7 +1156,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): !!! error TS2304: Cannot find name 'TypeScript'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. @@ -1174,7 +1174,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): else { for (var m = 0; m < compiler.scripts.members.length; m++) { var script2 = compiler.scripts.members[m]; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. if (script2.locationInfo.filename !== 'lib.d.ts') { if (targetPosition > -1) { @@ -1218,7 +1218,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } private getTypeInfoName(ast : TypeScript.AST) { - ~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var name = ''; switch (ast.nodeType) { @@ -1262,7 +1262,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = (ast).text; - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; case TypeScript.NodeType.QString: @@ -1274,7 +1274,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = (ast).text; - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; case TypeScript.NodeType.Return: @@ -1286,30 +1286,30 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = (ast).name.actualText; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; case TypeScript.NodeType.ModuleDeclaration: ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = (ast).name.actualText; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; case TypeScript.NodeType.ClassDeclaration: ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = (ast).name.actualText; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; case TypeScript.NodeType.FuncDecl: ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. name = !(ast).name ? "" : (ast).name.actualText; // name == null for lambdas - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. break; default: @@ -1338,7 +1338,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): * @param references the set of referenced files used by the given code */ export function generateDeclFile(code: string, verifyNoDeclFile: boolean, unitName?: string, compilationContext?: Harness.Compiler.CompilationContext, references?: TypeScript.IFileReference[]): string { - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. reset(); @@ -1409,7 +1409,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** @param fileResults an array of strings for the filename and an ITextWriter with its code */ constructor(public fileResults: { filename: string; file: WriterAggregator; }[], errorLines: string[], public scripts: TypeScript.Script[]) { - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var lines = []; fileResults.forEach(v => lines = lines.concat(v.file.lines)); @@ -1493,10 +1493,10 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export function addUnit(code: string, unitName?: string, isResident?: boolean, isDeclareFile?: boolean, references?: TypeScript.IFileReference[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var script: TypeScript.Script = null; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var uName = unitName || '0' + (isDeclareFile ? '.d.ts' : '.ts'); @@ -1504,7 +1504,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): if (compiler.units[i].filename === uName) { updateUnit(code, uName); script = compiler.scripts.members[i]; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. } } @@ -1531,9 +1531,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export function compileFile(path: string, callback: (res: CompilerResult) => void , settingsCallback?: (settings?: TypeScript.CompilationSettings) => void , context?: CompilationContext, references?: TypeScript.IFileReference[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. path = switchToForwardSlashes(path); var filename = path.match(/[^\/]*$/)[0]; @@ -1543,9 +1543,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export function compileUnit(code: string, filename: string, callback: (res: CompilerResult) => void , settingsCallback?: (settings?: TypeScript.CompilationSettings) => void , context?: CompilationContext, references?: TypeScript.IFileReference[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. // not recursive function clone/* */(source: any, target: any) { @@ -1603,16 +1603,16 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export function emit(ioHost: TypeScript.EmitterIOHost, usePullEmitter?: boolean) { - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. compiler.emit(ioHost, usePullEmitter); } export function compileString(code: string, unitName: string, callback: (res: Compiler.CompilerResult) => void , context?: CompilationContext, references?: TypeScript.IFileReference[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var scripts: TypeScript.Script[] = []; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. reset(); @@ -1695,7 +1695,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): name: string; originalFilePath: string; references: TypeScript.IFileReference[]; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. } @@ -1738,7 +1738,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): var currentFileOptions = {}; var currentFileName = null; var refs: TypeScript.IFileReference[] = []; - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. for (var i = 0; i < lines.length; i++) { @@ -1831,7 +1831,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): export class ScriptInfo { public version: number; public editRanges: { length: number; editRange: TypeScript.ScriptEditRange; }[] = []; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. constructor(public name: string, public content: string, public isResident: boolean, public maxScriptVersions: number) { @@ -1869,7 +1869,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } public getEditRangeSinceVersion(version: number): TypeScript.ScriptEditRange { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. if (this.version == version) { // No edits! @@ -1897,10 +1897,10 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): } export class TypeScriptLS implements Services.ILanguageServiceShimHost { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. private ls: Services.ILanguageServiceShim = null; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. public scripts: ScriptInfo[] = []; @@ -2002,7 +2002,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): * To access the non-shim (i.e. actual) language service, use the "ls.languageService" property. */ public getLanguageService(): Services.ILanguageServiceShim { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var ls = new Services.TypeScriptServicesFactory().createLanguageServiceShim(this); ~~~~~~~~ @@ -2014,9 +2014,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** Parse file given its source text */ public parseSourceText(fileName: string, sourceText: TypeScript.ISourceText): TypeScript.Script { - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var parser = new TypeScript.Parser(); ~~~~~~~~~~ @@ -2057,7 +2057,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): * @param col 0 based index */ public positionToZeroBasedLineCol(fileName: string, position: number): TypeScript.ILineCol { - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. var script = this.ls.languageService.getScriptAST(fileName); assert.notNull(script); @@ -2073,7 +2073,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** Verify that applying edits to sourceFileName result in the content of the file baselineFileName */ public checkEdits(sourceFileName: string, baselineFileName: string, edits: Services.TextEdit[]) { - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var script = readFile(sourceFileName); var formattedScript = this.applyEdits(script, edits); @@ -2086,7 +2086,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** Apply an array of text edits to a string, and return the resulting string. */ public applyEdits(content: string, edits: Services.TextEdit[]): string { - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var result = content; edits = this.normalizeEdits(edits); @@ -2103,18 +2103,18 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): /** Normalize an array of edits by removing overlapping entries and sorting entries on the minChar position. */ private normalizeEdits(edits: Services.TextEdit[]): Services.TextEdit[] { - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var result: Services.TextEdit[] = []; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. function mapEdits(edits: Services.TextEdit[]): { edit: Services.TextEdit; index: number; }[] { - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var result = []; for (var i = 0; i < edits.length; i++) { diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 02304380013..3645f21e5ce 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2151,7 +2151,9 @@ var Harness; function bugs(content) { var bugs = content.match(/\bbug (\d+)/i); if (bugs) { - bugs.forEach(function (bug) { return assert.bug(bug); }); + bugs.forEach(function (bug) { + return assert.bug(bug); + }); } } Assert.bugs = bugs; @@ -2164,7 +2166,9 @@ var Harness; function arrayLengthIs(arr, length) { if (arr.length != length) { var actual = ''; - arr.forEach(function (n) { return actual = actual + '\n ' + n.toString(); }); + arr.forEach(function (n) { + return actual = actual + '\n ' + n.toString(); + }); Assert.throwAssertError(new Error('Expected array to have ' + length + ' elements. Actual elements were:' + actual)); } } @@ -2271,17 +2275,28 @@ var Harness; var Logger = (function () { function Logger() { } - Logger.prototype.start = function (fileName, priority) { }; - Logger.prototype.end = function (fileName) { }; - Logger.prototype.scenarioStart = function (scenario) { }; - Logger.prototype.scenarioEnd = function (scenario, error) { }; - Logger.prototype.testStart = function (test) { }; - Logger.prototype.pass = function (test) { }; - Logger.prototype.bug = function (test) { }; - Logger.prototype.fail = function (test) { }; - Logger.prototype.error = function (test, error) { }; - Logger.prototype.comment = function (comment) { }; - Logger.prototype.verify = function (test, passed, actual, expected, message) { }; + Logger.prototype.start = function (fileName, priority) { + }; + Logger.prototype.end = function (fileName) { + }; + Logger.prototype.scenarioStart = function (scenario) { + }; + Logger.prototype.scenarioEnd = function (scenario, error) { + }; + Logger.prototype.testStart = function (test) { + }; + Logger.prototype.pass = function (test) { + }; + Logger.prototype.bug = function (test) { + }; + Logger.prototype.fail = function (test) { + }; + Logger.prototype.error = function (test, error) { + }; + Logger.prototype.comment = function (comment) { + }; + Logger.prototype.verify = function (test, passed, actual, expected, message) { + }; return Logger; })(); Harness.Logger = Logger; @@ -2348,13 +2363,16 @@ var Harness; return false; } }; - Runnable.prototype.run = function (done) { }; + Runnable.prototype.run = function (done) { + }; Runnable.prototype.runBlock = function (done) { return this.call(this.block, done); }; Runnable.prototype.runChild = function (index, done) { var _this = this; - return this.call((function (done) { return _this.children[index].run(done); }), done); + return this.call((function (done) { + return _this.children[index].run(done); + }), done); }; Runnable.pushGlobalErrorHandler = function (done) { errorHandlerStack.push(function (e) { @@ -2392,17 +2410,25 @@ var Harness; TestCase.prototype.run = function (done) { var that = this; Runnable.currentStack.push(this); - emitLog('testStart', { desc: this.description }); + emitLog('testStart', { + desc: this.description + }); if (this.block) { var async = this.runBlock(function (e) { if (e) { that.passed = false; that.error = e; - emitLog('error', { desc: this.description, pass: false }, e); + emitLog('error', { + desc: this.description, + pass: false + }, e); } else { that.passed = true; - emitLog('pass', { desc: this.description, pass: true }); + emitLog('pass', { + desc: this.description, + pass: true + }); } Runnable.currentStack.pop(); done(); @@ -2423,15 +2449,24 @@ var Harness; Scenario.prototype.run = function (done) { var that = this; Runnable.currentStack.push(this); - emitLog('scenarioStart', { desc: this.description }); + emitLog('scenarioStart', { + desc: this.description + }); var async = this.runBlock(function (e) { Runnable.currentStack.pop(); if (e) { that.passed = false; that.error = e; - var metadata = { id: undefined, desc: this.description, pass: false, bugs: assert.bugIds }; + var metadata = { + id: undefined, + desc: this.description, + pass: false, + bugs: assert.bugIds + }; // Report all bugs affecting this scenario - assert.bugIds.forEach(function (desc) { return emitLog('bug', metadata, desc); }); + assert.bugIds.forEach(function (desc) { + return emitLog('bug', metadata, desc); + }); emitLog('scenarioEnd', metadata, e); done(); } @@ -2458,9 +2493,16 @@ var Harness; if (async) return; } - var metadata = { id: undefined, desc: this.description, pass: this.passed, bugs: assert.bugIds }; + var metadata = { + id: undefined, + desc: this.description, + pass: this.passed, + bugs: assert.bugIds + }; // Report all bugs affecting this scenario - assert.bugIds.forEach(function (desc) { return emitLog('bug', metadata, desc); }); + assert.bugIds.forEach(function (desc) { + return emitLog('bug', metadata, desc); + }); emitLog('scenarioEnd', metadata); done(); }; @@ -2585,11 +2627,16 @@ var Harness; this.description = ""; this.results = {}; } - Benchmark.prototype.bench = function (subBench) { }; - Benchmark.prototype.before = function () { }; - Benchmark.prototype.beforeEach = function () { }; - Benchmark.prototype.after = function () { }; - Benchmark.prototype.afterEach = function () { }; + Benchmark.prototype.bench = function (subBench) { + }; + Benchmark.prototype.before = function () { + }; + Benchmark.prototype.beforeEach = function () { + }; + Benchmark.prototype.after = function () { + }; + Benchmark.prototype.afterEach = function () { + }; Benchmark.prototype.addTimingFor = function (name, timing) { this.results[name] = this.results[name] || new Dataset(); this.results[name].add(timing); @@ -2625,9 +2672,13 @@ var Harness; b.after(); for (var prop in b.results) { var description = b.description + (prop ? ": " + prop : ''); - emitLog('testStart', { desc: description }); + emitLog('testStart', { + desc: description + }); emitLog('pass', { - desc: description, pass: true, perfResults: { + desc: description, + pass: true, + perfResults: { mean: b.results[prop].mean(), min: b.results[prop].min(), max: b.results[prop].max(), @@ -2692,10 +2743,18 @@ var Harness; this.fileCollection[s] = writer; return writer; }; - EmitterIOHost.prototype.directoryExists = function (s) { return false; }; - EmitterIOHost.prototype.fileExists = function (s) { return typeof this.fileCollection[s] !== 'undefined'; }; - EmitterIOHost.prototype.resolvePath = function (s) { return s; }; - EmitterIOHost.prototype.reset = function () { this.fileCollection = {}; }; + EmitterIOHost.prototype.directoryExists = function (s) { + return false; + }; + EmitterIOHost.prototype.fileExists = function (s) { + return typeof this.fileCollection[s] !== 'undefined'; + }; + EmitterIOHost.prototype.resolvePath = function (s) { + return s; + }; + EmitterIOHost.prototype.reset = function () { + this.fileCollection = {}; + }; EmitterIOHost.prototype.toArray = function () { var result = []; for (var p in this.fileCollection) { @@ -2705,7 +2764,10 @@ var Harness; if (p !== '0.js') { current.lines.unshift('////[' + p + ']'); } - result.push({ filename: p, file: this.fileCollection[p] }); + result.push({ + filename: p, + file: this.fileCollection[p] + }); } } } @@ -2769,7 +2831,9 @@ var Harness; Type.prototype.normalizeToArray = function (arg) { if ((Array.isArray && Array.isArray(arg)) || arg instanceof Array) return arg; - return [arg]; + return [ + arg + ]; }; Type.prototype.compilesOk = function (testCode) { var errors = null; @@ -2927,7 +2991,9 @@ var Harness; var tyInfo = compiler.pullGetTypeInfoAtPosition(targetPosition, script2); var name = this.getTypeInfoName(tyInfo.ast); var foundValue = new Type(tyInfo.typeInfo, code, name); - if (!matchingIdentifiers.some(function (value) { return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); })) { + if (!matchingIdentifiers.some(function (value) { + return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); + })) { matchingIdentifiers.push(foundValue); } } @@ -2937,7 +3003,9 @@ var Harness; var name = this.getTypeInfoName(tyInfo.ast); if (name === targetIdentifier) { var foundValue = new Type(tyInfo.typeInfo, code, targetIdentifier); - if (!matchingIdentifiers.some(function (value) { return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); })) { + if (!matchingIdentifiers.some(function (value) { + return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); + })) { matchingIdentifiers.push(foundValue); } } @@ -3043,9 +3111,15 @@ var Harness; outputs[fn] = new Harness.Compiler.WriterAggregator(); return outputs[fn]; }, - directoryExists: function (path) { return true; }, - fileExists: function (path) { return true; }, - resolvePath: function (path) { return path; } + directoryExists: function (path) { + return true; + }, + fileExists: function (path) { + return true; + }, + resolvePath: function (path) { + return path; + } }); compiler.emitDeclarations(); var results = null; @@ -3086,7 +3160,9 @@ var Harness; this.fileResults = fileResults; this.scripts = scripts; var lines = []; - fileResults.forEach(function (v) { return lines = lines.concat(v.file.lines); }); + fileResults.forEach(function (v) { + return lines = lines.concat(v.file.lines); + }); this.code = lines.join("\n"); this.errors = []; for (var i = 0; i < errorLines.length; i++) { @@ -3143,7 +3219,9 @@ var Harness; function reset() { stdout.reset(); stderr.reset(); - var files = compiler.units.map(function (value) { return value.filename; }); + var files = compiler.units.map(function (value) { + return value.filename; + }); for (var i = 0; i < files.length; i++) { var fname = files[i]; if (fname !== 'lib.d.ts') { @@ -3304,12 +3382,24 @@ var Harness; (function (TestCaseParser) { optionRegex = /^[\/]{2}\s*@(\w+):\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out"]; + var fileMetadataNames = [ + "filename", + "comments", + "declaration", + "module", + "nolib", + "sourcemap", + "target", + "out" + ]; function extractCompilerSettings(content) { var opts = []; var match; while ((match = optionRegex.exec(content)) != null) { - opts.push({ flag: match[1], value: match[2] }); + opts.push({ + flag: match[1], + value: match[2] + }); } return opts; } @@ -3402,7 +3492,10 @@ var Harness; references: refs }; files.push(newTestFile); - return { settings: settings, testUnitData: files }; + return { + settings: settings, + testUnitData: files + }; } TestCaseParser.makeUnitsFromTest = makeUnitsFromTest; })(TestCaseParser = Harness.TestCaseParser || (Harness.TestCaseParser = {})); @@ -3449,9 +3542,21 @@ var Harness; return TypeScript.ScriptEditRange.unknown(); } var entries = this.editRanges.slice(initialEditRangeIndex); - var minDistFromStart = entries.map(function (x) { return x.editRange.minChar; }).reduce(function (prev, current) { return Math.min(prev, current); }); - var minDistFromEnd = entries.map(function (x) { return x.length - x.editRange.limChar; }).reduce(function (prev, current) { return Math.min(prev, current); }); - var aggDelta = entries.map(function (x) { return x.editRange.delta; }).reduce(function (prev, current) { return prev + current; }); + var minDistFromStart = entries.map(function (x) { + return x.editRange.minChar; + }).reduce(function (prev, current) { + return Math.min(prev, current); + }); + var minDistFromEnd = entries.map(function (x) { + return x.length - x.editRange.limChar; + }).reduce(function (prev, current) { + return Math.min(prev, current); + }); + var aggDelta = entries.map(function (x) { + return x.editRange.delta; + }).reduce(function (prev, current) { + return prev + current; + }); return new TypeScript.ScriptEditRange(minDistFromStart, entries[0].length - minDistFromEnd, aggDelta); }; return ScriptInfo; @@ -3501,11 +3606,21 @@ var Harness; ////////////////////////////////////////////////////////////////////// // ILogger implementation // - TypeScriptLS.prototype.information = function () { return false; }; - TypeScriptLS.prototype.debug = function () { return true; }; - TypeScriptLS.prototype.warning = function () { return true; }; - TypeScriptLS.prototype.error = function () { return true; }; - TypeScriptLS.prototype.fatal = function () { return true; }; + TypeScriptLS.prototype.information = function () { + return false; + }; + TypeScriptLS.prototype.debug = function () { + return true; + }; + TypeScriptLS.prototype.warning = function () { + return true; + }; + TypeScriptLS.prototype.error = function () { + return true; + }; + TypeScriptLS.prototype.fatal = function () { + return true; + }; TypeScriptLS.prototype.log = function (s) { // For debugging... //IO.printLine("TypeScriptLS:" + s); @@ -3552,7 +3667,8 @@ var Harness; TypeScriptLS.prototype.parseSourceText = function (fileName, sourceText) { var parser = new TypeScript.Parser(); parser.setErrorRecovery(null); - parser.errorCallback = function (a, b, c, d) { }; + parser.errorCallback = function (a, b, c, d) { + }; var script = parser.parse(sourceText, fileName, 0); return script; }; @@ -3612,7 +3728,10 @@ var Harness; function mapEdits(edits) { var result = []; for (var i = 0; i < edits.length; i++) { - result.push({ edit: edits[i], index: i }); + result.push({ + edit: edits[i], + index: i + }); } return result; } @@ -3654,7 +3773,9 @@ var Harness; return result; }; TypeScriptLS.prototype.getHostSettings = function () { - return JSON.stringify({ usePullLanguageService: Harness.usePull }); + return JSON.stringify({ + usePullLanguageService: Harness.usePull + }); }; return TypeScriptLS; })(); @@ -3691,7 +3812,9 @@ var Harness; Runner.runCollateral = runCollateral; function runJSString(code, callback) { // List of names that get overriden by various test code we eval - var dangerNames = ['Array']; + var dangerNames = [ + 'Array' + ]; var globalBackup = {}; var n = null; for (n in dangerNames) { @@ -3809,7 +3932,10 @@ var Harness; expected = expected.replace(/\r\n?/g, '\n'); actual = actual.replace(/\r\n?/g, '\n'); } - return { expected: expected, actual: actual }; + return { + expected: expected, + actual: actual + }; } function writeComparison(expected, actual, relativeFilename, actualFilename, descriptionForDescribe) { if (expected != actual) { diff --git a/tests/baselines/reference/parserindenter.errors.txt b/tests/baselines/reference/parserindenter.errors.txt index 55cc3ba8469..3d8e5f7cc45 100644 --- a/tests/baselines/reference/parserindenter.errors.txt +++ b/tests/baselines/reference/parserindenter.errors.txt @@ -164,7 +164,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): constructor( public logger: TypeScript.ILogger, - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. public tree: ParseTree, ~~~~~~~~~ @@ -174,7 +174,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): !!! error TS2304: Cannot find name 'ITextSnapshot'. public languageHostIndentation: string, public editorOptions: Services.EditorOptions, - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. public firstToken: TokenSpan, ~~~~~~~~~ @@ -369,7 +369,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): } static GetIndentSizeFromIndentText(indentText: string, editorOptions: Services.EditorOptions): number { - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. return GetIndentSizeFromText(indentText, editorOptions, /*includeNonIndentChars:*/ false); ~~~~~~~~~~~~~~~~~~~~~ @@ -377,7 +377,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): } static GetIndentSizeFromText(text: string, editorOptions: Services.EditorOptions, includeNonIndentChars: boolean): number { - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2304: Cannot find name 'Services'. var indentSize = 0; diff --git a/tests/baselines/reference/parserindenter.js b/tests/baselines/reference/parserindenter.js index 511e75ea135..514a24afcf6 100644 --- a/tests/baselines/reference/parserindenter.js +++ b/tests/baselines/reference/parserindenter.js @@ -778,10 +778,7 @@ var Formatting; } Indenter.prototype.GetIndentationEdits = function (token, nextToken, node, sameLineIndent) { if (this.logger.information()) { - this.logger.log("GetIndentationEdits(" + - "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition() + "], " + - "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + - ")"); + this.logger.log("GetIndentationEdits(" + "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition() + "], " + "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + ")"); } var result = this.GetIndentationEditsWorker(token, nextToken, node, sameLineIndent); if (this.logger.information()) { @@ -941,8 +938,7 @@ var Formatting; }; Indenter.prototype.GetSpecialCaseIndentationForLCurly = function (node) { var indentationInfo = null; - if (node.AuthorNode.Details.Kind == AuthorParseNodeKind.apnkFncDecl || - node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneThen || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneElse) { + if (node.AuthorNode.Details.Kind == AuthorParseNodeKind.apnkFncDecl || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneThen || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneElse) { // flushed with the node (function & if) indentationInfo = node.GetNodeStartLineIndentation(this); return indentationInfo; @@ -1237,8 +1233,7 @@ var Formatting; // Get the parent that is really on a different line from the self node var startNodeLineNumber = this.snapshot.GetLineNumberFromPosition(tree.StartNodeSelf.AuthorNode.Details.StartOffset); parent = tree.StartNodeSelf.Parent; - while (parent != null && - startNodeLineNumber == this.snapshot.GetLineNumberFromPosition(parent.AuthorNode.Details.StartOffset)) { + while (parent != null && startNodeLineNumber == this.snapshot.GetLineNumberFromPosition(parent.AuthorNode.Details.StartOffset)) { parent = parent.Parent; } } @@ -1336,8 +1331,7 @@ var Formatting; } }; Indenter.prototype.IsMultiLineString = function (token) { - return token.tokenID === TypeScript.TokenID.StringLiteral && - this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) > this.snapshot.GetLineNumberFromPosition(token.Span.startPosition()); + return token.tokenID === TypeScript.TokenID.StringLiteral && this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) > this.snapshot.GetLineNumberFromPosition(token.Span.startPosition()); }; return Indenter; })(); diff --git a/tests/baselines/reference/parservoidInQualifiedName2.errors.txt b/tests/baselines/reference/parservoidInQualifiedName2.errors.txt index eebec7fe00c..ad96679f0fd 100644 --- a/tests/baselines/reference/parservoidInQualifiedName2.errors.txt +++ b/tests/baselines/reference/parservoidInQualifiedName2.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName2.ts(1,15): ==== tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName2.ts (3 errors) ==== var v : x.void; - ~~ + ~ !!! error TS2304: Cannot find name 'x'. ~~~~ !!! error TS1003: Identifier expected. diff --git a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js index 8b197fd35a4..add4e3a69f3 100644 --- a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js +++ b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.f = function () { }; + C.prototype.f = function () { + }; return C; })(); diff --git a/tests/baselines/reference/partiallyAmbientFundule.js b/tests/baselines/reference/partiallyAmbientFundule.js index 9b52ca2147f..21cb5179aef 100644 --- a/tests/baselines/reference/partiallyAmbientFundule.js +++ b/tests/baselines/reference/partiallyAmbientFundule.js @@ -5,4 +5,5 @@ declare module foo { function foo () { } // Legal, because module is ambient //// [partiallyAmbientFundule.js] -function foo() { } // Legal, because module is ambient +function foo() { +} // Legal, because module is ambient diff --git a/tests/baselines/reference/plusOperatorWithAnyOtherType.js b/tests/baselines/reference/plusOperatorWithAnyOtherType.js index 33ac4ebb144..5a30af7e9f6 100644 --- a/tests/baselines/reference/plusOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/plusOperatorWithAnyOtherType.js @@ -60,9 +60,17 @@ var ResultIsNumber19 = +(undefined + undefined); // + operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: function (s) { }, y: function (s1) { } }; +var obj1 = { + x: function (s) { + }, + y: function (s1) { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/plusOperatorWithBooleanType.js b/tests/baselines/reference/plusOperatorWithBooleanType.js index 5af1a8fb903..81c62222805 100644 --- a/tests/baselines/reference/plusOperatorWithBooleanType.js +++ b/tests/baselines/reference/plusOperatorWithBooleanType.js @@ -38,11 +38,15 @@ var ResultIsNumber7 = +A.foo(); //// [plusOperatorWithBooleanType.js] // + operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -54,7 +58,10 @@ var objA = new A(); var ResultIsNumber1 = +BOOLEAN; // boolean type literal var ResultIsNumber2 = +true; -var ResultIsNumber3 = +{ x: true, y: false }; +var ResultIsNumber3 = +{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = +objA.a; var ResultIsNumber5 = +M.n; diff --git a/tests/baselines/reference/plusOperatorWithNumberType.js b/tests/baselines/reference/plusOperatorWithNumberType.js index a0adaa5dec2..a42147e0a30 100644 --- a/tests/baselines/reference/plusOperatorWithNumberType.js +++ b/tests/baselines/reference/plusOperatorWithNumberType.js @@ -44,12 +44,19 @@ var ResultIsNumber11 = +(NUMBER + NUMBER); //// [plusOperatorWithNumberType.js] // + operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -62,8 +69,16 @@ var ResultIsNumber1 = +NUMBER; var ResultIsNumber2 = +NUMBER1; // number type literal var ResultIsNumber3 = +1; -var ResultIsNumber4 = +{ x: 1, y: 2 }; -var ResultIsNumber5 = +{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = +{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = +{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = +objA.a; var ResultIsNumber7 = +M.n; diff --git a/tests/baselines/reference/plusOperatorWithStringType.js b/tests/baselines/reference/plusOperatorWithStringType.js index ed2c60111b3..b725f62adbe 100644 --- a/tests/baselines/reference/plusOperatorWithStringType.js +++ b/tests/baselines/reference/plusOperatorWithStringType.js @@ -43,12 +43,19 @@ var ResultIsNumber12 = +STRING.charAt(0); //// [plusOperatorWithStringType.js] // + operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -61,8 +68,16 @@ var ResultIsNumber1 = +STRING; var ResultIsNumber2 = +STRING1; // string type literal var ResultIsNumber3 = +""; -var ResultIsNumber4 = +{ x: "", y: "" }; -var ResultIsNumber5 = +{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = +{ + x: "", + y: "" +}; +var ResultIsNumber5 = +{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = +objA.a; var ResultIsNumber7 = +M.n; diff --git a/tests/baselines/reference/primaryExpressionMods.errors.txt b/tests/baselines/reference/primaryExpressionMods.errors.txt index eefc0735ef0..8de3d60c27d 100644 --- a/tests/baselines/reference/primaryExpressionMods.errors.txt +++ b/tests/baselines/reference/primaryExpressionMods.errors.txt @@ -16,6 +16,6 @@ tests/cases/compiler/primaryExpressionMods.ts(11,8): error TS2304: Cannot find n var x1 = M.a; // Used as PrimaryExpression var x2 = m.a; // Same as M.a var q: m.P; // Error - ~~~ + ~ !!! error TS2304: Cannot find name 'm'. \ No newline at end of file diff --git a/tests/baselines/reference/primitiveConstraints1.js b/tests/baselines/reference/primitiveConstraints1.js index 9ee39d74e80..7d697e57dfa 100644 --- a/tests/baselines/reference/primitiveConstraints1.js +++ b/tests/baselines/reference/primitiveConstraints1.js @@ -7,7 +7,9 @@ foo2(1, 'hm'); // error //// [primitiveConstraints1.js] -function foo1(t, u) { } +function foo1(t, u) { +} foo1('hm', 1); // no error -function foo2(t, u) { } +function foo2(t, u) { +} foo2(1, 'hm'); // error diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index bf3f1a17105..18ade7ca775 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -48,7 +48,9 @@ var N; n = N; // should not work, as 'number' has a different brand N = n; // should work var o = {}; -var f = function (x) { return x.length; }; +var f = function (x) { + return x.length; +}; var r2 = /./g; var n2 = 34; var s = "yo"; @@ -57,7 +59,8 @@ var n3 = 5 || {}; var baz = (function () { function baz() { } - baz.prototype.bar = function () { }; + baz.prototype.bar = function () { + }; return baz; })(); var foo = (function (_super) { @@ -65,6 +68,8 @@ var foo = (function (_super) { function foo() { _super.apply(this, arguments); } - foo.prototype.bar = function () { return undefined; }; + foo.prototype.bar = function () { + return undefined; + }; return foo; })(baz); diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.js b/tests/baselines/reference/primtiveTypesAreIdentical.js index 19bdadb4cee..00a77fac917 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.js +++ b/tests/baselines/reference/primtiveTypesAreIdentical.js @@ -33,14 +33,21 @@ function foo7(x: any) { } //// [primtiveTypesAreIdentical.js] // primitive types are identical to themselves so these overloads will all cause errors -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function foo6(x) { } -function foo7(x) { } +function foo6(x) { +} +function foo7(x) { +} diff --git a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.types b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.types index 936f04731f6..b0af8ae0b6e 100644 --- a/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.types +++ b/tests/baselines/reference/privacyCheckExportAssignmentOnExportedGenericInterface1.types @@ -12,9 +12,9 @@ interface Foo { >T : T } var Foo: new () => Foo.A>; ->Foo : new () => Foo.A> +>Foo : new () => default.A> >Foo : unknown ->A : Foo.A +>A : default.A >Foo : Foo export = Foo; diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js index 116b255a921..e754d49280c 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js @@ -37,20 +37,34 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.foo; }; + C.prototype.foo = function () { + return this.foo; + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.foo; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.foo; + }; + C.bar = function () { + this.foo(); + }; return C; })(); // added level of function nesting @@ -60,40 +74,54 @@ var C2 = (function () { Object.defineProperty(C2.prototype, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.prototype.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; Object.defineProperty(C2, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; C2.bar = function () { var _this = this; - (function () { return _this.foo(); }); + (function () { + return _this.foo(); + }); }; return C2; })(); diff --git a/tests/baselines/reference/privateInstanceVisibility.js b/tests/baselines/reference/privateInstanceVisibility.js index b730a763e1e..e1ccb287515 100644 --- a/tests/baselines/reference/privateInstanceVisibility.js +++ b/tests/baselines/reference/privateInstanceVisibility.js @@ -57,7 +57,9 @@ var Test; var C = (function () { function C() { } - C.prototype.getX = function () { return this.x; }; + C.prototype.getX = function () { + return this.x; + }; C.prototype.clone = function (other) { this.x = other.x; }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index fdcb2663299..dd022d8646a 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -24,7 +24,9 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { _super.apply(this, arguments); - this.bing = function () { return Base.foo; }; // error + this.bing = function () { + return Base.foo; + }; // error } Derived.bar = Base.foo; // error return Derived; diff --git a/tests/baselines/reference/privateVisibility.js b/tests/baselines/reference/privateVisibility.js index d70d7b4756f..80e0bf51a1b 100644 --- a/tests/baselines/reference/privateVisibility.js +++ b/tests/baselines/reference/privateVisibility.js @@ -32,8 +32,11 @@ var Foo = (function () { this.pubProp = 0; this.privProp = 0; } - Foo.prototype.pubMeth = function () { this.privMeth(); }; - Foo.prototype.privMeth = function () { }; + Foo.prototype.pubMeth = function () { + this.privMeth(); + }; + Foo.prototype.privMeth = function () { + }; return Foo; })(); var f = new Foo(); diff --git a/tests/baselines/reference/privateVisibles.js b/tests/baselines/reference/privateVisibles.js index b2cb673c681..c9206964f80 100644 --- a/tests/baselines/reference/privateVisibles.js +++ b/tests/baselines/reference/privateVisibles.js @@ -15,6 +15,8 @@ var Foo = (function () { this.pvar = 0; var n = this.pvar; } - Foo.prototype.meth = function () { var q = this.pvar; }; + Foo.prototype.meth = function () { + var q = this.pvar; + }; return Foo; })(); diff --git a/tests/baselines/reference/project/baseline/amd/decl.js b/tests/baselines/reference/project/baseline/amd/decl.js index ed53ca816db..96eaed7142c 100644 --- a/tests/baselines/reference/project/baseline/amd/decl.js +++ b/tests/baselines/reference/project/baseline/amd/decl.js @@ -1,7 +1,10 @@ define(["require", "exports"], function (require, exports) { ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; }); diff --git a/tests/baselines/reference/project/baseline/node/decl.js b/tests/baselines/reference/project/baseline/node/decl.js index eb0c46dd93e..50cca2c0f42 100644 --- a/tests/baselines/reference/project/baseline/node/decl.js +++ b/tests/baselines/reference/project/baseline/node/decl.js @@ -1,5 +1,8 @@ ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; diff --git a/tests/baselines/reference/project/baseline2/amd/decl.js b/tests/baselines/reference/project/baseline2/amd/decl.js index ed53ca816db..96eaed7142c 100644 --- a/tests/baselines/reference/project/baseline2/amd/decl.js +++ b/tests/baselines/reference/project/baseline2/amd/decl.js @@ -1,7 +1,10 @@ define(["require", "exports"], function (require, exports) { ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; }); diff --git a/tests/baselines/reference/project/baseline2/amd/dont_emit.js b/tests/baselines/reference/project/baseline2/amd/dont_emit.js index d3e9e871c2d..6b45d747c1c 100644 --- a/tests/baselines/reference/project/baseline2/amd/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/amd/dont_emit.js @@ -1,3 +1,6 @@ define(["require", "exports"], function (require, exports) { - var p = { x: 10, y: 20 }; + 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 eb0c46dd93e..50cca2c0f42 100644 --- a/tests/baselines/reference/project/baseline2/node/decl.js +++ b/tests/baselines/reference/project/baseline2/node/decl.js @@ -1,5 +1,8 @@ ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; diff --git a/tests/baselines/reference/project/baseline2/node/dont_emit.js b/tests/baselines/reference/project/baseline2/node/dont_emit.js index b6239b1295d..4322b9c60b6 100644 --- a/tests/baselines/reference/project/baseline2/node/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/node/dont_emit.js @@ -1 +1,4 @@ -var p = { x: 10, y: 20 }; +var p = { + x: 10, + y: 20 +}; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index ea13c12204d..401347e92f1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 a2f16483a1e..0e907c1a2ca 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map index 7d8b76cac05..af309c1684b 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 3153725651c..8d9c30d6288 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/mapRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 87101a5b084..cbb2dc36492 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map index 7d8b76cac05..af309c1684b 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index c90b960a80e..44306f12661 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 a2f16483a1e..0e907c1a2ca 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 7d8b76cac05..af309c1684b 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 30ffc64617e..55483177e5b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 87101a5b084..cbb2dc36492 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 7d8b76cac05..af309c1684b 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 6f1ddfd7dd7..d1972c6fac7 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index ef107bb75b8..8a778d7b74b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index a2f16483a1e..0e907c1a2ca 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 6f1ddfd7dd7..d1972c6fac7 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 2e21de11e01..dfc6d1e756f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 87101a5b084..cbb2dc36492 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 d9a8564525c..eb72bfc3c02 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 7c4f8ffc229..534b9497bda 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index a2f16483a1e..0e907c1a2ca 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 d9a8564525c..eb72bfc3c02 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 9e1907a3f19..71ac2234142 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 87101a5b084..cbb2dc36492 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 89642c2cc6d..b02c7fdd8c2 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index f8e8d8dfcda..021b77c5c7e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 2de14ea4583..652d934d602 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index 2fa75cca668..1ae647dfae6 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index a9c59a766f9..f9d0dd89e9c 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 784e7f4633d..5ab3146b099 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/mapRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 d01d6f28db2..15bddd32fe5 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index fca31256992..eae921435ac 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index db4c232c316..a52d154805d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 2de14ea4583..652d934d602 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 2fa75cca668..1ae647dfae6 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 89642c2cc6d..b02c7fdd8c2 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 84cb97409a5..7fd3bf30722 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 d01d6f28db2..15bddd32fe5 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 fca31256992..eae921435ac 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 a9c59a766f9..f9d0dd89e9c 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 89642c2cc6d..b02c7fdd8c2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 4cd682b8c3b..d40f871367c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 2de14ea4583..652d934d602 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map index 2fa75cca668..1ae647dfae6 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index a9c59a766f9..f9d0dd89e9c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 6bd3da2ec8d..f348cfad93c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index d01d6f28db2..15bddd32fe5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map index fca31256992..eae921435ac 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 3f162153875..7f5576a8a9c 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index a8a5bb2ccd2..93d9d6199b7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index cdcab4fcd08..2e8f6fe5049 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index edd3870ab63..ce271e4a3cd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 23be4fbfdc4..668c24e25c5 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/mapRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 1d68ca16748..de9ec1f9859 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 6c8b73f6c8b..357406fe360 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 3f162153875..7f5576a8a9c 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 cdcab4fcd08..2e8f6fe5049 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index b61a3bce9ad..ed2f07140c4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 edd3870ab63..ce271e4a3cd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 1d68ca16748..de9ec1f9859 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map index 3f162153875..7f5576a8a9c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 39e2b7f43fe..7985162b99d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map index cdcab4fcd08..2e8f6fe5049 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map index edd3870ab63..ce271e4a3cd 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index e26fe9d1141..75228e5ea64 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_simple/mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map index 1d68ca16748..de9ec1f9859 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index c83cc3c4cd4..c9fa657c407 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 cb450009899..88e67e19b36 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index e807575b382..9d8db9a4c71 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index 0b9f727913a..f227d9809ad 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/mapRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 5a72780e994..420650feeac 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 1952f8c0e7d..15d4e3e1c9b 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index d99f6762b89..71e537a5f0a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 cb450009899..88e67e19b36 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 e807575b382..9d8db9a4c71 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 284e615b39c..2e0ba5061ce 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 5a72780e994..420650feeac 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 1952f8c0e7d..15d4e3e1c9b 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index ac800e51764..837628ec61f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index cb450009899..88e67e19b36 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map index e807575b382..9d8db9a4c71 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index fe52512fa0a..97c6b8a85e4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=/tests/cases/projects/outputdir_module_subfolder/mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index 5a72780e994..420650feeac 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map index 1952f8c0e7d..15d4e3e1c9b 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map index 19d51858d76..bc33e2f8d72 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index 02cad9b9ab3..9d64326a562 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/amd/test.js.map index b592e001a98..b6fc8f25627 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map index 19d51858d76..bc33e2f8d72 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index 02cad9b9ab3..9d64326a562 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/mapRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderNoOutdir/node/test.js.map index b592e001a98..b6fc8f25627 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 3b087cd34db..d83cb1fe788 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b592e001a98..b6fc8f25627 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 19d51858d76..bc33e2f8d72 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 3b087cd34db..d83cb1fe788 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory/node/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b592e001a98..b6fc8f25627 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 19d51858d76..bc33e2f8d72 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 1812f2fecd5..8df103744b5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 6c42e7229b3..66573712ce7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/amd/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1812f2fecd5..8df103744b5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 6c42e7229b3..66573712ce7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathMultifolderSpecifyOutputFile/node/mapRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/m1.js.map index b52fecc1d52..9ad95c3cfd4 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 9b5860b612b..ad89f7cfe86 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/amd/test.js.map index b0471f2c948..08a7411226a 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/m1.js.map index b52fecc1d52..9ad95c3cfd4 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 9b5860b612b..ad89f7cfe86 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/mapRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSimpleNoOutdir/node/test.js.map index b0471f2c948..08a7411226a 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 47fa7e75199..fbca4c774c7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/amd/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 b52fecc1d52..9ad95c3cfd4 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b0471f2c948..08a7411226a 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 47fa7e75199..fbca4c774c7 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory/node/mapRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 b52fecc1d52..9ad95c3cfd4 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b0471f2c948..08a7411226a 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 4217335db62..f358b98d465 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index 92885552f3f..ca11421c733 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/amd/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4217335db62..f358b98d465 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index 92885552f3f..ca11421c733 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSimpleSpecifyOutputFile/node/mapRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index e73d1fdf39b..4433eb94534 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/amd/test.js.map index 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index e73d1fdf39b..4433eb94534 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/mapRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileNoOutdir/node/test.js.map index 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index a7c2ec6a92b..9b92dfb4455 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index a7c2ec6a92b..9b92dfb4455 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory/node/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index c6d7e2d77eb..85f4115a0ee 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/amd/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index c6d7e2d77eb..85f4115a0ee 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSingleFileSpecifyOutputFile/node/mapRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 949c8b01349..2c8142a51ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/amd/test.js.map index b1ba0007b51..1d5372ad9c9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index 949c8b01349..2c8142a51ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/mapRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderNoOutdir/node/test.js.map index b1ba0007b51..1d5372ad9c9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 44c413210dc..b87a91089b3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b1ba0007b51..1d5372ad9c9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 44c413210dc..b87a91089b3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory/node/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 16f97c48e68..43db599a092 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b1ba0007b51..1d5372ad9c9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 9593afdf577..6882b70c389 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index 6cdd1b8fc9e..cfa708b107d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/amd/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 9593afdf577..6882b70c389 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index 6cdd1b8fc9e..cfa708b107d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootAbsolutePathSubfolderSpecifyOutputFile/node/mapRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index 0c408c275ea..c4ea7bd2123 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c8bc7a5dead..49da9789ec8 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 9697f0008ad..81bb9202e5a 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map index 828e5f06c03..515473b17f7 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index 3f303cae59a..0eed3e7d5ba 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/mapRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c8bc7a5dead..49da9789ec8 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 5eaf90bb137..98da596cfa4 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/test.js.map index 828e5f06c03..515473b17f7 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 9465eaca080..1fdab4bbb56 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c8bc7a5dead..49da9789ec8 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 9697f0008ad..81bb9202e5a 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 828e5f06c03..515473b17f7 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 1494a71e0c2..129d326ecac 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c8bc7a5dead..49da9789ec8 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 5eaf90bb137..98da596cfa4 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 828e5f06c03..515473b17f7 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 111caa88ab6..9d7accaa452 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 33a1a16a5c5..e5fd70c6434 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index 9697f0008ad..81bb9202e5a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 111caa88ab6..9d7accaa452 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 100d1da6afd..2fc592160a1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/mapRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 5eaf90bb137..98da596cfa4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 5bfeb8c37b1..1b716998db3 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 090f794e06a..78467c99ecc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index 9697f0008ad..81bb9202e5a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 5bfeb8c37b1..1b716998db3 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index e6e8d34e4cb..7603a4ca2b0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 5eaf90bb137..98da596cfa4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 90534df8d8c..9745ad1a4ab 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 9986c904a2e..9df87b47237 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 458a007af7d..e7200adafdb 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index 9e56ebb991d..436695f4e0d 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 156d44b336a..c2ac2bc2710 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 683855ebe85..567b51cfff5 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/mapRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 d88675f1bb6..074ab743af3 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index b4e88f8cf4d..85da8e39421 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 3b46f52c0a3..7d976d7c896 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 458a007af7d..e7200adafdb 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 9e56ebb991d..436695f4e0d 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 90534df8d8c..9745ad1a4ab 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index e51988fff45..b4900315771 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 d88675f1bb6..074ab743af3 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 b4e88f8cf4d..85da8e39421 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 156d44b336a..c2ac2bc2710 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 90534df8d8c..9745ad1a4ab 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 170c86cf98e..e680f5976dd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 458a007af7d..e7200adafdb 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map index 9e56ebb991d..436695f4e0d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 156d44b336a..c2ac2bc2710 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index 48b161591d2..1d6a282976d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/mapRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index d88675f1bb6..074ab743af3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map index b4e88f8cf4d..85da8e39421 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index 4efa8b1c4e8..e2625035edb 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index d2f77da6708..559534194af 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index f2feb05d139..3dec08edbfc 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index 5382a2122af..0950101384d 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index 16bd40b29ae..aff5583a5e9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/mapRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map index c51a3e0d23d..c0654a8e141 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 40b415a7141..a2c4fc8b17e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 4efa8b1c4e8..e2625035edb 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 f2feb05d139..3dec08edbfc 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index c1f746f7600..bcfdd607553 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 5382a2122af..0950101384d 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 c51a3e0d23d..c0654a8e141 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map index 4efa8b1c4e8..e2625035edb 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index c96db8869f7..4849040861c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map index f2feb05d139..3dec08edbfc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map index 5382a2122af..0950101384d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index a74920582ea..0af20dc5ef9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/mapRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../mapFiles/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map index c51a3e0d23d..c0654a8e141 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index a745692adc0..fd3cc1e9423 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 c36f481f1b5..66acf4aace7 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index bf794345a00..324bf862942 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 13576c48bf9..48f639a7ee2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/mapRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 914c886ac87..7e9c3643b99 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index 1b507245fc6..64b21aa3115 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index f67ab153f73..c206367edaa 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 c36f481f1b5..66acf4aace7 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 bf794345a00..324bf862942 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 206300e0c34..abf4b9d6a84 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 914c886ac87..7e9c3643b99 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 1b507245fc6..64b21aa3115 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 5f6bdc4ae98..29b0e86baa2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index c36f481f1b5..66acf4aace7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map index bf794345a00..324bf862942 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 251fcdee70a..8f609cc28d9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/mapRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=../../mapFiles/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index 914c886ac87..7e9c3643b99 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map index 1b507245fc6..64b21aa3115 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map index b7b0675e733..b94901a1d6e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt index 29cc1bff12e..a0f444928ea 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 61da94509c8..be7882c99f6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/amd/test.js.map index 0893e2d067d..b6c5ca84681 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map index b7b0675e733..b94901a1d6e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt index 29cc1bff12e..a0f444928ea 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/mapRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 61da94509c8..be7882c99f6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMultifolderNoOutdir/node/test.js.map index 0893e2d067d..b6c5ca84681 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 20db52dd8e8..ff91d92f2c9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/amd/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 61da94509c8..be7882c99f6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 0893e2d067d..b6c5ca84681 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 b7b0675e733..b94901a1d6e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 20db52dd8e8..ff91d92f2c9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputDirectory/node/mapRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 61da94509c8..be7882c99f6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 0893e2d067d..b6c5ca84681 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 b7b0675e733..b94901a1d6e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 3764898a5cf..fdcfeeef82a 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":["../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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 0346140ef3d..ebe3cd999ae 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/amd/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 3764898a5cf..fdcfeeef82a 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":["../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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index 0346140ef3d..ebe3cd999ae 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathMultifolderSpecifyOutputFile/node/mapRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/m1.js.map index 54e9026a874..82ae367f41d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt index 144c281141e..1af999bf589 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/mapRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/amd/test.js.map index b280e83c684..ee9a236558d 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/m1.js.map index 54e9026a874..82ae367f41d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt index 144c281141e..1af999bf589 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/mapRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSimpleNoOutdir/node/test.js.map index b280e83c684..ee9a236558d 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 4166fd0726b..f62798ba3fe 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/amd/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 54e9026a874..82ae367f41d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b280e83c684..ee9a236558d 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 4166fd0726b..f62798ba3fe 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputDirectory/node/mapRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 54e9026a874..82ae367f41d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 b280e83c684..ee9a236558d 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_simple/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 9f094e0e243..e2b612e5851 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 08069776096..0c75ab9d5e1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/amd/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 9f094e0e243..e2b612e5851 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 08069776096..0c75ab9d5e1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSimpleSpecifyOutputFile/node/mapRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt index 5a20e2a7c7c..b0d16a34e9a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/amd/test.js.map index f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt index 5a20e2a7c7c..b0d16a34e9a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/mapRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSingleFileNoOutdir/node/test.js.map index f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index d3ed95ca916..ade0746d1bf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/amd/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index d3ed95ca916..ade0746d1bf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputDirectory/node/mapRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 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 f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index 512266b6237..b4f76aad2a3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/amd/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f664b080161..e3d8cd8c37f 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index 512266b6237..b4f76aad2a3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSingleFileSpecifyOutputFile/node/mapRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt index c95281b0117..3ec9d9c435c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 23fb6d33f8a..67151dfbad5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/amd/test.js.map index 3518a66e606..f1475afcba7 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt index c95281b0117..3ec9d9c435c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/mapRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 23fb6d33f8a..67151dfbad5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathSubfolderNoOutdir/node/test.js.map index 3518a66e606..f1475afcba7 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 7a17ef73ca4..0ff54843266 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/amd/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 23fb6d33f8a..67151dfbad5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 3518a66e606..f1475afcba7 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index 7a17ef73ca4..0ff54843266 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputDirectory/node/mapRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 23fb6d33f8a..67151dfbad5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 3518a66e606..f1475afcba7 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_subfolder/test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 70b064b97a9..1760e9f4124 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 95712b2c3ef..3bad00b19d7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/amd/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 70b064b97a9..1760e9f4124 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 95712b2c3ef..3bad00b19d7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/mapRootRelativePathSubfolderSpecifyOutputFile/node/mapRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt index dbacb509299..c13865cf8f3 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1b8646a41af..18051b2af91 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 a3f3bcc4e8b..c2157bc3b1b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/test.js.map index ec46d44dd36..5b6ec16659f 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt index 7f8e5e51eef..0b663f820bb 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/maprootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1b8646a41af..18051b2af91 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 8635a7515df..0230aad40a5 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/test.js.map index ec46d44dd36..5b6ec16659f 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index b055e0d85ac..e0f4f03c27a 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1b8646a41af..18051b2af91 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 a3f3bcc4e8b..c2157bc3b1b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 ec46d44dd36..5b6ec16659f 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 101a39cb149..96f7d6f45aa 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1b8646a41af..18051b2af91 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 8635a7515df..0230aad40a5 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 ec46d44dd36..5b6ec16659f 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 b8b1e81a1f7..420891e5019 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 8dbf7526563..26d86253ec1 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index a3f3bcc4e8b..c2157bc3b1b 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 b8b1e81a1f7..420891e5019 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 1805bde6293..0510b7e7e33 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 8635a7515df..0230aad40a5 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 6765e0e0fa6..e0b70849bc1 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index e5aca4bd246..00fddd7206e 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index a3f3bcc4e8b..c2157bc3b1b 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 6765e0e0fa6..e0b70849bc1 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/test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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/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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index ea467254de4..9d9bdbe17a2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 8635a7515df..0230aad40a5 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 4c7df3a9d40..66c8fa96a0b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt index a4ce5648e5b..a065295b528 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 2516d32cb22..37bc8039271 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map index aabb245d036..b36bc401bb8 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 457cf11710d..ec29dfcad18 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt index 29fa229628c..e3d905204b2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/maprootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 dec55471584..c88465aaec4 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map index a8d13feec67..6a18d277c10 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 7ad61dddeec..381bea73055 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 2516d32cb22..37bc8039271 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 aabb245d036..b36bc401bb8 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 4c7df3a9d40..66c8fa96a0b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 40f49063f38..097d3769047 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 dec55471584..c88465aaec4 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 a8d13feec67..6a18d277c10 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 457cf11710d..ec29dfcad18 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 4c7df3a9d40..66c8fa96a0b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 5a4217fe733..c288a90a6ee 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 2516d32cb22..37bc8039271 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map index aabb245d036..b36bc401bb8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 457cf11710d..ec29dfcad18 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 4db3d0c70d3..aaf57c9d055 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index dec55471584..c88465aaec4 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map index a8d13feec67..6a18d277c10 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map index b83ab295512..d2270dfd2ce 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt index fad4fc1783c..b36d21d9ba6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/maprootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map index 4aca98811da..b75b544961a 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map index a00af772e4d..bc2e2667bcd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt index 136894e2adf..ff16dbdb8d6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/maprootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map index a842c47d7fa..b9c164bb732 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index c71e97ff503..849fccd6b73 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 b83ab295512..d2270dfd2ce 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 4aca98811da..b75b544961a 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index ccc7c6c0ffc..67a86d9d9ae 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 a00af772e4d..bc2e2667bcd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 a842c47d7fa..b9c164bb732 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map index b83ab295512..d2270dfd2ce 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 697df496dfe..bd126e61877 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map index 4aca98811da..b75b544961a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map index a00af772e4d..bc2e2667bcd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 248347a869c..804e4408446 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_simple/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/test.js.map index a842c47d7fa..b9c164bb732 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt index 2d63c4bddac..6f16ea9e2f1 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 e31fdeb2b46..ec8a7690d47 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map index 243a840423d..e9f1ee500c9 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt index 83179011b96..acf02348d67 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/maprootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 949975a6ea1..95de442e92d 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map index adfae43de8e..fee2f4cb129 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index bcfc5bc3195..959fdf6baa2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 e31fdeb2b46..ec8a7690d47 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 243a840423d..e9f1ee500c9 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index c1c33e4a5e7..a70074a2fbd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 949975a6ea1..95de442e92d 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 adfae43de8e..fee2f4cb129 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index bba66e6cf92..f9f1988d93d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index e31fdeb2b46..ec8a7690d47 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map index 243a840423d..e9f1ee500c9 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index eae6ea635af..9a7f754c534 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:file:///tests/cases/projects/outputdir_module_subfolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index 949975a6ea1..95de442e92d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map index adfae43de8e..fee2f4cb129 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/diskFile0.js.map index 0b381a365b6..dd02f14d4a1 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt index 85447a672f9..a2fc3dfe05e 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/maprootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1429bf14f31..57ced088c41 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/amd/test.js.map index cc7aa790c7b..06903d6fc51 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/diskFile0.js.map index 0b381a365b6..dd02f14d4a1 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt index 85447a672f9..a2fc3dfe05e 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/maprootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1429bf14f31..57ced088c41 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlMultifolderNoOutdir/node/test.js.map index cc7aa790c7b..06903d6fc51 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index bf5416e3ae3..3bbfa8afdfa 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1429bf14f31..57ced088c41 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 cc7aa790c7b..06903d6fc51 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 0b381a365b6..dd02f14d4a1 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index bf5416e3ae3..3bbfa8afdfa 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1429bf14f31..57ced088c41 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 cc7aa790c7b..06903d6fc51 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 0b381a365b6..dd02f14d4a1 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 d3400838027..06f3e72443d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 292e5cf400f..f889da36fe6 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/amd/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 d3400838027..06f3e72443d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 292e5cf400f..f889da36fe6 100644 --- a/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlMultifolderSpecifyOutputFile/node/maprootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:file:///tests/cases/projects/outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/m1.js.map index ce927d94c7c..0fc2c621e0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt index 0779281197a..173dec77069 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/maprootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/amd/test.js.map index e10afd12d5f..5b13c1897d9 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/m1.js.map index ce927d94c7c..0fc2c621e0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt index 0779281197a..173dec77069 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/maprootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSimpleNoOutdir/node/test.js.map index e10afd12d5f..5b13c1897d9 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 68c1cd3bce9..e1589c0feff 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ce927d94c7c..0fc2c621e0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 e10afd12d5f..5b13c1897d9 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 68c1cd3bce9..e1589c0feff 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputDirectory/node/maprootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ce927d94c7c..0fc2c621e0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 e10afd12d5f..5b13c1897d9 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 70062ed1d78..b1aa6b79fb6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt index c06e1433af5..fb91eae1254 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/amd/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 70062ed1d78..b1aa6b79fb6 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt index c06e1433af5..fb91eae1254 100644 --- a/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSimpleSpecifyOutputFile/node/maprootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:file:///tests/cases/projects/outputdir_simple/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt index 039a038f947..a0eb693f753 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/maprootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/amd/test.js.map index 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt index 039a038f947..a0eb693f753 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/maprootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSingleFileNoOutdir/node/test.js.map index 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index f4bc5552ff5..22edc6e923d 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index f4bc5552ff5..22edc6e923d 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 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 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt index f952c25a211..b7c18ea6cd1 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/amd/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 781feaa6938..420452cddcf 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt index f952c25a211..b7c18ea6cd1 100644 --- a/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSingleFileSpecifyOutputFile/node/maprootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_singleFile/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt index af274497908..1d778de19b1 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/maprootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f27a87d128..74b0608f236 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/amd/test.js.map index 2cbc935e3ca..ec6296f1323 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt index af274497908..1d778de19b1 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/maprootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f27a87d128..74b0608f236 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlSubfolderNoOutdir/node/test.js.map index 2cbc935e3ca..ec6296f1323 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index ed6df05a4da..003ceee4d93 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f27a87d128..74b0608f236 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 2cbc935e3ca..ec6296f1323 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index ed6df05a4da..003ceee4d93 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f27a87d128..74b0608f236 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 2cbc935e3ca..ec6296f1323 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 a83d7767a58..e56b1937c6d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt index e7181011976..5f63c0e5142 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/amd/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 a83d7767a58..e56b1937c6d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt index e7181011976..5f63c0e5142 100644 --- a/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlSubfolderSpecifyOutputFile/node/maprootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:file:///tests/cases/projects/outputdir_subfolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index bbfd41971ea..679505e8648 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 bde211ed7de..04f168a6289 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map index c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index cb5acf04cad..341a676141d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 827f4db2a5e..0ce68e169af 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/test.js.map index c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 5c7fbf55980..39fe2de604c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 bde211ed7de..04f168a6289 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 9358870a688..4483b21610f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 827f4db2a5e..0ce68e169af 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 af09cb956f6..156e391d669 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index 7a63f82b063..877c5b5035c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index bde211ed7de..04f168a6289 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 af09cb956f6..156e391d669 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index edff71433ac..a15e54dd069 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 827f4db2a5e..0ce68e169af 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 2b043394866..c5ec380afae 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 1a6dfcfc5f3..b75fe639eb9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index bde211ed7de..04f168a6289 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 2b043394866..c5ec380afae 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 83af964a3ef..7a54e211028 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 827f4db2a5e..0ce68e169af 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a5693661025..3b00d82ab66 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index b646b14d468..d5be2b19f79 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 7f3d01c0a85..8c257bd1111 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index c74a9f9eede..74fe0bb17da 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 5c7f2c8f36a..058e405b606 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index a10ee476182..a8f4f3bf238 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 695098ebde0..e7f54a4a2e1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index 5590b2868b3..4ac74c2fcdb 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 4cd04fa270c..9dca948f2f1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 7f3d01c0a85..8c257bd1111 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 c74a9f9eede..74fe0bb17da 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 a5693661025..3b00d82ab66 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 5e785215461..8fbb0bd3916 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 695098ebde0..e7f54a4a2e1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 5590b2868b3..4ac74c2fcdb 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 5c7f2c8f36a..058e405b606 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index a5693661025..3b00d82ab66 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index db54a0d65a6..206982bbc7e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 7f3d01c0a85..8c257bd1111 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map index c74a9f9eede..74fe0bb17da 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 5c7f2c8f36a..058e405b606 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 6f7510afb31..5f476cfb8ed 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder/ref/m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/outputdir_module_multifolder_ref/m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index 695098ebde0..e7f54a4a2e1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map index 5590b2868b3..4ac74c2fcdb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 28f51d9cf9f..6751f2f82cd 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index c664fca1e12..0b21c3a7f08 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index 761cf1c1321..9232d211fa0 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 8a497cdfecd..ca45773f423 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 6224a28a43e..2843c88faf5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/maprootUrlsourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map index f48ab4302b1..41d3e11e995 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 7c145eb9597..16d5644b3d5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 28f51d9cf9f..6751f2f82cd 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 761cf1c1321..9232d211fa0 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index e5707eaf2e4..8b33b445d72 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 8a497cdfecd..ca45773f423 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 f48ab4302b1..41d3e11e995 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map index 28f51d9cf9f..6751f2f82cd 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 017951622a6..b15912ba2e6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map index 761cf1c1321..9232d211fa0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map index 8a497cdfecd..ca45773f423 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index b9e8c452ef0..ff984bf74ee 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map index f48ab4302b1..41d3e11e995 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index 15ce6f5a43a..4582ca1ca5b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 3ce04bc4f21..6c5413f630e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index 4fd5727d384..870292fffa0 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index c3f599f9e80..bf0333f3d12 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 e4234c0ce9f..35e7e9a48dd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index 8726f12b557..d0638b6c34c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index cb5ad88846a..831f0c94f62 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 3ce04bc4f21..6c5413f630e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 4fd5727d384..870292fffa0 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 162707b8a9b..363cd0e29f1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> 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 e4234c0ce9f..35e7e9a48dd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 8726f12b557..d0638b6c34c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 33014efc6e7..af780a9c2b5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index 3ce04bc4f21..6c5413f630e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map index 4fd5727d384..870292fffa0 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 2c64730243e..c5bce1a19d5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=http://www.typescriptlang.org/ref/m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index e4234c0ce9f..35e7e9a48dd 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map index 8726f12b557..d0638b6c34c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map index 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt index 470b4280389..96940f59a3f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/amd/test.js.map index 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map index 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt index 470b4280389..96940f59a3f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/maprootUrlsourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderNoOutdir/node/test.js.map index 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 4cfbf25edb5..5a945f4c71d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 4cfbf25edb5..5a945f4c71d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 ece3a005e75..df7254bd000 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 5884efb5062..4e24018adaf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ece3a005e75..df7254bd000 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 5884efb5062..4e24018adaf 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile/node/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/m1.js.map index c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt index 0d6c41e9711..6be1df8d85d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/amd/test.js.map index 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/m1.js.map index c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt index 0d6c41e9711..6be1df8d85d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/maprootUrlsourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleNoOutdir/node/test.js.map index 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 77f1611c24e..90059c54016 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 77f1611c24e..90059c54016 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 8610dc814fc..a107f15c1bf 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 93973163cd7..6ce817a2afc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/amd/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 8610dc814fc..a107f15c1bf 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 93973163cd7..6ce817a2afc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile/node/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt index 02f3351ef30..13e178f926c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/amd/test.js.map index 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt index 02f3351ef30..13e178f926c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/maprootUrlsourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileNoOutdir/node/test.js.map index 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 1d124c986f4..3fe9cb43cbd 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index 1d124c986f4..3fe9cb43cbd 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 6cd13c5c612..8fff42e6b47 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/amd/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 6cd13c5c612..8fff42e6b47 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile/node/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt index f437ff38afa..e6031c87b2b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/amd/test.js.map index 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt index f437ff38afa..e6031c87b2b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/maprootUrlsourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderNoOutdir/node/test.js.map index 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 5b1bcfef3e7..aff09cc2ec5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 5b1bcfef3e7..aff09cc2ec5 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 677ccf1596d..6e45ee8da7d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index f9478f2e3bc..8a2e3c01e10 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/amd/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 677ccf1596d..6e45ee8da7d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index f9478f2e3bc..8a2e3c01e10 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile/node/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/noDefaultLib/amd/noDefaultLib.errors.txt b/tests/baselines/reference/project/noDefaultLib/amd/noDefaultLib.errors.txt index 5541c8d7c19..e7db8a4da6a 100644 --- a/tests/baselines/reference/project/noDefaultLib/amd/noDefaultLib.errors.txt +++ b/tests/baselines/reference/project/noDefaultLib/amd/noDefaultLib.errors.txt @@ -21,7 +21,7 @@ test.ts(3,8): error TS2304: Cannot find name 'Array'. /// var x: Array; - ~~~~~~~~~~~~~ + ~~~~~ !!! error TS2304: Cannot find name 'Array'. \ No newline at end of file diff --git a/tests/baselines/reference/project/noDefaultLib/node/noDefaultLib.errors.txt b/tests/baselines/reference/project/noDefaultLib/node/noDefaultLib.errors.txt index 5541c8d7c19..e7db8a4da6a 100644 --- a/tests/baselines/reference/project/noDefaultLib/node/noDefaultLib.errors.txt +++ b/tests/baselines/reference/project/noDefaultLib/node/noDefaultLib.errors.txt @@ -21,7 +21,7 @@ test.ts(3,8): error TS2304: Cannot find name 'Array'. /// var x: Array; - ~~~~~~~~~~~~~ + ~~~~~ !!! error TS2304: Cannot find name 'Array'. \ No newline at end of file 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 6ffe8c53445..5351258111e 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) { - function hello() { } + 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 6ffe8c53445..5351258111e 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) { - function hello() { } + 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 6ffe8c53445..5351258111e 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) { - function hello() { } + function hello() { + } exports.hello = hello; }); 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 58114de3a4d..3bc8930ed53 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 @@ -function hello() { } +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 58114de3a4d..3bc8930ed53 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 @@ -function hello() { } +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 58114de3a4d..3bc8930ed53 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 @@ -function hello() { } +function hello() { +} exports.hello = hello; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index b19a07f6490..f311ea7ba24 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,6 +1,8 @@ var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var __extends = 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/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index b19a07f6490..f311ea7ba24 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,6 +1,8 @@ var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var __extends = 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/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js index 115b5fff25f..649db9a606d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js @@ -3,7 +3,8 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { }; + ClassA.prototype.method = function () { + }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js index 115b5fff25f..649db9a606d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js @@ -3,7 +3,8 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { }; + ClassA.prototype.method = function () { + }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/diskFile1.d.ts b/tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/diskFile1.d.ts rename to tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/test.d.ts diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/diskFile0.js b/tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/test.js similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/diskFile0.js rename to tests/baselines/reference/project/referenceResolutionSameFileTwice/amd/test.js diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwice/node/diskFile1.d.ts b/tests/baselines/reference/project/referenceResolutionSameFileTwice/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwice/node/diskFile1.d.ts rename to tests/baselines/reference/project/referenceResolutionSameFileTwice/node/test.d.ts diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwice/node/diskFile0.js b/tests/baselines/reference/project/referenceResolutionSameFileTwice/node/test.js similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwice/node/diskFile0.js rename to tests/baselines/reference/project/referenceResolutionSameFileTwice/node/test.js diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/diskFile1.d.ts b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/test.d.ts similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/diskFile1.d.ts rename to tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/test.d.ts diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/diskFile0.js b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/test.js similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/diskFile0.js rename to tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/amd/test.js diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/diskFile1.d.ts b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/test.d.ts similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/diskFile1.d.ts rename to tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/test.d.ts diff --git a/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/diskFile0.js b/tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/test.js similarity index 100% rename from tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/diskFile0.js rename to tests/baselines/reference/project/referenceResolutionSameFileTwiceNoResolve/node/test.js 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 c3cc0d4253f..ec4f3128e18 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 a522f38d991..381b239c573 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 6777ff94467..154daaa4a70 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/test.js.map index 59114b811dc..9bf8cc49759 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 c3cc0d4253f..ec4f3128e18 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 62ca624e4f3..2963737a5a0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt index 9250746237b..95d78aa3a6f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/sourceRootAbsolutePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/test.js.map index 59114b811dc..9bf8cc49759 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 c3cc0d4253f..ec4f3128e18 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 a522f38d991..381b239c573 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 59114b811dc..9bf8cc49759 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index ef941ec8527..7197c780765 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c3cc0d4253f..ec4f3128e18 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 62ca624e4f3..2963737a5a0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 59114b811dc..9bf8cc49759 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 8a79efe75e9..68ab2e1cb0e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f21f73c29bb..63116c3c3ec 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index a522f38d991..381b239c573 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index b1c5507682c..7579aa9cc1c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f21f73c29bb..63116c3c3ec 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 62ca624e4f3..2963737a5a0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 6eea2973858..8fe4fb35089 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f35721dda8..81d49818901 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index a522f38d991..381b239c573 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 39e33fa9c4f..1a094439574 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 7f35721dda8..81d49818901 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 62ca624e4f3..2963737a5a0 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 7943340db97..1b485f8a450 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 3ce4a0ee163..c4c57a82e12 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 9b1685c84f2..71e1da5d3cc 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 643298a2225..08265129eac 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index 5ee511671dd..c1ff644fb97 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 39c18fb8d23..7e08245de72 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 b95495e9dd1..de341c87ec1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt index 8d010aa113d..9072b5c7129 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/sourceRootAbsolutePathModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index e0c8782d730..0b67e7ee481 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 9b1685c84f2..71e1da5d3cc 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 5ee511671dd..c1ff644fb97 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 3ce4a0ee163..c4c57a82e12 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index b7c2f5b7669..062c65d4728 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 b95495e9dd1..de341c87ec1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 e0c8782d730..0b67e7ee481 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 39c18fb8d23..7e08245de72 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index acb0bd34971..fbbb2304152 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 3ce4a0ee163..c4c57a82e12 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 9b1685c84f2..71e1da5d3cc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index f7eeab0a5fd..4de4e7187f7 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map index 5ee511671dd..c1ff644fb97 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 39c18fb8d23..7e08245de72 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index b95495e9dd1..de341c87ec1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index e13d18582ca..63e22ab64ba 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map index e0c8782d730..0b67e7ee481 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 29b187f991d..89373fc1cfa 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 74eb9e3aa24..66992cb8359 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 0066f881f76..34ab44d4457 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 519ccb90df5..9bf6e024b3f 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt index 909e92e6606..55790d25272 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/sourceRootAbsolutePathModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 1ec1848e231..a7792ef5242 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 29b187f991d..89373fc1cfa 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 0066f881f76..34ab44d4457 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 03d8b18512e..3a29347b4ea 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 519ccb90df5..9bf6e024b3f 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 1ec1848e231..a7792ef5242 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 75c5572d004..e4c6d218e88 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map index 29b187f991d..89373fc1cfa 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 3f6102f1bb4..5ed1e2a3867 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map index 0066f881f76..34ab44d4457 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map index 519ccb90df5..9bf6e024b3f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt index d4deb812f0b..08491d50151 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map index 1ec1848e231..a7792ef5242 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 c0a2696f7ec..6f750f89857 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index 7157945599d..247d4dc21da 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 49e86ea9531..6f9c7463378 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 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 a4994dffea1..19b046a427c 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt index 5912d5319af..757d17973af 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/sourceRootAbsolutePathModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 5a0bc483548..c63a0943976 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 c0a2696f7ec..6f750f89857 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 49e86ea9531..6f9c7463378 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 396d03885e1..ebd955c3327 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 a4994dffea1..19b046a427c 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 5a0bc483548..c63a0943976 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 09274e0a16c..4849be6e95a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index c0a2696f7ec..6f750f89857 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 2394ca431ad..acef32cca00 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map index 49e86ea9531..6f9c7463378 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index a4994dffea1..19b046a427c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index e6f1a6e5f9c..67fc9030f41 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map index 5a0bc483548..c63a0943976 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/diskFile0.js.map index bdf6f4c4907..c41bb345581 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 f9b0b3e8ecb..e43074326e0 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index a932b4ba35e..06c05bb438b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/amd/test.js.map index 39be85e5c61..54f77cba804 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/diskFile0.js.map index bdf6f4c4907..c41bb345581 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 f9b0b3e8ecb..e43074326e0 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt index a932b4ba35e..06c05bb438b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/sourceRootAbsolutePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderNoOutdir/node/test.js.map index 39be85e5c61..54f77cba804 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 f9b0b3e8ecb..e43074326e0 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 39be85e5c61..54f77cba804 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 bdf6f4c4907..c41bb345581 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 7e47593c4b7..0cd80fd563d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f9b0b3e8ecb..e43074326e0 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 39be85e5c61..54f77cba804 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 bdf6f4c4907..c41bb345581 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt index 7e47593c4b7..0cd80fd563d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory/node/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 47c9541e0eb..6baf87e6a0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 011daa6708b..c686916fecf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/amd/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 47c9541e0eb..6baf87e6a0a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt index 011daa6708b..c686916fecf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile/node/sourceRootAbsolutePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/m1.js.map index 2f3480ff8df..166a894f9bc 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 40f672bb0f2..937975a41dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/amd/test.js.map index c50d8e4859f..2c82359c39e 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/m1.js.map index 2f3480ff8df..166a894f9bc 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt index 40f672bb0f2..937975a41dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/sourceRootAbsolutePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleNoOutdir/node/test.js.map index c50d8e4859f..2c82359c39e 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 2f3480ff8df..166a894f9bc 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 c50d8e4859f..2c82359c39e 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 4a50fc2c799..b94aa72552f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/amd/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 2f3480ff8df..166a894f9bc 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 c50d8e4859f..2c82359c39e 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt index 4a50fc2c799..b94aa72552f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory/node/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e60662f68a5..725dab29806 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index 28833a21cbc..1091dae5c06 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/amd/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e60662f68a5..725dab29806 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt index 28833a21cbc..1091dae5c06 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSimpleSpecifyOutputFile/node/sourceRootAbsolutePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 5e508ff8a78..8a378aeb633 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/amd/test.js.map index e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt index 5e508ff8a78..8a378aeb633 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/sourceRootAbsolutePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileNoOutdir/node/test.js.map index e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 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 e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 73fd44c82b9..d7ecfe75c35 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/amd/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt index 73fd44c82b9..d7ecfe75c35 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory/node/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index 5fb2ab686c7..ab2d0e10bd3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/amd/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e75ae6e92ca..d4b7f1b88c6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt index 5fb2ab686c7..ab2d0e10bd3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile/node/sourceRootAbsolutePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 cfd4530338c..0cd3d17ea8f 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index ee5822937fb..e76f86d4edf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/test.js.map index 09ec82b9dc6..7aecf7bb797 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 cfd4530338c..0cd3d17ea8f 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt index ee5822937fb..e76f86d4edf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/sourceRootAbsolutePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/node/test.js.map index 09ec82b9dc6..7aecf7bb797 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 cfd4530338c..0cd3d17ea8f 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 09ec82b9dc6..7aecf7bb797 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index de87b327bb2..e8ad9ce990c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/amd/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 cfd4530338c..0cd3d17ea8f 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 09ec82b9dc6..7aecf7bb797 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt index de87b327bb2..e8ad9ce990c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory/node/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 489c554916e..9d1c6c21871 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index ade7f125bba..d51d030afc4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/amd/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 489c554916e..9d1c6c21871 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt index ade7f125bba..d51d030afc4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile/node/sourceRootAbsolutePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 0b307d7a3f3..0927206ec1b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index 280d8605873..4492ea156cd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/test.js.map index e21190f8e2e..7b83f21b715 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 f5995365dd1..84f18c56247 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt index 7f4e9e1ddbe..18997be9365 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/sourceRootRelativePathMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/test.js.map index e21190f8e2e..7b83f21b715 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 0b307d7a3f3..0927206ec1b 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 e21190f8e2e..7b83f21b715 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index ee48016ceb9..4af0f38468e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 f5995365dd1..84f18c56247 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 e21190f8e2e..7b83f21b715 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 95cca9bf57d..bdfda8e946b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 b86daf390ae..f3b07b196ea 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index 0b307d7a3f3..0927206ec1b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 458add435ad..9bf843435cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 b86daf390ae..f3b07b196ea 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index f5995365dd1..84f18c56247 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt index 9e6b357fb24..59f5f96fc76 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e9865e31b38..bae3da16f51 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index 0b307d7a3f3..0927206ec1b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index e881c0b785d..d4f1ba4f5aa 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 e9865e31b38..bae3da16f51 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index f5995365dd1..84f18c56247 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 6312eb97268..47a5afc6d80 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 223d33df45e..414fa845b2e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 3c58e7d101c..0cdc44d330d 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index 06558319aad..c0fe39d4076 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index 706cb7efc9d..6cbe9eb3387 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 771da5c5a90..92fd6e19cfb 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 b332468413f..292dcb61933 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt index e87343210a7..095d4b65fdf 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/sourceRootRelativePathModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index 34d8334c90e..a603394fc15 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 3c58e7d101c..0cdc44d330d 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 706cb7efc9d..6cbe9eb3387 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 223d33df45e..414fa845b2e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index d523e5cd5b9..4315a83b043 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 b332468413f..292dcb61933 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 34d8334c90e..a603394fc15 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 771da5c5a90..92fd6e19cfb 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 4edec10d016..28aa64ae076 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 223d33df45e..414fa845b2e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 3c58e7d101c..0cdc44d330d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index c17d9555be6..c254e418af5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map index 706cb7efc9d..6cbe9eb3387 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 771da5c5a90..92fd6e19cfb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index b332468413f..292dcb61933 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt index e60683226b7..e34bffc6f61 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map index 34d8334c90e..a603394fc15 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index e4922cbc450..e0af3af9b22 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index 02b225cc851..8984f80e86c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index 439e497e1e6..b6ba5dd0f7e 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index d817acec1bc..05c53f0182e 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt index 8da4686938a..82c62b23d3c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/sourceRootRelativePathModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map index da13a487630..1e72e2a2203 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 e4922cbc450..e0af3af9b22 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 439e497e1e6..b6ba5dd0f7e 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 7bc5c6fc31a..01ab16b1f2b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 d817acec1bc..05c53f0182e 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 da13a487630..1e72e2a2203 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 8ab8c0a6041..d94164cc056 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map index e4922cbc450..e0af3af9b22 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 03a8fc274e0..ae7da446d66 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map index 439e497e1e6..b6ba5dd0f7e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map index d817acec1bc..05c53f0182e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt index 79fd07b3d67..65bea50d84f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/sourceRootRelativePathModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map index da13a487630..1e72e2a2203 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 dd0d4674a38..aaae11bb5b5 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 1f8be506ddd..6e10b6eea05 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index 2b2873013f1..43a3eb9d838 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 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 2b502d41a8f..702b574b614 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt index 9be420cb4f5..4e25047bafc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/sourceRootRelativePathModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index 5f288a1eaac..b3972a3cfc1 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 dd0d4674a38..aaae11bb5b5 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 2b2873013f1..43a3eb9d838 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index c85d2e84771..3ba8a06679f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 2b502d41a8f..702b574b614 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 5f288a1eaac..b3972a3cfc1 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 08d38875be1..ebcaec60aaa 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index dd0d4674a38..aaae11bb5b5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index d1a697bc810..9c2d987c549 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map index 2b2873013f1..43a3eb9d838 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index 2b502d41a8f..702b574b614 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt index 4597d82ebfb..5a3d45c1960 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map index 5f288a1eaac..b3972a3cfc1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/diskFile0.js.map index 5a8c5e83fb1..dfe53a2f98c 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 31e868764cc..ebf5d6bc886 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt index e3ee3f75771..88e6b10a246 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/amd/test.js.map index 203c42359bd..3f2781e7135 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/diskFile0.js.map index 5a8c5e83fb1..dfe53a2f98c 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 31e868764cc..ebf5d6bc886 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt index e3ee3f75771..88e6b10a246 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/sourceRootRelativePathMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMultifolderNoOutdir/node/test.js.map index 203c42359bd..3f2781e7135 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 31e868764cc..ebf5d6bc886 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 203c42359bd..3f2781e7135 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 5a8c5e83fb1..dfe53a2f98c 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index c89d3dadb38..939e34eb98b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/amd/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 31e868764cc..ebf5d6bc886 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 203c42359bd..3f2781e7135 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 5a8c5e83fb1..dfe53a2f98c 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt index c89d3dadb38..939e34eb98b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory/node/sourceRootRelativePathMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4b6e3515172..2e84a488006 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index db35a4d65e9..1d422734a9f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/amd/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4b6e3515172..2e84a488006 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt index db35a4d65e9..1d422734a9f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathMultifolderSpecifyOutputFile/node/sourceRootRelativePathMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/m1.js.map index 4b5198b3f50..66ee2527678 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt index 0019838beaf..bf10b5ed9fc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/amd/test.js.map index a3a4dda9ee2..1934eb39c28 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/m1.js.map index 4b5198b3f50..66ee2527678 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt index 0019838beaf..bf10b5ed9fc 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/sourceRootRelativePathSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSimpleNoOutdir/node/test.js.map index a3a4dda9ee2..1934eb39c28 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 4b5198b3f50..66ee2527678 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 a3a4dda9ee2..1934eb39c28 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 8e3a977cca1..cd059036df7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/amd/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4b5198b3f50..66ee2527678 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 a3a4dda9ee2..1934eb39c28 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt index 8e3a977cca1..cd059036df7 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputDirectory/node/sourceRootRelativePathSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ca707d32461..fb5adc76d59 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 0450303b15f..7e219ee4efd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/amd/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ca707d32461..fb5adc76d59 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt index 0450303b15f..7e219ee4efd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSimpleSpecifyOutputFile/node/sourceRootRelativePathSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt index 2019663bd1e..17acf414c6d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/amd/test.js.map index 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt index 2019663bd1e..17acf414c6d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/sourceRootRelativePathSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSingleFileNoOutdir/node/test.js.map index 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 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 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index e9a275d31ee..161f1a1befb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/amd/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt index e9a275d31ee..161f1a1befb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory/node/sourceRootRelativePathSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index 536d103e9d8..b282a6db091 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/amd/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 3b572c088f6..d6fa9b1eda6 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt index 536d103e9d8..b282a6db091 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSingleFileSpecifyOutputFile/node/sourceRootRelativePathSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt index 914b521f34b..75655274f8a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/amd/test.js.map index 17240f26218..a68bad790ab 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt index 914b521f34b..75655274f8a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/sourceRootRelativePathSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathSubfolderNoOutdir/node/test.js.map index 17240f26218..a68bad790ab 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 17240f26218..a68bad790ab 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index f7eb83a20d1..91537c88524 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/amd/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 51d14705f9c..17c695312b3 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 17240f26218..a68bad790ab 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt index f7eb83a20d1..91537c88524 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory/node/sourceRootRelativePathSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4e19de36fe8..47e290804f2 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 3f529a732cd..32bf6d56977 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/amd/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4e19de36fe8..47e290804f2 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt index 3f529a732cd..32bf6d56977 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourceRootRelativePathSubfolderSpecifyOutputFile/node/sourceRootRelativePathSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 85a8232bd28..cbb7eed4953 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt index 8e10970ffce..a5aeda6cdd8 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/sourcemapMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/test.js.map index 004deef64ee..9bac80ea492 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 65edb170af6..0826e9e95f3 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt index 7a872ddd504..5355f2e907e 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/sourcemapMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/test.js.map index 004deef64ee..9bac80ea492 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 02e26dc6443..aabf49f904d 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 b3ee1024446..46ba86b781c 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 77f7dd030d7..045f82046ce 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:../../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:../../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:../../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:../../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:../../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 dc602487a68..e31d90a8f0c 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 b3ee1024446..46ba86b781c 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 0ae77c78e64..4424c9c0872 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:../../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:../../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:../../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:../../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:../../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6f1ddfd7dd7..d1972c6fac7 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index 85a8232bd28..cbb7eed4953 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt index f798f6bd54d..f7faa24855f 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6f1ddfd7dd7..d1972c6fac7 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 65edb170af6..0826e9e95f3 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt index a6bfcf784e0..9931e5b4418 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/node/sourcemapMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 d9a8564525c..eb72bfc3c02 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index 02e26dc6443..aabf49f904d 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index a05ce4d647b..b75480da1e7 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:../../../ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 d9a8564525c..eb72bfc3c02 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","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index dc602487a68..e31d90a8f0c 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index adb046a3bcc..165ca8ce022 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:../../../ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map index 85a8232bd28..cbb7eed4953 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 3c388273ff4..51755e4c9a3 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt index b0bd2c62d2c..55f98059d50 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/sourcemapModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map index acd0ceb63b8..606f3e8ed8a 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map index 65edb170af6..0826e9e95f3 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 6ed9e2e6323..095951a67d0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt index 8654bc314a4..0036386e6c4 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/sourcemapModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map index 4f72b9ce65c..3b3ef6b145c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 cd70f70d5f8..820b088730f 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 816e60641ca..74f971bdbdb 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 73bffe89c3c..ac636fcee16 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index bbb66ad4639..0decd013acd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:../../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:../../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:../../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:../../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:../../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 67a333ddeae..6df33fbb9e6 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 2ca22f61022..cda16e9fb3e 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 559ad5c3def..5a37db58aa0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index ce763f05c36..0548113dc81 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/sourcemapModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:../../../../outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:../../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:../../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:../../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:../../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:../../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index 85a8232bd28..cbb7eed4953 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 3c388273ff4..51755e4c9a3 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt index 7817684a640..39744cb62a8 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/test.js.map index acd0ceb63b8..606f3e8ed8a 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 65edb170af6..0826e9e95f3 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index 6ed9e2e6323..095951a67d0 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt index 75124d203a9..f8d10678ca0 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/sourcemapModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/test.js.map index 4f72b9ce65c..3b3ef6b145c 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map index 3c388273ff4..51755e4c9a3 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt index fef556f0ecf..70b8c90eba8 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/sourcemapModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map index c996a776e06..57095af58bb 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map index 6ed9e2e6323..095951a67d0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt index 91f071d8783..d5247e7eeb0 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/sourcemapModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map index 74e129bdef6..7bae4ed7491 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 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 59a66655c1e..4a09f6eebdd 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 df91d86d73c..6afbf97db4d 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 9093c5dbbb5..b42d5846da5 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 5e71320d77b..fbcf63377be 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 0843e68f0a0..1c53bf2849c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 665b813a7e4..8fda552208b 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/sourcemapModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/m1.js.map index 3c388273ff4..51755e4c9a3 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt index 6ec11f61b55..be5429fa802 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/test.js.map index c996a776e06..57095af58bb 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/m1.js.map index 6ed9e2e6323..095951a67d0 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt index 363b01567fa..4ff8b4fa8c7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/sourcemapModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/test.js.map index 74e129bdef6..7bae4ed7491 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 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 3c388273ff4..51755e4c9a3 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt index 36df051e9c0..cbe1d27e1a9 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/sourcemapModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map index 675e3349179..a3cd4c20a53 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 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 6ed9e2e6323..095951a67d0 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt index 81f0dc2577f..3319b4e31f9 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/sourcemapModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map index 44e7dccedd2..56d42d8bdfd 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 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 2de14ea4583..652d934d602 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 67f8e2d57c5..856699ba7d0 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index e63e012df3b..d3470fdb64f 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:../../../ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:../../../ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:../../../ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:../../test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:../../test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:../../test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:../../test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 d01d6f28db2..15bddd32fe5 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 eb9f8205703..bcab7aa3bc6 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 74b8b4eb99f..a9427c9fc8b 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/sourcemapModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:../../../ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:../../test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:../../test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index 3c388273ff4..51755e4c9a3 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt index fc964104780..bcf72481eda 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/test.js.map index 675e3349179..a3cd4c20a53 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index 6ed9e2e6323..095951a67d0 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt index de6475b368d..205f70497ad 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/sourcemapModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/test.js.map index 44e7dccedd2..56d42d8bdfd 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,CAAA;AAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/diskFile0.js.map index 2ac26aa1648..5511f8eed7a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt index 8606d36acd4..3a0747b7391 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/sourcemapMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/amd/test.js.map index 276a8b2a720..c44bc996538 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/diskFile0.js.map index 2ac26aa1648..5511f8eed7a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt index 8606d36acd4..3a0747b7391 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/sourcemapMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapMultifolderNoOutdir/node/test.js.map index 276a8b2a720..c44bc996538 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 f06d0fae1d2..b9e02d04348 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 521dbe5e313..39003b7de59 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 3563010e709..8bb6ed14650 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt index 11ece946281..f46ef4b5d46 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/amd/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 f06d0fae1d2..b9e02d04348 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 521dbe5e313..39003b7de59 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 3563010e709..8bb6ed14650 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt index 11ece946281..f46ef4b5d46 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputDirectory/node/sourcemapMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:../../../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:../../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:../../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:../../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1812f2fecd5..8df103744b5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt index d8299995443..e5f624e893b 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/amd/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 1812f2fecd5..8df103744b5 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt index d8299995443..e5f624e893b 100644 --- a/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapMultifolderSpecifyOutputFile/node/sourcemapMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:../../outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/m1.js.map index 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt index 7337d98d30b..37f3a793697 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/sourcemapSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/amd/test.js.map index 66a78eca4fd..35110f566c5 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/m1.js.map index 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt index 7337d98d30b..37f3a793697 100644 --- a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/sourcemapSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSimpleNoOutdir/node/test.js.map index 66a78eca4fd..35110f566c5 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 973e11b0a2b..dcba20cf66a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 5a197e3071b..dcdfb881785 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt index 4b35efc9982..1d4ac548211 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/amd/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 973e11b0a2b..dcba20cf66a 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 5a197e3071b..dcdfb881785 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt index 4b35efc9982..1d4ac548211 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputDirectory/node/sourcemapSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4217335db62..f358b98d465 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt index 5ace4e9d141..bd56afebe59 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/amd/sourcemapSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4217335db62..f358b98d465 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt index 5ace4e9d141..bd56afebe59 100644 --- a/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSimpleSpecifyOutputFile/node/sourcemapSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt index e4128b4a255..0b09b971bcb 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/sourcemapSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/amd/test.js.map index 21ba47bba40..3cb3f00b46d 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt index e4128b4a255..0b09b971bcb 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/sourcemapSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSingleFileNoOutdir/node/test.js.map index 21ba47bba40..3cb3f00b46d 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 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 aab3485a17b..d2bb04b2226 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt index 5741483263b..dffdc150f71 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/amd/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 aab3485a17b..d2bb04b2226 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt index 5741483263b..dffdc150f71 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputDirectory/node/sourcemapSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt index d42a2d28902..127f06d960e 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/amd/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 4587ff981be..c15b0f9ed70 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt index d42a2d28902..127f06d960e 100644 --- a/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSingleFileSpecifyOutputFile/node/sourcemapSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt index a8cf87e7c6a..d35b75a2de1 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/sourcemapSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/amd/test.js.map index 3c65fcf31b8..a91cc4d9881 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 5ee69838f4d..da83de7ea2e 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt index a8cf87e7c6a..d35b75a2de1 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/sourcemapSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapSubfolderNoOutdir/node/test.js.map index 3c65fcf31b8..a91cc4d9881 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 071f3dc5770..0024c7c2747 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt index c8f714c3481..079673b4779 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/amd/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 6b66c0c4d64..b8be5eb8e01 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA"} \ No newline at end of file +{"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 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 071f3dc5770..0024c7c2747 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt index c8f714c3481..079673b4779 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputDirectory/node/sourcemapSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../../../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../../../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../../../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:../../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:../../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:../../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 9593afdf577..6882b70c389 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt index 5c3d682e6f9..9f06bde3b12 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/amd/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 9593afdf577..6882b70c389 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt index 5c3d682e6f9..9f06bde3b12 100644 --- a/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcemapSubfolderSpecifyOutputFile/node/sourcemapSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:../ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:../ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:../ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:../test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:../test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:../test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 bde211ed7de..04f168a6289 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index bdc09350720..ecf6b4f4fb4 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/test.js.map index c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 827f4db2a5e..0ce68e169af 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt index 22f075a2c26..65a337f5eab 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/sourcerootUrlMixedSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/test.js.map index c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 bde211ed7de..04f168a6289 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 8ea7277b999..0f0eb1aa02a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -189,37 +172,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -250,22 +222,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -294,16 +263,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -311,7 +274,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -336,21 +299,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -407,37 +367,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,16 +444,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -512,7 +455,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 827f4db2a5e..0ce68e169af 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 c084feb0fd0..2a21f422960 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":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt index 406569f1a8f..30caf09e890 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -188,37 +171,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -249,22 +221,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -293,16 +262,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -310,7 +273,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -335,22 +298,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -406,37 +366,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -494,16 +443,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -511,7 +454,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 af09cb956f6..156e391d669 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map index bde211ed7de..04f168a6289 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index c0b44f4c066..c2331c962e7 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 af09cb956f6..156e391d669 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map index 827f4db2a5e..0ce68e169af 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt index c11097c512b..96a83ac34b2 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/node/sourcerootUrlMixedSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 2b043394866..c5ec380afae 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map index bde211ed7de..04f168a6289 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/outdir/outAndOutDirFolder/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index 3b975d27540..d21b9752018 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -226,37 +203,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -314,16 +280,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -331,7 +291,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -401,37 +361,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -489,16 +438,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -506,7 +449,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 2b043394866..c5ec380afae 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","test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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","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;ACND,AAFA,iCAAiC;AACjC,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map index 827f4db2a5e..0ce68e169af 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/outdir/outAndOutDirFolder/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt index b7ac7d33ad9..a4436e03b4d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/node/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: outAndOutDirFile.js @@ -225,37 +202,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -313,16 +279,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -330,7 +290,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -400,37 +360,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(14, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(14, 5) Source(4, 7) + SourceIndex(1) -3 >Emitted(14, 7) Source(4, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1) -2 >Emitted(15, 14) Source(4, 7) + SourceIndex(1) name (c1) -3 >Emitted(15, 16) Source(4, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -488,16 +437,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1) -2 >Emitted(20, 10) Source(9, 10) + SourceIndex(1) -3 >Emitted(20, 12) Source(9, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -505,7 +448,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a5693661025..3b00d82ab66 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 7f3d01c0a85..8c257bd1111 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index 7263a0ae155..287e688b603 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index c74a9f9eede..74fe0bb17da 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 5c7f2c8f36a..058e405b606 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 695098ebde0..e7f54a4a2e1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt index 40b76f21939..625e81c4738 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/sourcerootUrlModuleMultifolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index 5590b2868b3..4ac74c2fcdb 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 7f3d01c0a85..8c257bd1111 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 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 c74a9f9eede..74fe0bb17da 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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 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 a5693661025..3b00d82ab66 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index 1b74fbd815d..270469d093c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 695098ebde0..e7f54a4a2e1 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 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 5590b2868b3..4ac74c2fcdb 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 5c7f2c8f36a..058e405b606 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt index d76b985a334..f2cac8f7a2a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map index a5693661025..3b00d82ab66 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map index 7f3d01c0a85..8c257bd1111 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index 84bf18ede48..adbd280cf16 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -224,37 +201,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> var m2_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -285,22 +251,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_c1 = m2_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m2_instance1 = new m2_c1(); 1->^^^^ @@ -329,16 +292,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>> function m2_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m2_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^^^^^ @@ -346,7 +303,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -371,21 +328,18 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>> exports.m2_f1 = m2_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m2.js.map=================================================================== @@ -434,37 +388,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(4, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -495,22 +438,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(4, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(6, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(6, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -539,16 +479,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(9, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -556,7 +490,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -581,22 +515,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(9, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(9, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(11, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(11, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map index c74a9f9eede..74fe0bb17da 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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":"+GAAO,EAAE,EACF,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"+GAAO,EAAE,EACF,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map index 5c7f2c8f36a..058e405b606 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map index 695098ebde0..e7f54a4a2e1 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt index d3e0be31cee..eb2dff17042 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/sourcerootUrlModuleMultifolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:outputdir_module_multifolder/ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: m2.js @@ -222,37 +199,26 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -283,22 +249,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_c1 = m2_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m2_c1 -3 > -4 > m2_c1 { - > public m2_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m2_instance1 = new m2_c1(); 1-> @@ -327,16 +290,10 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m2_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m2_instance1; 1->^^^^ @@ -344,7 +301,7 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m2_f1() { > 2 > return 3 > @@ -369,22 +326,19 @@ sourceFile:outputdir_module_multifolder_ref/m2.ts >>>exports.m2_f1 = m2_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m2_f1 -3 > -4 > m2_f1() { - > return m2_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m2.js.map=================================================================== JsFile: test.js @@ -465,37 +419,26 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 14) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 14) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -526,22 +469,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(4, 14) + SourceIndex(0) -4 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) -5 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) +3 >Emitted(9, 16) Source(6, 2) + SourceIndex(0) +4 >Emitted(9, 17) Source(6, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -570,16 +510,10 @@ sourceFile:outputdir_module_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(11, 10) Source(9, 17) + SourceIndex(0) -3 >Emitted(11, 12) Source(9, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -587,7 +521,7 @@ sourceFile:outputdir_module_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -612,22 +546,19 @@ sourceFile:outputdir_module_multifolder/test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(14, 1) Source(9, 17) + SourceIndex(0) 2 >Emitted(14, 11) Source(9, 19) + SourceIndex(0) -3 >Emitted(14, 14) Source(9, 17) + SourceIndex(0) -4 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) -5 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) +3 >Emitted(14, 16) Source(11, 2) + SourceIndex(0) +4 >Emitted(14, 17) Source(11, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map index 5590b2868b3..4ac74c2fcdb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 28f51d9cf9f..6751f2f82cd 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index 2d8655bf2d9..ebdcadc16ac 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index 761cf1c1321..9232d211fa0 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 8a497cdfecd..ca45773f423 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt index a2cd8b55903..75f6eb83940 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/sourcerootUrlModuleSimpleNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map index f48ab4302b1..41d3e11e995 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 28f51d9cf9f..6751f2f82cd 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 761cf1c1321..9232d211fa0 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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 23ddea644c2..51ff0fd9524 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 8a497cdfecd..ca45773f423 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 f48ab4302b1..41d3e11e995 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt index 3fb8deb4f10..c4f12e28fe8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/sourcerootUrlModuleSimpleSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map index 28f51d9cf9f..6751f2f82cd 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 9704c194922..a36050cc7e8 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map index 761cf1c1321..9232d211fa0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/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":"iEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"iEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map index 8a497cdfecd..ca45773f423 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt index 597cf7020bf..4d3c5799e27 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/sourcerootUrlModuleSimpleSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map index f48ab4302b1..41d3e11e995 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 3ce04bc4f21..6c5413f630e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index 22a1042ad84..9bc68f9c969 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index 4fd5727d384..870292fffa0 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 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 e4234c0ce9f..35e7e9a48dd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt index f2fa457dc41..7fc9e0c1f60 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/sourcerootUrlModuleSubfolderNoOutdir.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index 8726f12b557..d0638b6c34c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 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 3ce04bc4f21..6c5413f630e 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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 4fd5727d384..870292fffa0 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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 120acb4a22c..6d5b4ab1218 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ 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 e4234c0ce9f..35e7e9a48dd 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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 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 8726f12b557..d0638b6c34c 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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt index 211d8310054..c97d88b3d59 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map index 3ce04bc4f21..6c5413f630e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;QAAlBA,SAAaA,KAAKA;QAElBC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,GAAL,KAEZ,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC,SAAgB,KAAK;QACjBE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 05c95c9165c..b376e70b5af 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -29,37 +29,26 @@ sourceFile:ref/m1.ts --- >>> var m1_c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 14) + SourceIndex(0) -3 >Emitted(3, 14) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(4, 18) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(4, 23) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -90,22 +79,19 @@ sourceFile:ref/m1.ts >>> exports.m1_c1 = m1_c1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 21) Source(2, 14) + SourceIndex(0) -4 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) -5 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) +3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0) +4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0) --- >>> exports.m1_instance1 = new m1_c1(); 1->^^^^ @@ -134,16 +120,10 @@ sourceFile:ref/m1.ts --- >>> function m1_f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > m1_f1 1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(7, 17) + SourceIndex(0) -3 >Emitted(10, 19) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^^^^^ @@ -151,7 +131,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -176,21 +156,18 @@ sourceFile:ref/m1.ts >>> exports.m1_f1 = m1_f1; 1->^^^^ 2 > ^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ +3 > ^^^^^^^^ +4 > ^ 1-> 2 > m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 21) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) -5 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) +3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0) +4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=m1.js.map=================================================================== @@ -232,37 +209,26 @@ sourceFile:test.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 9) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 11) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 18) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 20) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 9) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 10) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -293,22 +259,19 @@ sourceFile:test.ts >>> exports.c1 = c1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 18) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 20) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 21) Source(5, 2) + SourceIndex(0) --- >>> exports.instance1 = new c1(); 1->^^^^ @@ -337,16 +300,10 @@ sourceFile:test.ts --- >>> function f1() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export function -3 > f1 1 >Emitted(10, 5) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 14) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 16) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^^^^^ @@ -354,7 +311,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -379,22 +336,19 @@ sourceFile:test.ts >>> exports.f1 = f1; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 5) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 15) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 18) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 20) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 21) Source(10, 2) + SourceIndex(0) --- >>> exports.a2 = m1.m1_c1; 1->^^^^ diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map index 4fd5727d384..870292fffa0 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/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":"qEAAO,EAAE;IACE,UAAE,GAAG,EAAE,CAAC;IACnB,IAAa,EAAE;QAAfA,SAAaA,EAAEA;QAEfC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,GAAF,EAEZ,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC,SAAgB,EAAE;QACdE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,GAAF,EAEf,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":["c1","c1.constructor","f1"],"mappings":"qEAAO,EAAE;IACE,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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map index e4234c0ce9f..35e7e9a48dd 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,KAAK;IAAlBA,SAAaA,KAAKA;IAElBC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,GAAL,KAEZ,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC,SAAgB,KAAK;IACjBE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,GAAL,KAEf,CAAA"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt index 0e378aace84..cf41966a818 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/sourcerootUrlModuleSubfolderSpecifyOutputFile.sourcemap.txt @@ -28,37 +28,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 14) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > export class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->export class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -89,22 +78,19 @@ sourceFile:ref/m1.ts >>>exports.m1_c1 = m1_c1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >m1_c1 -3 > -4 > m1_c1 { - > public m1_c1_p1: number; - > } -5 > +3 > { + > 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, 17) Source(2, 14) + SourceIndex(0) -4 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) -5 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) +3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0) +4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0) --- >>>exports.m1_instance1 = new m1_c1(); 1-> @@ -133,16 +119,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > m1_f1 1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(7, 17) + SourceIndex(0) -3 >Emitted(9, 15) Source(7, 22) + SourceIndex(0) --- >>> return exports.m1_instance1; 1->^^^^ @@ -150,7 +130,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function m1_f1() { > 2 > return 3 > @@ -175,22 +155,19 @@ sourceFile:ref/m1.ts >>>exports.m1_f1 = m1_f1; 1-> 2 >^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >m1_f1 -3 > -4 > m1_f1() { - > return m1_instance1; - > } -5 > +3 > () { + > 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, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) -5 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) +3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0) +4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=m1.js.map=================================================================== JsFile: test.js @@ -246,37 +223,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >export class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 14) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 16) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 14) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -307,22 +273,19 @@ sourceFile:test.ts >>>exports.c1 = c1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> 1-> 2 >c1 -3 > -4 > c1 { - > public p1: number; - > } -5 > +3 > { + > 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, 14) Source(3, 14) + SourceIndex(0) -4 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) -5 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) +3 >Emitted(8, 16) Source(5, 2) + SourceIndex(0) +4 >Emitted(8, 17) Source(5, 2) + SourceIndex(0) --- >>>exports.instance1 = new c1(); 1-> @@ -351,16 +314,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >export function -3 > f1 1 >Emitted(10, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(8, 17) + SourceIndex(0) -3 >Emitted(10, 12) Source(8, 19) + SourceIndex(0) --- >>> return exports.instance1; 1->^^^^ @@ -368,7 +325,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^^^^^^^^^ 5 > ^ -1->() { +1->export function f1() { > 2 > return 3 > @@ -393,22 +350,19 @@ sourceFile:test.ts >>>exports.f1 = f1; 1-> 2 >^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 >f1 -3 > -4 > f1() { - > return instance1; - > } -5 > +3 > () { + > return instance1; + > } +4 > 1->Emitted(13, 1) Source(8, 17) + SourceIndex(0) 2 >Emitted(13, 11) Source(8, 19) + SourceIndex(0) -3 >Emitted(13, 14) Source(8, 17) + SourceIndex(0) -4 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) -5 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) +3 >Emitted(13, 16) Source(10, 2) + SourceIndex(0) +4 >Emitted(13, 17) Source(10, 2) + SourceIndex(0) --- >>>exports.a2 = m1.m1_c1; 1-> diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map index 8726f12b557..d0638b6c34c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/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,IAAa,EAAE;IAAfA,SAAaA,EAAEA;IAEfC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAFY,UAAE,GAAF,EAEZ,CAAA;AAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC,SAAgB,EAAE;IACdE,MAAMA,CAACA,iBAASA,CAACA;AACrBA,CAACA;AAFe,UAAE,GAAF,EAEf,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/diskFile0.js.map index 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt index 336519863e2..f5758392a22 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/sourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/amd/test.js.map index 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/diskFile0.js.map index 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt index 336519863e2..f5758392a22 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/sourcerootUrlMultifolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlMultifolderNoOutdir/node/test.js.map index 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 5698aa393c1..309061b94ed 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/amd/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 018b71e572c..64aafef0915 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 4c01d4f1055..63113a47468 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":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AAEA,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 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 57143a47b4b..e652c011c17 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt index 5698aa393c1..309061b94ed 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputDirectory/node/sourcerootUrlMultifolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -191,37 +174,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m2_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -279,16 +251,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m2_instance1; 1->^^^^ @@ -296,7 +262,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -372,37 +338,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c1) -2 >Emitted(5, 14) Source(4, 7) + SourceIndex(0) name (c1) -3 >Emitted(5, 16) Source(4, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(6, 5) Source(6, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(6, 6) Source(6, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -460,16 +415,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(10, 10) Source(9, 10) + SourceIndex(0) -3 >Emitted(10, 12) Source(9, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -477,7 +426,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ece3a005e75..df7254bd000 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 522133b61a4..2903da82815 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/amd/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 ece3a005e75..df7254bd000 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,IAAM,KAAK;IAAXC,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACND,AAFA,iCAAiC;AACjC,0DAA0D;IACtD,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 diff --git a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt index 522133b61a4..2903da82815 100644 --- a/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlMultifolderSpecifyOutputFile/node/sourcerootUrlMultifolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:outputdir_multifolder/ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:outputdir_multifolder/ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -185,37 +168,26 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>var m2_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m2_c1 1->Emitted(12, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(12, 5) Source(2, 7) + SourceIndex(1) -3 >Emitted(12, 10) Source(2, 12) + SourceIndex(1) --- >>> function m2_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m2_c1 1->Emitted(13, 5) Source(2, 1) + SourceIndex(1) name (m2_c1) -2 >Emitted(13, 14) Source(2, 7) + SourceIndex(1) name (m2_c1) -3 >Emitted(13, 19) Source(2, 12) + SourceIndex(1) name (m2_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m2_c1 { > public m2_c1_p1: number; > 2 > } -1 >Emitted(14, 5) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor) +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) --- >>> return m2_c1; @@ -273,16 +245,10 @@ sourceFile:outputdir_multifolder_ref/m2.ts --- >>>function m2_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m2_f1 1 >Emitted(18, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(18, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(18, 15) Source(7, 15) + SourceIndex(1) --- >>> return m2_instance1; 1->^^^^ @@ -290,7 +256,7 @@ sourceFile:outputdir_multifolder_ref/m2.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m2_f1() { > 2 > return 3 > @@ -360,37 +326,26 @@ sourceFile:outputdir_multifolder/test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(24, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(24, 5) Source(4, 7) + SourceIndex(2) -3 >Emitted(24, 7) Source(4, 9) + SourceIndex(2) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(25, 5) Source(4, 1) + SourceIndex(2) name (c1) -2 >Emitted(25, 14) Source(4, 7) + SourceIndex(2) name (c1) -3 >Emitted(25, 16) Source(4, 9) + SourceIndex(2) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) +1->Emitted(26, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor) 2 >Emitted(26, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor) --- >>> return c1; @@ -448,16 +403,10 @@ sourceFile:outputdir_multifolder/test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(30, 1) Source(9, 1) + SourceIndex(2) -2 >Emitted(30, 10) Source(9, 10) + SourceIndex(2) -3 >Emitted(30, 12) Source(9, 12) + SourceIndex(2) --- >>> return instance1; 1->^^^^ @@ -465,7 +414,7 @@ sourceFile:outputdir_multifolder/test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/m1.js.map index c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt index 0c278b8a07a..6784e74b54c 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/sourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/amd/test.js.map index 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/m1.js.map index c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt index 0c278b8a07a..6784e74b54c 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/sourcerootUrlSimpleNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSimpleNoOutdir/node/test.js.map index 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 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 c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 376e7fbb742..b6a9d4f8786 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/amd/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 c455ec2516d..d920bbe078d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 228d40908fb..ec67c8da25b 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":"AACA,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt index 376e7fbb742..b6a9d4f8786 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputDirectory/node/sourcerootUrlSimpleSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 8610dc814fc..a107f15c1bf 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 013a0298c46..a4f350382a6 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/amd/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 8610dc814fc..a107f15c1bf 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,6BAA6B;IACzB,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,6BAA6B;IACzB,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt index 013a0298c46..a4f350382a6 100644 --- a/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSimpleSpecifyOutputFile/node/sourcerootUrlSimpleSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt index 5f492905cc1..ac21898e23f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/sourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/amd/test.js.map index 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt index 5f492905cc1..ac21898e23f 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/sourcerootUrlSingleFileNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSingleFileNoOutdir/node/test.js.map index 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index c37a154dd9f..cdd78604f75 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/amd/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt index c37a154dd9f..cdd78604f75 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputDirectory/node/sourcerootUrlSingleFileSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 1dd8da6ea41..54961a153f9 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/amd/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 95cbff86f91..a1be429da80 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,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt index 1dd8da6ea41..54961a153f9 100644 --- a/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSingleFileSpecifyOutputFile/node/sourcerootUrlSingleFileSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (c1) -3 >Emitted(3, 16) Source(2, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -119,16 +108,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 12) Source(7, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt index d66cc473768..333f432766e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/sourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/amd/test.js.map index 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt index d66cc473768..333f432766e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/sourcerootUrlSubfolderNoOutdir.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlSubfolderNoOutdir/node/test.js.map index 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 0d8c0c34ca8..68dc81acc3e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/amd/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 dead527f9b0..b8fe7026610 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,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":["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 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 129e7217134..7a5bbb049d9 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":"AACA,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARA,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["c1","c1.constructor","f1"],"mappings":"AACA,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt index 0d8c0c34ca8..68dc81acc3e 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputDirectory/node/sourcerootUrlSubfolderSpecifyOutputDirectory.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -201,37 +184,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 9) + SourceIndex(0) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c1) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c1) -3 >Emitted(4, 16) Source(3, 9) + SourceIndex(0) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) +1->Emitted(5, 5) Source(5, 1) + SourceIndex(0) name (c1.constructor) 2 >Emitted(5, 6) Source(5, 2) + SourceIndex(0) name (c1.constructor) --- >>> return c1; @@ -289,16 +261,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(9, 10) Source(8, 10) + SourceIndex(0) -3 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) --- >>> return instance1; 1->^^^^ @@ -306,7 +272,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 677ccf1596d..6e45ee8da7d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index 627fd896eb6..3ca3d1774f8 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/amd/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > 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 677ccf1596d..6e45ee8da7d 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,IAAM,KAAK;IAAXA,SAAMA,KAAKA;IAEXC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B,SAAS,KAAK;IACVE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACPD,AADA,iCAAiC;IAC7B,EAAE,GAAG,EAAE,CAAC;AACZ,IAAM,EAAE;IAARC,SAAMA,EAAEA;IAERC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB,SAAS,EAAE;IACPE,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":["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;ACPD,AADA,iCAAiC;IAC7B,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 diff --git a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt index 627fd896eb6..3ca3d1774f8 100644 --- a/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt +++ b/tests/baselines/reference/project/sourcerootUrlSubfolderSpecifyOutputFile/node/sourcerootUrlSubfolderSpecifyOutputFile.sourcemap.txt @@ -31,37 +31,26 @@ sourceFile:ref/m1.ts --- >>>var m1_c1 = (function () { 1-> -2 >^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > m1_c1 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 12) + SourceIndex(0) --- >>> function m1_c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ +2 > ^^-> 1-> -2 > class -3 > m1_c1 1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m1_c1) -2 >Emitted(3, 14) Source(2, 7) + SourceIndex(0) name (m1_c1) -3 >Emitted(3, 19) Source(2, 12) + SourceIndex(0) name (m1_c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^-> -1 > { +1->class m1_c1 { > public m1_c1_p1: number; > 2 > } -1 >Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m1_c1.constructor) +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) --- >>> return m1_c1; @@ -119,16 +108,10 @@ sourceFile:ref/m1.ts --- >>>function m1_f1() { 1 > -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > m1_f1 1 >Emitted(8, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(8, 10) Source(7, 10) + SourceIndex(0) -3 >Emitted(8, 15) Source(7, 15) + SourceIndex(0) --- >>> return m1_instance1; 1->^^^^ @@ -136,7 +119,7 @@ sourceFile:ref/m1.ts 3 > ^ 4 > ^^^^^^^^^^^^ 5 > ^ -1->() { +1->function m1_f1() { > 2 > return 3 > @@ -195,37 +178,26 @@ sourceFile:test.ts --- >>>var c1 = (function () { 1-> -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >class -3 > c1 1->Emitted(13, 1) Source(3, 1) + SourceIndex(1) -2 >Emitted(13, 5) Source(3, 7) + SourceIndex(1) -3 >Emitted(13, 7) Source(3, 9) + SourceIndex(1) --- >>> function c1() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > class -3 > c1 1->Emitted(14, 5) Source(3, 1) + SourceIndex(1) name (c1) -2 >Emitted(14, 14) Source(3, 7) + SourceIndex(1) name (c1) -3 >Emitted(14, 16) Source(3, 9) + SourceIndex(1) name (c1) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->class c1 { > public p1: number; > 2 > } -1 >Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) name (c1.constructor) 2 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) name (c1.constructor) --- >>> return c1; @@ -283,16 +255,10 @@ sourceFile:test.ts --- >>>function f1() { 1 > -2 >^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >function -3 > f1 1 >Emitted(19, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(19, 10) Source(8, 10) + SourceIndex(1) -3 >Emitted(19, 12) Source(8, 12) + SourceIndex(1) --- >>> return instance1; 1->^^^^ @@ -300,7 +266,7 @@ sourceFile:test.ts 3 > ^ 4 > ^^^^^^^^^ 5 > ^ -1->() { +1->function f1() { > 2 > return 3 > diff --git a/tests/baselines/reference/promiseChaining.js b/tests/baselines/reference/promiseChaining.js index ce15e2d44c1..acf6b715175 100644 --- a/tests/baselines/reference/promiseChaining.js +++ b/tests/baselines/reference/promiseChaining.js @@ -19,7 +19,13 @@ var Chain = (function () { Chain.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }); // No error + var z = this.then(function (x) { + return result; + }) /*S*/.then(function (x) { + return "abc"; + }) /*string*/.then(function (x) { + return x.length; + }); // No error return new Chain(result); }; return Chain; diff --git a/tests/baselines/reference/promiseChaining1.js b/tests/baselines/reference/promiseChaining1.js index 001f1ffc1a6..54e5064809e 100644 --- a/tests/baselines/reference/promiseChaining1.js +++ b/tests/baselines/reference/promiseChaining1.js @@ -19,7 +19,13 @@ var Chain2 = (function () { Chain2.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*Function*/.then(function (x) { return x.length; }); // Should error on "abc" because it is not a Function + var z = this.then(function (x) { + return result; + }) /*S*/.then(function (x) { + return "abc"; + }) /*Function*/.then(function (x) { + return x.length; + }); // Should error on "abc" because it is not a Function return new Chain2(result); }; return Chain2; diff --git a/tests/baselines/reference/promiseChaining2.js b/tests/baselines/reference/promiseChaining2.js index ed03ab2c97a..88b601aad82 100644 --- a/tests/baselines/reference/promiseChaining2.js +++ b/tests/baselines/reference/promiseChaining2.js @@ -19,7 +19,13 @@ var Chain2 = (function () { Chain2.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }).then(function (x) { return "abc"; }).then(function (x) { return x.length; }); + var z = this.then(function (x) { + return result; + }).then(function (x) { + return "abc"; + }).then(function (x) { + return x.length; + }); return new Chain2(result); }; return Chain2; diff --git a/tests/baselines/reference/promisePermutations.js b/tests/baselines/reference/promisePermutations.js index e59e49d6f8c..83b1f251e61 100644 --- a/tests/baselines/reference/promisePermutations.js +++ b/tests/baselines/reference/promisePermutations.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations2.js b/tests/baselines/reference/promisePermutations2.js index a7b5d8cf835..9a321e03667 100644 --- a/tests/baselines/reference/promisePermutations2.js +++ b/tests/baselines/reference/promisePermutations2.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations3.js b/tests/baselines/reference/promisePermutations3.js index eb9c882b971..cbee4093a65 100644 --- a/tests/baselines/reference/promisePermutations3.js +++ b/tests/baselines/reference/promisePermutations3.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promiseTypeInference.js b/tests/baselines/reference/promiseTypeInference.js index 6faf131438a..8124c4b03a8 100644 --- a/tests/baselines/reference/promiseTypeInference.js +++ b/tests/baselines/reference/promiseTypeInference.js @@ -12,4 +12,6 @@ var $$x = load("something").then(s => convert(s)); //// [promiseTypeInference.js] -var $$x = load("something").then(function (s) { return convert(s); }); +var $$x = load("something").then(function (s) { + return convert(s); +}); diff --git a/tests/baselines/reference/properties.js.map b/tests/baselines/reference/properties.js.map index d47694825ec..6e68d36e346 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,IAAM,OAAO;IAAbA,SAAMA,OAAOA;IAWbC,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":["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 diff --git a/tests/baselines/reference/properties.sourcemap.txt b/tests/baselines/reference/properties.sourcemap.txt index 7ef028e33c0..9ff77cc2c5d 100644 --- a/tests/baselines/reference/properties.sourcemap.txt +++ b/tests/baselines/reference/properties.sourcemap.txt @@ -10,33 +10,22 @@ sourceFile:properties.ts ------------------------------------------------------------------- >>>var MyClass = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >class -3 > MyClass 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 12) Source(2, 14) + SourceIndex(0) --- >>> function MyClass() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ +2 > ^^-> 1-> -2 > class -3 > MyClass 1->Emitted(2, 5) Source(2, 1) + SourceIndex(0) name (MyClass) -2 >Emitted(2, 14) Source(2, 7) + SourceIndex(0) name (MyClass) -3 >Emitted(2, 21) Source(2, 14) + SourceIndex(0) name (MyClass) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +1->class MyClass >{ > public get Count(): number > { @@ -49,7 +38,7 @@ sourceFile:properties.ts > } > 2 > } -1 >Emitted(3, 5) Source(13, 1) + SourceIndex(0) name (MyClass.constructor) +1->Emitted(3, 5) Source(13, 1) + SourceIndex(0) name (MyClass.constructor) 2 >Emitted(3, 6) Source(13, 2) + SourceIndex(0) name (MyClass.constructor) --- >>> Object.defineProperty(MyClass.prototype, "Count", { diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 9295ce43b26..d646ca40763 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -176,15 +176,28 @@ var Compass; Compass[Compass["East"] = 2] = "East"; Compass[Compass["West"] = 3] = "West"; })(Compass || (Compass = {})); -var numIndex = { 3: 'three', 'three': 'three' }; -var strIndex = { 'N': Compass.North, 'E': Compass.East }; +var numIndex = { + 3: 'three', + 'three': 'three' +}; +var strIndex = { + 'N': Compass.North, + 'E': Compass.East +}; var bothIndex; -function noIndex() { } +function noIndex() { +} var obj = { 10: 'ten', x: 'hello', y: 32, - z: { n: 'world', m: 15, o: function () { return false; } }, + z: { + n: 'world', + m: 15, + o: function () { + return false; + } + }, 'literal property': 100 }; var anyVar = {}; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 88baee7752e..81cdcec5434 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -92,7 +92,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 941adc7ab43..eb3770bc0b3 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -67,7 +67,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index fe3c9433796..3a88ec832f7 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -54,7 +54,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.js b/tests/baselines/reference/propertyAndAccessorWithSameName.js index f8978ac4d18..f466483cede 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.js +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.js @@ -36,7 +36,8 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { } // error + set: function (v) { + } // error , enumerable: true, configurable: true @@ -50,7 +51,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.js b/tests/baselines/reference/propertyAndFunctionWithSameName.js index eb0b437fd5c..ec5f1903e8a 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.js @@ -23,6 +23,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.x = function (v) { }; // error + D.prototype.x = function (v) { + }; // error return D; })(); diff --git a/tests/baselines/reference/propertyOrdering.js b/tests/baselines/reference/propertyOrdering.js index f0f4644a983..1dc930f93a1 100644 --- a/tests/baselines/reference/propertyOrdering.js +++ b/tests/baselines/reference/propertyOrdering.js @@ -31,7 +31,9 @@ var Foo = (function () { Foo.prototype.foo = function () { return this._store.length; // shouldn't be an error }; - Foo.prototype.bar = function () { return this.store; }; // should be an error + Foo.prototype.bar = function () { + return this.store; + }; // should be an error return Foo; })(); var Bar = (function () { diff --git a/tests/baselines/reference/propertyWrappedInTry.js b/tests/baselines/reference/propertyWrappedInTry.js index e7f8a28d688..459e35f91ae 100644 --- a/tests/baselines/reference/propertyWrappedInTry.js +++ b/tests/baselines/reference/propertyWrappedInTry.js @@ -28,7 +28,8 @@ var Foo = (function () { try { bar = someInitThatMightFail(); } -catch (e) { } +catch (e) { +} baz(); { return this.bar; // doesn't get rewritten to Foo.bar. diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js index 19ec9f50d27..63c6929e8b7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js @@ -37,20 +37,34 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.foo; }; + C.prototype.foo = function () { + return this.foo; + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.foo; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.foo; + }; + C.bar = function () { + this.foo(); + }; return C; })(); // added level of function nesting @@ -60,40 +74,54 @@ var C2 = (function () { Object.defineProperty(C2.prototype, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.prototype.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; Object.defineProperty(C2, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; C2.bar = function () { var _this = this; - (function () { return _this.foo(); }); + (function () { + return _this.foo(); + }); }; return C2; })(); diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 28a1da5ffec..381d10f43ea 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -38,20 +38,36 @@ var C = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.x; }; - C.prototype.bar = function () { return this.foo(); }; + C.prototype.foo = function () { + return this.x; + }; + C.prototype.bar = function () { + return this.foo(); + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.x; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.x; + }; + C.bar = function () { + this.foo(); + }; return C; })(B); diff --git a/tests/baselines/reference/protoAssignment.errors.txt b/tests/baselines/reference/protoAssignment.errors.txt index b87f97e7c04..37c443ba74e 100644 --- a/tests/baselines/reference/protoAssignment.errors.txt +++ b/tests/baselines/reference/protoAssignment.errors.txt @@ -4,7 +4,7 @@ tests/cases/compiler/protoAssignment.ts(2,26): error TS2304: Cannot find name 'C ==== tests/cases/compiler/protoAssignment.ts (1 errors) ==== interface Number extends Comparable { - ~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'Comparable'. compareTo(other: number); diff --git a/tests/baselines/reference/prototypes.js b/tests/baselines/reference/prototypes.js index 4d7ddc4a4d5..4ecdafb3dc4 100644 --- a/tests/baselines/reference/prototypes.js +++ b/tests/baselines/reference/prototypes.js @@ -7,5 +7,6 @@ f.prototype; //// [prototypes.js] Object.prototype; // ok new Object().prototype; // error -function f() { } +function f() { +} f.prototype; diff --git a/tests/baselines/reference/qualifiedModuleLocals.js b/tests/baselines/reference/qualifiedModuleLocals.js index b7ba5b70e81..2909be7639d 100644 --- a/tests/baselines/reference/qualifiedModuleLocals.js +++ b/tests/baselines/reference/qualifiedModuleLocals.js @@ -13,8 +13,11 @@ A.a(); //// [qualifiedModuleLocals.js] var A; (function (A) { - function b() { } - function a() { A.b(); } + function b() { + } + function a() { + A.b(); + } A.a = a; // A.b should be an unresolved symbol error })(A || (A = {})); A.a(); diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.errors.txt b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.errors.txt index 3b2cdf44194..21bf243dfcb 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.errors.txt +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts(5,20): error TS2305: Module 'Alpha' has no exported member 'x'. +tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts(5,26): error TS2305: Module 'Alpha' has no exported member 'x'. ==== tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts (1 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class- } class Beta extends Alpha.x { - ~~~~~~~ + ~ !!! error TS2305: Module 'Alpha' has no exported member 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/quotedAccessorName1.js b/tests/baselines/reference/quotedAccessorName1.js index 69e0fdb2c8e..93fd5b8dd6b 100644 --- a/tests/baselines/reference/quotedAccessorName1.js +++ b/tests/baselines/reference/quotedAccessorName1.js @@ -8,7 +8,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/quotedAccessorName2.js b/tests/baselines/reference/quotedAccessorName2.js index 5d2d4861550..43041a29bf4 100644 --- a/tests/baselines/reference/quotedAccessorName2.js +++ b/tests/baselines/reference/quotedAccessorName2.js @@ -8,7 +8,9 @@ var C = (function () { function C() { } Object.defineProperty(C, "foo", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/quotedFunctionName1.js b/tests/baselines/reference/quotedFunctionName1.js index 69f4f2cfaa3..28d75186474 100644 --- a/tests/baselines/reference/quotedFunctionName1.js +++ b/tests/baselines/reference/quotedFunctionName1.js @@ -7,6 +7,7 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1.prototype["prop1"] = function () { }; + Test1.prototype["prop1"] = function () { + }; return Test1; })(); diff --git a/tests/baselines/reference/quotedFunctionName2.js b/tests/baselines/reference/quotedFunctionName2.js index 3173ec29f13..46d8d9bae9d 100644 --- a/tests/baselines/reference/quotedFunctionName2.js +++ b/tests/baselines/reference/quotedFunctionName2.js @@ -7,6 +7,7 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1["prop1"] = function () { }; + Test1["prop1"] = function () { + }; return Test1; })(); diff --git a/tests/baselines/reference/quotedPropertyName3.js b/tests/baselines/reference/quotedPropertyName3.js index 4191418e42a..8e6342e1ba3 100644 --- a/tests/baselines/reference/quotedPropertyName3.js +++ b/tests/baselines/reference/quotedPropertyName3.js @@ -13,7 +13,9 @@ var Test = (function () { } Test.prototype.foo = function () { var _this = this; - var x = function () { return _this["prop1"]; }; + var x = function () { + return _this["prop1"]; + }; var y = x(); }; return Test; diff --git a/tests/baselines/reference/rectype.js b/tests/baselines/reference/rectype.js index 15c5d9861f4..ed303b6b26e 100644 --- a/tests/baselines/reference/rectype.js +++ b/tests/baselines/reference/rectype.js @@ -16,7 +16,9 @@ module M { //// [rectype.js] var M; (function (M) { - function f(p) { return f; } + function f(p) { + return f; + } M.f = f; ; var i; diff --git a/tests/baselines/reference/recur1.js b/tests/baselines/reference/recur1.js index 37a8b6eb3f2..3dd0e14ad97 100644 --- a/tests/baselines/reference/recur1.js +++ b/tests/baselines/reference/recur1.js @@ -9,6 +9,8 @@ cobalt.pitch = function() {} //// [recur1.js] var salt = new salt.pepper(); -salt.pepper = function () { }; +salt.pepper = function () { +}; var cobalt = new cobalt.pitch(); -cobalt.pitch = function () { }; +cobalt.pitch = function () { +}; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index c475f604b14..69a71a4f79c 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -16,7 +16,8 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.func = function (param) { }; + C1.prototype.func = function (param) { + }; return C1; })(); var C2 = (function (_super) { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 4b115d3e722..f565f8f23d0 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -122,7 +122,9 @@ var Sample; var StartFindAction = (function () { function StartFindAction() { } - StartFindAction.prototype.getId = function () { return "yo"; }; + StartFindAction.prototype.getId = function () { + return "yo"; + }; StartFindAction.prototype.run = function (Thing) { return true; }; @@ -146,9 +148,11 @@ var Sample; // scenario 1 codeThing.addWidget("addWidget", this); } - FindWidget.prototype.gar = function (runner) { if (true) { - return runner(this); - } }; + FindWidget.prototype.gar = function (runner) { + if (true) { + return runner(this); + } + }; FindWidget.prototype.getDomNode = function () { return domNode; }; @@ -163,7 +167,9 @@ var Sample; var AbstractMode = (function () { function AbstractMode() { } - AbstractMode.prototype.getInitialState = function () { return null; }; + AbstractMode.prototype.getInitialState = function () { + return null; + }; return AbstractMode; })(); var Sample; @@ -184,7 +190,9 @@ var Sample; State.prototype.equals = function (other) { return this === other; }; - State.prototype.getMode = function () { return mode; }; + State.prototype.getMode = function () { + return mode; + }; return State; })(); PlainText.State = State; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index a2c623e2cf5..d77875f10e4 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,QAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC,IAAaA,eAAeA;oBAA5BC,SAAaA,eAAeA;oBAQ5BC,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,GAAfA,eAQZA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,aAAIA,KAAJA,aAAIA,QAU/BA;QAADA,CAACA,EAVqBD,KAAKA,GAALA,aAAKA,KAALA,aAAKA,QAU1BA;IAADA,CAACA,EAVaD,OAAOA,GAAPA,cAAOA,KAAPA,cAAOA,QAUpBA;AAADA,CAACA,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAACA,IAAAA,KAAKA,CAoBlBA;IApBaA,WAAAA,KAAKA;QAACQ,IAAAA,OAAOA,CAoB1BA;QApBmBA,WAAAA,OAAOA,EAACA,CAACA;YAC5BC,IAAaA,UAAUA;gBAKtBC,SALYA,UAAUA,CAKFA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA,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,GAAVA,UAkBZA,CAAAA;QACFA,CAACA,EApBmBD,OAAOA,GAAPA,aAAOA,KAAPA,aAAOA,QAoB1BA;IAADA,CAACA,EApBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAoBlBA;AAADA,CAACA,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD,IAAM,YAAY;IAAlBe,SAAMA,YAAYA;IAAqEC,CAACA;IAA3CD,sCAAeA,GAAtBA,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,IAAaA,KAAKA;oBACXC,SADMA,KAAKA,CACSA,IAAWA;wBAAXC,SAAIA,GAAJA,IAAIA,CAAOA;oBAAIA,CAACA;oBACnCD,qBAAKA,GAAZA;wBACCE,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBAEMF,sBAAMA,GAAbA,UAAcA,KAAYA;wBACzBG,MAAMA,CAACA,IAAIA,KAAKA,KAAKA,CAACA;oBACvBA,CAACA;oBAEMH,uBAAOA,GAAdA,cAA0BI,MAAMA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,GAALA,KAWZA,CAAAA;gBAEDA,IAAaA,IAAIA;oBAASM,UAAbA,IAAIA,UAAqBA;oBAAtCA,SAAaA,IAAIA;wBAASC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,GAAJA,IAQZA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"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,QAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC;oBAAAC;oBAQAC,CAACA;oBANOD,+BAAKA,GAAZA;wBAAiBE,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,kBAQ3BA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,aAAIA,KAAJA,aAAIA,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;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA;oBAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;wBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;oBAAAA,CAACA;gBAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,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;QAAmCE,MAAMA,CAACA,IAAIA,CAACA;IAAAA,CAACA;IAACF,mBAACA;AAADA,CAACA,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAACf,IAAAA,KAAKA,CAwBlBA;IAxBaA,WAAAA,KAAKA;QAACQ,IAAAA,SAASA,CAwB5BA;QAxBmBA,WAAAA,SAASA;YAACU,IAAAA,SAASA,CAwBtCA;YAxB6BA,WAAAA,SAASA,EAACA,CAACA;gBAExCC;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;wBAA0BI,MAAMA,CAACA,IAAIA,CAACA;oBAACA,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 diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 8e4f3be36ff..47bb3f2d18a 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -215,33 +215,22 @@ sourceFile:recursiveClassReferenceTest.ts --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > StartFindAction 1->Emitted(17, 17) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(17, 21) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(17, 36) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > StartFindAction 1->Emitted(18, 21) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(18, 30) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(18, 45) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > implements Sample.Thing.IAction { +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->export class StartFindAction implements Sample.Thing.IAction { > > public getId() { return "yo"; } > @@ -251,59 +240,64 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1 >Emitted(19, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) +1->Emitted(19, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) 2 >Emitted(19, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) --- ->>> StartFindAction.prototype.getId = function () { return "yo"; }; +>>> StartFindAction.prototype.getId = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> 2 > getId 3 > -4 > public getId() { -5 > return -6 > -7 > "yo" -8 > ; -9 > -10> } 1->Emitted(20, 21) Source(35, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) 2 >Emitted(20, 52) Source(35, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) 3 >Emitted(20, 55) Source(35, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(20, 69) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -5 >Emitted(20, 75) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -6 >Emitted(20, 76) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -7 >Emitted(20, 80) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -8 >Emitted(20, 81) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -9 >Emitted(20, 82) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -10>Emitted(20, 83) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +--- +>>> return "yo"; +1 >^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getId() { +2 > return +3 > +4 > "yo" +5 > ; +1 >Emitted(21, 25) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(21, 31) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +3 >Emitted(21, 32) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +4 >Emitted(21, 36) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +5 >Emitted(21, 37) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(22, 21) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(22, 22) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) --- >>> StartFindAction.prototype.run = function (Thing) { -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^^^^^ -1 > +1-> > > public 2 > run 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(21, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(21, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(21, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(21, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -5 >Emitted(21, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(23, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(23, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(23, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +4 >Emitted(23, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +5 >Emitted(23, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -318,11 +312,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(22, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(22, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -3 >Emitted(22, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -4 >Emitted(22, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -5 >Emitted(22, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(24, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(24, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +3 >Emitted(24, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +4 >Emitted(24, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +5 >Emitted(24, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -331,8 +325,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(23, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(23, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(25, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(25, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -340,8 +334,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(24, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(24, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(26, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(26, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -361,36 +355,33 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(25, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(25, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(25, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(25, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1 >Emitted(27, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(27, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(27, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(27, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^ -6 > ^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^-> 1-> 2 > StartFindAction -3 > -4 > StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } -5 > -1->Emitted(26, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(26, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(26, 40) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(26, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) -5 >Emitted(26, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 > implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } +4 > +1->Emitted(28, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(28, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(28, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(28, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> })(Find = _Thing_1.Find || (_Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -422,15 +413,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(27, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(27, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(27, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(27, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(27, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(27, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -7 >Emitted(27, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -8 >Emitted(27, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -9 >Emitted(27, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +1->Emitted(29, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(29, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(29, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +4 >Emitted(29, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +5 >Emitted(29, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +6 >Emitted(29, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +7 >Emitted(29, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +8 >Emitted(29, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +9 >Emitted(29, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -462,15 +453,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(28, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(28, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(28, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(28, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -5 >Emitted(28, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -6 >Emitted(28, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -7 >Emitted(28, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -8 >Emitted(28, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +1 >Emitted(30, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) +2 >Emitted(30, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +3 >Emitted(30, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +4 >Emitted(30, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +5 >Emitted(30, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +6 >Emitted(30, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +7 >Emitted(30, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +8 >Emitted(30, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +9 >Emitted(30, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -501,15 +492,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(29, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(29, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(29, 8) Source(32, 15) + SourceIndex(0) name (Sample) -4 >Emitted(29, 15) Source(32, 22) + SourceIndex(0) name (Sample) -5 >Emitted(29, 18) Source(32, 15) + SourceIndex(0) name (Sample) -6 >Emitted(29, 32) Source(32, 22) + SourceIndex(0) name (Sample) -7 >Emitted(29, 37) Source(32, 15) + SourceIndex(0) name (Sample) -8 >Emitted(29, 51) Source(32, 22) + SourceIndex(0) name (Sample) -9 >Emitted(29, 59) Source(42, 2) + SourceIndex(0) name (Sample) +1->Emitted(31, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) +2 >Emitted(31, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(31, 8) Source(32, 15) + SourceIndex(0) name (Sample) +4 >Emitted(31, 15) Source(32, 22) + SourceIndex(0) name (Sample) +5 >Emitted(31, 18) Source(32, 15) + SourceIndex(0) name (Sample) +6 >Emitted(31, 32) Source(32, 22) + SourceIndex(0) name (Sample) +7 >Emitted(31, 37) Source(32, 15) + SourceIndex(0) name (Sample) +8 >Emitted(31, 51) Source(32, 22) + SourceIndex(0) name (Sample) +9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -536,13 +527,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(30, 1) Source(42, 1) + SourceIndex(0) name (Sample) -2 >Emitted(30, 2) Source(42, 2) + SourceIndex(0) name (Sample) -3 >Emitted(30, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(30, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(30, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(30, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(30, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(32, 1) Source(42, 1) + SourceIndex(0) name (Sample) +2 >Emitted(32, 2) Source(42, 2) + SourceIndex(0) name (Sample) +3 >Emitted(32, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(32, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(32, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(32, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(32, 29) Source(42, 2) + SourceIndex(0) --- >>>var Sample; 1 > @@ -576,10 +567,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(31, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(31, 5) Source(44, 8) + SourceIndex(0) -3 >Emitted(31, 11) Source(44, 14) + SourceIndex(0) -4 >Emitted(31, 12) Source(64, 2) + SourceIndex(0) +1 >Emitted(33, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(33, 5) Source(44, 8) + SourceIndex(0) +3 >Emitted(33, 11) Source(44, 14) + SourceIndex(0) +4 >Emitted(33, 12) Source(64, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -588,9 +579,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(32, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(32, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(32, 18) Source(44, 14) + SourceIndex(0) +1->Emitted(34, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -622,10 +613,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(33, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(33, 9) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(33, 14) Source(44, 20) + SourceIndex(0) name (Sample) -4 >Emitted(33, 15) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) name (Sample) +4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) name (Sample) --- >>> (function (Thing) { 1->^^^^ @@ -635,9 +626,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(34, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(34, 16) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(34, 21) Source(44, 20) + SourceIndex(0) name (Sample) +1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) name (Sample) --- >>> var Widgets; 1->^^^^^^^^ @@ -669,10 +660,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(35, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(35, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(35, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(35, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -686,52 +677,35 @@ sourceFile:recursiveClassReferenceTest.ts 3 > Widgets 4 > 5 > { -1->Emitted(36, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(36, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(36, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(36, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(36, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(38, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(38, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > FindWidget -1->Emitted(37, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(37, 17) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(37, 27) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^ -6 > ^^^-> -1-> implements Sample.Thing.IWidget { +2 > ^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^ +4 > ^^^-> +1->export class FindWidget implements Sample.Thing.IWidget { > > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} > > private domNode:any = null; > -2 > -3 > FindWidget -4 > implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private -5 > codeThing: Sample.Thing.ICodeThing -1->Emitted(38, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(38, 26) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(38, 36) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(38, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(38, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 > constructor(private +3 > codeThing: Sample.Thing.ICodeThing +1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -744,11 +718,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(39, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(39, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(39, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(39, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(39, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -761,11 +735,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(40, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(40, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(40, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(40, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(40, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -778,9 +752,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > 3 > // scenario 1 -1 >Emitted(41, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(41, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(41, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(43, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -804,108 +778,113 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(42, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(42, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(42, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(42, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(42, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -6 >Emitted(42, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -7 >Emitted(42, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -8 >Emitted(42, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -9 >Emitted(42, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -10>Emitted(42, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(43, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(43, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- ->>> FindWidget.prototype.gar = function (runner) { if (true) { +>>> FindWidget.prototype.gar = function (runner) { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^^^^^^ -6 > ^^^^ -7 > ^^ -8 > ^ -9 > ^ -10> ^^^^ -11> ^ -12> ^ -13> ^ 1-> 2 > gar 3 > 4 > public gar( 5 > runner:(widget:Sample.Thing.IWidget)=>any -6 > ) { -7 > if -8 > -9 > ( -10> true -11> ) -12> -13> { -1->Emitted(44, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(44, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(44, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(44, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(44, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -6 >Emitted(44, 64) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(44, 66) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(44, 67) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -9 >Emitted(44, 68) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -10>Emitted(44, 72) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -11>Emitted(44, 73) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -12>Emitted(44, 74) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -13>Emitted(44, 75) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- ->>> return runner(this); +>>> if (true) { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^ -3 > ^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^ -7 > ^ -8 > ^ -1 > -2 > return -3 > -4 > runner -5 > ( -6 > this -7 > ) -8 > ; -1 >Emitted(45, 21) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(45, 27) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(45, 28) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(45, 34) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -5 >Emitted(45, 35) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -6 >Emitted(45, 39) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(45, 40) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(45, 41) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 > ^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^^^^^^^^^^^^-> +1 >) { +2 > if +3 > +4 > ( +5 > true +6 > ) +7 > +8 > { +1 >Emitted(47, 21) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(47, 23) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(47, 24) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(47, 25) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(47, 29) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(47, 30) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(47, 31) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(47, 32) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- ->>> } }; +>>> return runner(this); +1->^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^ +1-> +2 > return +3 > +4 > runner +5 > ( +6 > this +7 > ) +8 > ; +1->Emitted(48, 25) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(48, 31) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(48, 32) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(48, 38) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(48, 39) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(48, 43) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(48, 44) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(48, 45) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +--- +>>> } +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(49, 21) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(49, 22) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +--- +>>> }; 1 >^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -3 > -4 > } -1 >Emitted(46, 17) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(46, 18) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(46, 19) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(46, 20) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(50, 17) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(50, 18) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -922,9 +901,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(47, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(47, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(47, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(51, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(51, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(51, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -938,11 +917,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(48, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(48, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -3 >Emitted(48, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -4 >Emitted(48, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -5 >Emitted(48, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(52, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(52, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +3 >Emitted(52, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +4 >Emitted(52, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +5 >Emitted(52, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -951,8 +930,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(49, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(49, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(53, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(53, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -963,9 +942,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(50, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(50, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(50, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(54, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(54, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(54, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -975,8 +954,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(51, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) -2 >Emitted(51, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +1 >Emitted(55, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +2 >Emitted(55, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -985,8 +964,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(52, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(52, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(56, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(56, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -1016,46 +995,43 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(53, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(53, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(53, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(53, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1 >Emitted(57, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(57, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(57, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(57, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^-> 1-> 2 > FindWidget -3 > -4 > FindWidget implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private codeThing: Sample.Thing.ICodeThing) { - > // scenario 1 - > codeThing.addWidget("addWidget", this); - > } - > - > public getDomNode() { - > return domNode; - > } - > - > public destroy() { - > - > } - > - > } -5 > -1->Emitted(54, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(54, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(54, 34) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(54, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) -5 >Emitted(54, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +3 > implements Sample.Thing.IWidget { + > + > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} + > + > private domNode:any = null; + > constructor(private codeThing: Sample.Thing.ICodeThing) { + > // scenario 1 + > codeThing.addWidget("addWidget", this); + > } + > + > public getDomNode() { + > return domNode; + > } + > + > public destroy() { + > + > } + > + > } +4 > +1->Emitted(58, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(58, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(58, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(58, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1097,15 +1073,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(55, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(55, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(55, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(55, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(55, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(55, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(55, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(55, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(55, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(59, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(59, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(59, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(59, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(59, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(59, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(59, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(59, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(59, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1146,15 +1122,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(56, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(56, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(56, 8) Source(44, 15) + SourceIndex(0) name (Sample) -4 >Emitted(56, 13) Source(44, 20) + SourceIndex(0) name (Sample) -5 >Emitted(56, 16) Source(44, 15) + SourceIndex(0) name (Sample) -6 >Emitted(56, 28) Source(44, 20) + SourceIndex(0) name (Sample) -7 >Emitted(56, 33) Source(44, 15) + SourceIndex(0) name (Sample) -8 >Emitted(56, 45) Source(44, 20) + SourceIndex(0) name (Sample) -9 >Emitted(56, 53) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(60, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(60, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(60, 8) Source(44, 15) + SourceIndex(0) name (Sample) +4 >Emitted(60, 13) Source(44, 20) + SourceIndex(0) name (Sample) +5 >Emitted(60, 16) Source(44, 15) + SourceIndex(0) name (Sample) +6 >Emitted(60, 28) Source(44, 20) + SourceIndex(0) name (Sample) +7 >Emitted(60, 33) Source(44, 15) + SourceIndex(0) name (Sample) +8 >Emitted(60, 45) Source(44, 20) + SourceIndex(0) name (Sample) +9 >Emitted(60, 53) Source(64, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -1192,88 +1168,82 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(57, 1) Source(64, 1) + SourceIndex(0) name (Sample) -2 >Emitted(57, 2) Source(64, 2) + SourceIndex(0) name (Sample) -3 >Emitted(57, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(57, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(57, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(57, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(57, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(61, 1) Source(64, 1) + SourceIndex(0) name (Sample) +2 >Emitted(61, 2) Source(64, 2) + SourceIndex(0) name (Sample) +3 >Emitted(61, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(61, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(61, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(61, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(61, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > >interface IMode { getInitialState(): IState;} > -2 >class -3 > AbstractMode -1->Emitted(58, 1) Source(67, 1) + SourceIndex(0) -2 >Emitted(58, 5) Source(67, 7) + SourceIndex(0) -3 >Emitted(58, 17) Source(67, 19) + SourceIndex(0) +1->Emitted(62, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^^^ +2 > ^^-> 1-> -2 > class -3 > AbstractMode -1->Emitted(59, 5) Source(67, 1) + SourceIndex(0) name (AbstractMode) -2 >Emitted(59, 14) Source(67, 7) + SourceIndex(0) name (AbstractMode) -3 >Emitted(59, 26) Source(67, 19) + SourceIndex(0) name (AbstractMode) +1->Emitted(63, 5) Source(67, 1) + SourceIndex(0) name (AbstractMode) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > implements IMode { public getInitialState(): IState { return null;} +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1 >Emitted(60, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode.constructor) -2 >Emitted(60, 6) Source(67, 89) + SourceIndex(0) name (AbstractMode.constructor) +1->Emitted(64, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode.constructor) +2 >Emitted(64, 6) Source(67, 89) + SourceIndex(0) name (AbstractMode.constructor) --- ->>> AbstractMode.prototype.getInitialState = function () { return null; }; +>>> AbstractMode.prototype.getInitialState = function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> 2 > getInitialState 3 > -4 > public getInitialState(): IState { -5 > return -6 > -7 > null -8 > ; -9 > -10> } -1->Emitted(61, 5) Source(67, 46) + SourceIndex(0) name (AbstractMode) -2 >Emitted(61, 43) Source(67, 61) + SourceIndex(0) name (AbstractMode) -3 >Emitted(61, 46) Source(67, 39) + SourceIndex(0) name (AbstractMode) -4 >Emitted(61, 60) Source(67, 74) + SourceIndex(0) name (AbstractMode.getInitialState) -5 >Emitted(61, 66) Source(67, 80) + SourceIndex(0) name (AbstractMode.getInitialState) -6 >Emitted(61, 67) Source(67, 81) + SourceIndex(0) name (AbstractMode.getInitialState) -7 >Emitted(61, 71) Source(67, 85) + SourceIndex(0) name (AbstractMode.getInitialState) -8 >Emitted(61, 72) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -9 >Emitted(61, 73) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -10>Emitted(61, 74) Source(67, 87) + SourceIndex(0) name (AbstractMode.getInitialState) +1->Emitted(65, 5) Source(67, 46) + SourceIndex(0) name (AbstractMode) +2 >Emitted(65, 43) Source(67, 61) + SourceIndex(0) name (AbstractMode) +3 >Emitted(65, 46) Source(67, 39) + SourceIndex(0) name (AbstractMode) +--- +>>> return null; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getInitialState(): IState { +2 > return +3 > +4 > null +5 > ; +1 >Emitted(66, 9) Source(67, 74) + SourceIndex(0) name (AbstractMode.getInitialState) +2 >Emitted(66, 15) Source(67, 80) + SourceIndex(0) name (AbstractMode.getInitialState) +3 >Emitted(66, 16) Source(67, 81) + SourceIndex(0) name (AbstractMode.getInitialState) +4 >Emitted(66, 20) Source(67, 85) + SourceIndex(0) name (AbstractMode.getInitialState) +5 >Emitted(66, 21) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(67, 5) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) +2 >Emitted(67, 6) Source(67, 87) + SourceIndex(0) name (AbstractMode.getInitialState) --- >>> return AbstractMode; -1 >^^^^ +1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(62, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(62, 24) Source(67, 89) + SourceIndex(0) name (AbstractMode) +1->Emitted(68, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode) +2 >Emitted(68, 24) Source(67, 89) + SourceIndex(0) name (AbstractMode) --- >>>})(); 1 > @@ -1285,10 +1255,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(63, 1) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(63, 2) Source(67, 89) + SourceIndex(0) name (AbstractMode) -3 >Emitted(63, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(63, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(69, 1) Source(67, 88) + SourceIndex(0) name (AbstractMode) +2 >Emitted(69, 2) Source(67, 89) + SourceIndex(0) name (AbstractMode) +3 >Emitted(69, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(69, 6) Source(67, 89) + SourceIndex(0) --- >>>var Sample; 1-> @@ -1333,10 +1303,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(64, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(64, 5) Source(76, 8) + SourceIndex(0) -3 >Emitted(64, 11) Source(76, 14) + SourceIndex(0) -4 >Emitted(64, 12) Source(100, 2) + SourceIndex(0) +1->Emitted(70, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(70, 5) Source(76, 8) + SourceIndex(0) +3 >Emitted(70, 11) Source(76, 14) + SourceIndex(0) +4 >Emitted(70, 12) Source(100, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1345,9 +1315,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(65, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(65, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(65, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(71, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(71, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(71, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1383,10 +1353,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(66, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(66, 9) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(66, 14) Source(76, 20) + SourceIndex(0) name (Sample) -4 >Emitted(66, 15) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(72, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(72, 9) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(72, 14) Source(76, 20) + SourceIndex(0) name (Sample) +4 >Emitted(72, 15) Source(100, 2) + SourceIndex(0) name (Sample) --- >>> (function (Thing) { 1->^^^^ @@ -1396,9 +1366,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(67, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(67, 16) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(67, 21) Source(76, 20) + SourceIndex(0) name (Sample) +1->Emitted(73, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(73, 16) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(73, 21) Source(76, 20) + SourceIndex(0) name (Sample) --- >>> var Languages; 1->^^^^^^^^ @@ -1434,10 +1404,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(68, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(68, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(68, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(68, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(74, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(74, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(74, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(74, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1446,9 +1416,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(69, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(69, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(75, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(75, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(75, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1484,10 +1454,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(70, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(70, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(70, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(70, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1 >Emitted(76, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(76, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(76, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(76, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1501,45 +1471,32 @@ sourceFile:recursiveClassReferenceTest.ts 3 > PlainText 4 > 5 > { -1->Emitted(71, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(71, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(71, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(71, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(71, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(77, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(77, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(77, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(77, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(77, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > -2 > export class -3 > State -1->Emitted(72, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(72, 21) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(72, 26) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(78, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^ -5 > ^^^^ -6 > ^^^-> -1-> implements IState { +2 > ^^^^^^^^^^^^^^^ +3 > ^^^^ +4 > ^^^-> +1->export class State implements IState { > -2 > -3 > State -4 > implements IState { - > constructor(private -5 > mode: IMode -1->Emitted(73, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(73, 30) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(73, 35) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(73, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(73, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 > constructor(private +3 > mode: IMode +1->Emitted(79, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(79, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(79, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1552,11 +1509,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(74, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(74, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -3 >Emitted(74, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -4 >Emitted(74, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -5 >Emitted(74, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1->Emitted(80, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(80, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +3 >Emitted(80, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +4 >Emitted(80, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +5 >Emitted(80, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1564,8 +1521,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(75, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(75, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1 >Emitted(81, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(81, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1575,9 +1532,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(76, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(76, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(76, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(82, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(82, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(82, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1591,11 +1548,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(77, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(77, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -3 >Emitted(77, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -4 >Emitted(77, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -5 >Emitted(77, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(83, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(83, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +3 >Emitted(83, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +4 >Emitted(83, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +5 >Emitted(83, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1604,8 +1561,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(78, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(78, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(84, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(84, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1620,11 +1577,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(79, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(79, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(79, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(79, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(79, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(85, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(85, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(85, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +4 >Emitted(85, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +5 >Emitted(85, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1642,66 +1599,71 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(80, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(80, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -3 >Emitted(80, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -4 >Emitted(80, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -5 >Emitted(80, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -6 >Emitted(80, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -7 >Emitted(80, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(86, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(86, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +3 >Emitted(86, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +4 >Emitted(86, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +5 >Emitted(86, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +6 >Emitted(86, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +7 >Emitted(86, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(81, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(81, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(87, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(87, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- ->>> State.prototype.getMode = function () { return mode; }; +>>> State.prototype.getMode = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> > > public 2 > getMode 3 > -4 > public getMode(): IMode { -5 > return -6 > -7 > mode -8 > ; -9 > -10> } -1->Emitted(82, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(82, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(82, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(82, 61) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -5 >Emitted(82, 67) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -6 >Emitted(82, 68) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -7 >Emitted(82, 72) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -8 >Emitted(82, 73) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -9 >Emitted(82, 74) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -10>Emitted(82, 75) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +1->Emitted(88, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(88, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(88, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +--- +>>> return mode; +1 >^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getMode(): IMode { +2 > return +3 > +4 > mode +5 > ; +1 >Emitted(89, 25) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(89, 31) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +3 >Emitted(89, 32) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +4 >Emitted(89, 36) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +5 >Emitted(89, 37) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(90, 21) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(90, 22) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) --- >>> return State; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^ -1 > +1-> > 2 > } -1 >Emitted(83, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(83, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(91, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(91, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1724,87 +1686,66 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(84, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(84, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(84, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(84, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1 >Emitted(92, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(92, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(92, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(92, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^-> 1-> 2 > State -3 > -4 > State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } -5 > -1->Emitted(85, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(85, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(85, 35) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(85, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(85, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 > implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } +4 > +1->Emitted(93, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(93, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(93, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(93, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > -2 > export class -3 > Mode -1->Emitted(86, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(86, 21) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(86, 25) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(94, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^^^ -4 > ^^^^^^^^^^ -1-> extends -2 > -3 > Mode -4 > extends AbstractMode -1->Emitted(87, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(87, 31) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(87, 35) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -4 >Emitted(87, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1->export class Mode extends +2 > AbstractMode +1->Emitted(95, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(95, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 > export class -3 > Mode -1 >Emitted(88, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(88, 30) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(88, 34) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1 >Emitted(96, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> extends +1->export class Mode extends 2 > AbstractMode -1->Emitted(89, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(89, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1->Emitted(97, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(97, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1820,8 +1761,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(90, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(90, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1 >Emitted(98, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(98, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1829,8 +1770,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(91, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(91, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(99, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(99, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1840,9 +1781,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(92, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(92, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(92, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(100, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(100, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(100, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1864,15 +1805,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(93, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(93, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -3 >Emitted(93, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -4 >Emitted(93, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -5 >Emitted(93, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -6 >Emitted(93, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -7 >Emitted(93, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -8 >Emitted(93, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -9 >Emitted(93, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(101, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(101, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +3 >Emitted(101, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +4 >Emitted(101, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +5 >Emitted(101, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +6 >Emitted(101, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +7 >Emitted(101, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +8 >Emitted(101, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +9 >Emitted(101, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1881,8 +1822,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(94, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(94, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(102, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(102, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1893,8 +1834,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(95, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(95, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(103, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(103, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> })(AbstractMode); 1->^^^^^^^^^^^^^^^^ @@ -1918,38 +1859,35 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(96, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(96, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(96, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(96, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(96, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -6 >Emitted(96, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(104, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(104, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(104, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(104, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +5 >Emitted(104, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +6 >Emitted(104, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > Mode -3 > -4 > Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } -5 > -1->Emitted(97, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(97, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(97, 34) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(97, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(97, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 > extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } +4 > +1->Emitted(105, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(105, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(105, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(105, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1995,15 +1933,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(98, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(98, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(98, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(98, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(98, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -6 >Emitted(98, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -7 >Emitted(98, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -8 >Emitted(98, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -9 >Emitted(98, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(106, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(106, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(106, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(106, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(106, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +6 >Emitted(106, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +7 >Emitted(106, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +8 >Emitted(106, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +9 >Emitted(106, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -2048,15 +1986,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(99, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(99, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(99, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(99, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(99, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(99, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(99, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(99, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(99, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1 >Emitted(107, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(107, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(107, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(107, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(107, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(107, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(107, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(107, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(107, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -2101,15 +2039,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(100, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(100, 8) Source(76, 15) + SourceIndex(0) name (Sample) -4 >Emitted(100, 13) Source(76, 20) + SourceIndex(0) name (Sample) -5 >Emitted(100, 16) Source(76, 15) + SourceIndex(0) name (Sample) -6 >Emitted(100, 28) Source(76, 20) + SourceIndex(0) name (Sample) -7 >Emitted(100, 33) Source(76, 15) + SourceIndex(0) name (Sample) -8 >Emitted(100, 45) Source(76, 20) + SourceIndex(0) name (Sample) -9 >Emitted(100, 53) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(108, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(108, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(108, 8) Source(76, 15) + SourceIndex(0) name (Sample) +4 >Emitted(108, 13) Source(76, 20) + SourceIndex(0) name (Sample) +5 >Emitted(108, 16) Source(76, 15) + SourceIndex(0) name (Sample) +6 >Emitted(108, 28) Source(76, 20) + SourceIndex(0) name (Sample) +7 >Emitted(108, 33) Source(76, 15) + SourceIndex(0) name (Sample) +8 >Emitted(108, 45) Source(76, 20) + SourceIndex(0) name (Sample) +9 >Emitted(108, 53) Source(100, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -2151,12 +2089,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(101, 1) Source(100, 1) + SourceIndex(0) name (Sample) -2 >Emitted(101, 2) Source(100, 2) + SourceIndex(0) name (Sample) -3 >Emitted(101, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(101, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(101, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(101, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(101, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(109, 1) Source(100, 1) + SourceIndex(0) name (Sample) +2 >Emitted(109, 2) Source(100, 2) + SourceIndex(0) name (Sample) +3 >Emitted(109, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(109, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(109, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(109, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(109, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js index 8123273846f..1a9e00675a7 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js @@ -14,8 +14,7 @@ import ClassB = require("recursiveExportAssignmentAndFindAliasedType4_moduleB"); export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType4_moduleC.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType4_moduleC"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType4_moduleB.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js index 8dc0bca5fb0..dd94524bfa2 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js @@ -18,12 +18,10 @@ import ClassB = require("recursiveExportAssignmentAndFindAliasedType5_moduleB"); export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType5_moduleD.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType5_moduleC"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType5_moduleC.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType5_moduleD"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType5_moduleB.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js index 666f5a996bb..792f09b5579 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js @@ -22,16 +22,13 @@ import ClassB = require("recursiveExportAssignmentAndFindAliasedType6_moduleB"); export var b: ClassB; // This should result in type ClassB //// [recursiveExportAssignmentAndFindAliasedType6_moduleE.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType6_moduleC"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleD.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType6_moduleE"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleC.js] -define(["require", "exports", "recursiveExportAssignmentAndFindAliasedType6_moduleD"], function (require, exports, self) { - return self; +define(["require", "exports"], function (require, exports) { }); //// [recursiveExportAssignmentAndFindAliasedType6_moduleB.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index 30f6c7aa41f..c69549403c4 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -7,7 +7,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(12,16): error TS2355: A function tests/cases/compiler/recursiveFunctionTypes.ts(17,5): error TS2322: Type '() => I' is not assignable to type 'number'. tests/cases/compiler/recursiveFunctionTypes.ts(22,5): error TS2345: Argument of type 'number' is not assignable to parameter of type '(t: typeof g) => void'. tests/cases/compiler/recursiveFunctionTypes.ts(25,1): error TS2322: Type 'number' is not assignable to type '() => any'. -tests/cases/compiler/recursiveFunctionTypes.ts(30,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/recursiveFunctionTypes.ts(30,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/recursiveFunctionTypes.ts(33,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/recursiveFunctionTypes.ts(34,4): error TS2345: Argument of type 'string' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. tests/cases/compiler/recursiveFunctionTypes.ts(42,1): error TS2346: Supplied parameters do not match any signature of call target. @@ -62,7 +62,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of function f6(): typeof f6; function f6(a: typeof f6): () => number; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2394: Overload signature is not compatible with function implementation. function f6(a?: any) { return f6; } diff --git a/tests/baselines/reference/recursiveFunctionTypes.js b/tests/baselines/reference/recursiveFunctionTypes.js index 040c323066d..6f10ef99080 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.js +++ b/tests/baselines/reference/recursiveFunctionTypes.js @@ -45,27 +45,39 @@ f7(""); // ok (function takes an any param) f7(); // ok //// [recursiveFunctionTypes.js] -function fn() { return 1; } +function fn() { + return 1; +} var x = fn; // error var y = fn; // ok var f; var g; -function f1(d) { } -function f2() { } -function g2() { } -function f3() { return f3; } +function f1(d) { +} +function f2() { +} +function g2() { +} +function f3() { + return f3; +} var a = f3; // error var C = (function () { function C() { } - C.g = function (t) { }; + C.g = function (t) { + }; return C; })(); C.g(3); // error var f4; f4 = 3; // error -function f5() { return f5; } -function f6(a) { return f6; } +function f5() { + return f5; +} +function f6(a) { + return f6; +} f6("", 3); // error (arity mismatch) f6(""); // ok (function takes an any param) f6(); // ok diff --git a/tests/baselines/reference/recursiveFunctionTypes1.js b/tests/baselines/reference/recursiveFunctionTypes1.js index c4c255d5e44..2f2d072cb6b 100644 --- a/tests/baselines/reference/recursiveFunctionTypes1.js +++ b/tests/baselines/reference/recursiveFunctionTypes1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.g = function (t) { }; + C.g = function (t) { + }; return C; })(); diff --git a/tests/baselines/reference/recursiveGetterAccess.js b/tests/baselines/reference/recursiveGetterAccess.js index 1dea2e02d3a..cf042c2c1a0 100644 --- a/tests/baselines/reference/recursiveGetterAccess.js +++ b/tests/baselines/reference/recursiveGetterAccess.js @@ -10,7 +10,9 @@ var MyClass = (function () { function MyClass() { } Object.defineProperty(MyClass.prototype, "testProp", { - get: function () { return this.testProp; }, + get: function () { + return this.testProp; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/recursiveIdenticalOverloadResolution.js b/tests/baselines/reference/recursiveIdenticalOverloadResolution.js index 3c53c2b2a0a..e1ea203ac5b 100644 --- a/tests/baselines/reference/recursiveIdenticalOverloadResolution.js +++ b/tests/baselines/reference/recursiveIdenticalOverloadResolution.js @@ -20,7 +20,9 @@ module M { //// [recursiveIdenticalOverloadResolution.js] var M; (function (M) { - function f(p) { return f; } + function f(p) { + return f; + } ; var i; f(i); diff --git a/tests/baselines/reference/recursiveInference1.js b/tests/baselines/reference/recursiveInference1.js index 3a26ead542d..839e13130f2 100644 --- a/tests/baselines/reference/recursiveInference1.js +++ b/tests/baselines/reference/recursiveInference1.js @@ -3,5 +3,7 @@ function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } var result = fib(5); //// [recursiveInference1.js] -function fib(x) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } +function fib(x) { + return x <= 1 ? x : fib(x - 1) + fib(x - 2); +} var result = fib(5); diff --git a/tests/baselines/reference/recursiveInferenceBug.js b/tests/baselines/reference/recursiveInferenceBug.js index 5b4d4f0c0a1..cffa96415dc 100644 --- a/tests/baselines/reference/recursiveInferenceBug.js +++ b/tests/baselines/reference/recursiveInferenceBug.js @@ -17,6 +17,9 @@ function f(x) { return x; } var zz = { - g: function () { }, - get f() { return "abc"; } + g: function () { + }, + get f() { + return "abc"; + } }; diff --git a/tests/baselines/reference/recursiveInheritance3.js b/tests/baselines/reference/recursiveInheritance3.js index bc9fb6cb4f9..710b691fa94 100644 --- a/tests/baselines/reference/recursiveInheritance3.js +++ b/tests/baselines/reference/recursiveInheritance3.js @@ -13,6 +13,8 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); diff --git a/tests/baselines/reference/recursiveInitializer.js b/tests/baselines/reference/recursiveInitializer.js index 82abf2b50af..2b33e873cb1 100644 --- a/tests/baselines/reference/recursiveInitializer.js +++ b/tests/baselines/reference/recursiveInitializer.js @@ -35,4 +35,6 @@ var b2 = !!b2; var b3 = !b3 || b3; // expected boolean here. actually 'any' var b4 = (!b4) && b4; // expected boolean here. actually 'any' // (x:string) => any -var f = function (x) { return f(x); }; +var f = function (x) { + return f(x); +}; diff --git a/tests/baselines/reference/recursiveLetConst.errors.txt b/tests/baselines/reference/recursiveLetConst.errors.txt new file mode 100644 index 00000000000..b02d0819a3f --- /dev/null +++ b/tests/baselines/reference/recursiveLetConst.errors.txt @@ -0,0 +1,47 @@ +tests/cases/compiler/recursiveLetConst.ts(2,9): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(3,12): error TS2448: Block-scoped variable 'x1' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(4,11): error TS2448: Block-scoped variable 'y' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(5,14): error TS2448: Block-scoped variable 'y1' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(6,14): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(7,16): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(9,15): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(10,17): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped variable 'x2' used before its declaration. + + +==== tests/cases/compiler/recursiveLetConst.ts (10 errors) ==== + 'use strict' + let x = x + 1; + ~ +!!! error TS2448: Block-scoped variable 'x' used before its declaration. + let [x1] = x1 + 1; + ~~ +!!! error TS2448: Block-scoped variable 'x1' used before its declaration. + const y = y + 2; + ~ +!!! error TS2448: Block-scoped variable 'y' used before its declaration. + const [y1] = y1 + 1; + ~~ +!!! error TS2448: Block-scoped variable 'y1' used before its declaration. + for (let v = v; ; ) { } + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + for (let [v] = v; ;) { } + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + for (let v in v) { } + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + for (let v of v) { } + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + for (let [v] of v) { } + ~ +!!! error TS2448: Block-scoped variable 'v' used before its declaration. + let [x2 = x2] = [] + ~~ +!!! error TS2448: Block-scoped variable 'x2' used before its declaration. + let z0 = () => z0; + let z1 = function () { return z1; } + let z2 = { f() { return z2;}} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveLetConst.js b/tests/baselines/reference/recursiveLetConst.js new file mode 100644 index 00000000000..7d9aea3a754 --- /dev/null +++ b/tests/baselines/reference/recursiveLetConst.js @@ -0,0 +1,42 @@ +//// [recursiveLetConst.ts] +'use strict' +let x = x + 1; +let [x1] = x1 + 1; +const y = y + 2; +const [y1] = y1 + 1; +for (let v = v; ; ) { } +for (let [v] = v; ;) { } +for (let v in v) { } +for (let v of v) { } +for (let [v] of v) { } +let [x2 = x2] = [] +let z0 = () => z0; +let z1 = function () { return z1; } +let z2 = { f() { return z2;}} + +//// [recursiveLetConst.js] +'use strict'; +let x = x + 1; +let [x1] = x1 + 1; +const y = y + 2; +const [y1] = y1 + 1; +for (let v = v;;) { +} +for (let [v] = v;;) { +} +for (let v in v) { +} +for (let v of v) { +} +for (let [v] of v) { +} +let [x2 = x2] = []; +let z0 = () => z0; +let z1 = function () { + return z1; +}; +let z2 = { + f() { + return z2; + } +}; diff --git a/tests/baselines/reference/recursiveObjectLiteral.js b/tests/baselines/reference/recursiveObjectLiteral.js index 70de48d2499..80c512a8280 100644 --- a/tests/baselines/reference/recursiveObjectLiteral.js +++ b/tests/baselines/reference/recursiveObjectLiteral.js @@ -2,4 +2,6 @@ var a = { f: a }; //// [recursiveObjectLiteral.js] -var a = { f: a }; +var a = { + f: a +}; diff --git a/tests/baselines/reference/recursiveProperties.js b/tests/baselines/reference/recursiveProperties.js index 84d9ebcd27c..63644484956 100644 --- a/tests/baselines/reference/recursiveProperties.js +++ b/tests/baselines/reference/recursiveProperties.js @@ -12,7 +12,9 @@ var A = (function () { function A() { } Object.defineProperty(A.prototype, "testProp", { - get: function () { return this.testProp; }, + get: function () { + return this.testProp; + }, enumerable: true, configurable: true }); @@ -22,7 +24,9 @@ var B = (function () { function B() { } Object.defineProperty(B.prototype, "testProp", { - set: function (value) { this.testProp = value; }, + set: function (value) { + this.testProp = value; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/recursiveReturns.js b/tests/baselines/reference/recursiveReturns.js index 18c9ed4dd7c..d01825f8cbf 100644 --- a/tests/baselines/reference/recursiveReturns.js +++ b/tests/baselines/reference/recursiveReturns.js @@ -20,7 +20,9 @@ function R1() { R1(); return; } -function R2() { R2(); } +function R2() { + R2(); +} function R3(n) { if (n == 0) { } diff --git a/tests/baselines/reference/recursiveTypeComparison2.errors.txt b/tests/baselines/reference/recursiveTypeComparison2.errors.txt index ce6311c0089..5c1200ceec6 100644 --- a/tests/baselines/reference/recursiveTypeComparison2.errors.txt +++ b/tests/baselines/reference/recursiveTypeComparison2.errors.txt @@ -15,7 +15,7 @@ tests/cases/compiler/recursiveTypeComparison2.ts(13,80): error TS2304: Cannot fi log(): Observable; combine(other: Observable, f: (a: T, b: U) => V): Property; withStateMachine(initState: U, f: (state: U, event: Event) => StateValue): EventStream; - ~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2304: Cannot find name 'StateValue'. decode(mapping: Object): Property; awaiting(other: Observable): Property; diff --git a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js index 0cef9be47ab..b056e90e909 100644 --- a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js +++ b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js @@ -59,9 +59,13 @@ function foo(x) { function foo2(x) { } function other() { - function foo3(x) { } - function foo4(x) { } - function foo5(x) { return null; } + function foo3(x) { + } + function foo4(x) { + } + function foo5(x) { + return null; + } var list; var myList; var r = foo5(list); diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt new file mode 100644 index 00000000000..bd307bb89ae --- /dev/null +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/redeclareParameterInCatchBlock.ts(5,11): error TS2492: Cannot redeclare identifier 'e' in catch clause +tests/cases/compiler/redeclareParameterInCatchBlock.ts(11,9): error TS2492: Cannot redeclare identifier 'e' in catch clause + + +==== tests/cases/compiler/redeclareParameterInCatchBlock.ts (2 errors) ==== + + try { + + } catch(e) { + const e = null; + ~ +!!! error TS2492: Cannot redeclare identifier 'e' in catch clause + } + + try { + + } catch(e) { + let e; + ~ +!!! error TS2492: Cannot redeclare identifier 'e' in catch clause + } + + try { + + } catch(e) { + function test() { + let e; + } + } + + \ No newline at end of file diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.js b/tests/baselines/reference/redeclareParameterInCatchBlock.js new file mode 100644 index 00000000000..704d56676bf --- /dev/null +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.js @@ -0,0 +1,42 @@ +//// [redeclareParameterInCatchBlock.ts] + +try { + +} catch(e) { + const e = null; +} + +try { + +} catch(e) { + let e; +} + +try { + +} catch(e) { + function test() { + let e; + } +} + + + +//// [redeclareParameterInCatchBlock.js] +try { +} +catch (e) { + const e = null; +} +try { +} +catch (e) { + let e; +} +try { +} +catch (e) { + function test() { + let e; + } +} diff --git a/tests/baselines/reference/redefineArray.js b/tests/baselines/reference/redefineArray.js index 080d2b1a2d2..93494232436 100644 --- a/tests/baselines/reference/redefineArray.js +++ b/tests/baselines/reference/redefineArray.js @@ -2,4 +2,6 @@ Array = function (n:number, s:string) {return n;}; //// [redefineArray.js] -Array = function (n, s) { return n; }; +Array = function (n, s) { + return n; +}; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 24f0e7f1bcb..608090e8722 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1036,31 +1036,41 @@ var rionegrensis; caniventer.prototype.salomonseni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.uchidai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.raffrayana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.Uranium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.nayaur = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return caniventer; @@ -1074,31 +1084,41 @@ var rionegrensis; veraecrucis.prototype.naso = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.vancouverensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.africana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.palliolata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.nivicola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return veraecrucis; @@ -1119,31 +1139,41 @@ var julianae; nudicaudus.prototype.brandtii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.maxwellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.endoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.venezuelae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.zamicrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nudicaudus; @@ -1155,43 +1185,57 @@ var julianae; galapagoensis.prototype.isabellae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.rueppellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.peregusna = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.gliroides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.banakrisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.rozendaali = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.stuhlmanni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return galapagoensis; @@ -1203,43 +1247,57 @@ var julianae; albidens.prototype.mattheyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.Astatine = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.vincenti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.hirta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.virginianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.macrophyllum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.porcellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return albidens; @@ -1253,79 +1311,105 @@ var julianae; oralis.prototype.cepapi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.porteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.bindi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.puda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.mindorensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.ignitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.rufus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.monax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.unalascensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.wuchihensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.leucippe = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.ordii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.eisentrauti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oralis; @@ -1339,43 +1423,57 @@ var julianae; sumatrana.prototype.wolffsohni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.geata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.awashensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.sturdeei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.pachyurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.lyelli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.neohibernicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sumatrana; @@ -1387,67 +1485,89 @@ var julianae; gerbillus.prototype.pundti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.tristrami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.swarthi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.horsfieldii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.diazi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.rennelli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.maulinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.muscina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.pelengensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.abramus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.reevesi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gerbillus; @@ -1459,73 +1579,97 @@ var julianae; acariensis.prototype.levicula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.minous = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.cinereiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.longicaudatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.baeodon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.soricoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.datae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.spixii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.anakuma = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.kihaulei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.gymnura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.olchonensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return acariensis; @@ -1539,19 +1683,25 @@ var julianae; durangae.prototype.Californium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; durangae.prototype.Flerovium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; durangae.prototype.phrudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return durangae; @@ -1566,13 +1716,17 @@ var ruatanica; hector.prototype.humulis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; hector.prototype.eurycerus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return hector; @@ -1587,19 +1741,25 @@ var Lanthanum; suillus.prototype.spilosoma = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; suillus.prototype.tumbalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; suillus.prototype.anatolicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return suillus; @@ -1613,61 +1773,81 @@ var Lanthanum; nitidus.prototype.granatensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.negligens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.lewisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.arge = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.dominicensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.taurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.tonganus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.silvatica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.midas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.bicornis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nitidus; @@ -1681,49 +1861,65 @@ var Lanthanum; megalonyx.prototype.phillipsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.melanogaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.elaphus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.elater = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.ourebi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.caraccioli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.parva = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.albipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return megalonyx; @@ -1735,85 +1931,113 @@ var Lanthanum; jugularis.prototype.torrei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.revoili = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.macrobullatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.compactus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.talpinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.stramineus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.dartmouthi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.ogilbyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.incomtus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.surdaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.melanorhinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.picticaudata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.pomona = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.ileile = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return jugularis; @@ -1830,85 +2054,113 @@ var rendalli; zuluensis.prototype.telfairi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.keyensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.occasius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.damarensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.Neptunium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.griseoflavus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.thar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.alborufus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.fusicaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.gordonorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.ruber = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.desmarestianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.lutillus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.salocco = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return zuluensis; @@ -1920,61 +2172,81 @@ var rendalli; moojeni.prototype.floweri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.montosa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.miletus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.heaneyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.marchei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.budini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.maggietaylorae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.poliocephalus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.zibethicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.biacensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return moojeni; @@ -1988,19 +2260,25 @@ var rendalli; crenulata.prototype.salvanius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; crenulata.prototype.maritimus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; crenulata.prototype.edax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return crenulata; @@ -2015,49 +2293,65 @@ var trivirgatus; tumidifrons.prototype.nivalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.vestitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.aequatorius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.scherman = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.improvisum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.cervinipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.audax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.vallinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return tumidifrons; @@ -2071,43 +2365,57 @@ var trivirgatus; mixtus.prototype.ochrogaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.bryophilus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.liechtensteini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.crawfordi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.hypsibia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.matacus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.demidoff = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return mixtus; @@ -2119,13 +2427,17 @@ var trivirgatus; lotor.prototype.balensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lotor.prototype.pullata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lotor; @@ -2137,43 +2449,57 @@ var trivirgatus; falconeri.prototype.cabrali = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gouldi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.fuscicollis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.martiensseni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gaoligongensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.shawi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gmelini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return falconeri; @@ -2185,85 +2511,113 @@ var trivirgatus; oconnelli.prototype.youngsoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.terrestris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.chrysopus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.fuscomurina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.hellwaldii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.aenea = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.perrini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.entellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.krebsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.cephalotes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.molossinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.luisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.ceylonicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.ralli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oconnelli; @@ -2278,25 +2632,33 @@ var quasiater; bobrinskoi.prototype.crassicaudatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.mulatta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.ansorgei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.Copper = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return bobrinskoi; @@ -2313,25 +2675,33 @@ var ruatanica; americanus.prototype.nasoloi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.mystacalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.fardoulisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.tumidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return americanus; @@ -2348,79 +2718,105 @@ var lavali; wilsoni.prototype.setiger = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.lorentzii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.antisensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.blossevillii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.bontanus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.caligata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.franqueti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.roberti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.degelidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.amoenus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.kob = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.csorbai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.dorsata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wilsoni; @@ -2440,79 +2836,105 @@ var lavali; otion.prototype.bonaerensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.dussumieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.osvaldoreigi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.grevyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.hirtula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.cristatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.darlingtoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.fontanierii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.umbrosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.chiriquinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.orarius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.ilaeus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.musschenbroekii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return otion; @@ -2524,73 +2946,97 @@ var lavali; xanthognathus.prototype.nanulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.albigena = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.onca = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.gunnii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.apeco = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.variegates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.goudotii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.pohlei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.ineptus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.euryotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.maurisca = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.coyhaiquensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return xanthognathus; @@ -2604,49 +3050,65 @@ var lavali; thaeleri.prototype.coromandra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.parvipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.sponsorius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.vates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.roosmalenorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.rubicola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.ikonnikovi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.paramicrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return thaeleri; @@ -2660,13 +3122,17 @@ var lavali; lepturus.prototype.ferrumequinum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lepturus.prototype.aequalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lepturus; @@ -2683,55 +3149,73 @@ var dogramacii; robustulus.prototype.fossor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.humboldti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.mexicana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.martini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.beatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.leporina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.pearsonii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.keaysi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.hindei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return robustulus; @@ -2743,7 +3227,9 @@ var dogramacii; koepckeae.prototype.culturatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return koepckeae; @@ -2755,79 +3241,105 @@ var dogramacii; kaiseri.prototype.bedfordiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.paramorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.rubidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.juninensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.marginata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.Meitnerium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.pinetorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.hoolock = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.poeyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.Thulium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.patrius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.quadraticauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.ater = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return kaiseri; @@ -2839,49 +3351,65 @@ var dogramacii; aurata.prototype.grunniens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.howensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.karlkoopmani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.mirapitanga = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.ophiodon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.landeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.sonomae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.erythromos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return aurata; @@ -2898,85 +3426,113 @@ var lutreolus; schlegeli.prototype.mittendorfi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.blicki = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.culionensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.scrofa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.fernandoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.Tin = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.marmorata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.tavaratra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.peregrina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.frontalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.cuniculus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.magdalenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.andamanensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.dispar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return schlegeli; @@ -2991,67 +3547,89 @@ var argurus; dauricus.prototype.chinensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.duodecimcostatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.foxi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.macleayii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.darienensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.hardwickii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.albifrons = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.jacobitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.guentheri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.mahomet = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.misionensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return dauricus; @@ -3066,49 +3644,65 @@ var nigra; dolichurus.prototype.solomonis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.alfredi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.morrisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.lekaguli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.dimissus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.phaeotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.ustus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.sagei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return dolichurus; @@ -3125,37 +3719,49 @@ var panglima; amphibius.prototype.bottegi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.jerdoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.camtschatica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.spadix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.luismanueli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.aceramarcae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return amphibius; @@ -3169,19 +3775,25 @@ var panglima; fundatus.prototype.crassulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fundatus.prototype.flamarioni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fundatus.prototype.mirabilis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return fundatus; @@ -3195,31 +3807,41 @@ var panglima; abidi.prototype.greyii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.macedonicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.galili = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.thierryi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.ega = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return abidi; @@ -3234,43 +3856,57 @@ var quasiater; carolinensis.prototype.concinna = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.aeneus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.aloysiisabaudiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.tenellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.andium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.persephone = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.patrizii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return carolinensis; @@ -3287,73 +3923,97 @@ var minutus; himalayana.prototype.simoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.lobata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.rusticus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.latona = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.famulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.flaviceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.paradoxolophus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.Osmium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.vulgaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.betsileoensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.vespuccii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.olympus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return himalayana; @@ -3370,49 +4030,65 @@ var caurinus; mahaganus.prototype.martiniquensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.devius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.masalai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.kathleenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.simulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.nigrovittatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.senegalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.acticola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return mahaganus; @@ -3427,7 +4103,9 @@ var macrorhinos; marmosurus.prototype.tansaniana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return marmosurus; @@ -3444,7 +4122,9 @@ var howi; angulatus.prototype.pennatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return angulatus; @@ -3468,49 +4148,65 @@ var nigra; thalia.prototype.dichotomus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.arnuxii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.verheyeni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.dauuricus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.tristriatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.lasiura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.gangetica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.brucei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return thalia; @@ -3527,7 +4223,9 @@ var sagitta; walkeri.prototype.maracajuensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return walkeri; @@ -3544,7 +4242,9 @@ var minutus; inez.prototype.vexillaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return inez; @@ -3572,55 +4272,73 @@ var panamensis; linulus.prototype.goslingi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.taki = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.fumosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.rufinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.lami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.regina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.nanilla = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.enganus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.gomantongensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return linulus; @@ -3635,79 +4353,105 @@ var nigra; gracilis.prototype.weddellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.echinothrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.garridoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.rouxii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.aurita = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.geoffrensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.theresa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.melanocarpus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.dubiaquercus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.pectoralis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.apoensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.grisescens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.ramirohitra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gracilis; @@ -3724,79 +4468,105 @@ var samarensis; pelurus.prototype.Palladium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.castanea = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.chamek = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.nigriceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.lunatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.madurae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.chinchilla = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.eliasi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.proditor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.gambianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.petteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.nusatenggara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.olitor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pelurus; @@ -3810,85 +4580,113 @@ var samarensis; fuscus.prototype.planifrons = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.badia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.prymnolopha = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.natalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.hunteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.sapiens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.macrocercus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.nimbae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.suricatta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.jagorii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.beecrofti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.imaizumii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.colocolo = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.wolfi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return fuscus; @@ -3900,25 +4698,33 @@ var samarensis; pallidus.prototype.oblativa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.watersi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.glacialis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.viaria = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pallidus; @@ -3930,31 +4736,41 @@ var samarensis; cahirinus.prototype.alashanicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.flaviventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.bottai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.pinetis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.saussurei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cahirinus; @@ -3971,31 +4787,41 @@ var sagitta; leptoceros.prototype.victus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.hoplomyoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.gratiosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.rex = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.bolami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return leptoceros; @@ -4012,7 +4838,9 @@ var daubentonii; nigricans.prototype.woosnami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nigricans; @@ -4038,19 +4866,25 @@ var argurus; pygmaea.prototype.pajeros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pygmaea.prototype.capucinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pygmaea.prototype.cuvieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pygmaea; @@ -4067,43 +4901,57 @@ var chrysaeolus; sarasinorum.prototype.belzebul = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.hinpoon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.kandti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.cynosuros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.Germanium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.Ununoctium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.princeps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sarasinorum; @@ -4118,43 +4966,57 @@ var argurus; wetmorei.prototype.leucoptera = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.ochraventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.tephromelas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.cracens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.jamaicensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.gymnocaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.mayori = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wetmorei; @@ -4171,49 +5033,65 @@ var argurus; oreas.prototype.salamonis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.paniscus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.fagani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.papuanus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.timidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.nghetinhensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.barbei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.univittatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oreas; @@ -4228,73 +5106,97 @@ var daubentonii; arboreus.prototype.capreolus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.moreni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.hypoleucos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.paedulcus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.pucheranii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.stella = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.brasiliensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.brevicaudata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.vitticollis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.huangensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.cameroni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.tianshanica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return arboreus; @@ -4309,79 +5211,105 @@ var patas; uralensis.prototype.cartilagonodus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.pyrrhinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.insulans = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.nigricauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.muricauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.albicaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.fallax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.attenuata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.megalura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.neblina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.citellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.tanezumi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.albiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return uralensis; @@ -4398,13 +5326,17 @@ var provocax; melanoleuca.prototype.Neodymium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanoleuca.prototype.baeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return melanoleuca; @@ -4419,13 +5351,17 @@ var sagitta; sicarius.prototype.Chlorine = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sicarius.prototype.simulator = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sicarius; @@ -4442,85 +5378,113 @@ var howi; marcanoi.prototype.formosae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.dudui = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.leander = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.martinsi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.beatrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.griseoventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.zerda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.yucatanicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.nigrita = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.jouvenetae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.indefessus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.vuquangensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.Zirconium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.hyaena = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return marcanoi; @@ -4535,73 +5499,97 @@ var argurus; gilbertii.prototype.nasutus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.poecilops = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.sondaicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.auriventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.cherriei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.lindberghi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.pipistrellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.paranus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.dubosti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.opossum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.oreopolus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.amurensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gilbertii; @@ -4625,79 +5613,105 @@ var lutreolus; punicus.prototype.strandi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.lar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.erica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.trichura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.lemniscatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.aspalax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.marshalli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.Zinc = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.monochromos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.purinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.ischyrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.tenuis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.Helium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return punicus; @@ -4712,37 +5726,49 @@ var macrorhinos; daphaenodon.prototype.bredanensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.othus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.hammondi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.aureocollaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.flavipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.callosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return daphaenodon; @@ -4757,73 +5783,97 @@ var sagitta; cinereus.prototype.zunigae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.microps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.guaporensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.tonkeana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.montensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.sphinx = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.glis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.dorsalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.fimbriatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.sara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.epimelas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.pittieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cinereus; @@ -4855,61 +5905,81 @@ var gabriellae; amicus.prototype.pirrensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.phaeura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.voratus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.satarae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.hooperi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.perrensi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.ridei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.audeberti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.Lutetium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.atrox = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return amicus; @@ -4921,7 +5991,9 @@ var gabriellae; echinatus.prototype.tenuipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return echinatus; @@ -4936,37 +6008,49 @@ var imperfecta; lasiurus.prototype.marisae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.fulvus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.paranaensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.didactylus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.schreibersii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.orii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lasiurus; @@ -4978,67 +6062,89 @@ var imperfecta; subspinosus.prototype.monticularis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.Gadolinium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.oasicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.paterculus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.punctata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.invictus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.stangeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.siskiyou = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.welwitschii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.Polonium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.harpia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return subspinosus; @@ -5052,19 +6158,25 @@ var imperfecta; ciliolabrum.prototype.leschenaultii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; ciliolabrum.prototype.ludia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; ciliolabrum.prototype.sinicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return ciliolabrum; @@ -5079,25 +6191,33 @@ var quasiater; wattsi.prototype.lagotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.hussoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.bilarni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.cabrerae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wattsi; @@ -5114,55 +6234,73 @@ var petrophilus; sodyi.prototype.saundersiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.imberbis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.cansdalei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.Lawrencium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.catta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.breviceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.transitionalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.heptneri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.bairdii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sodyi; @@ -5179,49 +6317,65 @@ var caurinus; megaphyllus.prototype.montana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.amatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.bucculentus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.lepida = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.graecus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.forsteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.perotensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.cirrhosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return megaphyllus; @@ -5236,19 +6390,25 @@ var minutus; portoricensis.prototype.relictus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; portoricensis.prototype.aequatorianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; portoricensis.prototype.rhinogradoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return portoricensis; @@ -5263,79 +6423,105 @@ var lutreolus; foina.prototype.tarfayensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.Promethium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.salinae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.kerri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.scotti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.camerunensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.affinis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.siebersi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.maquassiensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.layardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.bishopi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.apodemoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.argentiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return foina; @@ -5352,61 +6538,81 @@ var lutreolus; cor.prototype.antinorii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.voi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.mussoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.truncatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.achates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.praedatrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.mzabi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.xanthinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.tapoatafa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.castroviejoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cor; @@ -5421,13 +6627,17 @@ var howi; coludo.prototype.bernhardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; coludo.prototype.isseli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return coludo; @@ -5444,13 +6654,17 @@ var argurus; germaini.prototype.sharpei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; germaini.prototype.palmarum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return germaini; @@ -5465,67 +6679,89 @@ var sagitta; stolzmanni.prototype.riparius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.dhofarensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.tricolor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.gardneri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.walleri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.talpoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.pallipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.lagurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.hipposideros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.griselda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.florium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return stolzmanni; @@ -5542,79 +6778,105 @@ var dammermani; melanops.prototype.blarina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.harwoodi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.ashaninka = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.wiedii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.godmani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.condorensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.xerophila = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.laminatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.archeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.hidalgo = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.unicolor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.philippii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.bocagei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return melanops; @@ -5631,49 +6893,65 @@ var argurus; peninsulae.prototype.aitkeni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.novaeangliae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.olallae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.anselli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.timminsi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.sordidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.telfordi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.cavernarum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return peninsulae; @@ -5688,79 +6966,105 @@ var argurus; netscheri.prototype.gravis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.ruschii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.tricuspidatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.fernandezi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.colletti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.microbullatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.eburneae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.tatei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.millardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.pruinosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.delator = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.nyikae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.ruemmleri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return netscheri; @@ -5777,79 +7081,105 @@ var ruatanica; Praseodymium.prototype.clara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.spectabilis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.kamensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.ruddi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.bartelsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.yerbabuenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.davidi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.pilirostris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.catherinae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.frontata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.Terbium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.thomensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.soricinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return Praseodymium; @@ -5866,7 +7196,9 @@ var caurinus; johorensis.prototype.maini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return johorensis; @@ -5881,7 +7213,9 @@ var argurus; luctuosa.prototype.loriae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return luctuosa; @@ -5896,49 +7230,65 @@ var panamensis; setulosus.prototype.duthieae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.guereza = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.buselaphus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.nuttalli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.pelii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.tunneyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.lamula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.vampyrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return setulosus; @@ -5953,31 +7303,41 @@ var petrophilus; rosalia.prototype.palmeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.baeops = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.ozensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.creaghi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.montivaga = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return rosalia; @@ -5994,37 +7354,49 @@ var caurinus; psilurus.prototype.socialis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.lundi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.araeum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.calamianensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.petersoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.nitela = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return psilurus; diff --git a/tests/baselines/reference/restArgAssignmentCompat.js b/tests/baselines/reference/restArgAssignmentCompat.js index 3f8749f332d..a640560c051 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.js +++ b/tests/baselines/reference/restArgAssignmentCompat.js @@ -15,9 +15,14 @@ function f() { for (var _i = 0; _i < arguments.length; _i++) { x[_i - 0] = arguments[_i]; } - x.forEach(function (n, i) { return void ('item ' + i + ' = ' + n); }); + x.forEach(function (n, i) { + return void ('item ' + i + ' = ' + n); + }); +} +function g(x, y) { } -function g(x, y) { } var n = g; n = f; -n([4], 'foo'); +n([ + 4 +], 'foo'); diff --git a/tests/baselines/reference/restElementMustBeLast.js b/tests/baselines/reference/restElementMustBeLast.js index 337cb6de6f6..2e11ce91de8 100644 --- a/tests/baselines/reference/restElementMustBeLast.js +++ b/tests/baselines/reference/restElementMustBeLast.js @@ -4,6 +4,14 @@ var [...a, x] = [1, 2, 3]; // Error, rest must be last element //// [restElementMustBeLast.js] -var _a = [1, 2, 3], x = _a[1]; // Error, rest must be last element -_b = [1, 2, 3], x = _b[1]; // Error, rest must be last element +var _a = [ + 1, + 2, + 3 +], x = _a[1]; // Error, rest must be last element +_b = [ + 1, + 2, + 3 +], x = _b[1]; // Error, rest must be last element var _b; diff --git a/tests/baselines/reference/restParameterNotLast.js b/tests/baselines/reference/restParameterNotLast.js index 4ca416a47ec..791d83849a1 100644 --- a/tests/baselines/reference/restParameterNotLast.js +++ b/tests/baselines/reference/restParameterNotLast.js @@ -2,4 +2,5 @@ function f(...x, y) { } //// [restParameterNotLast.js] -function f(x, y) { } +function f(x, y) { +} diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 0096c4d65b6..30ce79bc369 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -77,39 +77,47 @@ var A = (function () { function A() { return; } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { return 1; // error } - B.prototype.foo = function () { }; + B.prototype.foo = function () { + }; return B; })(); var C = (function () { function C() { return this; } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var D = (function () { function D() { return "test"; // error } - D.prototype.foo = function () { }; + D.prototype.foo = function () { + }; return D; })(); var E = (function () { function E() { - return { foo: 1 }; + return { + foo: 1 + }; } return E; })(); var F = (function () { function F() { - return { foo: 1 }; //error + return { + foo: 1 + }; //error } return F; })(); @@ -117,8 +125,10 @@ var G = (function () { function G() { this.test = 2; } - G.prototype.test1 = function () { }; - G.prototype.foo = function () { }; + G.prototype.test1 = function () { + }; + G.prototype.foo = function () { + }; return G; })(); var H = (function (_super) { diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 77b6ae1f774..b968998e4d6 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -32,18 +32,35 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // all the following should be valid -function fn1() { return 1; } -function fn2() { return ''; } -function fn3() { return undefined; } -function fn4() { return; } -function fn5() { return true; } -function fn6() { return new Date(12); } -function fn7() { return null; } -function fn8() { return; } // OK, eq. to 'return undefined' +function fn1() { + return 1; +} +function fn2() { + return ''; +} +function fn3() { + return undefined; +} +function fn4() { + return; +} +function fn5() { + return true; +} +function fn6() { + return new Date(12); +} +function fn7() { + return null; +} +function fn8() { + return; +} // OK, eq. to 'return undefined' var C = (function () { function C() { } - C.prototype.dispose = function () { }; + C.prototype.dispose = function () { + }; return C; })(); var D = (function (_super) { @@ -53,7 +70,17 @@ var D = (function (_super) { } return D; })(C); -function fn10() { return { id: 12 }; } -function fn11() { return new C(); } -function fn12() { return new D(); } -function fn13() { return null; } +function fn10() { + return { + id: 12 + }; +} +function fn11() { + return new C(); +} +function fn12() { + return new D(); +} +function fn13() { + return null; +} diff --git a/tests/baselines/reference/returnTypeParameter.js b/tests/baselines/reference/returnTypeParameter.js index d5f46cba776..58667207055 100644 --- a/tests/baselines/reference/returnTypeParameter.js +++ b/tests/baselines/reference/returnTypeParameter.js @@ -3,5 +3,8 @@ function f(a: T): T { } // error, no return statement function f2(a: T): T { return T; } // bug was that this satisfied the return statement requirement //// [returnTypeParameter.js] -function f(a) { } // error, no return statement -function f2(a) { return T; } // bug was that this satisfied the return statement requirement +function f(a) { +} // error, no return statement +function f2(a) { + return T; +} // bug was that this satisfied the return statement requirement diff --git a/tests/baselines/reference/returnTypeParameterWithModules.js b/tests/baselines/reference/returnTypeParameterWithModules.js index 4790fe1341b..2dc8da604f9 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.js +++ b/tests/baselines/reference/returnTypeParameterWithModules.js @@ -18,7 +18,12 @@ module M2 { var M1; (function (M1) { function reduce(ar, f, e) { - return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); + return Array.prototype.reduce.apply(ar, e ? [ + f, + e + ] : [ + f + ]); } M1.reduce = reduce; ; @@ -33,7 +38,9 @@ var M2; M2.compose = compose; ; function compose2(g, f) { - return function (x) { return g(f(x)); }; + return function (x) { + return g(f(x)); + }; } M2.compose2 = compose2; ; diff --git a/tests/baselines/reference/returnTypeTypeArguments.js b/tests/baselines/reference/returnTypeTypeArguments.js index b374cb1c581..5be549d2f34 100644 --- a/tests/baselines/reference/returnTypeTypeArguments.js +++ b/tests/baselines/reference/returnTypeTypeArguments.js @@ -92,31 +92,65 @@ var Three = (function () { } return Three; })(); -function A1() { return null; } -function A2() { return null; } -function A3() { return null; } -function B1() { return null; } -function B2() { return null; } -function B3() { return null; } +function A1() { + return null; +} +function A2() { + return null; +} +function A3() { + return null; +} +function B1() { + return null; +} +function B2() { + return null; +} +function B3() { + return null; +} var C = (function () { function C() { } - C.prototype.A1 = function () { return null; }; - C.prototype.A2 = function () { return null; }; - C.prototype.A3 = function () { return null; }; - C.prototype.B1 = function () { return null; }; - C.prototype.B2 = function () { return null; }; - C.prototype.B3 = function () { return null; }; + C.prototype.A1 = function () { + return null; + }; + C.prototype.A2 = function () { + return null; + }; + C.prototype.A3 = function () { + return null; + }; + C.prototype.B1 = function () { + return null; + }; + C.prototype.B2 = function () { + return null; + }; + C.prototype.B3 = function () { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.A2 = function () { return null; }; - D.prototype.A3 = function () { return null; }; - D.prototype.B1 = function () { return null; }; - D.prototype.B2 = function () { return null; }; - D.prototype.B3 = function () { return null; }; + D.prototype.A2 = function () { + return null; + }; + D.prototype.A3 = function () { + return null; + }; + D.prototype.B1 = function () { + return null; + }; + D.prototype.B2 = function () { + return null; + }; + D.prototype.B3 = function () { + return null; + }; return D; })(); var Y = (function () { diff --git a/tests/baselines/reference/reverseInferenceInContextualInstantiation.js b/tests/baselines/reference/reverseInferenceInContextualInstantiation.js index f9c3242e1ea..7108029ac54 100644 --- a/tests/baselines/reference/reverseInferenceInContextualInstantiation.js +++ b/tests/baselines/reference/reverseInferenceInContextualInstantiation.js @@ -5,6 +5,8 @@ x.sort(compare); // Error, but shouldn't be //// [reverseInferenceInContextualInstantiation.js] -function compare(a, b) { return 0; } +function compare(a, b) { + return 0; +} var x; x.sort(compare); // Error, but shouldn't be diff --git a/tests/baselines/reference/scannerImportDeclaration1.errors.txt b/tests/baselines/reference/scannerImportDeclaration1.errors.txt index 4f71678aa7a..243670c6854 100644 --- a/tests/baselines/reference/scannerImportDeclaration1.errors.txt +++ b/tests/baselines/reference/scannerImportDeclaration1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/scanner/ecmascript5/scannerImportDeclaration1.ts(1,1): error TS2304: Cannot find name 'TypeScriptServices'. +tests/cases/conformance/scanner/ecmascript5/scannerImportDeclaration1.ts(1,21): error TS2304: Cannot find name 'TypeScriptServices'. ==== tests/cases/conformance/scanner/ecmascript5/scannerImportDeclaration1.ts (1 errors) ==== import TypeScript = TypeScriptServices.TypeScript; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScriptServices'. \ No newline at end of file diff --git a/tests/baselines/reference/scannertest1.js b/tests/baselines/reference/scannertest1.js index 8c9d805c5f2..dc003e95a8f 100644 --- a/tests/baselines/reference/scannertest1.js +++ b/tests/baselines/reference/scannertest1.js @@ -33,9 +33,7 @@ var CharacterInfo = (function () { return c >= CharacterCodes._0 && c <= CharacterCodes._9; }; CharacterInfo.isHexDigit = function (c) { - return isDecimalDigit(c) || - (c >= CharacterCodes.A && c <= CharacterCodes.F) || - (c >= CharacterCodes.a && c <= CharacterCodes.f); + return isDecimalDigit(c) || (c >= CharacterCodes.A && c <= CharacterCodes.F) || (c >= CharacterCodes.a && c <= CharacterCodes.f); }; CharacterInfo.hexValue = function (c) { Debug.assert(isHexDigit(c)); diff --git a/tests/baselines/reference/scopingInCatchBlocks.js b/tests/baselines/reference/scopingInCatchBlocks.js index 3121f4e9c79..2d3ca7098b5 100644 --- a/tests/baselines/reference/scopingInCatchBlocks.js +++ b/tests/baselines/reference/scopingInCatchBlocks.js @@ -11,12 +11,17 @@ var x = ex1; // should error //// [scopingInCatchBlocks.js] -try { } +try { +} catch (ex1) { throw ex1; } -try { } -catch (ex1) { } // should not error -try { } -catch (ex1) { } // should not error +try { +} +catch (ex1) { +} // should not error +try { +} +catch (ex1) { +} // should not error var x = ex1; // should error diff --git a/tests/baselines/reference/selfInCallback.js b/tests/baselines/reference/selfInCallback.js index 25228b03187..85f16390f96 100644 --- a/tests/baselines/reference/selfInCallback.js +++ b/tests/baselines/reference/selfInCallback.js @@ -12,10 +12,14 @@ var C = (function () { function C() { this.p1 = 0; } - C.prototype.callback = function (cb) { cb(); }; + C.prototype.callback = function (cb) { + cb(); + }; C.prototype.doit = function () { var _this = this; - this.callback(function () { _this.p1 + 1; }); + this.callback(function () { + _this.p1 + 1; + }); }; return C; })(); diff --git a/tests/baselines/reference/selfInLambdas.js b/tests/baselines/reference/selfInLambdas.js index 6b09cf2e227..67006603c8e 100644 --- a/tests/baselines/reference/selfInLambdas.js +++ b/tests/baselines/reference/selfInLambdas.js @@ -53,7 +53,9 @@ var o = { var _this = this; window.onmousemove = function () { _this.counter++; - var f = function () { return _this.counter; }; + var f = function () { + return _this.counter; + }; }; } }; diff --git a/tests/baselines/reference/separate1-2.js b/tests/baselines/reference/separate1-2.js index 6ef155ca0f4..bda277467e8 100644 --- a/tests/baselines/reference/separate1-2.js +++ b/tests/baselines/reference/separate1-2.js @@ -6,6 +6,7 @@ module X { //// [separate1-2.js] var X; (function (X) { - function f() { } + function f() { + } X.f = f; })(X || (X = {})); diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 098a7914a71..3d7e3db7ef1 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -13,7 +13,8 @@ var __extends = this.__extends || function (d, b) { var base = (function () { function base() { } - base.prototype.n = function () { }; + base.prototype.n = function () { + }; return base; })(); var derived = (function (_super) { @@ -21,6 +22,7 @@ var derived = (function (_super) { function derived() { _super.apply(this, arguments); } - derived.prototype.n = function () { }; + derived.prototype.n = function () { + }; return derived; })(base); diff --git a/tests/baselines/reference/shadowedInternalModule.js b/tests/baselines/reference/shadowedInternalModule.js index 3a7c6d4d61a..90bbd023584 100644 --- a/tests/baselines/reference/shadowedInternalModule.js +++ b/tests/baselines/reference/shadowedInternalModule.js @@ -37,11 +37,17 @@ module Z { // all errors imported modules conflict with local variables var A; (function (A) { - A.Point = { x: 0, y: 0 }; + A.Point = { + x: 0, + y: 0 + }; })(A || (A = {})); var B; (function (B) { - var A = { x: 0, y: 0 }; + var A = { + x: 0, + y: 0 + }; })(B || (B = {})); var X; (function (X) { diff --git a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt new file mode 100644 index 00000000000..4fc1d47c383 --- /dev/null +++ b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt @@ -0,0 +1,28 @@ +tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(4,13): error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(5,15): error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(6,18): error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(7,15): error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(8,18): error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + + +==== tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts (5 errors) ==== + if (true) { + let x; + if (true) { + var x = 0; // Error + ~ +!!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + var { x = 0 } = { x: 0 }; // Error + ~ +!!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + var { x: x = 0 } = { x: 0 }; // Error + ~ +!!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + var { x } = { x: 0 }; // Error + ~ +!!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + var { x: x } = { x: 0 }; // Error + ~ +!!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js new file mode 100644 index 00000000000..594ec1ca18e --- /dev/null +++ b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js @@ -0,0 +1,31 @@ +//// [shadowingViaLocalValueOrBindingElement.ts] +if (true) { + let x; + if (true) { + var x = 0; // Error + var { x = 0 } = { x: 0 }; // Error + var { x: x = 0 } = { x: 0 }; // Error + var { x } = { x: 0 }; // Error + var { x: x } = { x: 0 }; // Error + } +} + +//// [shadowingViaLocalValueOrBindingElement.js] +if (true) { + var _x; + if (true) { + var x = 0; // Error + var _a = ({ + x: 0 + }).x, x = _a === void 0 ? 0 : _a; // Error + var _b = ({ + x: 0 + }).x, x = _b === void 0 ? 0 : _b; // Error + var x = ({ + x: 0 + }).x; // Error + var x = ({ + x: 0 + }).x; // Error + } +} diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js index fbf01bc167a..2cbc58ac19a 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js @@ -3,4 +3,10 @@ //// [simpleArrowFunctionParameterReferencedInObjectLiteral1.js] -[].map(function () { return [].map(function (p) { return ({ X: p }); }); }); +[].map(function () { + return [].map(function (p) { + return ({ + X: p + }); + }); +}); diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js b/tests/baselines/reference/sourceMap-FileWithComments.js index e9755f6c048..6143ff95fb8 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js +++ b/tests/baselines/reference/sourceMap-FileWithComments.js @@ -48,7 +48,9 @@ var Shapes; this.y = y; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js.map b/tests/baselines/reference/sourceMap-FileWithComments.js.map index 28d4566efc7..3da9be212f5 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":"AAOA,AADA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAGXA,AADAA,QAAQA;QACKA,KAAKA;QACdC,cAAcA;QACdA,SAFSA,KAAKA,CAEKA,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,GAALA,KASZA,CAAAA;IAGDA,AADAA,+BAA+BA;QAC3BA,CAACA,GAAGA,EAAEA,CAACA;IAEXA,SAAgBA,GAAGA;IACnBI,CAACA;IADeJ,UAAGA,GAAHA,GACfA,CAAAA;IAKDA,AAHAA;;MAEEA;QACEA,CAACA,GAAGA,EAAEA,CAACA;AACfA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAGD,AADA,qBAAqB;IACjB,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":["Shapes","Shapes.Point","Shapes.Point.constructor","Shapes.Point.getDist","Shapes.foo"],"mappings":"AAOA,AADA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAGXA,AADAA,QAAQA;;QAEJC,cAAcA;QACdA,eAAmBA,CAASA,EAASA,CAASA;YAA3BC,MAACA,GAADA,CAACA,CAAQA;YAASA,MAACA,GAADA,CAACA,CAAQA;QAAIA,CAACA;QAEnDD,kBAAkBA;QAClBA,uBAAOA,GAAPA;YAAYE,MAAMA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,CAACA,CAACA;QAACA,CAACA;QAElEF,gBAAgBA;QACTA,YAAMA,GAAGA,IAAIA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACpCA,YAACA;IAADA,CAACA,AATDD,IASCA;IATYA,YAAKA,QASjBA,CAAAA;IAGDA,AADAA,+BAA+BA;QAC3BA,CAACA,GAAGA,EAAEA,CAACA;IAEXA;IACAI,CAACA;IADeJ,UAAGA,MAClBA,CAAAA;IAKDA,AAHAA;;MAEEA;QACEA,CAACA,GAAGA,EAAEA,CAACA;AACfA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAGD,AADA,qBAAqB;IACjB,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 c0e46430688..be00cb7f263 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt @@ -100,20 +100,12 @@ sourceFile:sourceMap-FileWithComments.ts 3 >Emitted(4, 13) Source(10, 13) + SourceIndex(0) name (Shapes) --- >>> var Point = (function () { -1->^^^^^^^^ -2 > ^^^^^ -3 > ^^^^^^^^^^-> -1-> - > export class -2 > Point -1->Emitted(5, 9) Source(11, 18) + SourceIndex(0) name (Shapes) -2 >Emitted(5, 14) Source(11, 23) + SourceIndex(0) name (Shapes) ---- >>> // Constructor 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^ 3 > ^^^^^^^^^-> -1-> implements IPoint { +1-> + > export class Point implements IPoint { > 2 > // Constructor 1->Emitted(6, 9) Source(12, 9) + SourceIndex(0) name (Shapes.Point) @@ -121,29 +113,21 @@ sourceFile:sourceMap-FileWithComments.ts --- >>> function Point(x, y) { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^ -4 > ^ -5 > ^ -6 > ^^ -7 > ^ +2 > ^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> > -2 > -3 > Point -4 > implements IPoint { - > // Constructor - > constructor(public -5 > x: number -6 > , public -7 > y: number +2 > constructor(public +3 > x: number +4 > , public +5 > y: number 1->Emitted(7, 9) Source(13, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(7, 18) Source(11, 18) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(7, 23) Source(11, 23) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(7, 24) Source(13, 28) + SourceIndex(0) name (Shapes.Point) -5 >Emitted(7, 25) Source(13, 37) + SourceIndex(0) name (Shapes.Point) -6 >Emitted(7, 27) Source(13, 46) + SourceIndex(0) name (Shapes.Point) -7 >Emitted(7, 28) Source(13, 55) + 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) --- >>> this.x = x; 1 >^^^^^^^^^^^^ @@ -192,7 +176,7 @@ sourceFile:sourceMap-FileWithComments.ts >>> // Instance member 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @@ -200,106 +184,112 @@ sourceFile:sourceMap-FileWithComments.ts 1->Emitted(11, 9) Source(15, 9) + SourceIndex(0) name (Shapes.Point) 2 >Emitted(11, 27) Source(15, 27) + SourceIndex(0) name (Shapes.Point) --- ->>> Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; +>>> Point.prototype.getDist = function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^^^^ -10> ^ -11> ^^^^ -12> ^ -13> ^ -14> ^^^ -15> ^^^^ -16> ^ -17> ^ -18> ^^^ -19> ^^^^ -20> ^ -21> ^ -22> ^^^ -23> ^^^^ -24> ^ -25> ^ -26> ^ -27> ^ -28> ^ -29> ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 > getDist 3 > -4 > getDist() { -5 > return -6 > -7 > Math -8 > . -9 > sqrt -10> ( -11> this -12> . -13> x -14> * -15> this -16> . -17> x -18> + -19> this -20> . -21> y -22> * -23> this -24> . -25> y -26> ) -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) +--- +>>> return Math.sqrt(this.x * this.x + this.y * this.y); +1->^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^^^^ +9 > ^ +10> ^ +11> ^^^ +12> ^^^^ +13> ^ +14> ^ +15> ^^^ +16> ^^^^ +17> ^ +18> ^ +19> ^^^ +20> ^^^^ +21> ^ +22> ^ +23> ^ +24> ^ +1->getDist() { +2 > return +3 > +4 > Math +5 > . +6 > sqrt +7 > ( +8 > this +9 > . +10> x +11> * +12> this +13> . +14> x +15> + +16> this +17> . +18> y +19> * +20> this +21> . +22> y +23> ) +24> ; +1->Emitted(13, 13) Source(16, 21) + SourceIndex(0) name (Shapes.Point.getDist) +2 >Emitted(13, 19) Source(16, 27) + SourceIndex(0) name (Shapes.Point.getDist) +3 >Emitted(13, 20) Source(16, 28) + SourceIndex(0) name (Shapes.Point.getDist) +4 >Emitted(13, 24) Source(16, 32) + SourceIndex(0) name (Shapes.Point.getDist) +5 >Emitted(13, 25) Source(16, 33) + SourceIndex(0) name (Shapes.Point.getDist) +6 >Emitted(13, 29) Source(16, 37) + SourceIndex(0) name (Shapes.Point.getDist) +7 >Emitted(13, 30) Source(16, 38) + SourceIndex(0) name (Shapes.Point.getDist) +8 >Emitted(13, 34) Source(16, 42) + SourceIndex(0) name (Shapes.Point.getDist) +9 >Emitted(13, 35) Source(16, 43) + SourceIndex(0) name (Shapes.Point.getDist) +10>Emitted(13, 36) Source(16, 44) + SourceIndex(0) name (Shapes.Point.getDist) +11>Emitted(13, 39) Source(16, 47) + SourceIndex(0) name (Shapes.Point.getDist) +12>Emitted(13, 43) Source(16, 51) + SourceIndex(0) name (Shapes.Point.getDist) +13>Emitted(13, 44) Source(16, 52) + SourceIndex(0) name (Shapes.Point.getDist) +14>Emitted(13, 45) Source(16, 53) + SourceIndex(0) name (Shapes.Point.getDist) +15>Emitted(13, 48) Source(16, 56) + SourceIndex(0) name (Shapes.Point.getDist) +16>Emitted(13, 52) Source(16, 60) + SourceIndex(0) name (Shapes.Point.getDist) +17>Emitted(13, 53) Source(16, 61) + SourceIndex(0) name (Shapes.Point.getDist) +18>Emitted(13, 54) Source(16, 62) + SourceIndex(0) name (Shapes.Point.getDist) +19>Emitted(13, 57) Source(16, 65) + SourceIndex(0) name (Shapes.Point.getDist) +20>Emitted(13, 61) Source(16, 69) + SourceIndex(0) name (Shapes.Point.getDist) +21>Emitted(13, 62) Source(16, 70) + SourceIndex(0) name (Shapes.Point.getDist) +22>Emitted(13, 63) Source(16, 71) + SourceIndex(0) name (Shapes.Point.getDist) +23>Emitted(13, 64) Source(16, 72) + SourceIndex(0) name (Shapes.Point.getDist) +24>Emitted(13, 65) Source(16, 73) + SourceIndex(0) name (Shapes.Point.getDist) +--- +>>> }; +1 >^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(14, 9) Source(16, 74) + SourceIndex(0) name (Shapes.Point.getDist) +2 >Emitted(14, 10) Source(16, 75) + SourceIndex(0) name (Shapes.Point.getDist) --- >>> // Static member -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^-> -1 > +1-> > > 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(15, 9) Source(18, 9) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(15, 25) Source(18, 25) + SourceIndex(0) name (Shapes.Point) --- >>> Point.origin = new Point(0, 0); 1->^^^^^^^^ @@ -325,17 +315,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(16, 9) Source(19, 16) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(16, 21) Source(19, 22) + SourceIndex(0) name (Shapes.Point) +3 >Emitted(16, 24) Source(19, 25) + SourceIndex(0) name (Shapes.Point) +4 >Emitted(16, 28) Source(19, 29) + SourceIndex(0) name (Shapes.Point) +5 >Emitted(16, 33) Source(19, 34) + SourceIndex(0) name (Shapes.Point) +6 >Emitted(16, 34) Source(19, 35) + SourceIndex(0) name (Shapes.Point) +7 >Emitted(16, 35) Source(19, 36) + SourceIndex(0) name (Shapes.Point) +8 >Emitted(16, 37) Source(19, 38) + SourceIndex(0) name (Shapes.Point) +9 >Emitted(16, 38) Source(19, 39) + SourceIndex(0) name (Shapes.Point) +10>Emitted(16, 39) Source(19, 40) + SourceIndex(0) name (Shapes.Point) +11>Emitted(16, 40) Source(19, 41) + SourceIndex(0) name (Shapes.Point) --- >>> return Point; 1 >^^^^^^^^ @@ -343,8 +333,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(17, 9) Source(20, 5) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(17, 21) Source(20, 6) + SourceIndex(0) name (Shapes.Point) --- >>> })(); 1 >^^^^ @@ -365,37 +355,34 @@ 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(18, 5) Source(20, 5) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(18, 6) Source(20, 6) + SourceIndex(0) name (Shapes.Point) +3 >Emitted(18, 6) Source(11, 5) + SourceIndex(0) name (Shapes) +4 >Emitted(18, 10) Source(20, 6) + SourceIndex(0) name (Shapes) --- >>> Shapes.Point = Point; 1->^^^^ 2 > ^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^^^^^^-> +3 > ^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^-> 1-> 2 > Point -3 > -4 > Point implements IPoint { - > // 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); - > } -5 > -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, 20) Source(11, 18) + SourceIndex(0) name (Shapes) -4 >Emitted(17, 25) Source(20, 6) + SourceIndex(0) name (Shapes) -5 >Emitted(17, 26) Source(20, 6) + SourceIndex(0) name (Shapes) +3 > implements IPoint { + > // 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); + > } +4 > +1->Emitted(19, 5) Source(11, 18) + SourceIndex(0) name (Shapes) +2 >Emitted(19, 17) Source(11, 23) + SourceIndex(0) name (Shapes) +3 >Emitted(19, 25) Source(20, 6) + SourceIndex(0) name (Shapes) +4 >Emitted(19, 26) Source(20, 6) + SourceIndex(0) name (Shapes) --- >>> // Variable comment after class 1->^^^^ @@ -407,9 +394,9 @@ sourceFile:sourceMap-FileWithComments.ts > 2 > 3 > // Variable comment after class -1->Emitted(18, 5) Source(23, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(18, 5) Source(22, 5) + SourceIndex(0) name (Shapes) -3 >Emitted(18, 36) Source(22, 36) + SourceIndex(0) name (Shapes) +1->Emitted(20, 5) Source(23, 5) + SourceIndex(0) name (Shapes) +2 >Emitted(20, 5) Source(22, 5) + SourceIndex(0) name (Shapes) +3 >Emitted(20, 36) Source(22, 36) + SourceIndex(0) name (Shapes) --- >>> var a = 10; 1 >^^^^^^^^ @@ -424,53 +411,45 @@ sourceFile:sourceMap-FileWithComments.ts 3 > = 4 > 10 5 > ; -1 >Emitted(19, 9) Source(23, 9) + SourceIndex(0) name (Shapes) -2 >Emitted(19, 10) Source(23, 10) + SourceIndex(0) name (Shapes) -3 >Emitted(19, 13) Source(23, 13) + SourceIndex(0) name (Shapes) -4 >Emitted(19, 15) Source(23, 15) + SourceIndex(0) name (Shapes) -5 >Emitted(19, 16) Source(23, 16) + SourceIndex(0) name (Shapes) +1 >Emitted(21, 9) Source(23, 9) + SourceIndex(0) name (Shapes) +2 >Emitted(21, 10) Source(23, 10) + SourceIndex(0) name (Shapes) +3 >Emitted(21, 13) Source(23, 13) + SourceIndex(0) name (Shapes) +4 >Emitted(21, 15) Source(23, 15) + SourceIndex(0) name (Shapes) +5 >Emitted(21, 16) Source(23, 16) + SourceIndex(0) name (Shapes) --- >>> function foo() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^ +2 > ^^-> 1-> > > -2 > export function -3 > foo -1->Emitted(20, 5) Source(25, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(20, 14) Source(25, 21) + SourceIndex(0) name (Shapes) -3 >Emitted(20, 17) Source(25, 24) + SourceIndex(0) name (Shapes) +1->Emitted(22, 5) Source(25, 5) + SourceIndex(0) name (Shapes) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^-> -1 >() { +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(23, 5) Source(26, 5) + SourceIndex(0) name (Shapes.foo) +2 >Emitted(23, 6) Source(26, 6) + SourceIndex(0) name (Shapes.foo) --- >>> Shapes.foo = foo; 1->^^^^ 2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^^ -5 > ^ -6 > ^^^^^^^^^^^-> +3 > ^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^-> 1-> 2 > foo -3 > -4 > foo() { - > } -5 > -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, 18) Source(25, 21) + SourceIndex(0) name (Shapes) -4 >Emitted(22, 21) Source(26, 6) + SourceIndex(0) name (Shapes) -5 >Emitted(22, 22) Source(26, 6) + SourceIndex(0) name (Shapes) +3 > () { + > } +4 > +1->Emitted(24, 5) Source(25, 21) + SourceIndex(0) name (Shapes) +2 >Emitted(24, 15) Source(25, 24) + SourceIndex(0) name (Shapes) +3 >Emitted(24, 21) Source(26, 6) + SourceIndex(0) name (Shapes) +4 >Emitted(24, 22) Source(26, 6) + SourceIndex(0) name (Shapes) --- >>> /** comment after function 1->^^^^ @@ -483,8 +462,8 @@ sourceFile:sourceMap-FileWithComments.ts > */ > 2 > -1->Emitted(23, 5) Source(31, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(23, 5) Source(28, 5) + SourceIndex(0) name (Shapes) +1->Emitted(25, 5) Source(31, 5) + SourceIndex(0) name (Shapes) +2 >Emitted(25, 5) Source(28, 5) + SourceIndex(0) name (Shapes) --- >>> * this is another comment >>> */ @@ -493,7 +472,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(27, 7) Source(30, 7) + SourceIndex(0) name (Shapes) --- >>> var b = 10; 1->^^^^^^^^ @@ -508,11 +487,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > = 4 > 10 5 > ; -1->Emitted(26, 9) Source(31, 9) + SourceIndex(0) name (Shapes) -2 >Emitted(26, 10) Source(31, 10) + SourceIndex(0) name (Shapes) -3 >Emitted(26, 13) Source(31, 13) + SourceIndex(0) name (Shapes) -4 >Emitted(26, 15) Source(31, 15) + SourceIndex(0) name (Shapes) -5 >Emitted(26, 16) Source(31, 16) + SourceIndex(0) name (Shapes) +1->Emitted(28, 9) Source(31, 9) + SourceIndex(0) name (Shapes) +2 >Emitted(28, 10) Source(31, 10) + SourceIndex(0) name (Shapes) +3 >Emitted(28, 13) Source(31, 13) + SourceIndex(0) name (Shapes) +4 >Emitted(28, 15) Source(31, 15) + SourceIndex(0) name (Shapes) +5 >Emitted(28, 16) Source(31, 16) + SourceIndex(0) name (Shapes) --- >>>})(Shapes || (Shapes = {})); 1-> @@ -554,13 +533,13 @@ 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) -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) -6 >Emitted(27, 21) Source(8, 14) + SourceIndex(0) -7 >Emitted(27, 29) Source(32, 2) + SourceIndex(0) +1->Emitted(29, 1) Source(32, 1) + SourceIndex(0) name (Shapes) +2 >Emitted(29, 2) Source(32, 2) + SourceIndex(0) name (Shapes) +3 >Emitted(29, 4) Source(8, 8) + SourceIndex(0) +4 >Emitted(29, 10) Source(8, 14) + SourceIndex(0) +5 >Emitted(29, 15) Source(8, 8) + SourceIndex(0) +6 >Emitted(29, 21) Source(8, 14) + SourceIndex(0) +7 >Emitted(29, 29) Source(32, 2) + SourceIndex(0) --- >>>/** Local Variable */ 1 > @@ -573,9 +552,9 @@ sourceFile:sourceMap-FileWithComments.ts > 2 > 3 >/** Local Variable */ -1 >Emitted(28, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(28, 1) Source(34, 1) + SourceIndex(0) -3 >Emitted(28, 22) Source(34, 22) + SourceIndex(0) +1 >Emitted(30, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(30, 1) Source(34, 1) + SourceIndex(0) +3 >Emitted(30, 22) Source(34, 22) + SourceIndex(0) --- >>>var p = new Shapes.Point(3, 4); 1->^^^^ @@ -605,19 +584,19 @@ sourceFile:sourceMap-FileWithComments.ts 11> 4 12> ) 13> ; -1->Emitted(29, 5) Source(35, 5) + SourceIndex(0) -2 >Emitted(29, 6) Source(35, 6) + SourceIndex(0) -3 >Emitted(29, 9) Source(35, 17) + SourceIndex(0) -4 >Emitted(29, 13) Source(35, 21) + SourceIndex(0) -5 >Emitted(29, 19) Source(35, 27) + SourceIndex(0) -6 >Emitted(29, 20) Source(35, 28) + SourceIndex(0) -7 >Emitted(29, 25) Source(35, 33) + SourceIndex(0) -8 >Emitted(29, 26) Source(35, 34) + SourceIndex(0) -9 >Emitted(29, 27) Source(35, 35) + SourceIndex(0) -10>Emitted(29, 29) Source(35, 37) + SourceIndex(0) -11>Emitted(29, 30) Source(35, 38) + SourceIndex(0) -12>Emitted(29, 31) Source(35, 39) + SourceIndex(0) -13>Emitted(29, 32) Source(35, 40) + SourceIndex(0) +1->Emitted(31, 5) Source(35, 5) + SourceIndex(0) +2 >Emitted(31, 6) Source(35, 6) + SourceIndex(0) +3 >Emitted(31, 9) Source(35, 17) + SourceIndex(0) +4 >Emitted(31, 13) Source(35, 21) + SourceIndex(0) +5 >Emitted(31, 19) Source(35, 27) + SourceIndex(0) +6 >Emitted(31, 20) Source(35, 28) + SourceIndex(0) +7 >Emitted(31, 25) Source(35, 33) + SourceIndex(0) +8 >Emitted(31, 26) Source(35, 34) + SourceIndex(0) +9 >Emitted(31, 27) Source(35, 35) + SourceIndex(0) +10>Emitted(31, 29) Source(35, 37) + SourceIndex(0) +11>Emitted(31, 30) Source(35, 38) + SourceIndex(0) +12>Emitted(31, 31) Source(35, 39) + SourceIndex(0) +13>Emitted(31, 32) Source(35, 40) + SourceIndex(0) --- >>>var dist = p.getDist(); 1 > @@ -640,14 +619,14 @@ sourceFile:sourceMap-FileWithComments.ts 7 > getDist 8 > () 9 > ; -1 >Emitted(30, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(36, 5) + SourceIndex(0) -3 >Emitted(30, 9) Source(36, 9) + SourceIndex(0) -4 >Emitted(30, 12) Source(36, 12) + SourceIndex(0) -5 >Emitted(30, 13) Source(36, 13) + SourceIndex(0) -6 >Emitted(30, 14) Source(36, 14) + SourceIndex(0) -7 >Emitted(30, 21) Source(36, 21) + SourceIndex(0) -8 >Emitted(30, 23) Source(36, 23) + SourceIndex(0) -9 >Emitted(30, 24) Source(36, 24) + SourceIndex(0) +1 >Emitted(32, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(32, 9) Source(36, 9) + SourceIndex(0) +4 >Emitted(32, 12) Source(36, 12) + SourceIndex(0) +5 >Emitted(32, 13) Source(36, 13) + SourceIndex(0) +6 >Emitted(32, 14) Source(36, 14) + SourceIndex(0) +7 >Emitted(32, 21) Source(36, 21) + SourceIndex(0) +8 >Emitted(32, 23) Source(36, 23) + SourceIndex(0) +9 >Emitted(32, 24) Source(36, 24) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMap-FileWithComments.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapSample.errors.txt b/tests/baselines/reference/sourceMapSample.errors.txt index 80a2f88aba5..25072de7c0e 100644 --- a/tests/baselines/reference/sourceMapSample.errors.txt +++ b/tests/baselines/reference/sourceMapSample.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/sourceMapSample.ts(14,37): error TS2305: Module 'Foo.Bar' has no exported member 'Greeter'. +tests/cases/compiler/sourceMapSample.ts(14,45): error TS2305: Module 'Foo.Bar' has no exported member 'Greeter'. ==== tests/cases/compiler/sourceMapSample.ts (1 errors) ==== @@ -16,7 +16,7 @@ tests/cases/compiler/sourceMapSample.ts(14,37): error TS2305: Module 'Foo.Bar' h function foo(greeting: string): Foo.Bar.Greeter { - ~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2305: Module 'Foo.Bar' has no exported member 'Greeter'. return new Greeter(greeting); } diff --git a/tests/baselines/reference/sourceMapSample.js.map b/tests/baselines/reference/sourceMapSample.js.map index 78a59c1b6c1..615db73973a 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,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,uBAA0BA;iBAA1BA,WAA0BA,CAA1BA,sBAA0BA,CAA1BA,IAA0BA;gBAA1BA,sCAA0BA;;YACtDA,IAAIA,QAAQA,GAAcA,EAAEA,CAACA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChCA,CAACA,CAACA,CAACA,CAACA,CAACA,KAAKA,EAAEA,CAACA;QACjBA,CAACA;IACLA,CAACA,EAlCUD,GAAGA,GAAHA,OAAGA,KAAHA,OAAGA,QAkCbA;AAADA,CAACA,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/sourceMapSample.sourcemap.txt b/tests/baselines/reference/sourceMapSample.sourcemap.txt index 218dfb1c152..df35ff4257f 100644 --- a/tests/baselines/reference/sourceMapSample.sourcemap.txt +++ b/tests/baselines/reference/sourceMapSample.sourcemap.txt @@ -150,37 +150,24 @@ sourceFile:sourceMapSample.ts --- >>> var Greeter = (function () { 1->^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > -2 > class -3 > Greeter 1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(6, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(6, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^-> -1-> { +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^-> +1->class Greeter { > -2 > -3 > Greeter -4 > { - > constructor(public -5 > greeting: string +2 > constructor(public +3 > greeting: string 1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(7, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(7, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) -4 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -5 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +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) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -302,24 +289,18 @@ sourceFile:sourceMapSample.ts --- >>> function foo(greeting) { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^^^^^^^^^-> 1-> > > > -2 > function -3 > foo -4 > ( -5 > greeting: string +2 > function foo( +3 > greeting: string 1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(15, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(15, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -427,23 +408,17 @@ sourceFile:sourceMapSample.ts --- >>> function foo2(greeting) { 1 >^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^^-> +2 > ^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^^-> 1 > > > -2 > function -3 > foo2 -4 > ( -5 > greeting: string +2 > function foo2( +3 > greeting: string 1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(20, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(20, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) --- >>> var restGreetings = []; 1->^^^^^^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationClass.js.map b/tests/baselines/reference/sourceMapValidationClass.js.map index 661459022b1..8693cf5d0fe 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,IAAM,OAAO;IACTA,SADEA,OAAOA,CACUA,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":["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 diff --git a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt index 1c80abde32e..0e019b487bb 100644 --- a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt @@ -10,34 +10,21 @@ sourceFile:sourceMapValidationClass.ts ------------------------------------------------------------------- >>>var Greeter = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > Greeter 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 12) Source(1, 14) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^^^^^^^^ -1-> { +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +1->class Greeter { > -2 > -3 > Greeter -4 > { - > constructor(public -5 > greeting: string +2 > constructor(public +3 > greeting: string 1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(2, 21) Source(1, 14) + SourceIndex(0) name (Greeter) -4 >Emitted(2, 22) Source(2, 24) + SourceIndex(0) name (Greeter) -5 >Emitted(2, 30) Source(2, 40) + 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) --- >>> var b = []; 1 >^^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.js.map index 0ed561de563..07abb96ca91 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,IAAM,OAAO;IAAbA,SAAMA,OAAOA;QACFC,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":["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 diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt index 57f9686f062..ede638b64d9 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructor.sourcemap.txt @@ -10,27 +10,15 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts ------------------------------------------------------------------- >>>var Greeter = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > Greeter 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 12) Source(1, 14) + SourceIndex(0) --- >>> function Greeter() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^-> +2 > ^^^^^^^^^^^^^^^^^-> 1-> -2 > class -3 > Greeter 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(2, 21) Source(1, 14) + SourceIndex(0) name (Greeter) --- >>> this.a = 10; 1->^^^^^^^^ @@ -39,7 +27,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructor.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^-> -1-> { +1->class Greeter { > public 2 > a 3 > = diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js index 486cdd39637..33efe0fabec 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js @@ -9,7 +9,9 @@ var Greeter = (function () { function Greeter() { var _this = this; this.a = 10; - this.returnA = function () { return _this.a; }; + this.returnA = function () { + return _this.a; + }; } return Greeter; })(); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map index c06771070a8..d085c2f9cc1 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,IAAM,OAAO;IAAbA,SAAMA,OAAOA;QAAbC,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":["Greeter","Greeter.constructor"],"mappings":"AAAA;IAAAA;QAAAC,iBAGCA;QAFUA,MAACA,GAAGA,EAAEA,CAACA;QACPA,YAAOA,GAAGA;mBAAMA,KAAIA,CAACA,CAACA;QAANA,CAAMA,CAACA;IAClCA,CAACA;IAADD,cAACA;AAADA,CAACA,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 82a592e4bd2..ff4d526ffcd 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt @@ -10,27 +10,15 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen ------------------------------------------------------------------- >>>var Greeter = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > Greeter 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 12) Source(1, 14) + SourceIndex(0) --- >>> function Greeter() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> -2 > class -3 > Greeter 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(2, 21) Source(1, 14) + SourceIndex(0) name (Greeter) --- >>> var _this = this; 1->^^^^^^^^ @@ -49,7 +37,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 3 > ^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^-> 1 > 2 > a 3 > = @@ -61,41 +49,43 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 4 >Emitted(4, 20) Source(2, 18) + SourceIndex(0) name (Greeter.constructor) 5 >Emitted(4, 21) Source(2, 19) + SourceIndex(0) name (Greeter.constructor) --- ->>> this.returnA = function () { return _this.a; }; +>>> this.returnA = function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^^ -6 > ^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ +4 > ^^^^^-> 1-> > public 2 > returnA 3 > = -4 > () => -5 > -6 > this -7 > . -8 > a -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) +--- +>>> return _this.a; +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +4 > ^ +1->() => +2 > this +3 > . +4 > a +1->Emitted(6, 20) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(6, 25) Source(3, 32) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(6, 26) Source(3, 33) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(6, 27) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) +--- +>>> }; +1 >^^^^^^^^ +2 > ^ +3 > ^ +1 > +2 > this.a +3 > ; +1 >Emitted(7, 9) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(7, 10) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(7, 11) Source(3, 35) + SourceIndex(0) name (Greeter.constructor) --- >>> } 1 >^^^^ @@ -104,16 +94,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(8, 5) Source(4, 1) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) --- >>> 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(9, 5) Source(4, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(9, 19) Source(4, 2) + SourceIndex(0) name (Greeter) --- >>>})(); 1 > @@ -128,9 +118,9 @@ 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) -3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(10, 1) Source(4, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(10, 2) Source(4, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(10, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(10, 6) Source(4, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index d379fa629ca..60a26845043 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,IAAM,eAAe;IAArBA,SAAMA,eAAeA;IACrBC,CAACA;IAADD,sBAACA;AAADA,CAACA,AADD,IACC;AAED,IAAM,OAAO;IAASE,UAAhBA,OAAOA,UAAwBA;IAArCA,SAAMA,OAAOA;QAASC,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":["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 diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 010ad8ea1e1..96b52724320 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -16,35 +16,24 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts >>>}; >>>var AbstractGreeter = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > AbstractGreeter 1 >Emitted(7, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(7, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(7, 20) Source(1, 22) + SourceIndex(0) --- >>> function AbstractGreeter() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ +2 > ^^-> 1-> -2 > class -3 > AbstractGreeter 1->Emitted(8, 5) Source(1, 1) + SourceIndex(0) name (AbstractGreeter) -2 >Emitted(8, 14) Source(1, 7) + SourceIndex(0) name (AbstractGreeter) -3 >Emitted(8, 29) Source(1, 22) + SourceIndex(0) name (AbstractGreeter) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +1->class AbstractGreeter { > 2 > } -1 >Emitted(9, 5) Source(2, 1) + SourceIndex(0) name (AbstractGreeter.constructor) +1->Emitted(9, 5) Source(2, 1) + SourceIndex(0) name (AbstractGreeter.constructor) 2 >Emitted(9, 6) Source(2, 2) + SourceIndex(0) name (AbstractGreeter.constructor) --- >>> return AbstractGreeter; @@ -73,48 +62,30 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts --- >>>var Greeter = (function (_super) { 1-> -2 >^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > -2 >class -3 > Greeter 1->Emitted(12, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(12, 5) Source(4, 7) + SourceIndex(0) -3 >Emitted(12, 12) Source(4, 14) + SourceIndex(0) --- >>> __extends(Greeter, _super); 1->^^^^ -2 > ^^^^^^^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^ -1-> extends -2 > -3 > Greeter -4 > extends AbstractGreeter +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1->class Greeter extends +2 > AbstractGreeter 1->Emitted(13, 5) Source(4, 23) + SourceIndex(0) name (Greeter) -2 >Emitted(13, 15) Source(4, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(13, 22) Source(4, 14) + SourceIndex(0) name (Greeter) -4 >Emitted(13, 32) Source(4, 38) + SourceIndex(0) name (Greeter) +2 >Emitted(13, 32) Source(4, 38) + SourceIndex(0) name (Greeter) --- >>> function Greeter() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 > class -3 > Greeter 1 >Emitted(14, 5) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(14, 14) Source(4, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(14, 21) Source(4, 14) + SourceIndex(0) name (Greeter) --- >>> _super.apply(this, arguments); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> extends +1->class Greeter extends 2 > AbstractGreeter 1->Emitted(15, 9) Source(4, 23) + SourceIndex(0) name (Greeter.constructor) 2 >Emitted(15, 39) Source(4, 38) + SourceIndex(0) name (Greeter.constructor) diff --git a/tests/baselines/reference/sourceMapValidationClasses.js.map b/tests/baselines/reference/sourceMapValidationClasses.js.map index 68ded9631e2..e3ffe2de454 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,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,kBAAiBA,mBAAmBA,MAAUA;iBAA9CA,WAA8CA,CAA9CA,sBAA8CA,CAA9CA,IAA8CA;gBAA9CA,cAAiBA,mBAAmBA,yBAAUA;;YAC1EA,IAAIA,QAAQA,GAAcA,EAAEA,EAAEA,0BAA0BA,AAA3BA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QAEpCA,AADAA,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":["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,EAAEA,0BAA0BA,AAA3BA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QAEpCA,AADAA,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 diff --git a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt index 6cd77b696ff..6d937785cc8 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt @@ -152,37 +152,24 @@ sourceFile:sourceMapValidationClasses.ts --- >>> var Greeter = (function () { 1->^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > -2 > class -3 > Greeter 1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(6, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(6, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^-> -1-> { +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^-> +1->class Greeter { > -2 > -3 > Greeter -4 > { - > constructor(public -5 > greeting: string +2 > constructor(public +3 > greeting: string 1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(7, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(7, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) -4 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -5 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +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) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -304,24 +291,18 @@ sourceFile:sourceMapValidationClasses.ts --- >>> function foo(greeting) { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^^^^^^^^^-> 1-> > > > -2 > function -3 > foo -4 > ( -5 > greeting: string +2 > function foo( +3 > greeting: string 1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(15, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(15, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -429,23 +410,17 @@ sourceFile:sourceMapValidationClasses.ts --- >>> function foo2(greeting) { 1 >^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > -2 > function -3 > foo2 -4 > ( -5 > greeting: string +2 > function foo2( +3 > greeting: string 1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(20, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(20, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) --- >>> var restGreetings /* more greeting */ = []; 1->^^^^^^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationExportAssignment.js.map b/tests/baselines/reference/sourceMapValidationExportAssignment.js.map index c44a5e54c3b..2846bc70e06 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,IAAM,CAAC;QAAPA,SAAMA,CAACA;QAEPC,CAACA;QAADD,QAACA;IAADA,CAACA,AAFD,IAEC;IACU,AAAX,OAAS,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationExportAssignment.js","sourceRoot":"","sources":["sourceMapValidationExportAssignment.ts"],"names":["a","a.constructor"],"mappings":";IAAA;QAAAA;QAEAC,CAACA;QAADD,QAACA;IAADA,CAACA,AAFD,IAEC;IACU,AAAX,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 86dd911d5a8..58810df106b 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationExportAssignment.sourcemap.txt @@ -11,36 +11,25 @@ sourceFile:sourceMapValidationExportAssignment.ts >>>define(["require", "exports"], function (require, exports) { >>> var a = (function () { 1 >^^^^ -2 > ^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^-> 1 > -2 > class -3 > a 1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) -2 >Emitted(2, 9) Source(1, 7) + SourceIndex(0) -3 >Emitted(2, 10) Source(1, 8) + SourceIndex(0) --- >>> function a() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > a 1->Emitted(3, 9) Source(1, 1) + SourceIndex(0) name (a) -2 >Emitted(3, 18) Source(1, 7) + SourceIndex(0) name (a) -3 >Emitted(3, 19) Source(1, 8) + SourceIndex(0) name (a) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class a { > public c; > 2 > } -1 >Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (a.constructor) +1->Emitted(4, 9) Source(3, 1) + SourceIndex(0) name (a.constructor) 2 >Emitted(4, 10) Source(3, 2) + SourceIndex(0) name (a.constructor) --- >>> return a; diff --git a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.js.map index 18e89d37465..f3d29aaebf8 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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IAEPC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC;AACU,AAAX,iBAAS,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationExportAssignmentCommonjs.js","sourceRoot":"","sources":["sourceMapValidationExportAssignmentCommonjs.ts"],"names":["a","a.constructor"],"mappings":"AAAA;IAAAA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC;AACU,AAAX,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 308e29c37a5..a78364591f9 100644 --- a/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationExportAssignmentCommonjs.sourcemap.txt @@ -10,36 +10,25 @@ sourceFile:sourceMapValidationExportAssignmentCommonjs.ts ------------------------------------------------------------------- >>>var a = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > a 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 8) + SourceIndex(0) --- >>> function a() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > a 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (a) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (a) -3 >Emitted(2, 15) Source(1, 8) + SourceIndex(0) name (a) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class a { > public c; > 2 > } -1 >Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (a.constructor) +1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) name (a.constructor) 2 >Emitted(3, 6) Source(3, 2) + SourceIndex(0) name (a.constructor) --- >>> return a; diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js index f215c5071e4..5aa2c9902ea 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js @@ -14,5 +14,7 @@ var greet = function (greeting) { return greetings; }; greet("Hello"); -var incrGreetings = function () { return greetings++; }; +var incrGreetings = function () { + return greetings++; +}; //# sourceMappingURL=sourceMapValidationFunctionExpressions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map index 0ab0bdac146..a55cd03c9ed 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctionExpressions.js.map] -{"version":3,"file":"sourceMapValidationFunctionExpressions.js","sourceRoot":"","sources":["sourceMapValidationFunctionExpressions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,IAAI,KAAK,GAAG,UAAC,QAAgB;IACzB,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC,CAAA;AACD,KAAK,CAAC,OAAO,CAAC,CAAC;AACf,IAAI,aAAa,GAAG,cAAM,OAAA,SAAS,EAAE,EAAX,CAAW,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctionExpressions.js","sourceRoot":"","sources":["sourceMapValidationFunctionExpressions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,IAAI,KAAK,GAAG,UAAC,QAAgB;IACzB,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC,CAAA;AACD,KAAK,CAAC,OAAO,CAAC,CAAC;AACf,IAAI,aAAa,GAAG;WAAM,SAAS,EAAE;AAAX,CAAW,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt index 722afe1f9d9..d745903dafa 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt @@ -104,7 +104,7 @@ sourceFile:sourceMapValidationFunctionExpressions.ts 4 > ^^^^^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >greet @@ -119,41 +119,43 @@ sourceFile:sourceMapValidationFunctionExpressions.ts 5 >Emitted(6, 15) Source(6, 15) + SourceIndex(0) 6 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) --- ->>>var incrGreetings = function () { return greetings++; }; +>>>var incrGreetings = function () { 1-> 2 >^^^^ 3 > ^^^^^^^^^^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^^ -7 > ^^^^^^^^^ -8 > ^^ -9 > ^^ -10> ^ -11> ^ -12> ^^^^^^^^^-> +5 > ^^^^-> 1-> > 2 >var 3 > incrGreetings 4 > = -5 > () => -6 > -7 > greetings -8 > ++ -9 > -10> greetings++ -11> ; 1->Emitted(7, 1) Source(7, 1) + SourceIndex(0) 2 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) 3 >Emitted(7, 18) Source(7, 18) + SourceIndex(0) 4 >Emitted(7, 21) Source(7, 21) + SourceIndex(0) -5 >Emitted(7, 35) Source(7, 27) + SourceIndex(0) -6 >Emitted(7, 42) Source(7, 27) + SourceIndex(0) -7 >Emitted(7, 51) Source(7, 36) + SourceIndex(0) -8 >Emitted(7, 53) Source(7, 38) + SourceIndex(0) -9 >Emitted(7, 55) Source(7, 27) + SourceIndex(0) -10>Emitted(7, 56) Source(7, 38) + SourceIndex(0) -11>Emitted(7, 57) Source(7, 39) + SourceIndex(0) +--- +>>> return greetings++; +1->^^^^^^^^^^^ +2 > ^^^^^^^^^ +3 > ^^ +1->() => +2 > greetings +3 > ++ +1->Emitted(8, 12) Source(7, 27) + SourceIndex(0) +2 >Emitted(8, 21) Source(7, 36) + SourceIndex(0) +3 >Emitted(8, 23) Source(7, 38) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >greetings++ +3 > ; +1 >Emitted(9, 1) Source(7, 27) + SourceIndex(0) +2 >Emitted(9, 2) Source(7, 38) + SourceIndex(0) +3 >Emitted(9, 3) Source(7, 39) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctionExpressions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js index 289d29d02bd..be4c5bbf083 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js @@ -2,5 +2,8 @@ var x = { n() { } }; //// [sourceMapValidationFunctionPropertyAssignment.js] -var x = { n: function () { } }; +var x = { + n: function () { + } +}; //# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.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 81066a66bad..9ff69d21921 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":["n"],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAE,CAAC;IAAKA,CAACA;CAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt index 52a8bfe688c..3595fcebf3c 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt @@ -8,37 +8,45 @@ sources: sourceMapValidationFunctionPropertyAssignment.ts emittedFile:tests/cases/compiler/sourceMapValidationFunctionPropertyAssignment.js sourceFile:sourceMapValidationFunctionPropertyAssignment.ts ------------------------------------------------------------------- ->>>var x = { n: function () { } }; +>>>var x = { 1 > 2 >^^^^ 3 > ^ 4 > ^^^ -5 > ^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^-> 1 > 2 >var 3 > x 4 > = -5 > { -6 > n -7 > () { -8 > } -9 > } -10> ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) 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) -9 >Emitted(1, 31) Source(1, 20) + SourceIndex(0) -10>Emitted(1, 32) Source(1, 21) + SourceIndex(0) +--- +>>> n: function () { +1->^^^^ +2 > ^ +3 > ^-> +1->{ +2 > n +1->Emitted(2, 5) Source(1, 11) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 12) + SourceIndex(0) +--- +>>> } +1->^^^^ +2 > ^ +1->() { +2 > } +1->Emitted(3, 5) Source(1, 17) + SourceIndex(0) name (n) +2 >Emitted(3, 6) Source(1, 18) + SourceIndex(0) name (n) +--- +>>>}; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > } +2 > ; +1 >Emitted(4, 2) Source(1, 20) + SourceIndex(0) +2 >Emitted(4, 3) Source(1, 21) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctions.js.map b/tests/baselines/reference/sourceMapValidationFunctions.js.map index c04ec524d2d..bb98f5b19d2 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,SAAS,KAAK,CAAC,QAAgB;IAC3BA,SAASA,EAAEA,CAACA;IACZA,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA;AACD,SAAS,MAAM,CAAC,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,SAAS,GAAG,CAAC,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":["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 diff --git a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt index a9e43e404a7..830e9c459d7 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt @@ -31,21 +31,15 @@ sourceFile:sourceMapValidationFunctions.ts --- >>>function greet(greeting) { 1-> -2 >^^^^^^^^^ -3 > ^^^^^ -4 > ^ -5 > ^^^^^^^^ +2 >^^^^^^^^^^^^^^^ +3 > ^^^^^^^^ 1-> > -2 >function -3 > greet -4 > ( -5 > greeting: string +2 >function greet( +3 > greeting: string 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -4 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -5 >Emitted(2, 24) Source(2, 32) + SourceIndex(0) +2 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) +3 >Emitted(2, 24) Source(2, 32) + SourceIndex(0) --- >>> greetings++; 1 >^^^^ @@ -93,34 +87,28 @@ sourceFile:sourceMapValidationFunctions.ts --- >>>function greet2(greeting, n, x) { 1-> -2 >^^^^^^^^^ -3 > ^^^^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^ +6 > ^^ +7 > ^ +8 > ^^^^-> 1-> > -2 >function -3 > greet2 -4 > ( -5 > greeting: string -6 > , -7 > n = 10 -8 > , -9 > x?: string +2 >function greet2( +3 > greeting: string +4 > , +5 > n = 10 +6 > , +7 > x?: string 1->Emitted(6, 1) Source(6, 1) + SourceIndex(0) -2 >Emitted(6, 10) Source(6, 10) + SourceIndex(0) -3 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) -4 >Emitted(6, 17) Source(6, 17) + SourceIndex(0) -5 >Emitted(6, 25) Source(6, 33) + SourceIndex(0) -6 >Emitted(6, 27) Source(6, 35) + SourceIndex(0) -7 >Emitted(6, 28) Source(6, 41) + SourceIndex(0) -8 >Emitted(6, 30) Source(6, 43) + SourceIndex(0) -9 >Emitted(6, 31) Source(6, 53) + SourceIndex(0) +2 >Emitted(6, 17) Source(6, 17) + SourceIndex(0) +3 >Emitted(6, 25) Source(6, 33) + SourceIndex(0) +4 >Emitted(6, 27) Source(6, 35) + SourceIndex(0) +5 >Emitted(6, 28) Source(6, 41) + SourceIndex(0) +6 >Emitted(6, 30) Source(6, 43) + SourceIndex(0) +7 >Emitted(6, 31) Source(6, 53) + SourceIndex(0) --- >>> if (n === void 0) { n = 10; } 1->^^^^ @@ -220,34 +208,28 @@ sourceFile:sourceMapValidationFunctions.ts --- >>>function foo(greeting, n, x) { 1-> -2 >^^^^^^^^^ -3 > ^^^ -4 > ^ -5 > ^^^^^^^^ -6 > ^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^^^^-> +2 >^^^^^^^^^^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^ +6 > ^^ +7 > ^ +8 > ^^^^^^^-> 1-> > -2 >function -3 > foo -4 > ( -5 > greeting: string -6 > , -7 > n = 10 -8 > , -9 > x?: string +2 >function foo( +3 > greeting: string +4 > , +5 > n = 10 +6 > , +7 > x?: string 1->Emitted(15, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(15, 10) Source(10, 10) + SourceIndex(0) -3 >Emitted(15, 13) Source(10, 13) + SourceIndex(0) -4 >Emitted(15, 14) Source(10, 14) + SourceIndex(0) -5 >Emitted(15, 22) Source(10, 30) + SourceIndex(0) -6 >Emitted(15, 24) Source(10, 32) + SourceIndex(0) -7 >Emitted(15, 25) Source(10, 38) + SourceIndex(0) -8 >Emitted(15, 27) Source(10, 40) + SourceIndex(0) -9 >Emitted(15, 28) Source(10, 50) + SourceIndex(0) +2 >Emitted(15, 14) Source(10, 14) + SourceIndex(0) +3 >Emitted(15, 22) Source(10, 30) + SourceIndex(0) +4 >Emitted(15, 24) Source(10, 32) + SourceIndex(0) +5 >Emitted(15, 25) Source(10, 38) + SourceIndex(0) +6 >Emitted(15, 27) Source(10, 40) + SourceIndex(0) +7 >Emitted(15, 28) Source(10, 50) + SourceIndex(0) --- >>> if (n === void 0) { n = 10; } 1->^^^^ diff --git a/tests/baselines/reference/sourceMapValidationImport.js.map b/tests/baselines/reference/sourceMapValidationImport.js.map index 59cfbf86a91..a5b9c2b0317 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,IAAaA,CAACA;QAAdC,SAAaA,CAACA;QACdC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,GAACA,GAADA,CACZA,CAAAA;AACLA,CAACA,EAHa,CAAC,GAAD,SAAC,KAAD,SAAC,QAGd;AACD,IAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACD,SAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,SAAC,EAAE,CAAC"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt index 38ed0c972f5..73d7e48fb28 100644 --- a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt @@ -46,36 +46,25 @@ sourceFile:sourceMapValidationImport.ts --- >>> var c = (function () { 1->^^^^ -2 > ^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c 1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (m) -2 >Emitted(3, 9) Source(2, 18) + SourceIndex(0) name (m) -3 >Emitted(3, 10) Source(2, 19) + SourceIndex(0) name (m) --- >>> function c() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > export class -3 > c 1->Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (m.c) -2 >Emitted(4, 18) Source(2, 18) + SourceIndex(0) name (m.c) -3 >Emitted(4, 19) Source(2, 19) + SourceIndex(0) name (m.c) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->export class c { > 2 > } -1 >Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m.c.constructor) +1->Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m.c.constructor) 2 >Emitted(5, 10) Source(3, 6) + SourceIndex(0) name (m.c.constructor) --- >>> return c; @@ -105,21 +94,18 @@ sourceFile:sourceMapValidationImport.ts >>> m.c = c; 1->^^^^ 2 > ^^^ -3 > ^^^ -4 > ^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > c -3 > -4 > c { - > } -5 > +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, 11) Source(2, 18) + SourceIndex(0) name (m) -4 >Emitted(8, 12) Source(3, 6) + SourceIndex(0) name (m) -5 >Emitted(8, 13) Source(3, 6) + SourceIndex(0) name (m) +3 >Emitted(8, 12) Source(3, 6) + SourceIndex(0) name (m) +4 >Emitted(8, 13) Source(3, 6) + SourceIndex(0) name (m) --- >>>})(m = exports.m || (exports.m = {})); 1-> diff --git a/tests/baselines/reference/sourceMapValidationModule.js.map b/tests/baselines/reference/sourceMapValidationModule.js.map index c601c045cc7..b56797bbf98 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,SAAgBA,GAAGA;QACfE,MAAMA,CAACA,EAAEA,CAACA,CAACA,CAACA;IAChBA,CAACA;IAFeF,MAAGA,GAAHA,GAEfA,CAAAA;AACLA,CAACA,EARM,EAAE,KAAF,EAAE,QAQR"} \ No newline at end of file +{"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 diff --git a/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt b/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt index f20aff9ad97..286fffb4469 100644 --- a/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationModule.sourcemap.txt @@ -230,17 +230,11 @@ sourceFile:sourceMapValidationModule.ts --- >>> function foo() { 1 >^^^^ -2 > ^^^^^^^^^ -3 > ^^^ -4 > ^^^^^-> +2 > ^^^^^^^^^^^^^^^^^-> 1 > > > -2 > export function -3 > foo 1 >Emitted(12, 5) Source(10, 5) + SourceIndex(0) name (m3) -2 >Emitted(12, 14) Source(10, 21) + SourceIndex(0) name (m3) -3 >Emitted(12, 17) Source(10, 24) + SourceIndex(0) name (m3) --- >>> return m4.x; 1->^^^^^^^^ @@ -250,7 +244,7 @@ sourceFile:sourceMapValidationModule.ts 5 > ^ 6 > ^ 7 > ^ -1->() { +1->export function foo() { > 2 > return 3 > @@ -279,22 +273,19 @@ sourceFile:sourceMapValidationModule.ts >>> m3.foo = foo; 1->^^^^ 2 > ^^^^^^ -3 > ^^^ -4 > ^^^ -5 > ^ -6 > ^^^^-> +3 > ^^^^^^ +4 > ^ +5 > ^^^^-> 1-> 2 > foo -3 > -4 > foo() { - > return m4.x; - > } -5 > +3 > () { + > 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, 14) Source(10, 21) + SourceIndex(0) name (m3) -4 >Emitted(15, 17) Source(12, 6) + SourceIndex(0) name (m3) -5 >Emitted(15, 18) Source(12, 6) + 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) --- >>>})(m3 || (m3 = {})); 1-> diff --git a/tests/baselines/reference/sourceMapValidationStatements.js b/tests/baselines/reference/sourceMapValidationStatements.js index 8a4b565e9b0..85a4dc33889 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js +++ b/tests/baselines/reference/sourceMapValidationStatements.js @@ -136,19 +136,22 @@ function f() { z = 10; } switch (obj.z) { - case 0: { - x++; - break; - } - case 1: { - x--; - break; - } - default: { - x *= 2; - x = 50; - break; - } + case 0: + { + x++; + break; + } + case 1: + { + x--; + break; + } + default: + { + x *= 2; + x = 50; + break; + } } while (x < 10) { x++; diff --git a/tests/baselines/reference/sourceMapValidationStatements.js.map b/tests/baselines/reference/sourceMapValidationStatements.js.map index 7bf883de6c3..63731751060 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,SAAS,CAAC;IACNA,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":["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;YAAEA,CAACA;gBACLA,CAACA,EAAEA,CAACA;gBACJA,KAAKA,CAACA;YAEVA,CAACA;QACDA,KAAKA,CAACA;YAAEA,CAACA;gBACLA,CAACA,EAAEA,CAACA;gBACJA,KAAKA,CAACA;YAEVA,CAACA;QACDA;YAASA,CAACA;gBACNA,CAACA,IAAIA,CAACA,CAACA;gBACPA,CAACA,GAAGA,EAAEA,CAACA;gBACPA,KAAKA,CAACA;YAEVA,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 diff --git a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt index 586063c7c12..789d98afe5a 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt @@ -10,15 +10,9 @@ sourceFile:sourceMapValidationStatements.ts ------------------------------------------------------------------- >>>function f() { 1 > -2 >^^^^^^^^^ -3 > ^ -4 > ^-> +2 >^^^^^^^^^^^-> 1 > -2 >function -3 > f 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) --- >>> var y; 1->^^^^ @@ -26,7 +20,7 @@ sourceFile:sourceMapValidationStatements.ts 3 > ^ 4 > ^ 5 > ^^^^^-> -1->() { +1->function f() { > 2 > var 3 > y @@ -936,191 +930,200 @@ sourceFile:sourceMapValidationStatements.ts 9 >Emitted(52, 20) Source(47, 20) + SourceIndex(0) name (f) 10>Emitted(52, 21) Source(47, 21) + SourceIndex(0) name (f) --- ->>> case 0: { +>>> case 0: 1 >^^^^^^^^ 2 > ^^^^^ 3 > ^ -4 > ^^ -5 > ^ 1 > > 2 > case 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) --- ->>> x++; +>>> { 1 >^^^^^^^^^^^^ 2 > ^ -3 > ^^ -4 > ^ -5 > ^^^-> -1 > - > -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) +3 > ^^^^^^^^-> +1 >: +2 > { +1 >Emitted(54, 13) Source(48, 17) + SourceIndex(0) name (f) +2 >Emitted(54, 14) Source(48, 18) + SourceIndex(0) name (f) --- ->>> break; -1->^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> x++; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^-> 1-> > -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) +2 > x +3 > ++ +4 > ; +1->Emitted(55, 17) Source(49, 13) + SourceIndex(0) name (f) +2 >Emitted(55, 18) Source(49, 14) + SourceIndex(0) name (f) +3 >Emitted(55, 20) Source(49, 16) + SourceIndex(0) name (f) +4 >Emitted(55, 21) Source(49, 17) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^-> +>>> break; +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +1-> + > +2 > break +3 > ; +1->Emitted(56, 17) Source(50, 13) + SourceIndex(0) name (f) +2 >Emitted(56, 22) Source(50, 18) + SourceIndex(0) name (f) +3 >Emitted(56, 23) Source(50, 19) + SourceIndex(0) name (f) +--- +>>> } +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^-> 1 > > > -2 > } -1 >Emitted(56, 9) Source(52, 9) + SourceIndex(0) name (f) -2 >Emitted(56, 10) Source(52, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(57, 13) Source(52, 9) + SourceIndex(0) name (f) +2 >Emitted(57, 14) Source(52, 10) + SourceIndex(0) name (f) --- ->>> case 1: { +>>> case 1: 1->^^^^^^^^ 2 > ^^^^^ 3 > ^ -4 > ^^ -5 > ^ 1-> > 2 > case 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(58, 9) Source(53, 9) + SourceIndex(0) name (f) +2 >Emitted(58, 14) Source(53, 14) + SourceIndex(0) name (f) +3 >Emitted(58, 15) Source(53, 15) + SourceIndex(0) name (f) --- ->>> x--; +>>> { 1 >^^^^^^^^^^^^ 2 > ^ -3 > ^^ -4 > ^ -5 > ^^^-> -1 > - > -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) +3 > ^^^^^^^^-> +1 >: +2 > { +1 >Emitted(59, 13) Source(53, 17) + SourceIndex(0) name (f) +2 >Emitted(59, 14) Source(53, 18) + SourceIndex(0) name (f) --- ->>> break; -1->^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> x--; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^-> 1-> > -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) +2 > x +3 > -- +4 > ; +1->Emitted(60, 17) Source(54, 13) + SourceIndex(0) name (f) +2 >Emitted(60, 18) Source(54, 14) + SourceIndex(0) name (f) +3 >Emitted(60, 20) Source(54, 16) + SourceIndex(0) name (f) +4 >Emitted(60, 21) Source(54, 17) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^-> +>>> break; +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +1-> + > +2 > break +3 > ; +1->Emitted(61, 17) Source(55, 13) + SourceIndex(0) name (f) +2 >Emitted(61, 22) Source(55, 18) + SourceIndex(0) name (f) +3 >Emitted(61, 23) Source(55, 19) + SourceIndex(0) name (f) +--- +>>> } +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^^-> 1 > > > -2 > } -1 >Emitted(60, 9) Source(57, 9) + SourceIndex(0) name (f) -2 >Emitted(60, 10) Source(57, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(62, 13) Source(57, 9) + SourceIndex(0) name (f) +2 >Emitted(62, 14) Source(57, 10) + SourceIndex(0) name (f) --- ->>> default: { +>>> default: 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^ -4 > ^^-> +2 > ^^^^^^-> 1-> > -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(63, 9) Source(58, 9) + SourceIndex(0) name (f) --- ->>> x *= 2; +>>> { 1->^^^^^^^^^^^^ 2 > ^ -3 > ^^^^ -4 > ^ -5 > ^ -6 > ^-> +3 > ^^^^^^^^^^^-> +1->default: +2 > { +1->Emitted(64, 13) Source(58, 18) + SourceIndex(0) name (f) +2 >Emitted(64, 14) Source(58, 19) + SourceIndex(0) name (f) +--- +>>> x *= 2; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^ +4 > ^ +5 > ^ +6 > ^-> 1-> > -2 > x -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) +2 > x +3 > *= +4 > 2 +5 > ; +1->Emitted(65, 17) Source(59, 13) + SourceIndex(0) name (f) +2 >Emitted(65, 18) Source(59, 14) + SourceIndex(0) name (f) +3 >Emitted(65, 22) Source(59, 18) + SourceIndex(0) name (f) +4 >Emitted(65, 23) Source(59, 19) + SourceIndex(0) name (f) +5 >Emitted(65, 24) Source(59, 20) + SourceIndex(0) name (f) --- ->>> x = 50; -1->^^^^^^^^^^^^ -2 > ^ -3 > ^^^ -4 > ^^ -5 > ^ +>>> x = 50; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^ +4 > ^^ +5 > ^ 1-> > -2 > x -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) +2 > x +3 > = +4 > 50 +5 > ; +1->Emitted(66, 17) Source(60, 13) + SourceIndex(0) name (f) +2 >Emitted(66, 18) Source(60, 14) + SourceIndex(0) name (f) +3 >Emitted(66, 21) Source(60, 17) + SourceIndex(0) name (f) +4 >Emitted(66, 23) Source(60, 19) + SourceIndex(0) name (f) +5 >Emitted(66, 24) Source(60, 20) + SourceIndex(0) name (f) --- ->>> break; -1 >^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> break; +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ 1 > > -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) +2 > break +3 > ; +1 >Emitted(67, 17) Source(61, 13) + SourceIndex(0) name (f) +2 >Emitted(67, 22) Source(61, 18) + SourceIndex(0) name (f) +3 >Emitted(67, 23) Source(61, 19) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ +>>> } +1 >^^^^^^^^^^^^ +2 > ^ 1 > > > -2 > } -1 >Emitted(65, 9) Source(63, 9) + SourceIndex(0) name (f) -2 >Emitted(65, 10) Source(63, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(68, 13) Source(63, 9) + SourceIndex(0) name (f) +2 >Emitted(68, 14) Source(63, 10) + SourceIndex(0) name (f) --- >>> } 1 >^^^^ @@ -1129,8 +1132,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(69, 5) Source(64, 5) + SourceIndex(0) name (f) +2 >Emitted(69, 6) Source(64, 6) + SourceIndex(0) name (f) --- >>> while (x < 10) { 1->^^^^ @@ -1148,13 +1151,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(70, 5) Source(65, 5) + SourceIndex(0) name (f) +2 >Emitted(70, 12) Source(65, 12) + SourceIndex(0) name (f) +3 >Emitted(70, 13) Source(65, 13) + SourceIndex(0) name (f) +4 >Emitted(70, 16) Source(65, 16) + SourceIndex(0) name (f) +5 >Emitted(70, 18) Source(65, 18) + SourceIndex(0) name (f) +6 >Emitted(70, 20) Source(65, 20) + SourceIndex(0) name (f) +7 >Emitted(70, 21) Source(65, 21) + SourceIndex(0) name (f) --- >>> x++; 1 >^^^^^^^^ @@ -1166,10 +1169,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(71, 9) Source(66, 9) + SourceIndex(0) name (f) +2 >Emitted(71, 10) Source(66, 10) + SourceIndex(0) name (f) +3 >Emitted(71, 12) Source(66, 12) + SourceIndex(0) name (f) +4 >Emitted(71, 13) Source(66, 13) + SourceIndex(0) name (f) --- >>> } 1 >^^^^ @@ -1178,8 +1181,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(72, 5) Source(67, 5) + SourceIndex(0) name (f) +2 >Emitted(72, 6) Source(67, 6) + SourceIndex(0) name (f) --- >>> do { 1->^^^^ @@ -1190,9 +1193,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(73, 5) Source(68, 5) + SourceIndex(0) name (f) +2 >Emitted(73, 8) Source(68, 8) + SourceIndex(0) name (f) +3 >Emitted(73, 9) Source(68, 9) + SourceIndex(0) name (f) --- >>> x--; 1->^^^^^^^^ @@ -1205,10 +1208,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(74, 9) Source(69, 9) + SourceIndex(0) name (f) +2 >Emitted(74, 10) Source(69, 10) + SourceIndex(0) name (f) +3 >Emitted(74, 12) Source(69, 12) + SourceIndex(0) name (f) +4 >Emitted(74, 13) Source(69, 13) + SourceIndex(0) name (f) --- >>> } while (x > 4); 1->^^^^ @@ -1226,13 +1229,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(75, 5) Source(70, 5) + SourceIndex(0) name (f) +2 >Emitted(75, 6) Source(70, 6) + SourceIndex(0) name (f) +3 >Emitted(75, 14) Source(70, 14) + SourceIndex(0) name (f) +4 >Emitted(75, 15) Source(70, 15) + SourceIndex(0) name (f) +5 >Emitted(75, 18) Source(70, 18) + SourceIndex(0) name (f) +6 >Emitted(75, 19) Source(70, 19) + SourceIndex(0) name (f) +7 >Emitted(75, 21) Source(70, 20) + SourceIndex(0) name (f) --- >>> x = y; 1 >^^^^ @@ -1247,11 +1250,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(76, 5) Source(71, 5) + SourceIndex(0) name (f) +2 >Emitted(76, 6) Source(71, 6) + SourceIndex(0) name (f) +3 >Emitted(76, 9) Source(71, 9) + SourceIndex(0) name (f) +4 >Emitted(76, 10) Source(71, 10) + SourceIndex(0) name (f) +5 >Emitted(76, 11) Source(71, 11) + SourceIndex(0) name (f) --- >>> var z = (x == 1) ? x + 1 : x - 1; 1->^^^^ @@ -1291,24 +1294,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(77, 5) Source(72, 5) + SourceIndex(0) name (f) +2 >Emitted(77, 9) Source(72, 9) + SourceIndex(0) name (f) +3 >Emitted(77, 10) Source(72, 10) + SourceIndex(0) name (f) +4 >Emitted(77, 13) Source(72, 13) + SourceIndex(0) name (f) +5 >Emitted(77, 14) Source(72, 14) + SourceIndex(0) name (f) +6 >Emitted(77, 15) Source(72, 15) + SourceIndex(0) name (f) +7 >Emitted(77, 19) Source(72, 19) + SourceIndex(0) name (f) +8 >Emitted(77, 20) Source(72, 20) + SourceIndex(0) name (f) +9 >Emitted(77, 21) Source(72, 21) + SourceIndex(0) name (f) +10>Emitted(77, 24) Source(72, 24) + SourceIndex(0) name (f) +11>Emitted(77, 25) Source(72, 25) + SourceIndex(0) name (f) +12>Emitted(77, 28) Source(72, 28) + SourceIndex(0) name (f) +13>Emitted(77, 29) Source(72, 29) + SourceIndex(0) name (f) +14>Emitted(77, 32) Source(72, 32) + SourceIndex(0) name (f) +15>Emitted(77, 33) Source(72, 33) + SourceIndex(0) name (f) +16>Emitted(77, 36) Source(72, 36) + SourceIndex(0) name (f) +17>Emitted(77, 37) Source(72, 37) + SourceIndex(0) name (f) +18>Emitted(77, 38) Source(72, 38) + SourceIndex(0) name (f) --- >>> (x == 1) ? x + 1 : x - 1; 1 >^^^^ @@ -1342,21 +1345,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(78, 5) Source(73, 5) + SourceIndex(0) name (f) +2 >Emitted(78, 6) Source(73, 6) + SourceIndex(0) name (f) +3 >Emitted(78, 7) Source(73, 7) + SourceIndex(0) name (f) +4 >Emitted(78, 11) Source(73, 11) + SourceIndex(0) name (f) +5 >Emitted(78, 12) Source(73, 12) + SourceIndex(0) name (f) +6 >Emitted(78, 13) Source(73, 13) + SourceIndex(0) name (f) +7 >Emitted(78, 16) Source(73, 16) + SourceIndex(0) name (f) +8 >Emitted(78, 17) Source(73, 17) + SourceIndex(0) name (f) +9 >Emitted(78, 20) Source(73, 20) + SourceIndex(0) name (f) +10>Emitted(78, 21) Source(73, 21) + SourceIndex(0) name (f) +11>Emitted(78, 24) Source(73, 24) + SourceIndex(0) name (f) +12>Emitted(78, 25) Source(73, 25) + SourceIndex(0) name (f) +13>Emitted(78, 28) Source(73, 28) + SourceIndex(0) name (f) +14>Emitted(78, 29) Source(73, 29) + SourceIndex(0) name (f) +15>Emitted(78, 30) Source(73, 30) + SourceIndex(0) name (f) --- >>> x === 1; 1 >^^^^ @@ -1371,11 +1374,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(79, 5) Source(74, 5) + SourceIndex(0) name (f) +2 >Emitted(79, 6) Source(74, 6) + SourceIndex(0) name (f) +3 >Emitted(79, 11) Source(74, 11) + SourceIndex(0) name (f) +4 >Emitted(79, 12) Source(74, 12) + SourceIndex(0) name (f) +5 >Emitted(79, 13) Source(74, 13) + SourceIndex(0) name (f) --- >>> x = z = 40; 1->^^^^ @@ -1393,13 +1396,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(80, 5) Source(75, 5) + SourceIndex(0) name (f) +2 >Emitted(80, 6) Source(75, 6) + SourceIndex(0) name (f) +3 >Emitted(80, 9) Source(75, 9) + SourceIndex(0) name (f) +4 >Emitted(80, 10) Source(75, 10) + SourceIndex(0) name (f) +5 >Emitted(80, 13) Source(75, 13) + SourceIndex(0) name (f) +6 >Emitted(80, 15) Source(75, 15) + SourceIndex(0) name (f) +7 >Emitted(80, 16) Source(75, 16) + SourceIndex(0) name (f) --- >>> eval("y"); 1 >^^^^ @@ -1415,12 +1418,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(81, 5) Source(76, 5) + SourceIndex(0) name (f) +2 >Emitted(81, 9) Source(76, 9) + SourceIndex(0) name (f) +3 >Emitted(81, 10) Source(76, 10) + SourceIndex(0) name (f) +4 >Emitted(81, 13) Source(76, 13) + SourceIndex(0) name (f) +5 >Emitted(81, 14) Source(76, 14) + SourceIndex(0) name (f) +6 >Emitted(81, 15) Source(76, 15) + SourceIndex(0) name (f) --- >>> return; 1 >^^^^ @@ -1430,9 +1433,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(82, 5) Source(77, 5) + SourceIndex(0) name (f) +2 >Emitted(82, 11) Source(77, 11) + SourceIndex(0) name (f) +3 >Emitted(82, 12) Source(77, 12) + SourceIndex(0) name (f) --- >>>} 1 > @@ -1441,8 +1444,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(83, 1) Source(78, 1) + SourceIndex(0) name (f) +2 >Emitted(83, 2) Source(78, 2) + SourceIndex(0) name (f) --- >>>var b = function () { 1-> @@ -1455,10 +1458,10 @@ sourceFile:sourceMapValidationStatements.ts 2 >var 3 > b 4 > = -1->Emitted(81, 1) Source(79, 1) + SourceIndex(0) -2 >Emitted(81, 5) Source(79, 5) + SourceIndex(0) -3 >Emitted(81, 6) Source(79, 6) + SourceIndex(0) -4 >Emitted(81, 9) Source(79, 9) + SourceIndex(0) +1->Emitted(84, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(84, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(84, 6) Source(79, 6) + SourceIndex(0) +4 >Emitted(84, 9) Source(79, 9) + SourceIndex(0) --- >>> var x = 10; 1->^^^^ @@ -1474,12 +1477,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > = 5 > 10 6 > ; -1->Emitted(82, 5) Source(80, 5) + SourceIndex(0) -2 >Emitted(82, 9) Source(80, 9) + SourceIndex(0) -3 >Emitted(82, 10) Source(80, 10) + SourceIndex(0) -4 >Emitted(82, 13) Source(80, 13) + SourceIndex(0) -5 >Emitted(82, 15) Source(80, 15) + SourceIndex(0) -6 >Emitted(82, 16) Source(80, 16) + SourceIndex(0) +1->Emitted(85, 5) Source(80, 5) + SourceIndex(0) +2 >Emitted(85, 9) Source(80, 9) + SourceIndex(0) +3 >Emitted(85, 10) Source(80, 10) + SourceIndex(0) +4 >Emitted(85, 13) Source(80, 13) + SourceIndex(0) +5 >Emitted(85, 15) Source(80, 15) + SourceIndex(0) +6 >Emitted(85, 16) Source(80, 16) + SourceIndex(0) --- >>> x = x + 1; 1 >^^^^ @@ -1497,13 +1500,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > + 6 > 1 7 > ; -1 >Emitted(83, 5) Source(81, 5) + SourceIndex(0) -2 >Emitted(83, 6) Source(81, 6) + SourceIndex(0) -3 >Emitted(83, 9) Source(81, 9) + SourceIndex(0) -4 >Emitted(83, 10) Source(81, 10) + SourceIndex(0) -5 >Emitted(83, 13) Source(81, 13) + SourceIndex(0) -6 >Emitted(83, 14) Source(81, 14) + SourceIndex(0) -7 >Emitted(83, 15) Source(81, 15) + SourceIndex(0) +1 >Emitted(86, 5) Source(81, 5) + SourceIndex(0) +2 >Emitted(86, 6) Source(81, 6) + SourceIndex(0) +3 >Emitted(86, 9) Source(81, 9) + SourceIndex(0) +4 >Emitted(86, 10) Source(81, 10) + SourceIndex(0) +5 >Emitted(86, 13) Source(81, 13) + SourceIndex(0) +6 >Emitted(86, 14) Source(81, 14) + SourceIndex(0) +7 >Emitted(86, 15) Source(81, 15) + SourceIndex(0) --- >>>}; 1 > @@ -1514,9 +1517,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 >} 3 > ; -1 >Emitted(84, 1) Source(82, 1) + SourceIndex(0) -2 >Emitted(84, 2) Source(82, 2) + SourceIndex(0) -3 >Emitted(84, 3) Source(82, 3) + SourceIndex(0) +1 >Emitted(87, 1) Source(82, 1) + SourceIndex(0) +2 >Emitted(87, 2) Source(82, 2) + SourceIndex(0) +3 >Emitted(87, 3) Source(82, 3) + SourceIndex(0) --- >>>f(); 1-> @@ -1529,9 +1532,9 @@ sourceFile:sourceMapValidationStatements.ts 2 >f 3 > () 4 > ; -1->Emitted(85, 1) Source(83, 1) + SourceIndex(0) -2 >Emitted(85, 2) Source(83, 2) + SourceIndex(0) -3 >Emitted(85, 4) Source(83, 4) + SourceIndex(0) -4 >Emitted(85, 5) Source(83, 5) + SourceIndex(0) +1->Emitted(88, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(88, 2) Source(83, 2) + SourceIndex(0) +3 >Emitted(88, 4) Source(83, 4) + SourceIndex(0) +4 >Emitted(88, 5) Source(83, 5) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationStatements.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationWithComments.js.map b/tests/baselines/reference/sourceMapValidationWithComments.js.map index 75563cf9b95..fe250495802 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,IAAM,UAAU;IAAhBA,SAAMA,UAAUA;IAoBhBC,CAACA;IAlBiBD,oBAASA,GAAvBA;QAGIE,AADAA,2BAA2BA;YACvBA,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;QAIJA,AAHAA,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":["DebugClass","DebugClass.constructor","DebugClass.debugFunc"],"mappings":"AAAA;IAAAA;IAoBAC,CAACA;IAlBiBD,oBAASA,GAAvBA;QAGIE,AADAA,2BAA2BA;YACvBA,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;QAIJA,AAHAA,yBAAyBA;QAGzBA,MAAMA,CAACA,IAAIA,CAACA;IAChBA,CAACA;IACLF,iBAACA;AAADA,CAACA,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 929091139f7..5d2716cd127 100644 --- a/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationWithComments.sourcemap.txt @@ -10,32 +10,21 @@ sourceFile:sourceMapValidationWithComments.ts ------------------------------------------------------------------- >>>var DebugClass = (function () { 1 > -2 >^^^^ -3 > ^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > DebugClass 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 15) Source(1, 17) + SourceIndex(0) --- >>> function DebugClass() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^ +2 > ^^-> 1-> -2 > class -3 > DebugClass 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (DebugClass) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (DebugClass) -3 >Emitted(2, 24) Source(1, 17) + SourceIndex(0) name (DebugClass) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +1->class DebugClass { > > public static debugFunc() { > @@ -57,7 +46,7 @@ sourceFile:sourceMapValidationWithComments.ts > } > 2 > } -1 >Emitted(3, 5) Source(21, 1) + SourceIndex(0) name (DebugClass.constructor) +1->Emitted(3, 5) Source(21, 1) + SourceIndex(0) name (DebugClass.constructor) 2 >Emitted(3, 6) Source(21, 2) + SourceIndex(0) name (DebugClass.constructor) --- >>> DebugClass.debugFunc = function () { diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map index 384caae23ea..cc528f82334 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":"AAEA,AAFA,gFAAgF;AAChF,wIAAwI;IAClI,CAAC;IAAPA,SAAMA,CAACA;IACPC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD,IAAM,CAAC;IAAPE,SAAMA,CAACA;IACPC,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":["c","c.constructor","d","d.constructor"],"mappings":"AAEA,AAFA,gFAAgF;AAChF,wIAAwI;;IACxIA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD;IAAAE;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,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 b67d4e3be57..b26b7c71db6 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt @@ -32,34 +32,21 @@ sourceFile:../testFiles/app.ts 2 >Emitted(2, 137) Source(2, 137) + SourceIndex(0) --- >>>var c = (function () { -1 >^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > c -1 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 8) + SourceIndex(0) ---- >>> function c() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> -2 > class -3 > c -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c) -3 >Emitted(4, 15) Source(3, 8) + SourceIndex(0) name (c) +1 >^^^^ +2 > ^^-> +1 > + > +1 >Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class c { > 2 > } -1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) 2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) --- >>> return c; @@ -92,35 +79,24 @@ sourceFile:../testFiles/app2.ts ------------------------------------------------------------------- >>>var d = (function () { 1-> -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1-> -2 >class -3 > d 1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(8, 5) Source(1, 7) + SourceIndex(1) -3 >Emitted(8, 6) Source(1, 8) + SourceIndex(1) --- >>> function d() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > d 1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) name (d) -2 >Emitted(9, 14) Source(1, 7) + SourceIndex(1) name (d) -3 >Emitted(9, 15) Source(1, 8) + SourceIndex(1) name (d) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class d { > 2 > } -1 >Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) +1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) 2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) name (d.constructor) --- >>> return d; diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map index e665c70c15b..b27ad076cc8 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":"AAEA,AAFA,gFAAgF;AAChF,wIAAwI;IAClI,CAAC;IAAPA,SAAMA,CAACA;IACPC,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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IACPC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"app.js","sourceRoot":"","sources":["../testFiles/app.ts"],"names":["c","c.constructor"],"mappings":"AAEA,AAFA,gFAAgF;AAChF,wIAAwI;;IACxIA;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 diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt index 7d94304c359..6064ee003df 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt @@ -32,34 +32,21 @@ sourceFile:../testFiles/app.ts 2 >Emitted(2, 137) Source(2, 137) + SourceIndex(0) --- >>>var c = (function () { -1 >^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > c -1 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 8) + SourceIndex(0) ---- >>> function c() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> -2 > class -3 > c -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c) -3 >Emitted(4, 15) Source(3, 8) + SourceIndex(0) name (c) +1 >^^^^ +2 > ^^-> +1 > + > +1 >Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class c { > 2 > } -1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) 2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) --- >>> return c; @@ -98,35 +85,24 @@ sourceFile:../testFiles/app2.ts ------------------------------------------------------------------- >>>var d = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > d 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 8) + SourceIndex(0) --- >>> function d() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > d 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (d) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (d) -3 >Emitted(2, 15) Source(1, 8) + SourceIndex(0) name (d) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class d { > 2 > } -1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) 2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (d.constructor) --- >>> return d; diff --git a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map index 1142b4313a7..bac55383fff 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,IAAaA,EAAEA;QAAfC,SAAaA,EAAEA;QACfC,CAACA;QAADD,SAACA;IAADA,CAACA,AADDD,IACCA;IADYA,KAAEA,GAAFA,EACZA,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":["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 diff --git a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt index e58ed879c6f..63d4cec6ef1 100644 --- a/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt @@ -129,36 +129,25 @@ sourceFile:tests/cases/compiler/b.ts --- >>> var c1 = (function () { 1->^^^^ -2 > ^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c1 1->Emitted(7, 5) Source(2, 5) + SourceIndex(1) name (m1) -2 >Emitted(7, 9) Source(2, 18) + SourceIndex(1) name (m1) -3 >Emitted(7, 11) Source(2, 20) + SourceIndex(1) name (m1) --- >>> function c1() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ +2 > ^^-> 1-> -2 > export class -3 > c1 1->Emitted(8, 9) Source(2, 5) + SourceIndex(1) name (m1.c1) -2 >Emitted(8, 18) Source(2, 18) + SourceIndex(1) name (m1.c1) -3 >Emitted(8, 20) Source(2, 20) + SourceIndex(1) name (m1.c1) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^-> -1 > { +1->export class c1 { > 2 > } -1 >Emitted(9, 9) Source(3, 5) + SourceIndex(1) name (m1.c1.constructor) +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) --- >>> return c1; @@ -188,21 +177,18 @@ sourceFile:tests/cases/compiler/b.ts >>> m1.c1 = c1; 1->^^^^ 2 > ^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^-> +3 > ^^^^^ +4 > ^ +5 > ^^^^^^-> 1-> 2 > c1 -3 > -4 > c1 { - > } -5 > +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, 13) Source(2, 18) + SourceIndex(1) name (m1) -4 >Emitted(12, 15) Source(3, 6) + SourceIndex(1) name (m1) -5 >Emitted(12, 16) Source(3, 6) + 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) --- >>>})(m1 || (m1 = {})); 1-> diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map index 0a164a2a2c2..e3262d8c686 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":"AAEA,AAFA,gFAAgF;AAChF,0GAA0G;IACpG,CAAC;IAAPA,SAAMA,CAACA;IACPC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD,IAAM,CAAC;IAAPE,SAAMA,CAACA;IACPC,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":["c","c.constructor","d","d.constructor"],"mappings":"AAEA,AAFA,gFAAgF;AAChF,0GAA0G;;IAC1GA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC;ACHD;IAAAE;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,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 1923426adc6..560fd29616d 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt @@ -32,34 +32,21 @@ sourceFile:app.ts 2 >Emitted(2, 107) Source(2, 107) + SourceIndex(0) --- >>>var c = (function () { -1 >^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > c -1 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 8) + SourceIndex(0) ---- >>> function c() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> -2 > class -3 > c -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c) -3 >Emitted(4, 15) Source(3, 8) + SourceIndex(0) name (c) +1 >^^^^ +2 > ^^-> +1 > + > +1 >Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class c { > 2 > } -1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) 2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) --- >>> return c; @@ -92,35 +79,24 @@ sourceFile:app2.ts ------------------------------------------------------------------- >>>var d = (function () { 1-> -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1-> -2 >class -3 > d 1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(8, 5) Source(1, 7) + SourceIndex(1) -3 >Emitted(8, 6) Source(1, 8) + SourceIndex(1) --- >>> function d() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > d 1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) name (d) -2 >Emitted(9, 14) Source(1, 7) + SourceIndex(1) name (d) -3 >Emitted(9, 15) Source(1, 8) + SourceIndex(1) name (d) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class d { > 2 > } -1 >Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) +1->Emitted(10, 5) Source(2, 1) + SourceIndex(1) name (d.constructor) 2 >Emitted(10, 6) Source(2, 2) + SourceIndex(1) name (d.constructor) --- >>> return d; diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map index 027c795967c..9fff2ee3f66 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":"AAEA,AAFA,gFAAgF;AAChF,0GAA0G;IACpG,CAAC;IAAPA,SAAMA,CAACA;IACPC,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,IAAM,CAAC;IAAPA,SAAMA,CAACA;IACPC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":["c","c.constructor"],"mappings":"AAEA,AAFA,gFAAgF;AAChF,0GAA0G;;IAC1GA;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 diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt index cfcd91a6552..f91aaea6ab9 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt @@ -32,34 +32,21 @@ sourceFile:app.ts 2 >Emitted(2, 107) Source(2, 107) + SourceIndex(0) --- >>>var c = (function () { -1 >^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 > - >class -2 > c -1 >Emitted(3, 5) Source(3, 7) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 8) + SourceIndex(0) ---- >>> function c() { -1->^^^^ -2 > ^^^^^^^^^ -3 > ^ -1-> -2 > class -3 > c -1->Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) -2 >Emitted(4, 14) Source(3, 7) + SourceIndex(0) name (c) -3 >Emitted(4, 15) Source(3, 8) + SourceIndex(0) name (c) +1 >^^^^ +2 > ^^-> +1 > + > +1 >Emitted(4, 5) Source(3, 1) + SourceIndex(0) name (c) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class c { > 2 > } -1 >Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) +1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (c.constructor) 2 >Emitted(5, 6) Source(4, 2) + SourceIndex(0) name (c.constructor) --- >>> return c; @@ -98,35 +85,24 @@ sourceFile:app2.ts ------------------------------------------------------------------- >>>var d = (function () { 1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^-> 1 > -2 >class -3 > d 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 8) + SourceIndex(0) --- >>> function d() { 1->^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > class -3 > d 1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (d) -2 >Emitted(2, 14) Source(1, 7) + SourceIndex(0) name (d) -3 >Emitted(2, 15) Source(1, 8) + SourceIndex(0) name (d) --- >>> } -1 >^^^^ +1->^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->class d { > 2 > } -1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) +1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (d.constructor) 2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (d.constructor) --- >>> return d; diff --git a/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map b/tests/baselines/reference/sourcemapValidationDuplicateNames.js.map index 69e580b7629..65bb725231c 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,IAAaA,CAACA;QAAdC,SAAaA,CAACA;QACdC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,IAACA,GAADA,CACZA,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":["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 diff --git a/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt b/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt index 805658a0bd7..a5d1f637a15 100644 --- a/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt +++ b/tests/baselines/reference/sourcemapValidationDuplicateNames.sourcemap.txt @@ -68,36 +68,25 @@ sourceFile:sourcemapValidationDuplicateNames.ts --- >>> var c = (function () { 1->^^^^ -2 > ^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > c 1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) name (m1) -2 >Emitted(4, 9) Source(3, 18) + SourceIndex(0) name (m1) -3 >Emitted(4, 10) Source(3, 19) + SourceIndex(0) name (m1) --- >>> function c() { 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^ +2 > ^^-> 1-> -2 > export class -3 > c 1->Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m1.c) -2 >Emitted(5, 18) Source(3, 18) + SourceIndex(0) name (m1.c) -3 >Emitted(5, 19) Source(3, 19) + SourceIndex(0) name (m1.c) --- >>> } -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^-> -1 > { +1->export class c { > 2 > } -1 >Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (m1.c.constructor) +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) --- >>> return c; @@ -127,21 +116,18 @@ sourceFile:sourcemapValidationDuplicateNames.ts >>> m1.c = c; 1->^^^^ 2 > ^^^^ -3 > ^^^ -4 > ^ -5 > ^ -6 > ^^^^^^^^-> +3 > ^^^^ +4 > ^ +5 > ^^^^^^^^-> 1-> 2 > c -3 > -4 > c { - > } -5 > +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, 12) Source(3, 18) + SourceIndex(0) name (m1) -4 >Emitted(9, 13) Source(4, 6) + SourceIndex(0) name (m1) -5 >Emitted(9, 14) Source(4, 6) + 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) --- >>>})(m1 || (m1 = {})); 1-> diff --git a/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js b/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js index d439cc3b020..87aff29c210 100644 --- a/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js +++ b/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js @@ -2,4 +2,6 @@ var x = {x ?: 1} // should not crash //// [spaceBeforeQuestionMarkInPropertyAssignment.js] -var x = { x: 1 }; // should not crash +var x = { + x: 1 +}; // should not crash diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js index 3116571166f..d0b84d99009 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js @@ -23,9 +23,13 @@ var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); //// [specializationsShouldNotAffectEachOther.js] var series; function foo() { - var seriesExtent = function (series) { return null; }; + var seriesExtent = function (series) { + return null; + }; var series2; series2.map(seriesExtent); return null; } -var keyExtent2 = series.data.map(function (d) { return d; }); +var keyExtent2 = series.data.map(function (d) { + return d; +}); diff --git a/tests/baselines/reference/specializeVarArgs1.js b/tests/baselines/reference/specializeVarArgs1.js index cc09df1daa6..3eac6daa61f 100644 --- a/tests/baselines/reference/specializeVarArgs1.js +++ b/tests/baselines/reference/specializeVarArgs1.js @@ -23,6 +23,8 @@ a.push('Some Value'); //// [specializeVarArgs1.js] -function observableArray() { return null; } +function observableArray() { + return null; +} var a = observableArray(); a.push('Some Value'); diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 36280f9a44e..4c30628af4f 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -41,7 +41,11 @@ var MyView = (function (_super) { } return MyView; })(View); -var m = { model: new Model() }; -var aView = new View({ model: new Model() }); +var m = { + model: new Model() +}; +var aView = new View({ + model: new Model() +}); var aView2 = new View(m); var myView = new MyView(m); // was error diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt b/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt index e7272aeaf8e..0e67cc37f32 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/specializedOverloadWithRestParameters.ts(3,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/specializedOverloadWithRestParameters.ts(8,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/specializedOverloadWithRestParameters.ts(3,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/specializedOverloadWithRestParameters.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ==== tests/cases/compiler/specializedOverloadWithRestParameters.ts (2 errors) ==== class Base { foo() { } } class Derived1 extends Base { bar() { } } function f(tagName: 'span', ...args): Derived1; // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f(tagName: number, ...args): Base; function f(tagName: any): Base { return null; } function g(tagName: 'span', arg): Derived1; // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function g(tagName: number, arg): Base; function g(tagName: any): Base { diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index f091a39677c..56bf07f6fdf 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -22,7 +22,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -30,7 +31,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); function f(tagName) { diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js index 1607f730e42..bf6c73bdf40 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js @@ -13,5 +13,9 @@ function x3(a, cb) { cb(a); } // both are errors -x3(1, function (x) { return 1; }); -x3(1, function (x) { return 1; }); +x3(1, function (x) { + return 1; +}); +x3(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt index f5883a17d7e..6b705a0c34d 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(4,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(8,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(14,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(20,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -17,7 +17,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignat // All the below should be errors function foo(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: number) { } diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js index e5e06d48a8d..eaf0605ef17 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js @@ -69,23 +69,27 @@ var a3: { //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should be errors -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { }; + C2.prototype.foo = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { }; + C3.prototype.foo = function (x) { + }; return C3; })(); var a; diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js index 17a886a0784..882d0da9124 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js @@ -84,23 +84,27 @@ var a3: { //// [specializedSignatureIsSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should not be errors -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { }; + C2.prototype.foo = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { }; + C3.prototype.foo = function (x) { + }; return C3; })(); var a; diff --git a/tests/baselines/reference/staticAndMemberFunctions.js b/tests/baselines/reference/staticAndMemberFunctions.js index 71f146b72f7..0d1d9e81900 100644 --- a/tests/baselines/reference/staticAndMemberFunctions.js +++ b/tests/baselines/reference/staticAndMemberFunctions.js @@ -8,7 +8,9 @@ class T { var T = (function () { function T() { } - T.x = function () { }; - T.prototype.y = function () { }; + T.x = function () { + }; + T.prototype.y = function () { + }; return T; })(); diff --git a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js index be667ae1f3b..ccfbcc85602 100644 --- a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js +++ b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js @@ -11,7 +11,9 @@ class C { var C = (function () { function C() { } - C.prototype.f = function () { }; - C.f = function () { }; + C.prototype.f = function () { + }; + C.f = function () { + }; return C; })(); diff --git a/tests/baselines/reference/staticClassProps.js b/tests/baselines/reference/staticClassProps.js index aad40e29b76..3dc7dbb67d0 100644 --- a/tests/baselines/reference/staticClassProps.js +++ b/tests/baselines/reference/staticClassProps.js @@ -12,7 +12,8 @@ class C var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; C.z = 1; return C; })(); diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 529cc230d73..af5780d96cf 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { return 1; }; + Base.prototype.foo = function () { + return 1; + }; Base.create = function () { return new this(); }; @@ -34,7 +36,9 @@ var Derived = (function (_super) { function Derived() { _super.apply(this, arguments); } - Derived.prototype.foo = function () { return 2; }; + Derived.prototype.foo = function () { + return 2; + }; return Derived; })(Base); var d = Derived.create(); diff --git a/tests/baselines/reference/staticGetterAndSetter.js b/tests/baselines/reference/staticGetterAndSetter.js index 5c61af0b7cc..7c6ef26e739 100644 --- a/tests/baselines/reference/staticGetterAndSetter.js +++ b/tests/baselines/reference/staticGetterAndSetter.js @@ -10,8 +10,11 @@ var Foo = (function () { function Foo() { } Object.defineProperty(Foo, "Foo", { - get: function () { return 0; }, - set: function (n) { }, + get: function () { + return 0; + }, + set: function (n) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index a577bad3a86..dfe39119d32 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -18,7 +18,8 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function doThing(x) { } +function doThing(x) { +} var A = (function () { function A() { this.p = doThing(A); // OK diff --git a/tests/baselines/reference/staticInstanceResolution4.js b/tests/baselines/reference/staticInstanceResolution4.js index c74030d047e..6e81d67dc00 100644 --- a/tests/baselines/reference/staticInstanceResolution4.js +++ b/tests/baselines/reference/staticInstanceResolution4.js @@ -9,7 +9,8 @@ A.foo(); var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); A.foo(); diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 843b79ec6f1..6ca976ae46a 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -19,7 +19,10 @@ function z(w3: WinJS) { } //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { // these 3 should be errors - var x = function (w1) { }; - var y = function (w2) { }; - function z(w3) { } + var x = function (w1) { + }; + var y = function (w2) { + }; + function z(w3) { + } }); diff --git a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js index edd657d7da1..df0858edc08 100644 --- a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js +++ b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js @@ -17,12 +17,18 @@ var C = (function () { function C() { } C.foo = function () { - C.foo = function () { }; + C.foo = function () { + }; }; C.bar = function (x) { - C.bar = function () { }; // error - C.bar = function (x) { return x; }; // ok - C.bar = function (x) { return 1; }; // ok + C.bar = function () { + }; // error + C.bar = function (x) { + return x; + }; // ok + C.bar = function (x) { + return 1; + }; // ok return 1; }; return C; diff --git a/tests/baselines/reference/staticMemberExportAccess.js b/tests/baselines/reference/staticMemberExportAccess.js index 37799356708..5de5a76ca7a 100644 --- a/tests/baselines/reference/staticMemberExportAccess.js +++ b/tests/baselines/reference/staticMemberExportAccess.js @@ -24,7 +24,9 @@ Sammy.bar(); var Sammy = (function () { function Sammy() { } - Sammy.prototype.foo = function () { return "hi"; }; + Sammy.prototype.foo = function () { + return "hi"; + }; Sammy.bar = function () { return -1; }; diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js index 7b24a29b326..23e6fa9dd06 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js @@ -29,13 +29,15 @@ c = a; var B = (function () { function B() { } - B.prototype.name = function () { }; + B.prototype.name = function () { + }; return B; })(); var C = (function () { function C() { } - C.name = function () { }; + C.name = function () { + }; return C; })(); var a = new B(); diff --git a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js index 0c728cdbab6..1c31ef82d91 100644 --- a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js +++ b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js @@ -20,18 +20,21 @@ class C3 { var C = (function () { function C() { } - C.f = function (x) { }; + C.f = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.f = function (x) { }; + C2.f = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.f = function (x) { }; + C3.f = function (x) { + }; return C3; })(); diff --git a/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js b/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js index 76fa7d6249e..499e16ec581 100644 --- a/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js +++ b/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js @@ -7,6 +7,8 @@ class C { var C = (function () { function C() { } - C.s = function (p) { return p; }; + C.s = function (p) { + return p; + }; return C; })(); diff --git a/tests/baselines/reference/staticModifierAlreadySeen.js b/tests/baselines/reference/staticModifierAlreadySeen.js index d767a9b51d1..b097f3924e4 100644 --- a/tests/baselines/reference/staticModifierAlreadySeen.js +++ b/tests/baselines/reference/staticModifierAlreadySeen.js @@ -8,7 +8,8 @@ class C { var C = (function () { function C() { } - C.bar = function () { }; + C.bar = function () { + }; C.foo = 1; return C; })(); diff --git a/tests/baselines/reference/staticOffOfInstance1.js b/tests/baselines/reference/staticOffOfInstance1.js index 58cf24d0529..41b7cd895bb 100644 --- a/tests/baselines/reference/staticOffOfInstance1.js +++ b/tests/baselines/reference/staticOffOfInstance1.js @@ -13,6 +13,7 @@ var List = (function () { List.prototype.Blah = function () { this.Foo(); }; - List.Foo = function () { }; + List.Foo = function () { + }; return List; })(); diff --git a/tests/baselines/reference/staticOffOfInstance2.js b/tests/baselines/reference/staticOffOfInstance2.js index ceac77419a4..ff139859bf7 100644 --- a/tests/baselines/reference/staticOffOfInstance2.js +++ b/tests/baselines/reference/staticOffOfInstance2.js @@ -16,6 +16,7 @@ var List = (function () { this.Foo(); // no error List.Foo(); }; - List.Foo = function () { }; + List.Foo = function () { + }; return List; })(); diff --git a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js index 50252c606f4..0308805cd7b 100644 --- a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js @@ -18,6 +18,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.f = function () { }; + D.prototype.f = function () { + }; return D; })(); diff --git a/tests/baselines/reference/staticPropertyNotInClassType.js b/tests/baselines/reference/staticPropertyNotInClassType.js index e9df2b2158d..22ff4276deb 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.js +++ b/tests/baselines/reference/staticPropertyNotInClassType.js @@ -47,10 +47,15 @@ var NonGeneric; this.a = a; this.b = b; } - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -73,10 +78,15 @@ var Generic; this.a = a; this.b = b; } - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticPrototypeProperty.js b/tests/baselines/reference/staticPrototypeProperty.js index 471ec743b59..cfd81bedeec 100644 --- a/tests/baselines/reference/staticPrototypeProperty.js +++ b/tests/baselines/reference/staticPrototypeProperty.js @@ -11,7 +11,8 @@ class C2 { var C = (function () { function C() { } - C.prototype = function () { }; + C.prototype = function () { + }; return C; })(); var C2 = (function () { diff --git a/tests/baselines/reference/staticVisibility.js b/tests/baselines/reference/staticVisibility.js index 7dbf49a2baa..0da2e3dbe2c 100644 --- a/tests/baselines/reference/staticVisibility.js +++ b/tests/baselines/reference/staticVisibility.js @@ -58,9 +58,13 @@ var C2 = (function () { this.barback = ""; } Object.defineProperty(C2, "Bar", { - get: function () { return "bar"; } // ok + get: function () { + return "bar"; + } // ok , - set: function (bar) { barback = bar; } // not ok + set: function (bar) { + barback = bar; + } // not ok , enumerable: true, configurable: true diff --git a/tests/baselines/reference/statics.js b/tests/baselines/reference/statics.js index c69fa0aabd7..4da39198b21 100644 --- a/tests/baselines/reference/statics.js +++ b/tests/baselines/reference/statics.js @@ -40,7 +40,9 @@ var M; this.c1 = c1; this.c2 = c2; this.x = C.y + this.c1 + this.c2 + c3; - this.g = function (v) { return C.f(_this.x + C.y + v + _this.c1 + _this.c2 + C.pub); }; + this.g = function (v) { + return C.f(_this.x + C.y + v + _this.c1 + _this.c2 + C.pub); + }; } C.f = function (n) { return "wow: " + (n + C.y + C.pub + C.priv); diff --git a/tests/baselines/reference/staticsInAFunction.js b/tests/baselines/reference/staticsInAFunction.js index e918f4b2901..e6959b7757a 100644 --- a/tests/baselines/reference/staticsInAFunction.js +++ b/tests/baselines/reference/staticsInAFunction.js @@ -11,5 +11,6 @@ function boo() { test(); test(name, string); test(name ? : any); - { } + { + } } diff --git a/tests/baselines/reference/staticsInConstructorBodies.js b/tests/baselines/reference/staticsInConstructorBodies.js index bb91b52a18a..044f183b370 100644 --- a/tests/baselines/reference/staticsInConstructorBodies.js +++ b/tests/baselines/reference/staticsInConstructorBodies.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.m1 = function () { }; // ERROR + C.m1 = function () { + }; // ERROR C.p1 = 0; // ERROR return C; })(); diff --git a/tests/baselines/reference/strictMode5.js b/tests/baselines/reference/strictMode5.js index 8e4021820f1..c46de926dbb 100644 --- a/tests/baselines/reference/strictMode5.js +++ b/tests/baselines/reference/strictMode5.js @@ -36,7 +36,8 @@ var A = (function () { return _this.n(); }; }; - A.prototype.n = function () { }; + A.prototype.n = function () { + }; return A; })(); function bar(x) { diff --git a/tests/baselines/reference/stringIndexerAndConstructor.js b/tests/baselines/reference/stringIndexerAndConstructor.js index db3b9b8770b..6d4cc3747c0 100644 --- a/tests/baselines/reference/stringIndexerAndConstructor.js +++ b/tests/baselines/reference/stringIndexerAndConstructor.js @@ -17,6 +17,7 @@ interface I { var C = (function () { function C() { } - C.v = function () { }; + C.v = function () { + }; return C; })(); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js index 9d70b66887c..ed96311f526 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js @@ -106,7 +106,8 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { } // ok + set: function (v) { + } // ok , enumerable: true, configurable: true @@ -114,7 +115,8 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { }; // ok + C.foo = function () { + }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -129,7 +131,8 @@ var a; var b = { a: '', b: 1, - c: function () { }, + c: function () { + }, "d": '', "e": 1, 1.0: '', @@ -140,7 +143,8 @@ var b = { get X() { return ''; }, - set X(v) { }, + set X(v) { + }, foo: function () { return ''; } diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index c9278c40446..b9195403b20 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -50,7 +50,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { @@ -58,7 +60,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return ''; }; + B.prototype.bar = function () { + return ''; + }; return B; })(A); var Foo = (function () { diff --git a/tests/baselines/reference/stringIndexingResults.js b/tests/baselines/reference/stringIndexingResults.js index a6e00d92ec2..4e80c25d9b9 100644 --- a/tests/baselines/reference/stringIndexingResults.js +++ b/tests/baselines/reference/stringIndexingResults.js @@ -54,7 +54,9 @@ var a; var r7 = a['y']; var r8 = a['a']; var r9 = a[1]; -var b = { y: '' }; +var b = { + y: '' +}; var r10 = b['y']; var r11 = b['a']; var r12 = b[1]; diff --git a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js index 2c9e54e610b..a367c3400f8 100644 --- a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js +++ b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js @@ -7,7 +7,9 @@ module m1 { //// [stringLiteralObjectLiteralDeclaration1.js] var m1; (function (m1) { - m1.n = { 'foo bar': 4 }; + m1.n = { + 'foo bar': 4 + }; })(m1 || (m1 = {})); diff --git a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js index 99ed3fb320a..0c46d72e23a 100644 --- a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js +++ b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js @@ -5,6 +5,8 @@ x.text = "bar" //// [stringLiteralPropertyNameWithLineContinuation1.js] -var x = { 'text\ -': 'hello' }; +var x = { + 'text\ +': 'hello' +}; x.text = "bar"; diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt index d9e01d9ccc8..8a916c16b2d 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(22,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(26,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(30,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(34,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(38,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(76,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(89,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(93,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(22,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(26,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(30,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(34,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(38,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(77,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(90,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(94,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(95,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(97,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(96,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(98,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(99,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(100,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts (13 errors) ==== @@ -36,31 +36,31 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLite function f4(x: any) { } function f5(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f5(x: number); function f5(x: any) { } function f6(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f6(x: boolean); function f6(x: any) { } function f7(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f7(x: Date); function f7(x: any) { } function f8(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f8(x: RegExp); function f8(x: any) { } function f9(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f9(x: () => {}); function f9(x: any) { } @@ -86,6 +86,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLite trim(): string { return null; } length: number; substr(from: number, length?: number): string { return null; } + valueOf(): string { return null; } [index: number]: string; } @@ -100,7 +101,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLite // BUG 831846 function f11(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f11(x: I); function f11(x: any) { } @@ -115,7 +116,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLite enum E { A } function f14(x: 'a'); - ~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function f14(x: E); function f14(x: any) { } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js index 6260493dea0..64609d96ecc 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js @@ -61,6 +61,7 @@ class C implements String { trim(): string { return null; } length: number; substr(from: number, length?: number): string { return null; } + valueOf(): string { return null; } [index: number]: string; } @@ -101,21 +102,36 @@ function f16(x: any) { } //// [stringLiteralTypeIsSubtypeOfString.js] // string literal types are subtypes of string, any -function f1(x) { } -function f2(x) { } -function f3(x) { } -function f4(x) { } -function f5(x) { } -function f6(x) { } -function f7(x) { } -function f8(x) { } -function f9(x) { } +function f1(x) { +} +function f2(x) { +} +function f3(x) { +} +function f4(x) { +} +function f5(x) { +} +function f6(x) { +} +function f7(x) { +} +function f8(x) { +} +function f9(x) { +} var C = (function () { function C() { } - C.prototype.toString = function () { return null; }; - C.prototype.charAt = function (pos) { return null; }; - C.prototype.charCodeAt = function (index) { return null; }; + C.prototype.toString = function () { + return null; + }; + C.prototype.charAt = function (pos) { + return null; + }; + C.prototype.charCodeAt = function (index) { + return null; + }; C.prototype.concat = function () { var strings = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -123,31 +139,71 @@ var C = (function () { } return null; }; - C.prototype.indexOf = function (searchString, position) { return null; }; - C.prototype.lastIndexOf = function (searchString, position) { return null; }; - C.prototype.localeCompare = function (that) { return null; }; - C.prototype.match = function (regexp) { return null; }; - C.prototype.replace = function (searchValue, replaceValue) { return null; }; - C.prototype.search = function (regexp) { return null; }; - C.prototype.slice = function (start, end) { return null; }; - C.prototype.split = function (separator, limit) { return null; }; - C.prototype.substring = function (start, end) { return null; }; - C.prototype.toLowerCase = function () { return null; }; - C.prototype.toLocaleLowerCase = function () { return null; }; - C.prototype.toUpperCase = function () { return null; }; - C.prototype.toLocaleUpperCase = function () { return null; }; - C.prototype.trim = function () { return null; }; - C.prototype.substr = function (from, length) { return null; }; + C.prototype.indexOf = function (searchString, position) { + return null; + }; + C.prototype.lastIndexOf = function (searchString, position) { + return null; + }; + C.prototype.localeCompare = function (that) { + return null; + }; + C.prototype.match = function (regexp) { + return null; + }; + C.prototype.replace = function (searchValue, replaceValue) { + return null; + }; + C.prototype.search = function (regexp) { + return null; + }; + C.prototype.slice = function (start, end) { + return null; + }; + C.prototype.split = function (separator, limit) { + return null; + }; + C.prototype.substring = function (start, end) { + return null; + }; + C.prototype.toLowerCase = function () { + return null; + }; + C.prototype.toLocaleLowerCase = function () { + return null; + }; + C.prototype.toUpperCase = function () { + return null; + }; + C.prototype.toLocaleUpperCase = function () { + return null; + }; + C.prototype.trim = function () { + return null; + }; + C.prototype.substr = function (from, length) { + return null; + }; + C.prototype.valueOf = function () { + return null; + }; return C; })(); -function f10(x) { } -function f11(x) { } -function f12(x) { } -function f13(x) { } +function f10(x) { +} +function f11(x) { +} +function f12(x) { +} +function f13(x) { +} var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f14(x) { } -function f15(x) { } -function f16(x) { } +function f14(x) { +} +function f15(x) { +} +function f16(x) { +} diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt index a2404ac6482..b89553fcf5b 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(3,1): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(4,9): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(4,18): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(5,10): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(8,5): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(12,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -7,7 +7,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(17,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(18,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(22,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(23,8): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(23,17): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(24,8): error TS2381: A signature with an implementation cannot use a string literal type. @@ -15,10 +15,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType // String literal types are only valid in overload signatures function foo(x: 'hi') { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. var f = function foo(x: 'hi') { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. var f2 = (x: 'hi', y: 'hi') => { } ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -53,7 +53,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType ~~~~~~~~~~~~~~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. a: function foo(x: 'hi', y: 'hi') { }, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. b: (x: 'hi') => { } ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js index 724c20c6309..dc2b2a73412 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js @@ -28,18 +28,25 @@ var b = { //// [stringLiteralTypesInImplementationSignatures.js] // String literal types are only valid in overload signatures -function foo(x) { } -var f = function foo(x) { }; -var f2 = function (x, y) { }; +function foo(x) { +} +var f = function foo(x) { +}; +var f2 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var a; var b = { - foo: function (x) { }, - a: function foo(x, y) { }, - b: function (x) { } + foo: function (x) { + }, + a: function foo(x, y) { + }, + b: function (x) { + } }; diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt index 3cc172c96d5..8d296e68a17 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(4,1): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(4,10): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(8,5): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(12,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(13,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. @@ -19,7 +19,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType function foo(x: any); function foo(x: 'hi') { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. class C { diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js index 5050709c213..2ecd3330e20 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js @@ -31,15 +31,19 @@ var b = { //// [stringLiteralTypesInImplementationSignatures2.js] // String literal types are only valid in overload signatures -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var a; var b = { - foo: function (x) { }, - foo: function (x) { } + foo: function (x) { + }, + foo: function (x) { + } }; diff --git a/tests/baselines/reference/stringPropCodeGen.js b/tests/baselines/reference/stringPropCodeGen.js index ae8cfa3d5aa..46e1a6eb920 100644 --- a/tests/baselines/reference/stringPropCodeGen.js +++ b/tests/baselines/reference/stringPropCodeGen.js @@ -15,7 +15,8 @@ a.bar.toString(); //// [stringPropCodeGen.js] var a = { - "foo": function () { }, + "foo": function () { + }, "bar": 5 }; a.foo(); diff --git a/tests/baselines/reference/stripInternal1.js b/tests/baselines/reference/stripInternal1.js index c5d350bcd86..9deadf1fc31 100644 --- a/tests/baselines/reference/stripInternal1.js +++ b/tests/baselines/reference/stripInternal1.js @@ -10,9 +10,11 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; // @internal - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/structural1.js b/tests/baselines/reference/structural1.js index 73b033a525c..ebafbc8f0a0 100644 --- a/tests/baselines/reference/structural1.js +++ b/tests/baselines/reference/structural1.js @@ -18,5 +18,8 @@ var M; function f(i) { } M.f = f; - f({ salt: 2, pepper: 0 }); + f({ + salt: 2, + pepper: 0 + }); })(M || (M = {})); diff --git a/tests/baselines/reference/subtypesOfAny.js b/tests/baselines/reference/subtypesOfAny.js index e73a120ed63..973db6a9a74 100644 --- a/tests/baselines/reference/subtypesOfAny.js +++ b/tests/baselines/reference/subtypesOfAny.js @@ -149,7 +149,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 7fe3d28278b..d9901e6cea4 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -143,7 +143,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; @@ -174,12 +175,22 @@ function f2(x, y) { var r4 = true ? x : new Date(); var r5 = true ? /1/ : x; var r5 = true ? x : /1/; - var r6 = true ? { foo: 1 } : x; - var r6 = true ? x : { foo: 1 }; - var r7 = true ? function () { } : x; - var r7 = true ? x : function () { }; - var r8 = true ? function (x) { return x; } : x; - var r8b = true ? x : function (x) { return x; }; // type parameters not identical across declarations + var r6 = true ? { + foo: 1 + } : x; + var r6 = true ? x : { + foo: 1 + }; + var r7 = true ? function () { + } : x; + var r7 = true ? x : function () { + }; + var r8 = true ? function (x) { + return x; + } : x; + var r8b = true ? x : function (x) { + return x; + }; // type parameters not identical across declarations var i1; var r9 = true ? i1 : x; var r9 = true ? x : i1; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js index e1c137f77e4..07f2170aca1 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js @@ -199,7 +199,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; @@ -241,16 +242,26 @@ function f9(x) { var r5 = true ? x : /1/; // ok } function f10(x) { - var r6 = true ? { foo: 1 } : x; // ok - var r6 = true ? x : { foo: 1 }; // ok + var r6 = true ? { + foo: 1 + } : x; // ok + var r6 = true ? x : { + foo: 1 + }; // ok } function f11(x) { - var r7 = true ? function () { } : x; // ok - var r7 = true ? x : function () { }; // ok + var r7 = true ? function () { + } : x; // ok + var r7 = true ? x : function () { + }; // ok } function f12(x) { - var r8 = true ? function (x) { return x; } : x; // ok - var r8b = true ? x : function (x) { return x; }; // ok, type parameters not identical across declarations + var r8 = true ? function (x) { + return x; + } : x; // ok + var r8b = true ? x : function (x) { + return x; + }; // ok, type parameters not identical across declarations } function f13(x) { var i1; diff --git a/tests/baselines/reference/subtypesOfUnion.js b/tests/baselines/reference/subtypesOfUnion.js index 926efc3e921..a18ebb944b9 100644 --- a/tests/baselines/reference/subtypesOfUnion.js +++ b/tests/baselines/reference/subtypesOfUnion.js @@ -68,7 +68,8 @@ var A2 = (function () { } return A2; })(); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypingWithCallSignatures.js b/tests/baselines/reference/subtypingWithCallSignatures.js index 73ca2c6543c..560871cce4e 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures.js +++ b/tests/baselines/reference/subtypingWithCallSignatures.js @@ -14,8 +14,16 @@ module CallSignature { //// [subtypingWithCallSignatures.js] var CallSignature; (function (CallSignature) { - var r = foo1(function (x) { return 1; }); // ok because base returns void - var r2 = foo1(function (x) { return ''; }); // ok because base returns void - var r3 = foo2(function (x, y) { return 1; }); // ok because base returns void - var r4 = foo2(function (x) { return ''; }); // ok because base returns void + var r = foo1(function (x) { + return 1; + }); // ok because base returns void + var r2 = foo1(function (x) { + return ''; + }); // ok because base returns void + var r3 = foo2(function (x, y) { + return 1; + }); // ok because base returns void + var r4 = foo2(function (x) { + return ''; + }); // ok because base returns void })(CallSignature || (CallSignature = {})); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index e1341914739..cd430902af0 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -206,51 +206,160 @@ var OtherDerived = (function (_super) { } return OtherDerived; })(Base); -var r1arg1 = function (x) { return [x]; }; -var r1arg2 = function (x) { return [1]; }; +var r1arg1 = function (x) { + return [ + x + ]; +}; +var r1arg2 = function (x) { + return [ + 1 + ]; +}; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions -var r2arg1 = function (x) { return ['']; }; -var r2arg2 = function (x) { return ['']; }; +var r1a = [ + r1arg2, + r1arg1 +]; // generic signature, subtype in both directions +var r1b = [ + r1arg1, + r1arg2 +]; // generic signature, subtype in both directions +var r2arg1 = function (x) { + return [ + '' + ]; +}; +var r2arg2 = function (x) { + return [ + '' + ]; +}; var r2 = foo2(r2arg1); -var r2a = [r2arg1, r2arg2]; -var r2b = [r2arg2, r2arg1]; -var r3arg1 = function (x) { return x; }; -var r3arg2 = function (x) { }; +var r2a = [ + r2arg1, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg1 +]; +var r3arg1 = function (x) { + return x; +}; +var r3arg2 = function (x) { +}; var r3 = foo3(r3arg1); -var r3a = [r3arg1, r3arg2]; -var r3b = [r3arg2, r3arg1]; -var r4arg1 = function (x, y) { return x; }; -var r4arg2 = function (x, y) { return ''; }; +var r3a = [ + r3arg1, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg1 +]; +var r4arg1 = function (x, y) { + return x; +}; +var r4arg2 = function (x, y) { + return ''; +}; var r4 = foo4(r4arg1); // any -var r4a = [r4arg1, r4arg2]; -var r4b = [r4arg2, r4arg1]; -var r5arg1 = function (x) { return null; }; -var r5arg2 = function (x) { return ''; }; +var r4a = [ + r4arg1, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg1 +]; +var r5arg1 = function (x) { + return null; +}; +var r5arg2 = function (x) { + return ''; +}; var r5 = foo5(r5arg1); // any -var r5a = [r5arg1, r5arg2]; -var r5b = [r5arg2, r5arg1]; -var r6arg1 = function (x) { return null; }; -var r6arg2 = function (x) { return null; }; +var r5a = [ + r5arg1, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg1 +]; +var r6arg1 = function (x) { + return null; +}; +var r6arg2 = function (x) { + return null; +}; var r6 = foo6(r6arg1); // any -var r6a = [r6arg1, r6arg2]; -var r6b = [r6arg2, r6arg1]; -var r7arg1 = function (x) { return function (r) { return null; }; }; -var r7arg2 = function (x) { return function (r) { return null; }; }; +var r6a = [ + r6arg1, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg1 +]; +var r7arg1 = function (x) { + return function (r) { + return null; + }; +}; +var r7arg2 = function (x) { + return function (r) { + return null; + }; +}; var r7 = foo7(r7arg1); // any -var r7a = [r7arg1, r7arg2]; -var r7b = [r7arg2, r7arg1]; -var r8arg1 = function (x, y) { return function (r) { return null; }; }; -var r8arg2 = function (x, y) { return function (r) { return null; }; }; +var r7a = [ + r7arg1, + r7arg2 +]; +var r7b = [ + r7arg2, + r7arg1 +]; +var r8arg1 = function (x, y) { + return function (r) { + return null; + }; +}; +var r8arg2 = function (x, y) { + return function (r) { + return null; + }; +}; var r8 = foo8(r8arg1); // any -var r8a = [r8arg1, r8arg2]; -var r8b = [r8arg2, r8arg1]; -var r9arg1 = function (x, y) { return function (r) { return null; }; }; -var r9arg2 = function (x, y) { return function (r) { return null; }; }; +var r8a = [ + r8arg1, + r8arg2 +]; +var r8b = [ + r8arg2, + r8arg1 +]; +var r9arg1 = function (x, y) { + return function (r) { + return null; + }; +}; +var r9arg2 = function (x, y) { + return function (r) { + return null; + }; +}; var r9 = foo9(r9arg1); // any -var r9a = [r9arg1, r9arg2]; -var r9b = [r9arg2, r9arg1]; +var r9a = [ + r9arg1, + r9arg2 +]; +var r9b = [ + r9arg2, + r9arg1 +]; var r10arg1 = function () { var x = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -266,33 +375,89 @@ var r10arg2 = function () { return null; }; var r10 = foo10(r10arg1); // any -var r10a = [r10arg1, r10arg2]; -var r10b = [r10arg2, r10arg1]; -var r11arg1 = function (x, y) { return x; }; -var r11arg2 = function (x, y) { return null; }; +var r10a = [ + r10arg1, + r10arg2 +]; +var r10b = [ + r10arg2, + r10arg1 +]; +var r11arg1 = function (x, y) { + return x; +}; +var r11arg2 = function (x, y) { + return null; +}; var r11 = foo11(r11arg1); // any -var r11a = [r11arg1, r11arg2]; -var r11b = [r11arg2, r11arg1]; -var r12arg1 = function (x, y) { return null; }; -var r12arg2 = function (x, y) { return null; }; +var r11a = [ + r11arg1, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg1 +]; +var r12arg1 = function (x, y) { + return null; +}; +var r12arg2 = function (x, y) { + return null; +}; var r12 = foo12(r12arg1); // any -var r12a = [r12arg1, r12arg2]; -var r12b = [r12arg2, r12arg1]; -var r13arg1 = function (x, y) { return y; }; -var r13arg2 = function (x, y) { return null; }; +var r12a = [ + r12arg1, + r12arg2 +]; +var r12b = [ + r12arg2, + r12arg1 +]; +var r13arg1 = function (x, y) { + return y; +}; +var r13arg2 = function (x, y) { + return null; +}; var r13 = foo13(r13arg1); // any -var r13a = [r13arg1, r13arg2]; -var r13b = [r13arg2, r13arg1]; -var r14arg1 = function (x) { return x.a; }; -var r14arg2 = function (x) { return null; }; +var r13a = [ + r13arg1, + r13arg2 +]; +var r13b = [ + r13arg2, + r13arg1 +]; +var r14arg1 = function (x) { + return x.a; +}; +var r14arg2 = function (x) { + return null; +}; var r14 = foo14(r14arg1); // any -var r14a = [r14arg1, r14arg2]; -var r14b = [r14arg2, r14arg1]; -var r15arg1 = function (x) { return null; }; +var r14a = [ + r14arg1, + r14arg2 +]; +var r14b = [ + r14arg2, + r14arg1 +]; +var r15arg1 = function (x) { + return null; +}; var r15 = foo15(r15arg1); // any -var r16arg1 = function (x) { return [1]; }; +var r16arg1 = function (x) { + return [ + 1 + ]; +}; var r16 = foo16(r16arg1); -var r17arg1 = function (x) { return null; }; +var r17arg1 = function (x) { + return null; +}; var r17 = foo17(r17arg1); // any -var r18arg1 = function (x) { return null; }; +var r18arg1 = function (x) { + return null; +}; var r18 = foo18(r18arg1); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index fb7b0fef551..9dd2cb7a87e 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -155,19 +155,67 @@ var Errors; } return OtherDerived; })(Base); - var r1 = foo2(function (x) { return null; }); // any - var r1a = [function (x) { return ['']; }, function (x) { return null; }]; - var r1b = [function (x) { return null; }, function (x) { return ['']; }]; - var r2arg = function (x) { return function (r) { return null; }; }; - var r2arg2 = function (x) { return function (r) { return null; }; }; + var r1 = foo2(function (x) { + return null; + }); // any + var r1a = [ + function (x) { + return [ + '' + ]; + }, + function (x) { + return null; + } + ]; + var r1b = [ + function (x) { + return null; + }, + function (x) { + return [ + '' + ]; + } + ]; + var r2arg = function (x) { + return function (r) { + return null; + }; + }; + var r2arg2 = function (x) { + return function (r) { + return null; + }; + }; var r2 = foo7(r2arg); // any - var r2a = [r2arg2, r2arg]; - var r2b = [r2arg, r2arg2]; - var r3arg = function (x, y) { return function (r) { return null; }; }; - var r3arg2 = function (x, y) { return function (r) { return null; }; }; + var r2a = [ + r2arg2, + r2arg + ]; + var r2b = [ + r2arg, + r2arg2 + ]; + var r3arg = function (x, y) { + return function (r) { + return null; + }; + }; + var r3arg2 = function (x, y) { + return function (r) { + return null; + }; + }; var r3 = foo8(r3arg); // any - var r3a = [r3arg2, r3arg]; - var r3b = [r3arg, r3arg2]; + var r3a = [ + r3arg2, + r3arg + ]; + var r3b = [ + r3arg, + r3arg2 + ]; var r4arg = function () { var x = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -183,36 +231,90 @@ var Errors; return null; }; var r4 = foo10(r4arg); // any - var r4a = [r4arg2, r4arg]; - var r4b = [r4arg, r4arg2]; - var r5arg = function (x, y) { return null; }; - var r5arg2 = function (x, y) { return null; }; + var r4a = [ + r4arg2, + r4arg + ]; + var r4b = [ + r4arg, + r4arg2 + ]; + var r5arg = function (x, y) { + return null; + }; + var r5arg2 = function (x, y) { + return null; + }; var r5 = foo11(r5arg); // any - var r5a = [r5arg2, r5arg]; - var r5b = [r5arg, r5arg2]; - var r6arg = function (x, y) { return null; }; - var r6arg2 = function (x, y) { return null; }; + var r5a = [ + r5arg2, + r5arg + ]; + var r5b = [ + r5arg, + r5arg2 + ]; + var r6arg = function (x, y) { + return null; + }; + var r6arg2 = function (x, y) { + return null; + }; var r6 = foo12(r6arg); // (x: Array, y: Array) => Array - var r6a = [r6arg2, r6arg]; - var r6b = [r6arg, r6arg2]; - var r7arg = function (x) { return null; }; - var r7arg2 = function (x) { return 1; }; + var r6a = [ + r6arg2, + r6arg + ]; + var r6b = [ + r6arg, + r6arg2 + ]; + var r7arg = function (x) { + return null; + }; + var r7arg2 = function (x) { + return 1; + }; var r7 = foo15(r7arg); // any - var r7a = [r7arg2, r7arg]; - var r7b = [r7arg, r7arg2]; - var r7arg3 = function (x) { return 1; }; + var r7a = [ + r7arg2, + r7arg + ]; + var r7b = [ + r7arg, + r7arg2 + ]; + var r7arg3 = function (x) { + return 1; + }; var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number; - var r7d = [r7arg2, r7arg3]; - var r7e = [r7arg3, r7arg2]; - var r8arg = function (x) { return null; }; + var r7d = [ + r7arg2, + r7arg3 + ]; + var r7e = [ + r7arg3, + r7arg2 + ]; + var r8arg = function (x) { + return null; + }; var r8 = foo16(r8arg); // any - var r9arg = function (x) { return null; }; + var r9arg = function (x) { + return null; + }; var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; })(Errors || (Errors = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { - var r2arg2 = function (x) { return ['']; }; + var r2arg2 = function (x) { + return [ + '' + ]; + }; var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now - var r3arg2 = function (x) { return null; }; + var r3arg2 = function (x) { + return null; + }; var r3 = foo3(r3arg2); // any })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index cbdf92e2e60..abdef75ef91 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -145,52 +145,149 @@ var OtherDerived = (function (_super) { } return OtherDerived; })(Base); -var r1arg = function (x) { return null; }; -var r1arg2 = function (x) { return null; }; +var r1arg = function (x) { + return null; +}; +var r1arg2 = function (x) { + return null; +}; var r1 = foo1(r1arg); -var r1a = [r1arg, r1arg2]; -var r1b = [r1arg2, r1arg]; -var r2arg = function (x) { return ['']; }; -var r2arg2 = function (x) { return ['']; }; +var r1a = [ + r1arg, + r1arg2 +]; +var r1b = [ + r1arg2, + r1arg +]; +var r2arg = function (x) { + return [ + '' + ]; +}; +var r2arg2 = function (x) { + return [ + '' + ]; +}; var r2 = foo2(r2arg); -var r2a = [r2arg, r2arg2]; -var r2b = [r2arg2, r2arg]; -var r3arg = function (x) { return null; }; -var r3arg2 = function (x) { }; +var r2a = [ + r2arg, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg +]; +var r3arg = function (x) { + return null; +}; +var r3arg2 = function (x) { +}; var r3 = foo3(r3arg); -var r3a = [r3arg, r3arg2]; -var r3b = [r3arg2, r3arg]; -var r4arg = function (x, y) { return ''; }; -var r4arg2 = function (x, y) { return ''; }; +var r3a = [ + r3arg, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg +]; +var r4arg = function (x, y) { + return ''; +}; +var r4arg2 = function (x, y) { + return ''; +}; var r4 = foo4(r4arg); -var r4a = [r4arg, r4arg2]; -var r4b = [r4arg2, r4arg]; -var r5arg = function (x) { return null; }; -var r5arg2 = function (x) { return null; }; +var r4a = [ + r4arg, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg +]; +var r5arg = function (x) { + return null; +}; +var r5arg2 = function (x) { + return null; +}; var r5 = foo5(r5arg); -var r5a = [r5arg, r5arg2]; -var r5b = [r5arg2, r5arg]; -var r6arg = function (x) { return null; }; -var r6arg2 = function (x) { return null; }; +var r5a = [ + r5arg, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg +]; +var r6arg = function (x) { + return null; +}; +var r6arg2 = function (x) { + return null; +}; var r6 = foo6(r6arg); -var r6a = [r6arg, r6arg2]; -var r6b = [r6arg2, r6arg]; -var r11arg = function (x, y) { return null; }; -var r11arg2 = function (x, y) { return null; }; +var r6a = [ + r6arg, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg +]; +var r11arg = function (x, y) { + return null; +}; +var r11arg2 = function (x, y) { + return null; +}; var r11 = foo11(r11arg); -var r11a = [r11arg, r11arg2]; -var r11b = [r11arg2, r11arg]; -var r15arg = function (x) { return null; }; -var r15arg2 = function (x) { return null; }; +var r11a = [ + r11arg, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg +]; +var r15arg = function (x) { + return null; +}; +var r15arg2 = function (x) { + return null; +}; var r15 = foo15(r15arg); -var r15a = [r15arg, r15arg2]; -var r15b = [r15arg2, r15arg]; -var r16arg = function (x) { return null; }; -var r16arg2 = function (x) { return null; }; +var r15a = [ + r15arg, + r15arg2 +]; +var r15b = [ + r15arg2, + r15arg +]; +var r16arg = function (x) { + return null; +}; +var r16arg2 = function (x) { + return null; +}; var r16 = foo16(r16arg); -var r16a = [r16arg, r16arg2]; -var r16b = [r16arg2, r16arg]; -var r17arg = function (x) { return null; }; +var r16a = [ + r16arg, + r16arg2 +]; +var r16b = [ + r16arg2, + r16arg +]; +var r17arg = function (x) { + return null; +}; var r17 = foo17(r17arg); -var r18arg = function (x) { return null; }; +var r18arg = function (x) { + return null; +}; var r18 = foo18(r18arg); diff --git a/tests/baselines/reference/subtypingWithCallSignaturesA.js b/tests/baselines/reference/subtypingWithCallSignaturesA.js index a6c8da99b8c..5a679844573 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesA.js +++ b/tests/baselines/reference/subtypingWithCallSignaturesA.js @@ -3,4 +3,6 @@ declare function foo3(cb: (x: number) => number): typeof cb; var r5 = foo3((x: number) => ''); // error //// [subtypingWithCallSignaturesA.js] -var r5 = foo3(function (x) { return ''; }); // error +var r5 = foo3(function (x) { + return ''; +}); // error diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 9a7ecd791c3..ebedd898491 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -209,73 +209,157 @@ var OtherDerived = (function (_super) { var r1arg1; var r1arg2; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions +var r1a = [ + r1arg2, + r1arg1 +]; // generic signature, subtype in both directions +var r1b = [ + r1arg1, + r1arg2 +]; // generic signature, subtype in both directions var r2arg1; var r2arg2; var r2 = foo2(r2arg1); -var r2a = [r2arg1, r2arg2]; -var r2b = [r2arg2, r2arg1]; +var r2a = [ + r2arg1, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg1 +]; var r3arg1; var r3arg2; var r3 = foo3(r3arg1); -var r3a = [r3arg1, r3arg2]; -var r3b = [r3arg2, r3arg1]; +var r3a = [ + r3arg1, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg1 +]; var r4arg1; var r4arg2; var r4 = foo4(r4arg1); // any -var r4a = [r4arg1, r4arg2]; -var r4b = [r4arg2, r4arg1]; +var r4a = [ + r4arg1, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg1 +]; var r5arg1; var r5arg2; var r5 = foo5(r5arg1); // any -var r5a = [r5arg1, r5arg2]; -var r5b = [r5arg2, r5arg1]; +var r5a = [ + r5arg1, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg1 +]; var r6arg1; var r6arg2; var r6 = foo6(r6arg1); // any -var r6a = [r6arg1, r6arg2]; -var r6b = [r6arg2, r6arg1]; +var r6a = [ + r6arg1, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg1 +]; var r7arg1; var r7arg2; var r7 = foo7(r7arg1); // any -var r7a = [r7arg1, r7arg2]; -var r7b = [r7arg2, r7arg1]; +var r7a = [ + r7arg1, + r7arg2 +]; +var r7b = [ + r7arg2, + r7arg1 +]; var r8arg1; var r8arg2; var r8 = foo8(r8arg1); // any -var r8a = [r8arg1, r8arg2]; -var r8b = [r8arg2, r8arg1]; +var r8a = [ + r8arg1, + r8arg2 +]; +var r8b = [ + r8arg2, + r8arg1 +]; var r9arg1; var r9arg2; var r9 = foo9(r9arg1); // any -var r9a = [r9arg1, r9arg2]; -var r9b = [r9arg2, r9arg1]; +var r9a = [ + r9arg1, + r9arg2 +]; +var r9b = [ + r9arg2, + r9arg1 +]; var r10arg1; var r10arg2; var r10 = foo10(r10arg1); // any -var r10a = [r10arg1, r10arg2]; -var r10b = [r10arg2, r10arg1]; +var r10a = [ + r10arg1, + r10arg2 +]; +var r10b = [ + r10arg2, + r10arg1 +]; var r11arg1; var r11arg2; var r11 = foo11(r11arg1); // any -var r11a = [r11arg1, r11arg2]; -var r11b = [r11arg2, r11arg1]; +var r11a = [ + r11arg1, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg1 +]; var r12arg1; var r12arg2; var r12 = foo12(r12arg1); // any -var r12a = [r12arg1, r12arg2]; -var r12b = [r12arg2, r12arg1]; +var r12a = [ + r12arg1, + r12arg2 +]; +var r12b = [ + r12arg2, + r12arg1 +]; var r13arg1; var r13arg2; var r13 = foo13(r13arg1); // any -var r13a = [r13arg1, r13arg2]; -var r13b = [r13arg2, r13arg1]; +var r13a = [ + r13arg1, + r13arg2 +]; +var r13b = [ + r13arg2, + r13arg1 +]; var r14arg1; var r14arg2; var r14 = foo14(r14arg1); // any -var r14a = [r14arg1, r14arg2]; -var r14b = [r14arg2, r14arg1]; +var r14a = [ + r14arg1, + r14arg2 +]; +var r14b = [ + r14arg2, + r14arg1 +]; var r15arg1; var r15 = foo15(r15arg1); // any var r16arg1; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index a74c14e8d4b..f32f26fc693 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -160,42 +160,90 @@ var Errors; var r1arg1; var r1arg2; var r1 = foo2(r1arg1); // any - var r1a = [r1arg2, r1arg1]; - var r1b = [r1arg1, r1arg2]; + var r1a = [ + r1arg2, + r1arg1 + ]; + var r1b = [ + r1arg1, + r1arg2 + ]; var r2arg1; var r2arg2; var r2 = foo7(r2arg1); // any - var r2a = [r2arg2, r2arg1]; - var r2b = [r2arg1, r2arg2]; + var r2a = [ + r2arg2, + r2arg1 + ]; + var r2b = [ + r2arg1, + r2arg2 + ]; var r3arg1; var r3arg2; var r3 = foo8(r3arg1); // any - var r3a = [r3arg2, r3arg1]; - var r3b = [r3arg1, r3arg2]; + var r3a = [ + r3arg2, + r3arg1 + ]; + var r3b = [ + r3arg1, + r3arg2 + ]; var r4arg1; var r4arg2; var r4 = foo10(r4arg1); // any - var r4a = [r4arg2, r4arg1]; - var r4b = [r4arg1, r4arg2]; + var r4a = [ + r4arg2, + r4arg1 + ]; + var r4b = [ + r4arg1, + r4arg2 + ]; var r5arg1; var r5arg2; var r5 = foo11(r5arg1); // any - var r5a = [r5arg2, r5arg1]; - var r5b = [r5arg1, r5arg2]; + var r5a = [ + r5arg2, + r5arg1 + ]; + var r5b = [ + r5arg1, + r5arg2 + ]; var r6arg1; var r6arg2; var r6 = foo12(r6arg1); // new (x: Array, y: Array) => Array - var r6a = [r6arg2, r6arg1]; - var r6b = [r6arg1, r6arg2]; + var r6a = [ + r6arg2, + r6arg1 + ]; + var r6b = [ + r6arg1, + r6arg2 + ]; var r7arg1; var r7arg2; var r7 = foo15(r7arg1); // (x: { a: string; b: number }) => number): number; - var r7a = [r7arg2, r7arg1]; - var r7b = [r7arg1, r7arg2]; + var r7a = [ + r7arg2, + r7arg1 + ]; + var r7b = [ + r7arg1, + r7arg2 + ]; var r7arg3; var r7c = foo15(r7arg3); // any - var r7d = [r7arg2, r7arg3]; - var r7e = [r7arg3, r7arg2]; + var r7d = [ + r7arg2, + r7arg3 + ]; + var r7e = [ + r7arg3, + r7arg2 + ]; var r8arg; var r8 = foo16(r8arg); // any var r9arg; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index b3d43b03087..4e0783afa47 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -148,48 +148,102 @@ var OtherDerived = (function (_super) { var r1arg; var r1arg2; var r1 = foo1(r1arg); -var r1a = [r1arg, r1arg2]; -var r1b = [r1arg2, r1arg]; +var r1a = [ + r1arg, + r1arg2 +]; +var r1b = [ + r1arg2, + r1arg +]; var r2arg; var r2arg2; var r2 = foo2(r2arg); -var r2a = [r2arg, r2arg2]; -var r2b = [r2arg2, r2arg]; +var r2a = [ + r2arg, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg +]; var r3arg; var r3arg2; var r3 = foo3(r3arg); -var r3a = [r3arg, r3arg2]; -var r3b = [r3arg2, r3arg]; +var r3a = [ + r3arg, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg +]; var r4arg; var r4arg2; var r4 = foo4(r4arg); -var r4a = [r4arg, r4arg2]; -var r4b = [r4arg2, r4arg]; +var r4a = [ + r4arg, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg +]; var r5arg; var r5arg2; var r5 = foo5(r5arg); -var r5a = [r5arg, r5arg2]; -var r5b = [r5arg2, r5arg]; +var r5a = [ + r5arg, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg +]; var r6arg; var r6arg2; var r6 = foo6(r6arg); -var r6a = [r6arg, r6arg2]; -var r6b = [r6arg2, r6arg]; +var r6a = [ + r6arg, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg +]; var r11arg; var r11arg2; var r11 = foo11(r11arg); -var r11a = [r11arg, r11arg2]; -var r11b = [r11arg2, r11arg]; +var r11a = [ + r11arg, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg +]; var r15arg; var r15arg2; var r15 = foo15(r15arg); -var r15a = [r15arg, r15arg2]; -var r15b = [r15arg2, r15arg]; +var r15a = [ + r15arg, + r15arg2 +]; +var r15b = [ + r15arg2, + r15arg +]; var r16arg; var r16arg2; var r16 = foo16(r16arg); -var r16a = [r16arg, r16arg2]; -var r16b = [r16arg2, r16arg]; +var r16a = [ + r16arg, + r16arg2 +]; +var r16b = [ + r16arg2, + r16arg +]; var r17arg; var r17 = foo17(r17arg); var r18arg; diff --git a/tests/baselines/reference/subtypingWithObjectMembersOptionality.js b/tests/baselines/reference/subtypingWithObjectMembersOptionality.js index 87a7012e91e..f0005c9fe15 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersOptionality.js +++ b/tests/baselines/reference/subtypingWithObjectMembersOptionality.js @@ -77,12 +77,16 @@ module TwoLevels { // Derived member is not optional but base member is, should be ok // object literal case var a; -var b = { Foo: null }; +var b = { + Foo: null +}; var r = true ? a : b; var TwoLevels; (function (TwoLevels) { // object literal case var a; - var b = { Foo: null }; + var b = { + Foo: null + }; var r = true ? a : b; })(TwoLevels || (TwoLevels = {})); diff --git a/tests/baselines/reference/subtypingWithOptionalProperties.js b/tests/baselines/reference/subtypingWithOptionalProperties.js index 4908a92f2e5..48f73e72b0e 100644 --- a/tests/baselines/reference/subtypingWithOptionalProperties.js +++ b/tests/baselines/reference/subtypingWithOptionalProperties.js @@ -17,5 +17,7 @@ function f(a) { var b = a; return b; } -var r = f({ s: new Object() }); // ok +var r = f({ + s: new Object() +}); // ok r.s && r.s.toFixed(); // would blow up at runtime diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 5c3102cd877..453eb820ddb 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -80,7 +80,7 @@ var Base2 = (function () { function Base2() { } Base2.prototype.foo = function () { - super.foo.call(this); + _super.foo.call(this); }; return Base2; })(); diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index acc5b4072f5..ab982aa8fdf 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -166,7 +166,7 @@ var Base4; function Sub4E() { } Sub4E.prototype.x = function () { - return super.x.call(this); + return _super.x.call(this); }; return Sub4E; })(); diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 3d9080b76e1..c9ab251443f 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var MyBase = (function () { function MyBase() { this.S2 = "test"; - this.f = function () { return 5; }; + this.f = function () { + return 5; + }; } MyBase.S1 = 5; return MyBase; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 7d8f7a9e643..259afb1af0f 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -34,8 +34,10 @@ var __extends = this.__extends || function (d, b) { var P = (function () { function P() { } - P.prototype.x = function () { }; - P.y = function () { }; + P.prototype.x = function () { + }; + P.y = function () { + }; return P; })(); var Q = (function (_super) { @@ -45,7 +47,9 @@ var Q = (function (_super) { var _this = this; if (z === void 0) { z = _super.prototype.; } if (zz === void 0) { zz = _super.prototype.; } - if (zzz === void 0) { zzz = function () { return _super.prototype.; }; } + if (zzz === void 0) { zzz = function () { + return _super.prototype.; + }; } _super.call(this); this.z = z; this.xx = _super.prototype.; @@ -60,6 +64,6 @@ var Q = (function (_super) { _super.x.call(this); // error _super.y.call(this); }; - Q.yy = super.; // error for static initializer accessing super + Q.yy = _super.; // error for static initializer accessing super return Q; })(P); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 92abed0d66d..bbfd81879bb 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 7e3c61e6690..11eb82025a6 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index b48d5bb7f58..b6caa0880ca 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js index 7818aed7ff8..3f4c24297e1 100644 --- a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js +++ b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js @@ -19,7 +19,9 @@ var A = (function () { })(); var B = (function () { function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(); diff --git a/tests/baselines/reference/superCallFromFunction1.js b/tests/baselines/reference/superCallFromFunction1.js index a7fcbaaeff0..ecc78aa5397 100644 --- a/tests/baselines/reference/superCallFromFunction1.js +++ b/tests/baselines/reference/superCallFromFunction1.js @@ -6,5 +6,7 @@ function foo() { //// [superCallFromFunction1.js] function foo() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 7ef1ce1c62a..cf29ac3b1a4 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -70,7 +70,9 @@ var Other = (function (_super) { var _this = this; _super.call(this); this.propertyInitializer = _super.prototype.instanceMethod.call(this); - this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; + this.functionProperty = function () { + _super.prototype.instanceMethod.call(_this); + }; _super.prototype.instanceMethod.call(this); } // in instance method diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 94f41cccb57..32d45b044f5 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -32,7 +32,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index b11d62d62c8..0df2159c40c 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -29,7 +29,9 @@ var B = (function (_super) { __extends(B, _super); // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. function B() { - _super.call(this, function (value) { return String(value.toExponential()); }); + _super.call(this, function (value) { + return String(value.toExponential()); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 61e8b94f00f..cfd2c452ada 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -28,7 +28,9 @@ var C = (function (_super) { __extends(C, _super); // Ensure 'value' is not of type 'any' by invoking it with type arguments. function C() { - _super.call(this, function (value) { return String(value()); }); + _super.call(this, function (value) { + return String(value()); + }); } return C; })(A); diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 2928793feb6..e714a4db191 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -43,7 +43,8 @@ var Base = (function () { } return Base; })(); -function v() { } +function v() { +} var Derived = (function (_super) { __extends(Derived, _super); //super call in class constructor of derived type diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 0c19e365d92..912bfab349b 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -30,8 +30,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; - C.prototype.bar = function () { }; + C.prototype.foo = function () { + }; + C.prototype.bar = function () { + }; return C; })(); var Base = (function () { @@ -47,7 +49,8 @@ var Derived = (function (_super) { _super.call(this); bar(); } - try { } + try { + } catch (e) { _super.call(this); } diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index ce49da10687..2b1a5082617 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -60,9 +60,17 @@ var __extends = this.__extends || function (d, b) { }; function foo() { // super in a non class context - var x = super.; - var y = function () { return super.; }; - var z = function () { return function () { return function () { return super.; }; }; }; + var x = _super.; + var y = function () { + return _super.; + }; + var z = function () { + return function () { + return function () { + return _super.; + }; + }; + }; } var User = (function () { function User() { @@ -80,31 +88,51 @@ var RegisteredUser = (function (_super) { this.name = "Frank"; // super call in an inner function in a constructor function inner() { - super.sayHello.call(this); + _super.sayHello.call(this); } // super call in a lambda in an inner function in a constructor function inner2() { - var x = function () { return super.sayHello.call(this); }; + var x = function () { + return _super.sayHello.call(this); + }; } // super call in a lambda in a function expression in a constructor - (function () { return function () { return super.; }; })(); + (function () { + return function () { + return _super.; + }; + })(); } RegisteredUser.prototype.sayHello = function () { // super call in a method _super.prototype.sayHello.call(this); // super call in a lambda in an inner function in a method function inner() { - var x = function () { return super.sayHello.call(this); }; + var x = function () { + return _super.sayHello.call(this); + }; } // super call in a lambda in a function expression in a constructor - (function () { return function () { return super.; }; })(); + (function () { + return function () { + return _super.; + }; + })(); }; RegisteredUser.staticFunction = function () { var _this = this; // super in static functions var s = _super.; - var x = function () { return _super.; }; - var y = function () { return function () { return function () { return _super.; }; }; }; + var x = function () { + return _super.; + }; + var y = function () { + return function () { + return function () { + return _super.; + }; + }; + }; }; return RegisteredUser; })(User); diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 1b9085ec266..f94c0511277 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.m = function () { }; + A.prototype.m = function () { + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 10c489f1b40..f7e3c4706c4 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -92,14 +92,18 @@ var RegisteredUser = (function (_super) { // super call in a constructor _super.prototype.sayHello.call(this); // super call in a lambda in a constructor - var x = function () { return _super.prototype.sayHello.call(_this); }; + var x = function () { + return _super.prototype.sayHello.call(_this); + }; } RegisteredUser.prototype.sayHello = function () { var _this = this; // super call in a method _super.prototype.sayHello.call(this); // super call in a lambda in a method - var x = function () { return _super.prototype.sayHello.call(_this); }; + var x = function () { + return _super.prototype.sayHello.call(_this); + }; }; return RegisteredUser; })(User); @@ -110,12 +114,24 @@ var RegisteredUser2 = (function (_super) { _super.call(this); this.name = "Joe"; // super call in a nested lambda in a constructor - var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + var x = function () { + return function () { + return function () { + return _super.prototype.sayHello.call(_this); + }; + }; + }; } RegisteredUser2.prototype.sayHello = function () { var _this = this; // super call in a nested lambda in a method - var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + var x = function () { + return function () { + return function () { + return _super.prototype.sayHello.call(_this); + }; + }; + }; }; return RegisteredUser2; })(User); @@ -126,12 +142,24 @@ var RegisteredUser3 = (function (_super) { _super.call(this); this.name = "Sam"; // super property in a nested lambda in a constructor - var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + var superName = function () { + return function () { + return function () { + return _super.prototype.name; + }; + }; + }; } RegisteredUser3.prototype.sayHello = function () { var _this = this; // super property in a nested lambda in a method - var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + var superName = function () { + return function () { + return function () { + return _super.prototype.name; + }; + }; + }; }; return RegisteredUser3; })(User); @@ -142,12 +170,20 @@ var RegisteredUser4 = (function (_super) { _super.call(this); this.name = "Mark"; // super in a nested lambda in a constructor - var x = function () { return function () { return _super.prototype.; }; }; + var x = function () { + return function () { + return _super.prototype.; + }; + }; } RegisteredUser4.prototype.sayHello = function () { var _this = this; // super in a nested lambda in a method - var x = function () { return function () { return _super.prototype.; }; }; + var x = function () { + return function () { + return _super.prototype.; + }; + }; }; return RegisteredUser4; })(User); diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index d9b74ac5080..b0ec9899a52 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -28,7 +28,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - new _super.prototype(function (value) { return String(value); }); + new _super.prototype(function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index a5419aaf36e..a9ee2352c76 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -45,15 +45,22 @@ var __extends = this.__extends || function (d, b) { }; var MyBase = (function () { function MyBase() { - this.m2 = function () { }; + this.m2 = function () { + }; this.d1 = 42; this.d2 = 42; } - MyBase.prototype.m1 = function (a) { return a; }; - MyBase.prototype.p1 = function () { }; + MyBase.prototype.m1 = function (a) { + return a; + }; + MyBase.prototype.p1 = function () { + }; Object.defineProperty(MyBase.prototype, "value", { - get: function () { return 0; }, - set: function (v) { }, + get: function () { + return 0; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -72,7 +79,9 @@ var MyDerived = (function (_super) { _super.prototype.p1.call(this); // Should error, private not public instance member function var l1 = _super.prototype.d1; // Should error, instance data property not a public instance member function var l1 = _super.prototype.d2; // Should error, instance data property not a public instance member function - _super.prototype.m1 = function (a) { return ""; }; // Should be allowed, we will not restrict assignment + _super.prototype.m1 = function (a) { + return ""; + }; // Should be allowed, we will not restrict assignment _super.prototype.value = 0; // Should error, instance data property not a public instance member function var z = _super.prototype.value; // Should error, instance data property not a public instance member function }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index a0a52526f93..8b1e855e0a3 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -37,7 +37,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -45,7 +46,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index b906f1b0a8b..98beb078e2f 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -37,7 +37,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -45,7 +46,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.bar = function () { }; + C.bar = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index e49a2c6b719..086ead2e16d 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -95,7 +95,9 @@ var SomeDerivedClass = (function (_super) { var _this = this; var x = _super.prototype.func.call(this); var x; - var y = function () { return _super.prototype.func.call(_this); }; + var y = function () { + return _super.prototype.func.call(_this); + }; }; Object.defineProperty(SomeDerivedClass.prototype, "a", { get: function () { diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index ef228a3ba20..8277fe0506e 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 7fd55d221ab..c4ced2a9dcc 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -39,20 +39,22 @@ var ObjectLiteral; var ThisInObjectLiteral = { _foo: '1', get foo() { - return super._foo; + return _super._foo; }, set foo(value) { - super._foo = value; + _super._foo = value; }, test: function () { - return super._foo; + return _super._foo; } }; })(ObjectLiteral || (ObjectLiteral = {})); var F = (function () { function F() { } - F.prototype.test = function () { return ""; }; + F.prototype.test = function () { + return ""; + }; return F; })(); var SuperObjectTest = (function (_super) { @@ -63,7 +65,7 @@ var SuperObjectTest = (function (_super) { SuperObjectTest.prototype.testing = function () { var test = { get F() { - return super.test.call(this); + return _super.test.call(this); } }; }; diff --git a/tests/baselines/reference/switchAssignmentCompat.js b/tests/baselines/reference/switchAssignmentCompat.js index 1e6792ee378..4743e5d7eb3 100644 --- a/tests/baselines/reference/switchAssignmentCompat.js +++ b/tests/baselines/reference/switchAssignmentCompat.js @@ -13,5 +13,6 @@ var Foo = (function () { return Foo; })(); switch (0) { - case Foo: break; // Error expected + case Foo: + break; // Error expected } diff --git a/tests/baselines/reference/switchBreakStatements.js b/tests/baselines/reference/switchBreakStatements.js index 534f025e2f5..810c9909233 100644 --- a/tests/baselines/reference/switchBreakStatements.js +++ b/tests/baselines/reference/switchBreakStatements.js @@ -91,7 +91,8 @@ SEVEN: switch ('') { break SEVEN; EIGHT: switch ('') { case 'a': - var fn = function () { }; + var fn = function () { + }; break EIGHT; } } diff --git a/tests/baselines/reference/switchCasesExpressionTypeMismatch.js b/tests/baselines/reference/switchCasesExpressionTypeMismatch.js index ca354779be1..546d03dec92 100644 --- a/tests/baselines/reference/switchCasesExpressionTypeMismatch.js +++ b/tests/baselines/reference/switchCasesExpressionTypeMismatch.js @@ -25,16 +25,24 @@ var Foo = (function () { return Foo; })(); switch (0) { - case Foo: break; // Error - case "sss": break; // Error - case 123: break; // No Error - case true: break; // Error + case Foo: + break; // Error + case "sss": + break; // Error + case 123: + break; // No Error + case true: + break; // Error } var s = 0; // No error for all switch (s) { - case Foo: break; - case "sss": break; - case 123: break; - case true: break; + case Foo: + break; + case "sss": + break; + case 123: + break; + case true: + break; } diff --git a/tests/baselines/reference/switchFallThroughs.js b/tests/baselines/reference/switchFallThroughs.js index 53f221bd467..b38c6b6f0ab 100644 --- a/tests/baselines/reference/switchFallThroughs.js +++ b/tests/baselines/reference/switchFallThroughs.js @@ -26,9 +26,10 @@ function R1(index) { var a = 'a'; return a; case 3: - case 4: { - return 'b'; - } + case 4: + { + return 'b'; + } case 5: default: return 'c'; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 6348ca62e78..699871d9dd2 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -81,13 +81,21 @@ switch (x) { case /[a-z]/: case []: case {}: - case { id: 12 }: - case ['a']: + case { + id: 12 + }: + case [ + 'a' + ]: case typeof x: case typeof M: case M.fn(1): - case function (x) { return ''; }: - case (function (x) { return ''; })(2): + case function (x) { + return ''; + }: + case (function (x) { + return ''; + })(2): default: } // basic assignable check, rest covered in tests for 'assignement compatibility' @@ -105,7 +113,10 @@ var D = (function (_super) { })(C); switch (new C()) { case new D(): - case { id: 12, name: '' }: + case { + id: 12, + name: '' + }: case new C(): } switch ('') { @@ -128,11 +139,19 @@ switch ([]) { } switch ({}) { } -switch ({ id: 12 }) { +switch ({ + id: 12 +}) { } -switch (['a']) { +switch ([ + 'a' +]) { } -switch (function (x) { return ''; }) { +switch (function (x) { + return ''; +}) { } -switch ((function (x) { return ''; })(1)) { +switch ((function (x) { + return ''; +})(1)) { } diff --git a/tests/baselines/reference/switchStatementsWithMultipleDefaults.js b/tests/baselines/reference/switchStatementsWithMultipleDefaults.js index a17abe5711d..09a1a70a5d9 100644 --- a/tests/baselines/reference/switchStatementsWithMultipleDefaults.js +++ b/tests/baselines/reference/switchStatementsWithMultipleDefaults.js @@ -56,7 +56,8 @@ switch (x) { default: // Error, third 'default' clause default: // Error, fourth 'default' clause. // Errors on fifth-seventh - default: return; + default: + return; default: default: } diff --git a/tests/baselines/reference/symbolDeclarationEmit1.js b/tests/baselines/reference/symbolDeclarationEmit1.js index 16d208db5eb..7c3b39b9d86 100644 --- a/tests/baselines/reference/symbolDeclarationEmit1.js +++ b/tests/baselines/reference/symbolDeclarationEmit1.js @@ -4,11 +4,8 @@ class C { } //// [symbolDeclarationEmit1.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} //// [symbolDeclarationEmit1.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit10.js b/tests/baselines/reference/symbolDeclarationEmit10.js index 0c46d8750e9..7ace6617db5 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.js +++ b/tests/baselines/reference/symbolDeclarationEmit10.js @@ -6,8 +6,11 @@ var obj = { //// [symbolDeclarationEmit10.js] var obj = { - get [Symbol.isConcatSpreadable]() { return ''; }, - set [Symbol.isConcatSpreadable](x) { } + get [Symbol.isConcatSpreadable]() { + return ''; + }, + set [Symbol.isConcatSpreadable](x) { + } }; diff --git a/tests/baselines/reference/symbolDeclarationEmit11.js b/tests/baselines/reference/symbolDeclarationEmit11.js index e5822104bf8..599f7393f4b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.js +++ b/tests/baselines/reference/symbolDeclarationEmit11.js @@ -7,19 +7,16 @@ class C { } //// [symbolDeclarationEmit11.js] -var C = (function () { - function C() { +class C { + static [Symbol.toPrimitive]() { } - C[Symbol.toPrimitive] = function () { }; - Object.defineProperty(C, Symbol.isRegExp, { - get: function () { return ""; }, - set: function (x) { }, - enumerable: true, - configurable: true - }); - C[Symbol.iterator] = 0; - return C; -})(); + static get [Symbol.isRegExp]() { + return ""; + } + static set [Symbol.isRegExp](x) { + } +} +C[Symbol.iterator] = 0; //// [symbolDeclarationEmit11.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit12.js b/tests/baselines/reference/symbolDeclarationEmit12.js index 68a256bd39d..ab930b41580 100644 --- a/tests/baselines/reference/symbolDeclarationEmit12.js +++ b/tests/baselines/reference/symbolDeclarationEmit12.js @@ -15,20 +15,17 @@ module M { //// [symbolDeclarationEmit12.js] var M; (function (M) { - var C = (function () { - function C() { + class C { + [Symbol.toPrimitive](x) { } - C.prototype[Symbol.toPrimitive] = function (x) { }; - C.prototype[Symbol.isConcatSpreadable] = function () { + [Symbol.isConcatSpreadable]() { return undefined; - }; - Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return undefined; }, - set: function (x) { }, - enumerable: true, - configurable: true - }); - return C; - })(); + } + get [Symbol.isRegExp]() { + return undefined; + } + set [Symbol.isRegExp](x) { + } + } M.C = C; })(M || (M = {})); diff --git a/tests/baselines/reference/symbolDeclarationEmit13.js b/tests/baselines/reference/symbolDeclarationEmit13.js index acf470ffce1..f48a918a6f2 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.js +++ b/tests/baselines/reference/symbolDeclarationEmit13.js @@ -5,21 +5,13 @@ class C { } //// [symbolDeclarationEmit13.js] -var C = (function () { - function C() { +class C { + get [Symbol.isRegExp]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, Symbol.toStringTag, { - set: function (x) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + set [Symbol.toStringTag](x) { + } +} //// [symbolDeclarationEmit13.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit14.js b/tests/baselines/reference/symbolDeclarationEmit14.js index 64330c6ce92..6197ffa2b4f 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.js +++ b/tests/baselines/reference/symbolDeclarationEmit14.js @@ -5,21 +5,14 @@ class C { } //// [symbolDeclarationEmit14.js] -var C = (function () { - function C() { +class C { + get [Symbol.isRegExp]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, Symbol.toStringTag, { - get: function () { return ""; }, - enumerable: true, - configurable: true - }); - return C; -})(); + get [Symbol.toStringTag]() { + return ""; + } +} //// [symbolDeclarationEmit14.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit2.js b/tests/baselines/reference/symbolDeclarationEmit2.js index 2112f9e7748..5558bebc64e 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.js +++ b/tests/baselines/reference/symbolDeclarationEmit2.js @@ -4,12 +4,11 @@ class C { } //// [symbolDeclarationEmit2.js] -var C = (function () { - function C() { +class C { + constructor() { this[Symbol.isRegExp] = ""; } - return C; -})(); +} //// [symbolDeclarationEmit2.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit3.js b/tests/baselines/reference/symbolDeclarationEmit3.js index e3b22d883c8..6f513b053c7 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.js +++ b/tests/baselines/reference/symbolDeclarationEmit3.js @@ -6,12 +6,10 @@ class C { } //// [symbolDeclarationEmit3.js] -var C = (function () { - function C() { +class C { + [Symbol.isRegExp](x) { } - C.prototype[Symbol.isRegExp] = function (x) { }; - return C; -})(); +} //// [symbolDeclarationEmit3.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit4.js b/tests/baselines/reference/symbolDeclarationEmit4.js index cfe3a14122d..14f50a03ee7 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.js +++ b/tests/baselines/reference/symbolDeclarationEmit4.js @@ -5,17 +5,13 @@ class C { } //// [symbolDeclarationEmit4.js] -var C = (function () { - function C() { +class C { + get [Symbol.isRegExp]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, - set: function (x) { }, - enumerable: true, - configurable: true - }); - return C; -})(); + set [Symbol.isRegExp](x) { + } +} //// [symbolDeclarationEmit4.d.ts] diff --git a/tests/baselines/reference/symbolDeclarationEmit9.js b/tests/baselines/reference/symbolDeclarationEmit9.js index d38171767a5..8cdb7173144 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.js +++ b/tests/baselines/reference/symbolDeclarationEmit9.js @@ -5,7 +5,8 @@ var obj = { //// [symbolDeclarationEmit9.js] var obj = { - [Symbol.isConcatSpreadable]() { } + [Symbol.isConcatSpreadable]() { + } }; diff --git a/tests/baselines/reference/symbolProperty1.js b/tests/baselines/reference/symbolProperty1.js index 0117dd3b1c2..1537883f4ec 100644 --- a/tests/baselines/reference/symbolProperty1.js +++ b/tests/baselines/reference/symbolProperty1.js @@ -12,7 +12,8 @@ var x = { var s; var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty10.js b/tests/baselines/reference/symbolProperty10.js index 5b4e44f11ab..74bcf886461 100644 --- a/tests/baselines/reference/symbolProperty10.js +++ b/tests/baselines/reference/symbolProperty10.js @@ -11,11 +11,8 @@ i = new C; var c: C = i; //// [symbolProperty10.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} var i; i = new C; var c = i; diff --git a/tests/baselines/reference/symbolProperty11.js b/tests/baselines/reference/symbolProperty11.js index 83a380c79e7..97fa4fc992f 100644 --- a/tests/baselines/reference/symbolProperty11.js +++ b/tests/baselines/reference/symbolProperty11.js @@ -9,11 +9,8 @@ i = new C; var c: C = i; //// [symbolProperty11.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} var i; i = new C; var c = i; diff --git a/tests/baselines/reference/symbolProperty12.js b/tests/baselines/reference/symbolProperty12.js index 9f63f86bc18..474ec4a0ffa 100644 --- a/tests/baselines/reference/symbolProperty12.js +++ b/tests/baselines/reference/symbolProperty12.js @@ -11,11 +11,8 @@ i = new C; var c: C = i; //// [symbolProperty12.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} var i; i = new C; var c = i; diff --git a/tests/baselines/reference/symbolProperty13.js b/tests/baselines/reference/symbolProperty13.js index 1cf24a49c7e..d7620d01159 100644 --- a/tests/baselines/reference/symbolProperty13.js +++ b/tests/baselines/reference/symbolProperty13.js @@ -17,11 +17,8 @@ var i: I; bar(i); //// [symbolProperty13.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} foo(new C); var i; bar(i); diff --git a/tests/baselines/reference/symbolProperty14.js b/tests/baselines/reference/symbolProperty14.js index 0283cb01b79..716bc68b430 100644 --- a/tests/baselines/reference/symbolProperty14.js +++ b/tests/baselines/reference/symbolProperty14.js @@ -17,11 +17,8 @@ var i: I; bar(i); //// [symbolProperty14.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} foo(new C); var i; bar(i); diff --git a/tests/baselines/reference/symbolProperty15.js b/tests/baselines/reference/symbolProperty15.js index 0c198037093..dec61964252 100644 --- a/tests/baselines/reference/symbolProperty15.js +++ b/tests/baselines/reference/symbolProperty15.js @@ -15,11 +15,8 @@ var i: I; bar(i); //// [symbolProperty15.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} foo(new C); var i; bar(i); diff --git a/tests/baselines/reference/symbolProperty16.js b/tests/baselines/reference/symbolProperty16.js index 1a1f3f857af..1382d913104 100644 --- a/tests/baselines/reference/symbolProperty16.js +++ b/tests/baselines/reference/symbolProperty16.js @@ -17,11 +17,8 @@ var i: I; bar(i); //// [symbolProperty16.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} foo(new C); var i; bar(i); diff --git a/tests/baselines/reference/symbolProperty18.js b/tests/baselines/reference/symbolProperty18.js index 1d0a57e7b50..ff69588be31 100644 --- a/tests/baselines/reference/symbolProperty18.js +++ b/tests/baselines/reference/symbolProperty18.js @@ -12,8 +12,11 @@ i[Symbol.toPrimitive] = false; //// [symbolProperty18.js] var i = { [Symbol.iterator]: 0, - [Symbol.toStringTag]() { return ""; }, - set [Symbol.toPrimitive](p) { } + [Symbol.toStringTag]() { + return ""; + }, + set [Symbol.toPrimitive](p) { + } }; var it = i[Symbol.iterator]; var str = i[Symbol.toStringTag](); diff --git a/tests/baselines/reference/symbolProperty19.js b/tests/baselines/reference/symbolProperty19.js index 5ec7968218a..d4bfd0dc7c7 100644 --- a/tests/baselines/reference/symbolProperty19.js +++ b/tests/baselines/reference/symbolProperty19.js @@ -9,8 +9,14 @@ var str = i[Symbol.toStringTag](); //// [symbolProperty19.js] var i = { - [Symbol.iterator]: { p: null }, - [Symbol.toStringTag]() { return { p: undefined }; } + [Symbol.iterator]: { + p: null + }, + [Symbol.toStringTag]() { + return { + p: undefined + }; + } }; var it = i[Symbol.iterator]; var str = i[Symbol.toStringTag](); diff --git a/tests/baselines/reference/symbolProperty2.js b/tests/baselines/reference/symbolProperty2.js index 0158366f9d5..5c0f89b0257 100644 --- a/tests/baselines/reference/symbolProperty2.js +++ b/tests/baselines/reference/symbolProperty2.js @@ -12,7 +12,8 @@ var x = { var s = Symbol(); var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty20.js b/tests/baselines/reference/symbolProperty20.js index dd60a87cbea..cfb763dc207 100644 --- a/tests/baselines/reference/symbolProperty20.js +++ b/tests/baselines/reference/symbolProperty20.js @@ -12,5 +12,7 @@ var i: I = { //// [symbolProperty20.js] var i = { [Symbol.iterator]: s => s, - [Symbol.toStringTag](n) { return n; } + [Symbol.toStringTag](n) { + return n; + } }; diff --git a/tests/baselines/reference/symbolProperty22.js b/tests/baselines/reference/symbolProperty22.js index d4609c74d36..19989106e56 100644 --- a/tests/baselines/reference/symbolProperty22.js +++ b/tests/baselines/reference/symbolProperty22.js @@ -8,4 +8,6 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); //// [symbolProperty22.js] -foo("", { [Symbol.unscopables]: s => s.length }); +foo("", { + [Symbol.unscopables]: s => s.length +}); diff --git a/tests/baselines/reference/symbolProperty23.js b/tests/baselines/reference/symbolProperty23.js index b3291ad34e8..3210f6dfed7 100644 --- a/tests/baselines/reference/symbolProperty23.js +++ b/tests/baselines/reference/symbolProperty23.js @@ -10,11 +10,8 @@ class C implements I { } //// [symbolProperty23.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.toPrimitive] = function () { +class C { + [Symbol.toPrimitive]() { return true; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/symbolProperty24.js b/tests/baselines/reference/symbolProperty24.js index b5d059dd29f..3d582d80254 100644 --- a/tests/baselines/reference/symbolProperty24.js +++ b/tests/baselines/reference/symbolProperty24.js @@ -10,11 +10,8 @@ class C implements I { } //// [symbolProperty24.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.toPrimitive] = function () { +class C { + [Symbol.toPrimitive]() { return ""; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/symbolProperty25.js b/tests/baselines/reference/symbolProperty25.js index c932da1e3eb..33c398a6c0e 100644 --- a/tests/baselines/reference/symbolProperty25.js +++ b/tests/baselines/reference/symbolProperty25.js @@ -10,11 +10,8 @@ class C implements I { } //// [symbolProperty25.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.toStringTag] = function () { +class C { + [Symbol.toStringTag]() { return ""; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/symbolProperty26.js b/tests/baselines/reference/symbolProperty26.js index 9e98027603d..837ef5837b0 100644 --- a/tests/baselines/reference/symbolProperty26.js +++ b/tests/baselines/reference/symbolProperty26.js @@ -12,27 +12,13 @@ class C2 extends C1 { } //// [symbolProperty26.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1() { - } - C1.prototype[Symbol.toStringTag] = function () { +class C1 { + [Symbol.toStringTag]() { return ""; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); } - C2.prototype[Symbol.toStringTag] = function () { +} +class C2 extends C1 { + [Symbol.toStringTag]() { return ""; - }; - return C2; -})(C1); + } +} diff --git a/tests/baselines/reference/symbolProperty27.js b/tests/baselines/reference/symbolProperty27.js index f19d05233cb..d4eb6fcafa7 100644 --- a/tests/baselines/reference/symbolProperty27.js +++ b/tests/baselines/reference/symbolProperty27.js @@ -12,27 +12,13 @@ class C2 extends C1 { } //// [symbolProperty27.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1() { - } - C1.prototype[Symbol.toStringTag] = function () { +class C1 { + [Symbol.toStringTag]() { return {}; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); } - C2.prototype[Symbol.toStringTag] = function () { +} +class C2 extends C1 { + [Symbol.toStringTag]() { return ""; - }; - return C2; -})(C1); + } +} diff --git a/tests/baselines/reference/symbolProperty28.js b/tests/baselines/reference/symbolProperty28.js index 219a192e381..ed53a88f957 100644 --- a/tests/baselines/reference/symbolProperty28.js +++ b/tests/baselines/reference/symbolProperty28.js @@ -11,26 +11,14 @@ var c: C2; var obj = c[Symbol.toStringTag]().x; //// [symbolProperty28.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1() { +class C1 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); - } - return C2; -})(C1); +} +class C2 extends C1 { +} var c; var obj = c[Symbol.toStringTag]().x; diff --git a/tests/baselines/reference/symbolProperty29.js b/tests/baselines/reference/symbolProperty29.js index f7fee99f6a1..759a7754826 100644 --- a/tests/baselines/reference/symbolProperty29.js +++ b/tests/baselines/reference/symbolProperty29.js @@ -7,11 +7,10 @@ class C1 { } //// [symbolProperty29.js] -var C1 = (function () { - function C1() { +class C1 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(); +} diff --git a/tests/baselines/reference/symbolProperty3.js b/tests/baselines/reference/symbolProperty3.js index dda9ca23d32..6159b10f9f3 100644 --- a/tests/baselines/reference/symbolProperty3.js +++ b/tests/baselines/reference/symbolProperty3.js @@ -12,7 +12,8 @@ var x = { var s = Symbol; var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty30.js b/tests/baselines/reference/symbolProperty30.js index bdb108015cf..263fdc1041b 100644 --- a/tests/baselines/reference/symbolProperty30.js +++ b/tests/baselines/reference/symbolProperty30.js @@ -7,11 +7,10 @@ class C1 { } //// [symbolProperty30.js] -var C1 = (function () { - function C1() { +class C1 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(); +} diff --git a/tests/baselines/reference/symbolProperty31.js b/tests/baselines/reference/symbolProperty31.js index cf532774652..a9db50061b3 100644 --- a/tests/baselines/reference/symbolProperty31.js +++ b/tests/baselines/reference/symbolProperty31.js @@ -9,24 +9,12 @@ class C2 extends C1 { } //// [symbolProperty31.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1() { +class C1 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); - } - return C2; -})(C1); +} +class C2 extends C1 { +} diff --git a/tests/baselines/reference/symbolProperty32.js b/tests/baselines/reference/symbolProperty32.js index 73e4bffdc01..52db43bb9de 100644 --- a/tests/baselines/reference/symbolProperty32.js +++ b/tests/baselines/reference/symbolProperty32.js @@ -9,24 +9,12 @@ class C2 extends C1 { } //// [symbolProperty32.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function () { - function C1() { +class C1 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(); -var C2 = (function (_super) { - __extends(C2, _super); - function C2() { - _super.apply(this, arguments); - } - return C2; -})(C1); +} +class C2 extends C1 { +} diff --git a/tests/baselines/reference/symbolProperty33.js b/tests/baselines/reference/symbolProperty33.js index f5a08010338..8a0e3f691b5 100644 --- a/tests/baselines/reference/symbolProperty33.js +++ b/tests/baselines/reference/symbolProperty33.js @@ -9,24 +9,12 @@ class C2 { } //// [symbolProperty33.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function (_super) { - __extends(C1, _super); - function C1() { - _super.apply(this, arguments); +class C1 extends C2 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(C2); -var C2 = (function () { - function C2() { - } - return C2; -})(); +} +class C2 { +} diff --git a/tests/baselines/reference/symbolProperty34.js b/tests/baselines/reference/symbolProperty34.js index 5b25f487fbf..b8bcd54487f 100644 --- a/tests/baselines/reference/symbolProperty34.js +++ b/tests/baselines/reference/symbolProperty34.js @@ -9,24 +9,12 @@ class C2 { } //// [symbolProperty34.js] -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var C1 = (function (_super) { - __extends(C1, _super); - function C1() { - _super.apply(this, arguments); +class C1 extends C2 { + [Symbol.toStringTag]() { + return { + x: "" + }; } - C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; - }; - return C1; -})(C2); -var C2 = (function () { - function C2() { - } - return C2; -})(); +} +class C2 { +} diff --git a/tests/baselines/reference/symbolProperty39.js b/tests/baselines/reference/symbolProperty39.js index 18551d20c0b..6454d4a983f 100644 --- a/tests/baselines/reference/symbolProperty39.js +++ b/tests/baselines/reference/symbolProperty39.js @@ -11,14 +11,11 @@ class C { } //// [symbolProperty39.js] -var C = (function () { - function C() { +class C { + [Symbol.iterator](x) { + return undefined; } - C.prototype[Symbol.iterator] = function (x) { + [Symbol.iterator](x) { return undefined; - }; - C.prototype[Symbol.iterator] = function (x) { - return undefined; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/symbolProperty4.js b/tests/baselines/reference/symbolProperty4.js index 6072d6bbf72..be7cdab5f85 100644 --- a/tests/baselines/reference/symbolProperty4.js +++ b/tests/baselines/reference/symbolProperty4.js @@ -10,7 +10,8 @@ var x = { //// [symbolProperty4.js] var x = { [Symbol()]: 0, - [Symbol()]() { }, + [Symbol()]() { + }, get [Symbol()]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty40.js b/tests/baselines/reference/symbolProperty40.js index 15d8c5c6fba..cf5a3c4396d 100644 --- a/tests/baselines/reference/symbolProperty40.js +++ b/tests/baselines/reference/symbolProperty40.js @@ -13,14 +13,11 @@ c[Symbol.iterator](0); //// [symbolProperty40.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.iterator] = function (x) { +class C { + [Symbol.iterator](x) { return undefined; - }; - return C; -})(); + } +} var c = new C; c[Symbol.iterator](""); c[Symbol.iterator](0); diff --git a/tests/baselines/reference/symbolProperty41.js b/tests/baselines/reference/symbolProperty41.js index d26b2c7682a..fd9d58082b6 100644 --- a/tests/baselines/reference/symbolProperty41.js +++ b/tests/baselines/reference/symbolProperty41.js @@ -13,14 +13,11 @@ c[Symbol.iterator]("hello"); //// [symbolProperty41.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.iterator] = function (x) { +class C { + [Symbol.iterator](x) { return undefined; - }; - return C; -})(); + } +} var c = new C; c[Symbol.iterator](""); c[Symbol.iterator]("hello"); diff --git a/tests/baselines/reference/symbolProperty42.js b/tests/baselines/reference/symbolProperty42.js index 1990f54066c..082e862f0fc 100644 --- a/tests/baselines/reference/symbolProperty42.js +++ b/tests/baselines/reference/symbolProperty42.js @@ -8,11 +8,8 @@ class C { } //// [symbolProperty42.js] -var C = (function () { - function C() { - } - C.prototype[Symbol.iterator] = function (x) { +class C { + [Symbol.iterator](x) { return undefined; - }; - return C; -})(); + } +} diff --git a/tests/baselines/reference/symbolProperty43.js b/tests/baselines/reference/symbolProperty43.js index fcb1fd3f8e5..fdeb52ca893 100644 --- a/tests/baselines/reference/symbolProperty43.js +++ b/tests/baselines/reference/symbolProperty43.js @@ -5,8 +5,5 @@ class C { } //// [symbolProperty43.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} diff --git a/tests/baselines/reference/symbolProperty44.js b/tests/baselines/reference/symbolProperty44.js index d4824e79318..1f4aaf73b3c 100644 --- a/tests/baselines/reference/symbolProperty44.js +++ b/tests/baselines/reference/symbolProperty44.js @@ -9,15 +9,11 @@ class C { } //// [symbolProperty44.js] -var C = (function () { - function C() { +class C { + get [Symbol.hasInstance]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.hasInstance, { - get: function () { - return ""; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + get [Symbol.hasInstance]() { + return ""; + } +} diff --git a/tests/baselines/reference/symbolProperty45.js b/tests/baselines/reference/symbolProperty45.js index d056aba9f56..97b1252b825 100644 --- a/tests/baselines/reference/symbolProperty45.js +++ b/tests/baselines/reference/symbolProperty45.js @@ -9,22 +9,11 @@ class C { } //// [symbolProperty45.js] -var C = (function () { - function C() { +class C { + get [Symbol.hasInstance]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.hasInstance, { - get: function () { - return ""; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, Symbol.toPrimitive, { - get: function () { - return ""; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + get [Symbol.toPrimitive]() { + return ""; + } +} diff --git a/tests/baselines/reference/symbolProperty46.js b/tests/baselines/reference/symbolProperty46.js index 255fbac0809..1d4a373f03c 100644 --- a/tests/baselines/reference/symbolProperty46.js +++ b/tests/baselines/reference/symbolProperty46.js @@ -12,20 +12,13 @@ class C { (new C)[Symbol.hasInstance] = ""; //// [symbolProperty46.js] -var C = (function () { - function C() { +class C { + get [Symbol.hasInstance]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.hasInstance, { - get: function () { - return ""; - }, - // Should take a string - set: function (x) { - }, - enumerable: true, - configurable: true - }); - return C; -})(); + // Should take a string + set [Symbol.hasInstance](x) { + } +} (new C)[Symbol.hasInstance] = 0; (new C)[Symbol.hasInstance] = ""; diff --git a/tests/baselines/reference/symbolProperty47.js b/tests/baselines/reference/symbolProperty47.js index 92429c720c1..7c6886f280b 100644 --- a/tests/baselines/reference/symbolProperty47.js +++ b/tests/baselines/reference/symbolProperty47.js @@ -12,20 +12,13 @@ class C { (new C)[Symbol.hasInstance] = ""; //// [symbolProperty47.js] -var C = (function () { - function C() { +class C { + get [Symbol.hasInstance]() { + return ""; } - Object.defineProperty(C.prototype, Symbol.hasInstance, { - get: function () { - return ""; - }, - // Should take a string - set: function (x) { - }, - enumerable: true, - configurable: true - }); - return C; -})(); + // Should take a string + set [Symbol.hasInstance](x) { + } +} (new C)[Symbol.hasInstance] = 0; (new C)[Symbol.hasInstance] = ""; diff --git a/tests/baselines/reference/symbolProperty48.js b/tests/baselines/reference/symbolProperty48.js index 48717470f2f..283c3d0d2c5 100644 --- a/tests/baselines/reference/symbolProperty48.js +++ b/tests/baselines/reference/symbolProperty48.js @@ -11,10 +11,8 @@ module M { var M; (function (M) { var Symbol; - var C = (function () { - function C() { + class C { + [Symbol.iterator]() { } - C.prototype[Symbol.iterator] = function () { }; - return C; - })(); + } })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty49.js b/tests/baselines/reference/symbolProperty49.js index 6c115a89ae4..027b76f76d1 100644 --- a/tests/baselines/reference/symbolProperty49.js +++ b/tests/baselines/reference/symbolProperty49.js @@ -11,10 +11,8 @@ module M { var M; (function (M) { M.Symbol; - var C = (function () { - function C() { + class C { + [M.Symbol.iterator]() { } - C.prototype[M.Symbol.iterator] = function () { }; - return C; - })(); + } })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty5.js b/tests/baselines/reference/symbolProperty5.js index c7c88681f8a..9f0ff3d688f 100644 --- a/tests/baselines/reference/symbolProperty5.js +++ b/tests/baselines/reference/symbolProperty5.js @@ -10,7 +10,8 @@ var x = { //// [symbolProperty5.js] var x = { [Symbol.iterator]: 0, - [Symbol.isRegExp]() { }, + [Symbol.isRegExp]() { + }, get [Symbol.toStringTag]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty50.js b/tests/baselines/reference/symbolProperty50.js index 61ded053938..30c911e8fab 100644 --- a/tests/baselines/reference/symbolProperty50.js +++ b/tests/baselines/reference/symbolProperty50.js @@ -10,10 +10,8 @@ module M { //// [symbolProperty50.js] var M; (function (M) { - var C = (function () { - function C() { + class C { + [Symbol.iterator]() { } - C.prototype[Symbol.iterator] = function () { }; - return C; - })(); + } })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty51.js b/tests/baselines/reference/symbolProperty51.js index 246dbaaa173..a9a79098424 100644 --- a/tests/baselines/reference/symbolProperty51.js +++ b/tests/baselines/reference/symbolProperty51.js @@ -10,10 +10,8 @@ module M { //// [symbolProperty51.js] var M; (function (M) { - var C = (function () { - function C() { + class C { + [Symbol.iterator]() { } - C.prototype[Symbol.iterator] = function () { }; - return C; - })(); + } })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty6.js b/tests/baselines/reference/symbolProperty6.js index aee61b97435..311baf2c187 100644 --- a/tests/baselines/reference/symbolProperty6.js +++ b/tests/baselines/reference/symbolProperty6.js @@ -9,17 +9,13 @@ class C { } //// [symbolProperty6.js] -var C = (function () { - function C() { +class C { + constructor() { this[Symbol.iterator] = 0; } - C.prototype[Symbol.isRegExp] = function () { }; - Object.defineProperty(C.prototype, Symbol.toStringTag, { - get: function () { - return 0; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + [Symbol.isRegExp]() { + } + get [Symbol.toStringTag]() { + return 0; + } +} diff --git a/tests/baselines/reference/symbolProperty7.js b/tests/baselines/reference/symbolProperty7.js index 781113572a1..b833eecff32 100644 --- a/tests/baselines/reference/symbolProperty7.js +++ b/tests/baselines/reference/symbolProperty7.js @@ -9,17 +9,13 @@ class C { } //// [symbolProperty7.js] -var C = (function () { - function C() { +class C { + constructor() { this[Symbol()] = 0; } - C.prototype[Symbol()] = function () { }; - Object.defineProperty(C.prototype, Symbol(), { - get: function () { - return 0; - }, - enumerable: true, - configurable: true - }); - return C; -})(); + [Symbol()]() { + } + get [Symbol()]() { + return 0; + } +} diff --git a/tests/baselines/reference/symbolProperty9.js b/tests/baselines/reference/symbolProperty9.js index f97a1d44a21..e6c8f7299a9 100644 --- a/tests/baselines/reference/symbolProperty9.js +++ b/tests/baselines/reference/symbolProperty9.js @@ -11,11 +11,8 @@ i = new C; var c: C = i; //// [symbolProperty9.js] -var C = (function () { - function C() { - } - return C; -})(); +class C { +} var i; i = new C; var c = i; diff --git a/tests/baselines/reference/symbolType13.js b/tests/baselines/reference/symbolType13.js index afd62079bb5..56aef2cc8e6 100644 --- a/tests/baselines/reference/symbolType13.js +++ b/tests/baselines/reference/symbolType13.js @@ -9,6 +9,9 @@ for (var y in s) { } //// [symbolType13.js] var s = Symbol(); var x; -for (s in {}) { } -for (x in s) { } -for (var y in s) { } +for (s in {}) { +} +for (x in s) { +} +for (var y in s) { +} diff --git a/tests/baselines/reference/taggedTemplateContextualTyping1.js b/tests/baselines/reference/taggedTemplateContextualTyping1.js index 17618b50e8b..173d0f56bb7 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping1.js +++ b/tests/baselines/reference/taggedTemplateContextualTyping1.js @@ -26,7 +26,28 @@ function tempTag1(...rest) { // Otherwise, the arrow functions' parameters will be typed as 'any', // and it is an error to invoke an any-typed value with type arguments, // so this test will error. -tempTag1 `${x => { x(undefined); return x; }}${10}`; -tempTag1 `${x => { x(undefined); return x; }}${y => { y(undefined); return y; }}${10}`; -tempTag1 `${x => { x(undefined); return x; }}${(y) => { y(undefined); return y; }}${undefined}`; -tempTag1 `${(x) => { x(undefined); return x; }}${y => { y(undefined); return y; }}${undefined}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${10}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${y => { + y(undefined); + return y; +}}${10}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${(y) => { + y(undefined); + return y; +}}${undefined}`; +tempTag1 `${(x) => { + x(undefined); + return x; +}}${y => { + y(undefined); + return y; +}}${undefined}`; diff --git a/tests/baselines/reference/taggedTemplateContextualTyping2.js b/tests/baselines/reference/taggedTemplateContextualTyping2.js index 8adea53f470..1eed600da4c 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping2.js +++ b/tests/baselines/reference/taggedTemplateContextualTyping2.js @@ -25,6 +25,18 @@ function tempTag2(...rest) { // Otherwise, the arrow functions' parameters will be typed as 'any', // and it is an error to invoke an any-typed value with type arguments, // so this test will error. -tempTag2 `${x => { x(undefined); return x; }}${0}`; -tempTag2 `${x => { x(undefined); return x; }}${y => { y(null); return y; }}${"hello"}`; -tempTag2 `${x => { x(undefined); return x; }}${undefined}${"hello"}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${0}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${y => { + y(null); + return y; +}}${"hello"}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${undefined}${"hello"}`; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js index 9d3531c2667..5b128221aa6 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js @@ -95,66 +95,145 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInference.js] // Generic tag with one parameter -function noParams(n) { } +function noParams(n) { +} (_a = [""], _a.raw = [""], noParams(_a)); // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { } +function noGenericParams(n) { +} (_b = [""], _b.raw = [""], noGenericParams(_b)); // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { } +function someGenerics1a(n, m) { +} (_c = ["", ""], _c.raw = ["", ""], someGenerics1a(_c, 3)); -function someGenerics1b(n, m) { } +function someGenerics1b(n, m) { +} (_d = ["", ""], _d.raw = ["", ""], someGenerics1b(_d, 3)); // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { } -(_e = ["", ""], _e.raw = ["", ""], someGenerics2a(_e, function (n) { return n; })); -function someGenerics2b(strs, n) { } -(_f = ["", ""], _f.raw = ["", ""], someGenerics2b(_f, function (n, x) { return n; })); +function someGenerics2a(strs, n) { +} +(_e = ["", ""], _e.raw = ["", ""], someGenerics2a(_e, function (n) { + return n; +})); +function someGenerics2b(strs, n) { +} +(_f = ["", ""], _f.raw = ["", ""], someGenerics2b(_f, function (n, x) { + return n; +})); // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { } -(_g = ["", ""], _g.raw = ["", ""], someGenerics3(_g, function () { return ''; })); -(_h = ["", ""], _h.raw = ["", ""], someGenerics3(_h, function () { return undefined; })); -(_j = ["", ""], _j.raw = ["", ""], someGenerics3(_j, function () { return 3; })); +function someGenerics3(strs, producer) { +} +(_g = ["", ""], _g.raw = ["", ""], someGenerics3(_g, function () { + return ''; +})); +(_h = ["", ""], _h.raw = ["", ""], someGenerics3(_h, function () { + return undefined; +})); +(_j = ["", ""], _j.raw = ["", ""], someGenerics3(_j, function () { + return 3; +})); // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { } -(_k = ["", "", ""], _k.raw = ["", "", ""], someGenerics4(_k, 4, function () { return null; })); -(_l = ["", "", ""], _l.raw = ["", "", ""], someGenerics4(_l, '', function () { return 3; })); +function someGenerics4(strs, n, f) { +} +(_k = ["", "", ""], _k.raw = ["", "", ""], someGenerics4(_k, 4, function () { + return null; +})); +(_l = ["", "", ""], _l.raw = ["", "", ""], someGenerics4(_l, '', function () { + return 3; +})); (_m = ["", "", ""], _m.raw = ["", "", ""], someGenerics4(_m, null, null)); // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { } -(_n = ["", " ", ""], _n.raw = ["", " ", ""], someGenerics5(_n, 4, function () { return null; })); -(_o = ["", "", ""], _o.raw = ["", "", ""], someGenerics5(_o, '', function () { return 3; })); -(_p = ["", "", ""], _p.raw = ["", "", ""], someGenerics5(_p, null, null)); +function someGenerics5(strs, n, f) { +} +(_o = ["", " ", ""], _o.raw = ["", " ", ""], someGenerics5(_o, 4, function () { + return null; +})); +(_p = ["", "", ""], _p.raw = ["", "", ""], someGenerics5(_p, '', function () { + return 3; +})); +(_q = ["", "", ""], _q.raw = ["", "", ""], someGenerics5(_q, null, null)); // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { } -(_q = ["", "", "", ""], _q.raw = ["", "", "", ""], someGenerics6(_q, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_r = ["", "", "", ""], _r.raw = ["", "", "", ""], someGenerics6(_r, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_s = ["", "", "", ""], _s.raw = ["", "", "", ""], someGenerics6(_s, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +function someGenerics6(strs, a, b, c) { +} +(_r = ["", "", "", ""], _r.raw = ["", "", "", ""], someGenerics6(_r, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_s = ["", "", "", ""], _s.raw = ["", "", "", ""], someGenerics6(_s, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_t = ["", "", "", ""], _t.raw = ["", "", "", ""], someGenerics6(_t, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { } -(_t = ["", "", "", ""], _t.raw = ["", "", "", ""], someGenerics7(_t, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_u = ["", "", "", ""], _u.raw = ["", "", "", ""], someGenerics7(_u, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_v = ["", "", "", ""], _v.raw = ["", "", "", ""], someGenerics7(_v, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +function someGenerics7(strs, a, b, c) { +} +(_u = ["", "", "", ""], _u.raw = ["", "", "", ""], someGenerics7(_u, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_v = ["", "", "", ""], _v.raw = ["", "", "", ""], someGenerics7(_v, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_w = ["", "", "", ""], _w.raw = ["", "", "", ""], someGenerics7(_w, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); // Generic tag with argument of generic function type -function someGenerics8(strs, n) { return n; } -var x = (_w = ["", ""], _w.raw = ["", ""], someGenerics8(_w, someGenerics7)); -(_x = ["", "", "", ""], _x.raw = ["", "", "", ""], x(_x, null, null, null)); +function someGenerics8(strs, n) { + return n; +} +var x = (_x = ["", ""], _x.raw = ["", ""], someGenerics8(_x, someGenerics7)); +(_y = ["", "", "", ""], _y.raw = ["", "", "", ""], x(_y, null, null, null)); // Generic tag with multiple parameters of generic type passed arguments with no best common type function someGenerics9(strs, a, b, c) { return null; } -var a9a = (_y = ["", "", "", ""], _y.raw = ["", "", "", ""], someGenerics9(_y, '', 0, [])); +var a9a = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, '', 0, [])); var a9a; -var a9e = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, undefined, { x: 6, z: new Date() }, { x: 6, y: '' })); +var a9e = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +})); var a9e; // Generic tag with multiple parameters of generic type passed arguments with a single best common type -var a9d = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, { x: 3 }, { x: 6 }, { x: 6 })); +var a9d = (_1 = ["", "", "", ""], _1.raw = ["", "", "", ""], someGenerics9(_1, { + x: 3 +}, { + x: 6 +}, { + x: 6 +})); var a9d; // Generic tag with multiple parameters of generic type where one argument is of type 'any' var anyVar; -var a = (_1 = ["", "", "", ""], _1.raw = ["", "", "", ""], someGenerics9(_1, 7, anyVar, 4)); +var a = (_2 = ["", "", "", ""], _2.raw = ["", "", "", ""], someGenerics9(_2, 7, anyVar, 4)); var a; // Generic tag with multiple parameters of generic type where one argument is [] and the other is not 'any' -var arr = (_2 = ["", "", "", ""], _2.raw = ["", "", "", ""], someGenerics9(_2, [], null, undefined)); +var arr = (_3 = ["", "", "", ""], _3.raw = ["", "", "", ""], someGenerics9(_3, [], null, undefined)); var arr; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2; +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js index 2f57882b4b7..1fdeb3e4b38 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js @@ -94,48 +94,61 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInferenceES6.js] // Generic tag with one parameter -function noParams(n) { } +function noParams(n) { +} noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { } +function someGenerics1a(n, m) { +} someGenerics1a `${3}`; -function someGenerics1b(n, m) { } +function someGenerics1b(n, m) { +} someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { } +function someGenerics2a(strs, n) { +} someGenerics2a `${(n) => n}`; -function someGenerics2b(strs, n) { } +function someGenerics2b(strs, n) { +} someGenerics2b `${(n, x) => n}`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { } +function someGenerics3(strs, producer) { +} someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { } +function someGenerics4(strs, n, f) { +} someGenerics4 `${4}${() => null}`; someGenerics4 `${''}${() => 3}`; someGenerics4 `${null}${null}`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { } +function someGenerics5(strs, n, f) { +} someGenerics5 `${4} ${() => null}`; someGenerics5 `${''}${() => 3}`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { } +function someGenerics6(strs, a, b, c) { +} someGenerics6 `${n => n}${n => n}${n => n}`; someGenerics6 `${n => n}${n => n}${n => n}`; someGenerics6 `${(n) => n}${(n) => n}${(n) => n}`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { } +function someGenerics7(strs, a, b, c) { +} someGenerics7 `${n => n}${n => n}${n => n}`; someGenerics7 `${n => n}${n => n}${n => n}`; someGenerics7 `${(n) => n}${(n) => n}${(n) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs, n) { return n; } +function someGenerics8(strs, n) { + return n; +} var x = someGenerics8 `${someGenerics7}`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type @@ -144,10 +157,22 @@ function someGenerics9(strs, a, b, c) { } var a9a = someGenerics9 `${''}${0}${[]}`; var a9a; -var a9e = someGenerics9 `${undefined}${{ x: 6, z: new Date() }}${{ x: 6, y: '' }}`; +var a9e = someGenerics9 `${undefined}${{ + x: 6, + z: new Date() +}}${{ + x: 6, + y: '' +}}`; var a9e; // Generic tag with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9 `${{ x: 3 }}${{ x: 6 }}${{ x: 6 }}`; +var a9d = someGenerics9 `${{ + x: 3 +}}${{ + x: 6 +}}${{ + x: 6 +}}`; var a9d; // Generic tag with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js index 4b9df44d3f7..24b0b16ea35 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js @@ -74,11 +74,15 @@ fn5 `${ (n) => n.substr(0) }`; //// [taggedTemplateStringsWithOverloadResolution3.js] -function fn1() { return null; } +function fn1() { + return null; +} var s = (_a = ["", ""], _a.raw = ["", ""], fn1(_a, undefined)); // No candidate overloads found (_b = ["", ""], _b.raw = ["", ""], fn1(_b, {})); // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d1 = (_c = ["", "", ""], _c.raw = ["", "", ""], fn2(_c, 0, undefined)); // contextually typed var d2 = (_d = ["", "", ""], _d.raw = ["", "", ""], fn2(_d, 0, undefined)); // any d1.foo(); // error @@ -87,7 +91,9 @@ d2(); // no error (typed as any) (_e = ["", "", ""], _e.raw = ["", "", ""], fn2(_e, 0, '')); // OK // Generic and non-generic overload where non-generic overload is the only candidate (_f = ["", "", ""], _f.raw = ["", "", ""], fn2(_f, '', 0)); // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = (_g = ["", ""], _g.raw = ["", ""], fn3(_g, 3)); var s = (_h = ["", "", "", ""], _h.raw = ["", "", "", ""], fn3(_h, '', 3, '')); var n = (_j = ["", "", "", ""], _j.raw = ["", "", "", ""], fn3(_j, 5, 5, 5)); @@ -97,19 +103,26 @@ var s = (_k = ["", ""], _k.raw = ["", ""], fn3(_k, 4)); var s = (_l = ["", "", "", ""], _l.raw = ["", "", "", ""], fn3(_l, '', '', '')); var n = (_m = ["", "", "", ""], _m.raw = ["", "", "", ""], fn3(_m, '', '', 3)); // Generic overloads with differing arity tagging with argument count that doesn't match any overload -(_n = [""], _n.raw = [""], fn3(_n)); // Error -function fn4() { } +(_o = [""], _o.raw = [""], fn3(_o)); // Error +function fn4() { +} // Generic overloads with constraints tagged with types that satisfy the constraints -(_o = ["", "", ""], _o.raw = ["", "", ""], fn4(_o, '', 3)); -(_p = ["", "", ""], _p.raw = ["", "", ""], fn4(_p, 3, '')); -(_q = ["", "", ""], _q.raw = ["", "", ""], fn4(_q, 3, undefined)); -(_r = ["", "", ""], _r.raw = ["", "", ""], fn4(_r, '', null)); +(_p = ["", "", ""], _p.raw = ["", "", ""], fn4(_p, '', 3)); +(_q = ["", "", ""], _q.raw = ["", "", ""], fn4(_q, 3, '')); +(_r = ["", "", ""], _r.raw = ["", "", ""], fn4(_r, 3, undefined)); +(_s = ["", "", ""], _s.raw = ["", "", ""], fn4(_s, '', null)); // Generic overloads with constraints called with type arguments that do not satisfy the constraints -(_s = ["", "", ""], _s.raw = ["", "", ""], fn4(_s, null, null)); // Error +(_t = ["", "", ""], _t.raw = ["", "", ""], fn4(_t, null, null)); // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints -(_t = ["", "", ""], _t.raw = ["", "", ""], fn4(_t, true, null)); -(_u = ["", "", ""], _u.raw = ["", "", ""], fn4(_u, null, true)); -function fn5() { return undefined; } -(_v = ["", ""], _v.raw = ["", ""], fn5(_v, function (n) { return n.toFixed(); })); // will error; 'n' should have type 'string'. -(_w = ["", ""], _w.raw = ["", ""], fn5(_w, function (n) { return n.substr(0); })); -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; +(_u = ["", "", ""], _u.raw = ["", "", ""], fn4(_u, true, null)); +(_v = ["", "", ""], _v.raw = ["", "", ""], fn4(_v, null, true)); +function fn5() { + return undefined; +} +(_w = ["", ""], _w.raw = ["", ""], fn5(_w, function (n) { + return n.toFixed(); +})); // will error; 'n' should have type 'string'. +(_x = ["", ""], _x.raw = ["", ""], fn5(_x, function (n) { + return n.substr(0); +})); +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js index 583770b9cd8..666974de447 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js @@ -73,11 +73,15 @@ fn5 `${ (n) => n.substr(0) }`; //// [taggedTemplateStringsWithOverloadResolution3_ES6.js] -function fn1() { return null; } +function fn1() { + return null; +} var s = fn1 `${undefined}`; // No candidate overloads found fn1 `${{}}`; // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d1 = fn2 `${0}${undefined}`; // contextually typed var d2 = fn2 `${0}${undefined}`; // any d1.foo(); // error @@ -86,7 +90,9 @@ d2(); // no error (typed as any) fn2 `${0}${''}`; // OK // Generic and non-generic overload where non-generic overload is the only candidate fn2 `${''}${0}`; // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = fn3 `${3}`; var s = fn3 `${''}${3}${''}`; var n = fn3 `${5}${5}${5}`; @@ -97,7 +103,8 @@ var s = fn3 `${''}${''}${''}`; var n = fn3 `${''}${''}${3}`; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ``; // Error -function fn4() { } +function fn4() { +} // Generic overloads with constraints tagged with types that satisfy the constraints fn4 `${''}${3}`; fn4 `${3}${''}`; @@ -108,6 +115,8 @@ fn4 `${null}${null}`; // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4 `${true}${null}`; fn4 `${null}${true}`; -function fn5() { return undefined; } +function fn5() { + return undefined; +} fn5 `${(n) => n.toFixed()}`; // will error; 'n' should have type 'string'. fn5 `${(n) => n.substr(0)}`; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js index f7523eb9870..10a8f1f2a12 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js @@ -13,5 +13,7 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -(_a = ["", ""], _a.raw = ["", ""], foo(_a, function (x) { x = "bad"; })); +(_a = ["", ""], _a.raw = ["", ""], foo(_a, function (x) { + x = "bad"; +})); var _a; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js index 7691b83b3bc..bc18a600458 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js @@ -8,4 +8,6 @@ foo `${function (x: number) { x = "bad"; } }`; //// [taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js] function foo(...rest) { } -foo `${function (x) { x = "bad"; }}`; +foo `${function (x) { + x = "bad"; +}}`; diff --git a/tests/baselines/reference/targetTypeArgs.js b/tests/baselines/reference/targetTypeArgs.js index 18dff375abe..cb227f81b40 100644 --- a/tests/baselines/reference/targetTypeArgs.js +++ b/tests/baselines/reference/targetTypeArgs.js @@ -18,10 +18,36 @@ foo(function(x) { x }); function foo(callback) { callback("hello"); } -foo(function (x) { x; }); -[1].forEach(function (v, i, a) { v; }); -["hello"].every(function (v, i, a) { return true; }); -[1].every(function (v, i, a) { return true; }); -[1].every(function (v, i, a) { return true; }); -["s"].every(function (v, i, a) { return true; }); -["s"].forEach(function (v, i, a) { v; }); +foo(function (x) { + x; +}); +[ + 1 +].forEach(function (v, i, a) { + v; +}); +[ + "hello" +].every(function (v, i, a) { + return true; +}); +[ + 1 +].every(function (v, i, a) { + return true; +}); +[ + 1 +].every(function (v, i, a) { + return true; +}); +[ + "s" +].every(function (v, i, a) { + return true; +}); +[ + "s" +].forEach(function (v, i, a) { + v; +}); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index c886183bacf..d844354b154 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -25,18 +25,25 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo(x) { } +function foo(x) { +} var Foo = (function () { function Foo(x) { } return Foo; })(); -foo(function (s) { s = 5; }); // Error, can’t assign number to string -new Foo(function (s) { s = 5; }); // error, if types are applied correctly +foo(function (s) { + s = 5; +}); // Error, can’t assign number to string +new Foo(function (s) { + s = 5; +}); // error, if types are applied correctly var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.call(this, function (s) { s = 5; }); + _super.call(this, function (s) { + s = 5; + }); } return Bar; })(Foo); // error, if types are applied correctly diff --git a/tests/baselines/reference/targetTypeCalls.js b/tests/baselines/reference/targetTypeCalls.js index 168195216ca..302419a2693 100644 --- a/tests/baselines/reference/targetTypeCalls.js +++ b/tests/baselines/reference/targetTypeCalls.js @@ -6,7 +6,27 @@ var fra3: (v:any)=>string = function() { return function() { return function(v) var fra4: (v:any)=>void = function() { return function() { return function(v) {return v;};}(); }() // should work //// [targetTypeCalls.js] -var fra1 = function () { return function (v) { return v; }; }(); // should work -var fra2 = function () { return function () { return 0; }; }(); // should work -var fra3 = function () { return function () { return function (v) { return v; }; }(); }(); // should work -var fra4 = function () { return function () { return function (v) { return v; }; }(); }(); // should work +var fra1 = function () { + return function (v) { + return v; + }; +}(); // should work +var fra2 = function () { + return function () { + return 0; + }; +}(); // should work +var fra3 = function () { + return function () { + return function (v) { + return v; + }; + }(); +}(); // should work +var fra4 = function () { + return function () { + return function (v) { + return v; + }; + }(); +}(); // should work diff --git a/tests/baselines/reference/targetTypeCastTest.js b/tests/baselines/reference/targetTypeCastTest.js index 053aced7305..c9a30c6d685 100644 --- a/tests/baselines/reference/targetTypeCastTest.js +++ b/tests/baselines/reference/targetTypeCastTest.js @@ -28,8 +28,12 @@ function Point(x, y) { this.x = x; this.y = y; } -var add = function (x, y) { return x + y; }; +var add = function (x, y) { + return x + y; +}; var add2 = function (x, y) { return 0; }; -function add3(x, y) { x; } +function add3(x, y) { + x; +} diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.js b/tests/baselines/reference/targetTypeObjectLiteralToAny.js index fced520e09e..f6228f210f8 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.js +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.js @@ -15,6 +15,9 @@ function suggest() { var TypeScriptKeywords; var result; TypeScriptKeywords.forEach(function (keyword) { - result.push({ text: keyword, type: "keyword" }); // this should not cause a crash - push should be typed to any + result.push({ + text: keyword, + type: "keyword" + }); // this should not cause a crash - push should be typed to any }); } diff --git a/tests/baselines/reference/targetTypeTest1.js b/tests/baselines/reference/targetTypeTest1.js index 8f9657ee9d0..8c9156d1e0d 100644 --- a/tests/baselines/reference/targetTypeTest1.js +++ b/tests/baselines/reference/targetTypeTest1.js @@ -80,7 +80,9 @@ function Point(x, y) { this.x = x; this.y = y; } -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} var x = EF1(1, 2); // Point.origin declared as type Point Point.origin = new Point(0, 0); @@ -108,10 +110,10 @@ function C(a, b) { this.a = a; this.b = b; } -C.prototype = - { a: 0, - b: 0, - C1M1: function (c, d) { - return (this.a + c) + (this.b + d); - } - }; +C.prototype = { + a: 0, + b: 0, + C1M1: function (c, d) { + return (this.a + c) + (this.b + d); + } +}; diff --git a/tests/baselines/reference/targetTypeTest2.js b/tests/baselines/reference/targetTypeTest2.js index 0ba82bc9cce..2d0a7dee464 100644 --- a/tests/baselines/reference/targetTypeTest2.js +++ b/tests/baselines/reference/targetTypeTest2.js @@ -13,8 +13,18 @@ function func2(stuff1:string, stuff2:number, stuff3:number) { //// [targetTypeTest2.js] // Test target typing for array literals and call expressions -var a = [1, 2, "3"]; -function func1(stuff) { return stuff; } +var a = [ + 1, + 2, + "3" +]; +function func1(stuff) { + return stuff; +} function func2(stuff1, stuff2, stuff3) { - return func1([stuff1, stuff2, stuff3]); + return func1([ + stuff1, + stuff2, + stuff3 + ]); } diff --git a/tests/baselines/reference/targetTypeTest3.js b/tests/baselines/reference/targetTypeTest3.js index 13972478582..199d998a11c 100644 --- a/tests/baselines/reference/targetTypeTest3.js +++ b/tests/baselines/reference/targetTypeTest3.js @@ -13,8 +13,18 @@ function func2(stuff1:string, stuff2:number, stuff3:number) { //// [targetTypeTest3.js] // Test target typing for array literals and call expressions -var a = [1, 2, "3"]; // should produce an error -function func1(stuff) { return stuff; } +var a = [ + 1, + 2, + "3" +]; // should produce an error +function func1(stuff) { + return stuff; +} function func2(stuff1, stuff2, stuff3) { - return func1([stuff1, stuff2, stuff3]); + return func1([ + stuff1, + stuff2, + stuff3 + ]); } diff --git a/tests/baselines/reference/targetTypeVoidFunc.errors.txt b/tests/baselines/reference/targetTypeVoidFunc.errors.txt index 14c3cb37c3a..f9434c1d630 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.errors.txt +++ b/tests/baselines/reference/targetTypeVoidFunc.errors.txt @@ -4,7 +4,7 @@ tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2322: Type '() => void ==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ==== function f1(): { new (): number; } { return function () { return; } - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'new () => number'. }; diff --git a/tests/baselines/reference/targetTypeVoidFunc.js b/tests/baselines/reference/targetTypeVoidFunc.js index dba2086b0e1..9913b4bd491 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.js +++ b/tests/baselines/reference/targetTypeVoidFunc.js @@ -9,7 +9,9 @@ var z = new (f1())(); //// [targetTypeVoidFunc.js] function f1() { - return function () { return; }; + return function () { + return; + }; } ; var x = f1(); diff --git a/tests/baselines/reference/targetTypingOnFunctions.js b/tests/baselines/reference/targetTypingOnFunctions.js index fad75a4bf6d..5b11a34ff4d 100644 --- a/tests/baselines/reference/targetTypingOnFunctions.js +++ b/tests/baselines/reference/targetTypingOnFunctions.js @@ -4,5 +4,9 @@ var fu: (s: string) => string = function (s) { return s.toLowerCase() }; var zu = fu = function (s) { return s.toLowerCase() }; //// [targetTypingOnFunctions.js] -var fu = function (s) { return s.toLowerCase(); }; -var zu = fu = function (s) { return s.toLowerCase(); }; +var fu = function (s) { + return s.toLowerCase(); +}; +var zu = fu = function (s) { + return s.toLowerCase(); +}; diff --git a/tests/baselines/reference/templateStringInArray.js b/tests/baselines/reference/templateStringInArray.js index 97d0b1a636b..175dc39f62c 100644 --- a/tests/baselines/reference/templateStringInArray.js +++ b/tests/baselines/reference/templateStringInArray.js @@ -2,4 +2,8 @@ var x = [1, 2, `abc${ 123 }def`]; //// [templateStringInArray.js] -var x = [1, 2, ("abc" + 123 + "def")]; +var x = [ + 1, + 2, + ("abc" + 123 + "def") +]; diff --git a/tests/baselines/reference/templateStringInArrowFunction.js b/tests/baselines/reference/templateStringInArrowFunction.js index 4c4890633e1..984c8673cb0 100644 --- a/tests/baselines/reference/templateStringInArrowFunction.js +++ b/tests/baselines/reference/templateStringInArrowFunction.js @@ -2,4 +2,6 @@ var x = x => `abc${ x }def`; //// [templateStringInArrowFunction.js] -var x = function (x) { return ("abc" + x + "def"); }; +var x = function (x) { + return ("abc" + x + "def"); +}; diff --git a/tests/baselines/reference/templateStringInEqualityChecks.js b/tests/baselines/reference/templateStringInEqualityChecks.js index f7573f8efd5..54f5fa610c2 100644 --- a/tests/baselines/reference/templateStringInEqualityChecks.js +++ b/tests/baselines/reference/templateStringInEqualityChecks.js @@ -5,7 +5,4 @@ var x = `abc${0}abc` === `abc` || "abc0abc" !== `abc${0}abc`; //// [templateStringInEqualityChecks.js] -var x = "abc" + 0 + "abc" === "abc" || - "abc" !== "abc" + 0 + "abc" && - "abc" + 0 + "abc" == "abc0abc" && - "abc0abc" !== "abc" + 0 + "abc"; +var x = "abc" + 0 + "abc" === "abc" || "abc" !== "abc" + 0 + "abc" && "abc" + 0 + "abc" == "abc0abc" && "abc0abc" !== "abc" + 0 + "abc"; diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.js b/tests/baselines/reference/templateStringInEqualityChecksES6.js index 9bb001d9dc7..317db1ab366 100644 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.js +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.js @@ -5,7 +5,4 @@ var x = `abc${0}abc` === `abc` || "abc0abc" !== `abc${0}abc`; //// [templateStringInEqualityChecksES6.js] -var x = `abc${0}abc` === `abc` || - `abc` !== `abc${0}abc` && - `abc${0}abc` == "abc0abc" && - "abc0abc" !== `abc${0}abc`; +var x = `abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc`; diff --git a/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt index 1f93a38e19f..e523b4c2dcb 100644 --- a/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt +++ b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,19): error TS1005: ';' expected. ==== tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts (4 errors) ==== function f(`hello`); - ~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. ~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~~~ !!! error TS1138: Parameter declaration expected. ~ diff --git a/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt index af911f07e73..be9c3556caf 100644 --- a/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt +++ b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,19): error TS1005: ';' expected. ==== tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts (4 errors) ==== function f(`hello`); - ~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. ~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~~~ !!! error TS1138: Parameter declaration expected. ~ diff --git a/tests/baselines/reference/templateStringInInOperator.js b/tests/baselines/reference/templateStringInInOperator.js index c496e335dd4..6384c1096c6 100644 --- a/tests/baselines/reference/templateStringInInOperator.js +++ b/tests/baselines/reference/templateStringInInOperator.js @@ -2,4 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; //// [templateStringInInOperator.js] -var x = "" + "hi" in { hi: 10, hello: 20 }; +var x = "" + "hi" in { + hi: 10, + hello: 20 +}; diff --git a/tests/baselines/reference/templateStringInInOperatorES6.js b/tests/baselines/reference/templateStringInInOperatorES6.js index bd4daef3b6d..75d79fad062 100644 --- a/tests/baselines/reference/templateStringInInOperatorES6.js +++ b/tests/baselines/reference/templateStringInInOperatorES6.js @@ -2,4 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; //// [templateStringInInOperatorES6.js] -var x = `${"hi"}` in { hi: 10, hello: 20 }; +var x = `${"hi"}` in { + hi: 10, + hello: 20 +}; diff --git a/tests/baselines/reference/templateStringInObjectLiteral.js b/tests/baselines/reference/templateStringInObjectLiteral.js index 2e4de70f57c..5a096b0adfa 100644 --- a/tests/baselines/reference/templateStringInObjectLiteral.js +++ b/tests/baselines/reference/templateStringInObjectLiteral.js @@ -6,6 +6,7 @@ var x = { //// [templateStringInObjectLiteral.js] var x = (_a = ["b"], _a.raw = ["b"], ({ - a: "abc" + 123 + "def" })(_a)); + a: "abc" + 123 + "def" +})(_a)); 321; var _a; diff --git a/tests/baselines/reference/templateStringInObjectLiteralES6.js b/tests/baselines/reference/templateStringInObjectLiteralES6.js index 7de012185a9..22144e75247 100644 --- a/tests/baselines/reference/templateStringInObjectLiteralES6.js +++ b/tests/baselines/reference/templateStringInObjectLiteralES6.js @@ -6,5 +6,6 @@ var x = { //// [templateStringInObjectLiteralES6.js] var x = { - a: `abc${123}def`, } `b`; + a: `abc${123}def`, +} `b`; 321; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArray.js b/tests/baselines/reference/templateStringWithEmbeddedArray.js index 1fb6512db47..946bae01dfb 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArray.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArray.js @@ -2,4 +2,8 @@ var x = `abc${ [1,2,3] }def`; //// [templateStringWithEmbeddedArray.js] -var x = "abc" + [1, 2, 3] + "def"; +var x = "abc" + [ + 1, + 2, + 3 +] + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js index 804ef7a4e78..96b311cf02b 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js @@ -2,4 +2,8 @@ var x = `abc${ [1,2,3] }def`; //// [templateStringWithEmbeddedArrayES6.js] -var x = `abc${[1, 2, 3]}def`; +var x = `abc${[ + 1, + 2, + 3 +]}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js index eb2579b0cc3..22b9387047f 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js @@ -2,4 +2,6 @@ var x = `abc${ x => x }def`; //// [templateStringWithEmbeddedArrowFunction.js] -var x = "abc" + function (x) { return x; } + "def"; +var x = "abc" + function (x) { + return x; +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js index 88a8349d1a4..3447ff87ac3 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js @@ -2,4 +2,6 @@ var x = `abc${ function y() { return y; } }def`; //// [templateStringWithEmbeddedFunctionExpression.js] -var x = "abc" + function y() { return y; } + "def"; +var x = "abc" + function y() { + return y; +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js index f0e2f749cfd..46e37c0ac18 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js @@ -2,4 +2,6 @@ var x = `abc${ function y() { return y; } }def`; //// [templateStringWithEmbeddedFunctionExpressionES6.js] -var x = `abc${function y() { return y; }}def`; +var x = `abc${function y() { + return y; +}}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.js b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js index 091843ea52e..27c83d6ca81 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperator.js +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js @@ -2,4 +2,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; //// [templateStringWithEmbeddedInOperator.js] -var x = "abc" + ("hi" in { hi: 10, hello: 20 }) + "def"; +var x = "abc" + ("hi" in { + hi: 10, + hello: 20 +}) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js index f6510c2fab9..76a66436311 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js @@ -2,4 +2,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; //// [templateStringWithEmbeddedInOperatorES6.js] -var x = `abc${"hi" in { hi: 10, hello: 20 }}def`; +var x = `abc${"hi" in { + hi: 10, + hello: 20 +}}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js index 40ecf486245..99d801f1c8a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js @@ -2,4 +2,7 @@ var x = `abc${ { x: 10, y: 20 } }def`; //// [templateStringWithEmbeddedObjectLiteral.js] -var x = "abc" + { x: 10, y: 20 } + "def"; +var x = "abc" + { + x: 10, + y: 20 +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js index dbc3837e133..bf197d86319 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js @@ -2,4 +2,7 @@ var x = `abc${ { x: 10, y: 20 } }def`; //// [templateStringWithEmbeddedObjectLiteralES6.js] -var x = `abc${{ x: 10, y: 20 }}def`; +var x = `abc${{ + x: 10, + y: 20 +}}def`; diff --git a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt index 7ac2eff8652..7c796d47398 100644 --- a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(515,11): error TS2300: Duplicate identifier 'TemplateStringsArray'. +lib.d.ts(521,11): error TS2300: Duplicate identifier 'TemplateStringsArray'. tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2300: Duplicate identifier 'TemplateStringsArray'. tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type '{ [x: number]: undefined; }'. diff --git a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt index db383b216a5..4b9cb63d9aa 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(515,11): error TS2300: Duplicate identifier 'TemplateStringsArray'. +lib.d.ts(521,11): error TS2300: Duplicate identifier 'TemplateStringsArray'. tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2300: Duplicate identifier 'TemplateStringsArray'. tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(8,3): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type '{ [x: number]: undefined; }'. diff --git a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.js b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.js index 22ce6831f00..95ab43743ae 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.js +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.js @@ -11,11 +11,8 @@ f({}, 10, 10); f `abcdef${ 1234 }${ 5678 }ghijkl`; //// [templateStringsArrayTypeRedefinedInES6Mode.js] -var TemplateStringsArray = (function () { - function TemplateStringsArray() { - } - return TemplateStringsArray; -})(); +class TemplateStringsArray { +} function f(x, y, z) { } f({}, 10, 10); diff --git a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js index 72d0fd8c8db..ef113312060 100644 --- a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js +++ b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js @@ -4,4 +4,6 @@ `${function (x: number) { x = "bad"; } }`; //// [templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js] -"" + function (x) { x = "bad"; }; +"" + function (x) { + x = "bad"; +}; diff --git a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js index 18fae66c78a..9ce47348dc1 100644 --- a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js +++ b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js @@ -3,4 +3,6 @@ `${function (x: number) { x = "bad"; } }`; //// [templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js] -`${function (x) { x = "bad"; }}`; +`${function (x) { + x = "bad"; +}}`; diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.js b/tests/baselines/reference/ternaryExpressionSourceMap.js index 4b43726b281..24813de9734 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.js +++ b/tests/baselines/reference/ternaryExpressionSourceMap.js @@ -5,5 +5,9 @@ var foo = x ? () => 0 : () => 0; //// [ternaryExpressionSourceMap.js] var x = 1; -var foo = x ? function () { return 0; } : function () { return 0; }; +var foo = x ? function () { + return 0; +} : function () { + return 0; +}; //# sourceMappingURL=ternaryExpressionSourceMap.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.js.map b/tests/baselines/reference/ternaryExpressionSourceMap.js.map index 9eb28cae3c1..af4eaa03ab7 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.js.map +++ b/tests/baselines/reference/ternaryExpressionSourceMap.js.map @@ -1,2 +1,2 @@ //// [ternaryExpressionSourceMap.js.map] -{"version":3,"file":"ternaryExpressionSourceMap.js","sourceRoot":"","sources":["ternaryExpressionSourceMap.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,GAAG,GAAG,CAAC,GAAG,cAAM,QAAC,EAAD,CAAC,GAAG,cAAM,QAAC,EAAD,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"ternaryExpressionSourceMap.js","sourceRoot":"","sources":["ternaryExpressionSourceMap.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,GAAG,GAAG,CAAC,GAAG;WAAM,CAAC;AAAD,CAAC,GAAG;WAAM,CAAC;AAAD,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt b/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt index 9eb1dd1be86..b1046e0b429 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt +++ b/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt @@ -15,7 +15,7 @@ sourceFile:ternaryExpressionSourceMap.ts 4 > ^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 >var @@ -30,23 +30,13 @@ sourceFile:ternaryExpressionSourceMap.ts 5 >Emitted(1, 10) Source(2, 10) + SourceIndex(0) 6 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) --- ->>>var foo = x ? function () { return 0; } : function () { return 0; }; +>>>var foo = x ? function () { 1-> 2 >^^^^ 3 > ^^^ 4 > ^^^ 5 > ^ 6 > ^^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^^^^^^^ -9 > ^^ -10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^ -13> ^^^^^^^^ -14> ^^ -15> ^ -16> ^ 1-> > 2 >var @@ -54,31 +44,52 @@ sourceFile:ternaryExpressionSourceMap.ts 4 > = 5 > x 6 > ? -7 > () => -8 > 0 -9 > -10> 0 -11> : -12> () => -13> 0 -14> -15> 0 -16> ; 1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) 2 >Emitted(2, 5) Source(3, 5) + SourceIndex(0) 3 >Emitted(2, 8) Source(3, 8) + SourceIndex(0) 4 >Emitted(2, 11) Source(3, 11) + SourceIndex(0) 5 >Emitted(2, 12) Source(3, 12) + SourceIndex(0) 6 >Emitted(2, 15) Source(3, 15) + SourceIndex(0) -7 >Emitted(2, 29) Source(3, 21) + SourceIndex(0) -8 >Emitted(2, 37) Source(3, 22) + SourceIndex(0) -9 >Emitted(2, 39) Source(3, 21) + SourceIndex(0) -10>Emitted(2, 40) Source(3, 22) + SourceIndex(0) -11>Emitted(2, 43) Source(3, 25) + SourceIndex(0) -12>Emitted(2, 57) Source(3, 31) + SourceIndex(0) -13>Emitted(2, 65) Source(3, 32) + SourceIndex(0) -14>Emitted(2, 67) Source(3, 31) + SourceIndex(0) -15>Emitted(2, 68) Source(3, 32) + SourceIndex(0) -16>Emitted(2, 69) Source(3, 33) + SourceIndex(0) +--- +>>> return 0; +1 >^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^-> +1 >() => +2 > 0 +1 >Emitted(3, 12) Source(3, 21) + SourceIndex(0) +2 >Emitted(3, 13) Source(3, 22) + SourceIndex(0) +--- +>>>} : function () { +1-> +2 >^ +3 > ^^^ +4 > ^^^^^^^^^^-> +1-> +2 >0 +3 > : +1->Emitted(4, 1) Source(3, 21) + SourceIndex(0) +2 >Emitted(4, 2) Source(3, 22) + SourceIndex(0) +3 >Emitted(4, 5) Source(3, 25) + SourceIndex(0) +--- +>>> return 0; +1->^^^^^^^^^^^ +2 > ^ +1->() => +2 > 0 +1->Emitted(5, 12) Source(3, 31) + SourceIndex(0) +2 >Emitted(5, 13) Source(3, 32) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >0 +3 > ; +1 >Emitted(6, 1) Source(3, 31) + SourceIndex(0) +2 >Emitted(6, 2) Source(3, 32) + SourceIndex(0) +3 >Emitted(6, 3) Source(3, 33) + SourceIndex(0) --- >>>//# sourceMappingURL=ternaryExpressionSourceMap.js.map \ No newline at end of file diff --git a/tests/baselines/reference/thisBinding.js b/tests/baselines/reference/thisBinding.js index 79a27b19fd8..0c0547a4b91 100644 --- a/tests/baselines/reference/thisBinding.js +++ b/tests/baselines/reference/thisBinding.js @@ -27,7 +27,10 @@ var M; var C = (function () { function C() { this.x = 0; - ({ z: 10, f: this.f }).f(({})); + ({ + z: 10, + f: this.f + }).f(({})); } C.prototype.f = function (x) { x.e; // e not found diff --git a/tests/baselines/reference/thisBinding2.js b/tests/baselines/reference/thisBinding2.js index 76b99797e16..ced47c0bc7b 100644 --- a/tests/baselines/reference/thisBinding2.js +++ b/tests/baselines/reference/thisBinding2.js @@ -40,6 +40,8 @@ var messenger = { message: "Hello World", start: function () { var _this = this; - return setTimeout(function () { var x = _this.message; }, 3000); + return setTimeout(function () { + var x = _this.message; + }, 3000); } }; diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js index 78b06d30dd2..348684fe606 100644 --- a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js @@ -10,7 +10,13 @@ var C = (function () { } C.prototype.foo = function () { var _this = this; - [1, 2, 3].map(function (x) { return _this; }); + [ + 1, + 2, + 3 + ].map(function (x) { + return _this; + }); }; return C; })(); diff --git a/tests/baselines/reference/thisExpressionInIndexExpression.js b/tests/baselines/reference/thisExpressionInIndexExpression.js index 1e6661386c4..45094ece936 100644 --- a/tests/baselines/reference/thisExpressionInIndexExpression.js +++ b/tests/baselines/reference/thisExpressionInIndexExpression.js @@ -6,5 +6,7 @@ function f() { //// [thisExpressionInIndexExpression.js] function f() { var _this = this; - return function (r) { return r[_this]; }; + return function (r) { + return r[_this]; + }; } diff --git a/tests/baselines/reference/thisExpressionOfGenericObject.js b/tests/baselines/reference/thisExpressionOfGenericObject.js index e790050069e..5daa4959c6d 100644 --- a/tests/baselines/reference/thisExpressionOfGenericObject.js +++ b/tests/baselines/reference/thisExpressionOfGenericObject.js @@ -11,7 +11,9 @@ class MyClass1 { var MyClass1 = (function () { function MyClass1() { var _this = this; - (function () { return _this; }); + (function () { + return _this; + }); } return MyClass1; })(); diff --git a/tests/baselines/reference/thisInAccessors.js b/tests/baselines/reference/thisInAccessors.js index ab521649292..3d3206e11f5 100644 --- a/tests/baselines/reference/thisInAccessors.js +++ b/tests/baselines/reference/thisInAccessors.js @@ -38,7 +38,9 @@ var GetterOnly = (function () { Object.defineProperty(GetterOnly.prototype, "Value", { get: function () { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; return ''; }, set: function (val) { @@ -58,7 +60,9 @@ var SetterOnly = (function () { }, set: function (val) { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; }, enumerable: true, configurable: true @@ -72,12 +76,16 @@ var GetterAndSetter = (function () { Object.defineProperty(GetterAndSetter.prototype, "Value", { get: function () { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; return ''; }, set: function (val) { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js index 03e6ddb64d9..fdfcc5d9522 100644 --- a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js +++ b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js @@ -9,7 +9,8 @@ class Vector { } //// [thisInArrowFunctionInStaticInitializer1.js] -function log(a) { } +function log(a) { +} var Vector = (function () { function Vector() { var _this = this; diff --git a/tests/baselines/reference/thisInInnerFunctions.js b/tests/baselines/reference/thisInInnerFunctions.js index d9ba3adfdf3..09ee60fdb9b 100644 --- a/tests/baselines/reference/thisInInnerFunctions.js +++ b/tests/baselines/reference/thisInInnerFunctions.js @@ -26,7 +26,9 @@ var Foo = (function () { function inner() { var _this = this; this.y = "hi"; // 'this' should be not type to 'Foo' either - var f = function () { return _this.y; }; // 'this' should be not type to 'Foo' either + var f = function () { + return _this.y; + }; // 'this' should be not type to 'Foo' either } }; return Foo; @@ -34,7 +36,9 @@ var Foo = (function () { function test() { var _this = this; var x = function () { - (function () { return _this; })(); + (function () { + return _this; + })(); _this; }; } diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index f21ebedc1eb..16c40a96e91 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -92,7 +92,8 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { } +function genericFunc(x) { +} genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index fae5e8eacff..0453d3ed315 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -6,10 +6,9 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(44,9): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(45,9): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,10): error TS1003: Identifier expected. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (8 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -72,7 +71,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod } export = this; // Should be an error - ~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. - ~~~~ -!!! error TS1003: Identifier expected. \ No newline at end of file + ~~~~~~~~~~~~~~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index ee1c5add921..2e8e6d10c6c 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -92,7 +92,8 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { } +function genericFunc(x) { +} genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { @@ -108,4 +109,4 @@ var SomeEnum; SomeEnum[SomeEnum["A"] = this] = "A"; SomeEnum[SomeEnum["B"] = this.spaaaace] = "B"; // Also should not be allowed })(SomeEnum || (SomeEnum = {})); -this; // Should be an error +module.exports = this; diff --git a/tests/baselines/reference/thisInLambda.js b/tests/baselines/reference/thisInLambda.js index 94c86bd5a80..40a12d93351 100644 --- a/tests/baselines/reference/thisInLambda.js +++ b/tests/baselines/reference/thisInLambda.js @@ -26,11 +26,14 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; // 'this' is type 'Foo' - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { + return _this.x; + }; // 'this' should be type 'Foo' as well }; return Foo; })(); -function myFn(a) { } +function myFn(a) { +} var myCls = (function () { function myCls() { var _this = this; diff --git a/tests/baselines/reference/thisInObjectLiterals.js b/tests/baselines/reference/thisInObjectLiterals.js index 79e834be154..a2a6453e1aa 100644 --- a/tests/baselines/reference/thisInObjectLiterals.js +++ b/tests/baselines/reference/thisInObjectLiterals.js @@ -24,7 +24,10 @@ var MyClass = (function () { } MyClass.prototype.fn = function () { //type of 'this' in an object literal is the containing scope's this - var t = { x: this, y: this.t }; + var t = { + x: this, + y: this.t + }; var t; }; return MyClass; diff --git a/tests/baselines/reference/thisInOuterClassBody.js b/tests/baselines/reference/thisInOuterClassBody.js index 0dff441bb1e..ecbe6fc5417 100644 --- a/tests/baselines/reference/thisInOuterClassBody.js +++ b/tests/baselines/reference/thisInOuterClassBody.js @@ -28,7 +28,9 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; // 'this' is type 'Foo' - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { + return _this.x; + }; // 'this' should be type 'Foo' as well var p = this.y; return this; }; diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.js b/tests/baselines/reference/thisInPropertyBoundDeclarations.js index e5004eed431..cba8fd2a8c2 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.js +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.js @@ -92,7 +92,9 @@ var A = (function () { function inner() { this; } - (function () { return _this; }); + (function () { + return _this; + }); }; this.prop3 = function () { function inner() { @@ -100,11 +102,15 @@ var A = (function () { } }; this.prop4 = { - a: function () { return this; } + a: function () { + return this; + } }; this.prop5 = function () { return { - a: function () { return this; } + a: function () { + return this; + } }; }; } @@ -114,19 +120,36 @@ var B = (function () { function B() { var _this = this; this.prop1 = this; - this.prop2 = function () { return _this; }; - this.prop3 = function () { return function () { return function () { return function () { return _this; }; }; }; }; - this.prop4 = ' ' + - function () { - } + - ' ' + - (function () { return function () { return function () { return _this; }; }; }); + this.prop2 = function () { + return _this; + }; + this.prop3 = function () { + return function () { + return function () { + return function () { + return _this; + }; + }; + }; + }; + this.prop4 = ' ' + function () { + } + ' ' + (function () { + return function () { + return function () { + return _this; + }; + }; + }); this.prop5 = { - a: function () { return _this; } + a: function () { + return _this; + } }; this.prop6 = function () { return { - a: function () { return _this; } + a: function () { + return _this; + } }; }; } diff --git a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js index 99341af9f86..78467e8a22e 100644 --- a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js +++ b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js @@ -8,9 +8,12 @@ function test() } //// [thisReferencedInFunctionInsideArrowFunction1.js] -var foo = function (dummy) { }; +var foo = function (dummy) { +}; function test() { foo(function () { - return function () { return this; }; + return function () { + return this; + }; }); } diff --git a/tests/baselines/reference/throwInEnclosingStatements.js b/tests/baselines/reference/throwInEnclosingStatements.js index 0b072434f33..b52926e651e 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.js +++ b/tests/baselines/reference/throwInEnclosingStatements.js @@ -50,7 +50,9 @@ var aa = { function fn(x) { throw x; } -(function (x) { throw x; }); +(function (x) { + throw x; +}); var y; switch (y) { case 'a': diff --git a/tests/baselines/reference/throwStatements.js b/tests/baselines/reference/throwStatements.js index 83663d08cc4..4ab370db0b6 100644 --- a/tests/baselines/reference/throwStatements.js +++ b/tests/baselines/reference/throwStatements.js @@ -97,7 +97,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -106,7 +108,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -127,12 +131,16 @@ var aClass = new C(); throw aClass; var aGenericClass = new D(); throw aGenericClass; -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; throw anObjectLiteral; var aFunction = F; throw aFunction; throw aFunction(''); -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; throw aLambda; throw aLambda(1); var aModule = M; @@ -151,11 +159,23 @@ throw false; throw null; throw undefined; throw 'a string'; -throw function () { return 'a string'; }; -throw function (x) { return 42; }; -throw { x: 12, y: 13 }; +throw function () { + return 'a string'; +}; +throw function (x) { + return 42; +}; +throw { + x: 12, + y: 13 +}; throw []; -throw ['a', ['b']]; +throw [ + 'a', + [ + 'b' + ] +]; throw /[a-z]/; throw new Date(); throw new C(); diff --git a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js index 4b00c5fd0f2..8aa23c82469 100644 --- a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js +++ b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js @@ -19,6 +19,10 @@ var r1b = _.map(c2, rf1); //// [tooFewArgumentsInGenericFunctionTypedArgument.js] var c2; var _; -var r1a = _.map(c2, function (x) { return x.toFixed(); }); -var rf1 = function (x) { return x.toFixed(); }; +var r1a = _.map(c2, function (x) { + return x.toFixed(); +}); +var rf1 = function (x) { + return x.toFixed(); +}; var r1b = _.map(c2, rf1); diff --git a/tests/baselines/reference/tooManyTypeParameters1.js b/tests/baselines/reference/tooManyTypeParameters1.js index 892731cbd43..3ac7dfacda3 100644 --- a/tests/baselines/reference/tooManyTypeParameters1.js +++ b/tests/baselines/reference/tooManyTypeParameters1.js @@ -12,9 +12,11 @@ interface I {} var i: I; //// [tooManyTypeParameters1.js] -function f() { } +function f() { +} f(); -var x = function () { }; +var x = function () { +}; x(); var C = (function () { function C() { diff --git a/tests/baselines/reference/topLevelExports.js b/tests/baselines/reference/topLevelExports.js index 91e28b6a976..0f539310b15 100644 --- a/tests/baselines/reference/topLevelExports.js +++ b/tests/baselines/reference/topLevelExports.js @@ -8,6 +8,8 @@ void log(foo).toString(); //// [topLevelExports.js] define(["require", "exports"], function (require, exports) { exports.foo = 3; - function log(n) { return n; } + function log(n) { + return n; + } void log(exports.foo).toString(); }); diff --git a/tests/baselines/reference/topLevelLambda.js b/tests/baselines/reference/topLevelLambda.js index 3c4f1a3bc84..756a42b4340 100644 --- a/tests/baselines/reference/topLevelLambda.js +++ b/tests/baselines/reference/topLevelLambda.js @@ -8,5 +8,7 @@ module M { var M; (function (M) { var _this = this; - var f = function () { _this.window; }; + var f = function () { + _this.window; + }; })(M || (M = {})); diff --git a/tests/baselines/reference/topLevelLambda2.js b/tests/baselines/reference/topLevelLambda2.js index 10059e42efd..e5cb1fcac5a 100644 --- a/tests/baselines/reference/topLevelLambda2.js +++ b/tests/baselines/reference/topLevelLambda2.js @@ -5,5 +5,8 @@ foo(()=>this.window); //// [topLevelLambda2.js] var _this = this; -function foo(x) { } -foo(function () { return _this.window; }); +function foo(x) { +} +foo(function () { + return _this.window; +}); diff --git a/tests/baselines/reference/topLevelLambda3.js b/tests/baselines/reference/topLevelLambda3.js index 0314b356b0f..1505e38956a 100644 --- a/tests/baselines/reference/topLevelLambda3.js +++ b/tests/baselines/reference/topLevelLambda3.js @@ -3,4 +3,6 @@ var f = () => {this.window;} //// [topLevelLambda3.js] var _this = this; -var f = function () { _this.window; }; +var f = function () { + _this.window; +}; diff --git a/tests/baselines/reference/topLevelLambda4.js b/tests/baselines/reference/topLevelLambda4.js index 863a0e9a103..47b238cd87f 100644 --- a/tests/baselines/reference/topLevelLambda4.js +++ b/tests/baselines/reference/topLevelLambda4.js @@ -4,5 +4,7 @@ export var x = () => this.window; //// [topLevelLambda4.js] define(["require", "exports"], function (require, exports) { var _this = this; - exports.x = function () { return _this.window; }; + exports.x = function () { + return _this.window; + }; }); diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js index 7dd59ee840e..0fdc7577088 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js @@ -13,11 +13,22 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { }; + arrTest.prototype.test = function (arg1) { + }; arrTest.prototype.callTest = function () { // these two should give the same error - this.test([1, 2, "hi", 5,]); - this.test([1, 2, "hi", 5]); + this.test([ + 1, + 2, + "hi", + 5, + ]); + this.test([ + 1, + 2, + "hi", + 5 + ]); }; return arrTest; })(); diff --git a/tests/baselines/reference/trailingCommasES3.js b/tests/baselines/reference/trailingCommasES3.js index 554390a83ea..b8b8c8ad1f0 100644 --- a/tests/baselines/reference/trailingCommasES3.js +++ b/tests/baselines/reference/trailingCommasES3.js @@ -13,13 +13,35 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES3.js] -var o1 = { a: 1, b: 2 }; -var o2 = { a: 1, b: 2 }; -var o3 = { a: 1 }; +var o1 = { + a: 1, + b: 2 +}; +var o2 = { + a: 1, + b: 2 +}; +var o3 = { + a: 1 +}; var o4 = {}; -var a1 = [1, 2]; -var a2 = [1, 2,]; -var a3 = [1,]; +var a1 = [ + 1, + 2 +]; +var a2 = [ + 1, + 2, +]; +var a3 = [ + 1, +]; var a4 = []; -var a5 = [1, ,]; -var a6 = [, ,]; +var a5 = [ + 1, + , +]; +var a6 = [ + , + , +]; diff --git a/tests/baselines/reference/trailingCommasES5.js b/tests/baselines/reference/trailingCommasES5.js index e54e911189a..8cd17e7519f 100644 --- a/tests/baselines/reference/trailingCommasES5.js +++ b/tests/baselines/reference/trailingCommasES5.js @@ -13,13 +13,35 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES5.js] -var o1 = { a: 1, b: 2 }; -var o2 = { a: 1, b: 2, }; -var o3 = { a: 1, }; +var o1 = { + a: 1, + b: 2 +}; +var o2 = { + a: 1, + b: 2, +}; +var o3 = { + a: 1, +}; var o4 = {}; -var a1 = [1, 2]; -var a2 = [1, 2,]; -var a3 = [1,]; +var a1 = [ + 1, + 2 +]; +var a2 = [ + 1, + 2, +]; +var a3 = [ + 1, +]; var a4 = []; -var a5 = [1, ,]; -var a6 = [, ,]; +var a5 = [ + 1, + , +]; +var a6 = [ + , + , +]; diff --git a/tests/baselines/reference/tryCatchFinally.js b/tests/baselines/reference/tryCatchFinally.js index b93f248c031..aeda61faca4 100644 --- a/tests/baselines/reference/tryCatchFinally.js +++ b/tests/baselines/reference/tryCatchFinally.js @@ -6,10 +6,17 @@ try {} catch(e) {} try {} finally {} //// [tryCatchFinally.js] -try { } -catch (e) { } -finally { } -try { } -catch (e) { } -try { } -finally { } +try { +} +catch (e) { +} +finally { +} +try { +} +catch (e) { +} +try { +} +finally { +} diff --git a/tests/baselines/reference/tryStatements.js b/tests/baselines/reference/tryStatements.js index 723014c1b52..01d55308d19 100644 --- a/tests/baselines/reference/tryStatements.js +++ b/tests/baselines/reference/tryStatements.js @@ -18,9 +18,14 @@ function fn() { catch (x) { var x; } - try { } - finally { } - try { } - catch (z) { } - finally { } + try { + } + finally { + } + try { + } + catch (z) { + } + finally { + } } diff --git a/tests/baselines/reference/tupleTypes.js b/tests/baselines/reference/tupleTypes.js index 451aeb5eb09..ba0aaa9d8b4 100644 --- a/tests/baselines/reference/tupleTypes.js +++ b/tests/baselines/reference/tupleTypes.js @@ -67,15 +67,40 @@ var t1; var t2 = t[2]; // number|string var t2; t = []; // Error -t = [1]; // Error -t = [1, "hello"]; // Ok -t = ["hello", 1]; // Error -t = [1, "hello", 2]; // Ok -var tf = ["hello", function (x) { return x.length; }]; -var ff1 = ff("hello", ["foo", function (x) { return x.length; }]); +t = [ + 1 +]; // Error +t = [ + 1, + "hello" +]; // Ok +t = [ + "hello", + 1 +]; // Error +t = [ + 1, + "hello", + 2 +]; // Ok +var tf = [ + "hello", + function (x) { + return x.length; + } +]; +var ff1 = ff("hello", [ + "foo", + function (x) { + return x.length; + } +]); var ff1; function tuple2(item0, item1) { - return [item0, item1]; + return [ + item0, + item1 + ]; } var tt = tuple2(1, "string"); var tt0 = tt[0]; @@ -85,8 +110,14 @@ var tt1; var tt2 = tt[2]; var tt2; tt = tuple2(1, undefined); -tt = [1, undefined]; -tt = [undefined, undefined]; +tt = [ + 1, + undefined +]; +tt = [ + undefined, + undefined +]; tt = []; // Error var a; var a1; diff --git a/tests/baselines/reference/twoAccessorsWithSameName.js b/tests/baselines/reference/twoAccessorsWithSameName.js index 1e447ea1205..7ae4d3bd1f9 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.js +++ b/tests/baselines/reference/twoAccessorsWithSameName.js @@ -39,7 +39,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -49,7 +51,8 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -62,7 +65,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -81,5 +85,6 @@ var y = { get x() { return 1; }, - set x(v) { } + set x(v) { + } }; diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.js b/tests/baselines/reference/twoAccessorsWithSameName2.js index 847f83e6a70..437fe16cea5 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.js +++ b/tests/baselines/reference/twoAccessorsWithSameName2.js @@ -21,7 +21,9 @@ var C = (function () { function C() { } Object.defineProperty(C, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -31,7 +33,8 @@ var D = (function () { function D() { } Object.defineProperty(D, "x", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -44,7 +47,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeAliases.js b/tests/baselines/reference/typeAliases.js index c31a52bff45..062a7410927 100644 --- a/tests/baselines/reference/typeAliases.js +++ b/tests/baselines/reference/typeAliases.js @@ -122,5 +122,8 @@ var E; f15(E.x).toLowerCase(); var x; f16(x); -var y = ["1", false]; +var y = [ + "1", + false +]; y[0].toLowerCase(); diff --git a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js index cf5ddb23ccd..be252fe345b 100644 --- a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js +++ b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js @@ -29,7 +29,8 @@ var menuData = [ "type": "image", "link": "", "icon": "modules/menu/logo.svg" - }, { + }, + { "id": "productName", "type": "default", "link": "", diff --git a/tests/baselines/reference/typeArgInference.js b/tests/baselines/reference/typeArgInference.js index 7ac36fa2580..624c357cbc4 100644 --- a/tests/baselines/reference/typeArgInference.js +++ b/tests/baselines/reference/typeArgInference.js @@ -16,13 +16,32 @@ var t4: { c: number; d: string }; //// [typeArgInference.js] -var o = { a: 3, b: "test" }; +var o = { + a: 3, + b: "test" +}; var x; -var t1 = x.f([o], [o]); +var t1 = x.f([ + o +], [ + o +]); var t1; -var t2 = x.f([o], [o]); +var t2 = x.f([ + o +], [ + o +]); var t2; -var t3 = x.g([o], [o]); +var t3 = x.g([ + o +], [ + o +]); var t3; -var t4 = x.g([o], [o]); +var t4 = x.g([ + o +], [ + o +]); var t4; diff --git a/tests/baselines/reference/typeArgInference2.js b/tests/baselines/reference/typeArgInference2.js index 193345cdeb3..1af776c1197 100644 --- a/tests/baselines/reference/typeArgInference2.js +++ b/tests/baselines/reference/typeArgInference2.js @@ -15,7 +15,20 @@ var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error //// [typeArgInference2.js] var z1 = foo(null); // any var z2 = foo(); // Item -var z3 = foo({ name: null }); // { name: any } -var z4 = foo({ name: "abc" }); // { name: string } -var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } -var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error +var z3 = foo({ + name: null +}); // { name: any } +var z4 = foo({ + name: "abc" +}); // { name: string } +var z5 = foo({ + name: "abc", + a: 5 +}); // { name: string; a: number } +var z6 = foo({ + name: "abc", + a: 5 +}, { + name: "def", + b: 5 +}); // error diff --git a/tests/baselines/reference/typeArgInferenceWithNull.js b/tests/baselines/reference/typeArgInferenceWithNull.js index ed7a50780aa..78b0dd238fe 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.js +++ b/tests/baselines/reference/typeArgInferenceWithNull.js @@ -13,9 +13,19 @@ fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally wou //// [typeArgInferenceWithNull.js] // All legal -function fn4(n) { } +function fn4(n) { +} fn4(null); -function fn5(n) { } -fn5({ x: null }); -function fn6(n, fun, n2) { } -fn6({ x: null }, function (y) { }, { x: "" }); // y has type { x: any }, but ideally would have type { x: string } +function fn5(n) { +} +fn5({ + x: null +}); +function fn6(n, fun, n2) { +} +fn6({ + x: null +}, function (y) { +}, { + x: "" +}); // y has type { x: any }, but ideally would have type { x: string } diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.js b/tests/baselines/reference/typeArgumentConstraintResolution1.js index fd661dd812c..b7476ad2abd 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.js +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.js @@ -13,7 +13,10 @@ foo2(""); // Type Date does not satisfy the constraint 'Number' for type p //// [typeArgumentConstraintResolution1.js] -function foo1(test) { } +function foo1(test) { +} foo1(""); // should error -function foo2(test) { return null; } +function foo2(test) { + return null; +} foo2(""); // Type Date does not satisfy the constraint 'Number' for type parameter 'T extends Number' diff --git a/tests/baselines/reference/typeArgumentInference.js b/tests/baselines/reference/typeArgumentInference.js index 1d10562ac7c..6de9a5951b4 100644 --- a/tests/baselines/reference/typeArgumentInference.js +++ b/tests/baselines/reference/typeArgumentInference.js @@ -102,55 +102,129 @@ var arr: any[]; //// [typeArgumentInference.js] // Generic call with no parameters -function noParams() { } +function noParams() { +} noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams(''); noGenericParams(''); noGenericParams(''); // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { } -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { } -someGenerics2b(function (n, x) { return n; }); -someGenerics2b(function (n, t) { return n; }); -someGenerics2b(function (n, t) { return n.substr(t * t); }); +function someGenerics2a(n) { +} +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n.substr(0); +}); +function someGenerics2b(n) { +} +someGenerics2b(function (n, x) { + return n; +}); +someGenerics2b(function (n, t) { + return n; +}); +someGenerics2b(function (n, t) { + return n.substr(t * t); +}); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { } -someGenerics3(function () { return ''; }); -someGenerics3(function () { return undefined; }); -someGenerics3(function () { return 3; }); +function someGenerics3(producer) { +} +someGenerics3(function () { + return ''; +}); +someGenerics3(function () { + return undefined; +}); +someGenerics3(function () { + return 3; +}); // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4(4, function () { return null; }); -someGenerics4('', function () { return 3; }); +function someGenerics4(n, f) { +} +someGenerics4(4, function () { + return null; +}); +someGenerics4('', function () { + return 3; +}); someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5(4, function () { return null; }); -someGenerics5('', function () { return 3; }); +function someGenerics5(n, f) { +} +someGenerics5(4, function () { + return null; +}); +someGenerics5('', function () { + return 3; +}); someGenerics5(null, null); // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { } -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics7(a, b, c) { +} +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with argument of generic function type -function someGenerics8(n) { return n; } +function someGenerics8(n) { + return n; +} var x = someGenerics8(someGenerics7); x(null, null, null); // Generic call with multiple parameters of generic type passed arguments with no best common type @@ -159,14 +233,36 @@ function someGenerics9(a, b, c) { } var a9a = someGenerics9('', 0, []); var a9a; -var a9b = someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); +var a9e = someGenerics9(undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +}); var a9e; -var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); +var a9f = someGenerics9(undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js index 148ec81c441..a2346cc28a7 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js @@ -152,50 +152,144 @@ new someGenerics1(3, 4); new someGenerics1(3, 4); // Error new someGenerics1(3, 4); var someGenerics2a; -new someGenerics2a(function (n) { return n; }); -new someGenerics2a(function (n) { return n; }); -new someGenerics2a(function (n) { return n.substr(0); }); +new someGenerics2a(function (n) { + return n; +}); +new someGenerics2a(function (n) { + return n; +}); +new someGenerics2a(function (n) { + return n.substr(0); +}); var someGenerics2b; -new someGenerics2b(function (n, x) { return n; }); -new someGenerics2b(function (n, t) { return n; }); -new someGenerics2b(function (n, t) { return n.substr(t * t); }); +new someGenerics2b(function (n, x) { + return n; +}); +new someGenerics2b(function (n, t) { + return n; +}); +new someGenerics2b(function (n, t) { + return n.substr(t * t); +}); var someGenerics3; -new someGenerics3(function () { return ''; }); -new someGenerics3(function () { return undefined; }); -new someGenerics3(function () { return 3; }); +new someGenerics3(function () { + return ''; +}); +new someGenerics3(function () { + return undefined; +}); +new someGenerics3(function () { + return 3; +}); var someGenerics4; -new someGenerics4(4, function () { return null; }); -new someGenerics4('', function () { return 3; }); -new someGenerics4('', function (x) { return ''; }); // Error +new someGenerics4(4, function () { + return null; +}); +new someGenerics4('', function () { + return 3; +}); +new someGenerics4('', function (x) { + return ''; +}); // Error new someGenerics4(null, null); var someGenerics5; -new someGenerics5(4, function () { return null; }); -new someGenerics5('', function () { return 3; }); -new someGenerics5('', function (x) { return ''; }); // Error +new someGenerics5(4, function () { + return null; +}); +new someGenerics5('', function () { + return 3; +}); +new someGenerics5('', function (x) { + return ''; +}); // Error new someGenerics5(null, null); var someGenerics6; -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); var someGenerics7; -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); var someGenerics8; var x = new someGenerics8(someGenerics7); new x(null, null, null); var someGenerics9; var a9a = new someGenerics9('', 0, []); var a9a; -var a9b = new someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = new someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9e = new someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9e; -var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9f = new someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = new someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceErrors.js b/tests/baselines/reference/typeArgumentInferenceErrors.js index 7ec612d2c7c..97dfce01a1d 100644 --- a/tests/baselines/reference/typeArgumentInferenceErrors.js +++ b/tests/baselines/reference/typeArgumentInferenceErrors.js @@ -18,14 +18,28 @@ someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // //// [typeArgumentInferenceErrors.js] // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4('', function (x) { return ''; }); // Error +function someGenerics4(n, f) { +} +someGenerics4('', function (x) { + return ''; +}); // Error // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5('', function (x) { return ''; }); // Error +function someGenerics5(n, f) { +} +someGenerics5('', function (x) { + return ''; +}); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error diff --git a/tests/baselines/reference/typeArgumentInferenceOrdering.js b/tests/baselines/reference/typeArgumentInferenceOrdering.js index 96978bfd489..53917844f66 100644 --- a/tests/baselines/reference/typeArgumentInferenceOrdering.js +++ b/tests/baselines/reference/typeArgumentInferenceOrdering.js @@ -16,7 +16,9 @@ interface Goo { //// [typeArgumentInferenceOrdering.js] -function foo(f) { return null; } +function foo(f) { + return null; +} var x = foo(new C()).x; // was Error that property x does not exist on type {} var C = (function () { function C() { diff --git a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js index 003ae4af535..5a470de46da 100644 --- a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js @@ -10,7 +10,11 @@ var d: Date[]; // Should be OK (d should be Date[]) //// [typeArgumentInferenceTransitiveConstraints.js] function fn(a, b, c) { - return [a, b, c]; + return [ + a, + b, + c + ]; } var d = fn(new Date(), new Date(), new Date()); var d; // Should be OK (d should be Date[]) diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js index 941c9330a5f..50d7767b5db 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js @@ -8,7 +8,9 @@ var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal //// [typeArgumentInferenceWithConstraintAsCommonRoot.js] -function f(x, y) { return undefined; } +function f(x, y) { + return undefined; +} var g; var e; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js index b8c051f0c37..ce0d3cb82e3 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js @@ -107,60 +107,144 @@ var arr: any[]; //// [typeArgumentInferenceWithConstraints.js] // Generic call with no parameters -function noParams() { } +function noParams() { +} noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams(''); // Valid noGenericParams(''); noGenericParams(''); // Error // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); // Valid someGenerics1(3, 4); // Error someGenerics1(3, 4); // Error someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { } -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { } -someGenerics2b(function (n, x) { return n; }); -someGenerics2b(function (n, t) { return n; }); -someGenerics2b(function (n, t) { return n.substr(t * t); }); +function someGenerics2a(n) { +} +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n.substr(0); +}); +function someGenerics2b(n) { +} +someGenerics2b(function (n, x) { + return n; +}); +someGenerics2b(function (n, t) { + return n; +}); +someGenerics2b(function (n, t) { + return n.substr(t * t); +}); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { } -someGenerics3(function () { return ''; }); // Error -someGenerics3(function () { return undefined; }); -someGenerics3(function () { return 3; }); // Error +function someGenerics3(producer) { +} +someGenerics3(function () { + return ''; +}); // Error +someGenerics3(function () { + return undefined; +}); +someGenerics3(function () { + return 3; +}); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4(4, function () { return null; }); // Valid -someGenerics4('', function () { return 3; }); -someGenerics4('', function (x) { return ''; }); // Error +function someGenerics4(n, f) { +} +someGenerics4(4, function () { + return null; +}); // Valid +someGenerics4('', function () { + return 3; +}); +someGenerics4('', function (x) { + return ''; +}); // Error someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5(4, function () { return null; }); // Valid -someGenerics5('', function () { return 3; }); -someGenerics5('', function (x) { return ''; }); // Error +function someGenerics5(n, f) { +} +someGenerics5(4, function () { + return null; +}); // Valid +someGenerics5('', function () { + return 3; +}); +someGenerics5('', function (x) { + return ''; +}); // Error someGenerics5(null, null); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Valid +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { } -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid, types of n are respectively -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics7(a, b, c) { +} +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Valid, types of n are respectively +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with argument of generic function type -function someGenerics8(n) { return n; } +function someGenerics8(n) { + return n; +} var x = someGenerics8(someGenerics7); // Error x(null, null, null); // Error // Generic call with multiple parameters of generic type passed arguments with no best common type @@ -169,14 +253,36 @@ function someGenerics9(a, b, c) { } var a9a = someGenerics9('', 0, []); var a9a; -var a9b = someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9e = someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9e; -var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9f = someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js index 4d040cfe13f..95220d4fdcf 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js @@ -37,16 +37,25 @@ var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error //// [typeArgumentInferenceWithObjectLiteral.js] -function foo(x) { } +function foo(x) { +} var s; // Calls below should infer string for T and then assign that type to the value parameter foo({ - read: function () { return s; }, - write: function (value) { return s = value; } + read: function () { + return s; + }, + write: function (value) { + return s = value; + } }); foo({ - write: function (value) { return s = value; }, - read: function () { return s; } + write: function (value) { + return s = value; + }, + read: function () { + return s; + } }); var E1; (function (E1) { @@ -57,9 +66,44 @@ var E2; E2[E2["X"] = 0] = "X"; })(E2 || (E2 = {})); var v1; -var v1 = f1({ w: function (x) { return x; }, r: function () { return 0; } }, 0); -var v1 = f1({ w: function (x) { return x; }, r: function () { return 0; } }, E1.X); -var v1 = f1({ w: function (x) { return x; }, r: function () { return E1.X; } }, 0); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0; + } +}, 0); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0; + } +}, E1.X); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return E1.X; + } +}, 0); var v2; -var v2 = f1({ w: function (x) { return x; }, r: function () { return E1.X; } }, E1.X); -var v3 = f1({ w: function (x) { return x; }, r: function () { return E1.X; } }, E2.X); // Error +var v2 = f1({ + w: function (x) { + return x; + }, + r: function () { + return E1.X; + } +}, E1.X); +var v3 = f1({ + w: function (x) { + return x; + }, + r: function () { + return E1.X; + } +}, E2.X); // Error diff --git a/tests/baselines/reference/typeAssertionToGenericFunctionType.js b/tests/baselines/reference/typeAssertionToGenericFunctionType.js index 15e5cf82f26..4f7d30dfbdd 100644 --- a/tests/baselines/reference/typeAssertionToGenericFunctionType.js +++ b/tests/baselines/reference/typeAssertionToGenericFunctionType.js @@ -8,8 +8,12 @@ x.b(); // error //// [typeAssertionToGenericFunctionType.js] var x = { - a: (function (x) { return 1; }), - b: function (x) { x; } + a: (function (x) { + return 1; + }), + b: function (x) { + x; + } }; x.a(1); // bug was that this caused 'Could not find symbol T' on return type T in the type assertion on x.a's definition x.b(); // error diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 01acf58227b..c964ae94958 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -50,8 +50,10 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // Function call whose argument is a 1 arg generic function call with explicit type arguments -function fn1(t) { } -function fn2(t) { } +function fn1(t) { +} +function fn2(t) { +} fn1(fn2(4)); // Error var a; var s; diff --git a/tests/baselines/reference/typeCheckTypeArgument.js b/tests/baselines/reference/typeCheckTypeArgument.js index bec33393f92..720ee92a966 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.js +++ b/tests/baselines/reference/typeCheckTypeArgument.js @@ -23,11 +23,14 @@ var Foo = (function () { } return Foo; })(); -function bar() { } +function bar() { +} var Foo2 = (function () { function Foo2() { } - Foo2.prototype.method = function () { }; + Foo2.prototype.method = function () { + }; return Foo2; })(); -(function (a) { }); +(function (a) { +}); diff --git a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js index 9dad9fb671f..3ea78c7a3d8 100644 --- a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js +++ b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js @@ -8,9 +8,15 @@ var functions = [function () { //// [typeCheckingInsideFunctionExpressionInArray.js] -var functions = [function () { +var functions = [ + function () { var k = 10; k = new Object(); - [1, 2, 3].NonexistantMethod(); + [ + 1, + 2, + 3 + ].NonexistantMethod(); derp(); - }]; + } +]; diff --git a/tests/baselines/reference/typeGuardsDefeat.js b/tests/baselines/reference/typeGuardsDefeat.js index 9670c260b57..bb70c2db825 100644 --- a/tests/baselines/reference/typeGuardsDefeat.js +++ b/tests/baselines/reference/typeGuardsDefeat.js @@ -69,7 +69,9 @@ function foo3(x) { return x.length; // string } else { - var f = function () { return x * x; }; + var f = function () { + return x * x; + }; } x = "hello"; f(); diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.js b/tests/baselines/reference/typeGuardsInConditionalExpression.js index 7c87d80d592..ebe84879d2b 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.js +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.js @@ -142,9 +142,8 @@ function foo7(x) { } function foo8(x) { var b; - return typeof x === "string" ? x === "hello" : ((b = x) && - (typeof x === "boolean" ? x // boolean - : x == 10)); // number + return typeof x === "string" ? x === "hello" : ((b = x) && (typeof x === "boolean" ? x // boolean + : x == 10)); // number } function foo9(x) { var y = 10; diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js index be3d64b806f..08aed91edd8 100644 --- a/tests/baselines/reference/typeGuardsWithAny.js +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -38,7 +38,9 @@ else { //// [typeGuardsWithAny.js] -var x = { p: 0 }; +var x = { + p: 0 +}; if (x instanceof Object) { x.p; // No error, type any unaffected by instanceof type guard } diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.js b/tests/baselines/reference/typeIdentityConsidersBrands.js index 2398033c2c6..002364a2e03 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.js +++ b/tests/baselines/reference/typeIdentityConsidersBrands.js @@ -53,13 +53,15 @@ var Y_1 = (function () { } return Y_1; })(); -function foo(arg) { } +function foo(arg) { +} var a = new Y(); var b = new X(); a = b; // ok foo(a); // ok var a2 = new Y_1(); var b2 = new X_1(); -function foo2(arg) { } +function foo2(arg) { +} a2 = b2; // should error foo2(a2); // should error diff --git a/tests/baselines/reference/typeInfer1.js b/tests/baselines/reference/typeInfer1.js index f9613298838..bab1ebf930c 100644 --- a/tests/baselines/reference/typeInfer1.js +++ b/tests/baselines/reference/typeInfer1.js @@ -15,9 +15,13 @@ var yyyyyyyy: ITextWriter2 = { //// [typeInfer1.js] var x = { - Write: function (s) { }, - WriteLine: function (s) { } + Write: function (s) { + }, + WriteLine: function (s) { + } }; var yyyyyyyy = { - Moo: function () { return "cow"; } + Moo: function () { + return "cow"; + } }; diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.js b/tests/baselines/reference/typeInferenceConflictingCandidates.js index 2033c3b6b22..ea7834a0769 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.js +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.js @@ -4,4 +4,6 @@ declare function g(a: T, b: T, c: (t: T) => T): T; g("", 3, a => a); //// [typeInferenceConflictingCandidates.js] -g("", 3, function (a) { return a; }); +g("", 3, function (a) { + return a; +}); diff --git a/tests/baselines/reference/typeInferenceFixEarly.js b/tests/baselines/reference/typeInferenceFixEarly.js index 58b8824c8b1..820f381e7ad 100644 --- a/tests/baselines/reference/typeInferenceFixEarly.js +++ b/tests/baselines/reference/typeInferenceFixEarly.js @@ -4,4 +4,6 @@ declare function f(p: (t: T) => T): T; f(n => 3); //// [typeInferenceFixEarly.js] -f(function (n) { return 3; }); +f(function (n) { + return 3; +}); diff --git a/tests/baselines/reference/typeInferenceWithTupleType.js b/tests/baselines/reference/typeInferenceWithTupleType.js index 10a18274c73..bc504b30b35 100644 --- a/tests/baselines/reference/typeInferenceWithTupleType.js +++ b/tests/baselines/reference/typeInferenceWithTupleType.js @@ -27,22 +27,39 @@ var zipResultEleEle = zipResult[0][0]; // string //// [typeInferenceWithTupleType.js] function combine(x, y) { - return [x, y]; + return [ + x, + y + ]; } var combineResult = combine("string", 10); var combineEle1 = combineResult[0]; // string var combineEle2 = combineResult[1]; // number function zip(array1, array2) { if (array1.length != array2.length) { - return [[undefined, undefined]]; + return [ + [ + undefined, + undefined + ] + ]; } var length = array1.length; var zipResult; for (var i = 0; i < length; ++i) { - zipResult.push([array1[i], array2[i]]); + zipResult.push([ + array1[i], + array2[i] + ]); } return zipResult; } -var zipResult = zip(["foo", "bar"], [5, 6]); +var zipResult = zip([ + "foo", + "bar" +], [ + 5, + 6 +]); var zipResultEle = zipResult[0]; // [string, number] var zipResultEleEle = zipResult[0][0]; // string diff --git a/tests/baselines/reference/typeInferenceWithTypeAnnotation.js b/tests/baselines/reference/typeInferenceWithTypeAnnotation.js index 119773f6e31..164be34cd29 100644 --- a/tests/baselines/reference/typeInferenceWithTypeAnnotation.js +++ b/tests/baselines/reference/typeInferenceWithTypeAnnotation.js @@ -4,4 +4,6 @@ declare function f(p: (t: T) => T): T; f((n: number) => n); //// [typeInferenceWithTypeAnnotation.js] -f(function (n) { return n; }); +f(function (n) { + return n; +}); diff --git a/tests/baselines/reference/typeLiteralCallback.js b/tests/baselines/reference/typeLiteralCallback.js index 82c8b37e454..8f940581916 100644 --- a/tests/baselines/reference/typeLiteralCallback.js +++ b/tests/baselines/reference/typeLiteralCallback.js @@ -17,5 +17,9 @@ test.fail2(arg => foo.reject(arg)); // Should be OK. Was: Error: Supplied para //// [typeLiteralCallback.js] var foo; var test; -test.fail(function (arg) { return foo.reject(arg); }); -test.fail2(function (arg) { return foo.reject(arg); }); // Should be OK. Was: Error: Supplied parameters do not match any signature of call target +test.fail(function (arg) { + return foo.reject(arg); +}); +test.fail2(function (arg) { + return foo.reject(arg); +}); // Should be OK. Was: Error: Supplied parameters do not match any signature of call target diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 1fd624e4e5b..c59bfad8b13 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -52,11 +52,23 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; function f1() { - var a = { x: 1, y: 2 }; + var a = { + x: 1, + y: 2 + }; a = {}; // error - a = { x: 1 }; // error - a = { x: 1, y: 2, z: 3 }; - a = { x: 1, z: 3 }; // error + a = { + x: 1 + }; // error + a = { + x: 1, + y: 2, + z: 3 + }; + a = { + x: 1, + z: 3 + }; // error } var Animal = (function () { function Animal() { @@ -73,12 +85,26 @@ var Giraffe = (function (_super) { function f2() { var a = new Animal(); var g = new Giraffe(); - var aa = [a, a, a]; - var gg = [g, g, g]; + var aa = [ + a, + a, + a + ]; + var gg = [ + g, + g, + g + ]; aa = gg; gg = aa; // error - var xa = { f1: 5, f2: aa }; - var xb = { f1: 5, f2: gg }; + var xa = { + f1: 5, + f2: aa + }; + var xb = { + f1: 5, + f2: gg + }; xa = xb; // Should be ok xb = xa; // Not ok } @@ -87,14 +113,36 @@ function f4() { var i = 5; i = null; i = undefined; - var a = { x: 1, y: 1 }; - a = { x: 1, y: null }; - a = { x: 1, y: undefined }; - a = { x: 1, y: _any }; - a = { x: 1, y: _any, z: 1 }; - a = { x: 1 }; // error - var mf = function m(n) { return false; }; - var zf = function z(n) { return true; }; + var a = { + x: 1, + y: 1 + }; + a = { + x: 1, + y: null + }; + a = { + x: 1, + y: undefined + }; + a = { + x: 1, + y: _any + }; + a = { + x: 1, + y: _any, + z: 1 + }; + a = { + x: 1 + }; // error + var mf = function m(n) { + return false; + }; + var zf = function z(n) { + return true; + }; mf = zf; mf(_any); zf(_any); diff --git a/tests/baselines/reference/typeOfOnTypeArg.js b/tests/baselines/reference/typeOfOnTypeArg.js index 199233065b4..ff304c05697 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.js +++ b/tests/baselines/reference/typeOfOnTypeArg.js @@ -9,7 +9,9 @@ fill(32); //// [typeOfOnTypeArg.js] -var A = { '': 3 }; +var A = { + '': 3 +}; function fill(f) { } fill(32); diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.js b/tests/baselines/reference/typeOfThisInInstanceMember.js index 5e4b4f2970d..7d88d98cf74 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember.js @@ -59,7 +59,11 @@ var r = c.x; var ra = c.x.x.x; var r2 = c.y; var r3 = c.foo(); -var rs = [r, r2, r3]; +var rs = [ + r, + r2, + r3 +]; rs.forEach(function (x) { x.foo; x.x; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.js b/tests/baselines/reference/typeOfThisInInstanceMember2.js index b2b81ce3a23..e094e232ec1 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.js @@ -64,7 +64,11 @@ var ra = c.x.x.x; var r2 = c.y; var r3 = c.foo(); var r4 = c.z; -var rs = [r, r2, r3]; +var rs = [ + r, + r2, + r3 +]; rs.forEach(function (x) { x.foo; x.x; diff --git a/tests/baselines/reference/typeParameterAsElementType.js b/tests/baselines/reference/typeParameterAsElementType.js index a934f3d0330..ce4364e7407 100644 --- a/tests/baselines/reference/typeParameterAsElementType.js +++ b/tests/baselines/reference/typeParameterAsElementType.js @@ -7,5 +7,8 @@ function fee() { //// [typeParameterAsElementType.js] function fee() { var t; - var arr = [t, ""]; + var arr = [ + t, + "" + ]; } diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js index 9266f520867..f432358a1ca 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js @@ -29,16 +29,32 @@ foo2(1, ['']); //// [typeParameterAsTypeParameterConstraint.js] // using a type parameter as a constraint for a type parameter is valid // no errors expected except illegal constraints -function foo(x, y) { return y; } +function foo(x, y) { + return y; +} var r = foo(1, 2); var r = foo({}, 1); var a; var b; var r2 = foo(a, b); -var r3 = foo({ x: 1 }, { x: 2, y: 3 }); -function foo2(x, y) { return y; } +var r3 = foo({ + x: 1 +}, { + x: 2, + y: 3 +}); +function foo2(x, y) { + return y; +} foo2(1, ''); -foo2({}, { length: 2 }); -foo2(1, { width: 3, length: 2 }); +foo2({}, { + length: 2 +}); +foo2(1, { + width: 3, + length: 2 +}); foo2(1, []); -foo2(1, ['']); +foo2(1, [ + '' +]); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js index e8066b9ebfa..a3f4d8d5259 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js @@ -21,12 +21,22 @@ foo2([], ['']); //// [typeParameterAsTypeParameterConstraint2.js] // using a type parameter as a constraint for a type parameter is invalid // these should be errors unless otherwise noted -function foo(x, y) { return y; } // this is now an error +function foo(x, y) { + return y; +} // this is now an error foo(1, ''); foo(1, {}); var n; var r3 = foo(1, n); -function foo2(x, y) { return y; } // this is now an error -foo2(1, { length: '' }); -foo2(1, { length: {} }); -foo2([], ['']); +function foo2(x, y) { + return y; +} // this is now an error +foo2(1, { + length: '' +}); +foo2(1, { + length: {} +}); +foo2([], [ + '' +]); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js index bc50363036d..669139058ed 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js @@ -30,15 +30,39 @@ foo(b, b, { foo: 1, bar: '', hm: '' }); var a; var b; var c; -function foo(x, y, z) { return z; } +function foo(x, y, z) { + return z; +} //function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, 3); -foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); +foo({ + x: 1 +}, { + x: 1, + y: '' +}, { + x: 2, + y: '', + z: true +}); foo(a, b, c); -foo(a, b, { foo: 1, bar: '', hm: true }); -foo(function (x, y) { }, function (x) { }, function () { }); -function foo2(x, y, z) { return z; } +foo(a, b, { + foo: 1, + bar: '', + hm: true +}); +foo(function (x, y) { +}, function (x) { +}, function () { +}); +function foo2(x, y, z) { + return z; +} //function foo2(x: T, y: U, z: V): V { return z; } foo(a, a, a); foo(a, b, c); -foo(b, b, { foo: 1, bar: '', hm: '' }); +foo(b, b, { + foo: 1, + bar: '', + hm: '' +}); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js index 6541cfaa231..32bad4dc3c3 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js @@ -29,14 +29,34 @@ foo(c, c, a); var a; var b; var c; -function foo(x, y, z) { return z; } +function foo(x, y, z) { + return z; +} //function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, ''); -foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); +foo({ + x: 1 +}, { + x: 1, + y: '' +}, { + x: 2, + y: 2, + z: true +}); foo(a, b, a); -foo(a, { foo: 1, bar: '', hm: true }, b); -foo(function (x, y) { }, function (x, y) { }, function () { }); -function foo2(x, y, z) { return z; } +foo(a, { + foo: 1, + bar: '', + hm: true +}, b); +foo(function (x, y) { +}, function (x, y) { +}, function () { +}); +function foo2(x, y, z) { + return z; +} //function foo2(x: T, y: U, z: V): V { return z; } foo(b, a, c); foo(c, c, a); diff --git a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js index 7e923941386..04fb7b1dc25 100644 --- a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js +++ b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js @@ -25,10 +25,14 @@ i2 = a2; // no error //// [typeParameterCompatibilityAccrossDeclarations.js] define(["require", "exports"], function (require, exports) { var a = { - x: function (y) { return null; } + x: function (y) { + return null; + } }; var a2 = { - x: function (y) { return null; } + x: function (y) { + return null; + } }; var i; var i2; diff --git a/tests/baselines/reference/typeParameterConstraints1.js b/tests/baselines/reference/typeParameterConstraints1.js index 6ffefbcf8f1..49d347f576b 100644 --- a/tests/baselines/reference/typeParameterConstraints1.js +++ b/tests/baselines/reference/typeParameterConstraints1.js @@ -14,16 +14,29 @@ function foo12(test: T) { } function foo13(test: T) { } //// [typeParameterConstraints1.js] -function foo1(test) { } -function foo2(test) { } -function foo3(test) { } -function foo4(test) { } // valid -function foo5(test) { } // valid -function foo6(test) { } -function foo7(test) { } // valid -function foo8(test) { } -function foo9(test) { } -function foo10(test) { } -function foo11(test) { } -function foo12(test) { } -function foo13(test) { } +function foo1(test) { +} +function foo2(test) { +} +function foo3(test) { +} +function foo4(test) { +} // valid +function foo5(test) { +} // valid +function foo6(test) { +} +function foo7(test) { +} // valid +function foo8(test) { +} +function foo9(test) { +} +function foo10(test) { +} +function foo11(test) { +} +function foo12(test) { +} +function foo13(test) { +} diff --git a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js index a14e010515b..85f86f7de76 100644 --- a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js @@ -30,8 +30,12 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} var a; -var b = function () { }; -var b2 = function () { }; +var b = function () { +}; +var b2 = function () { +}; diff --git a/tests/baselines/reference/typeParameterFixingWithConstraints.js b/tests/baselines/reference/typeParameterFixingWithConstraints.js new file mode 100644 index 00000000000..49b2c48fbe2 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithConstraints.js @@ -0,0 +1,21 @@ +//// [typeParameterFixingWithConstraints.ts] +interface IBar { + [barId: string]: any; +} + +interface IFoo { + foo(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar): TBar; +} + +var foo: IFoo; +foo.foo({ bar: null }, bar => null, bar => null); + +//// [typeParameterFixingWithConstraints.js] +var foo; +foo.foo({ + bar: null +}, function (bar) { + return null; +}, function (bar) { + return null; +}); diff --git a/tests/baselines/reference/typeParameterFixingWithConstraints.types b/tests/baselines/reference/typeParameterFixingWithConstraints.types new file mode 100644 index 00000000000..c15f22fc974 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithConstraints.types @@ -0,0 +1,44 @@ +=== tests/cases/compiler/typeParameterFixingWithConstraints.ts === +interface IBar { +>IBar : IBar + + [barId: string]: any; +>barId : string +} + +interface IFoo { +>IFoo : IFoo + + foo(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar): TBar; +>foo : (bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar +>TBar : TBar +>IBar : IBar +>bar : TBar +>TBar : TBar +>bar1 : (bar: TBar) => TBar +>bar : TBar +>TBar : TBar +>TBar : TBar +>bar2 : (bar: TBar) => TBar +>bar : TBar +>TBar : TBar +>TBar : TBar +>TBar : TBar +} + +var foo: IFoo; +>foo : IFoo +>IFoo : IFoo + +foo.foo({ bar: null }, bar => null, bar => null); +>foo.foo({ bar: null }, bar => null, bar => null) : IBar +>foo.foo : (bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar +>foo : IFoo +>foo : (bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar +>{ bar: null } : { [x: string]: null; bar: null; } +>bar : null +>bar => null : (bar: IBar) => any +>bar : IBar +>bar => null : (bar: IBar) => any +>bar : IBar + diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js new file mode 100644 index 00000000000..170bd711b61 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js @@ -0,0 +1,28 @@ +//// [typeParameterFixingWithContextSensitiveArguments.ts] +function f(y: T, f: (x: T) => U, x: T): [T, U] { return [y, f(x)]; } +interface A { a: A; } +interface B extends A { b; } + +var a: A, b: B; + +var d = f(b, x => x.a, a); // type [A, A] +var d2 = f(b, x => x.a, null); // type [B, A] +var d3 = f(b, x => x.b, null); // type [B, any] + +//// [typeParameterFixingWithContextSensitiveArguments.js] +function f(y, f, x) { + return [ + y, + f(x) + ]; +} +var a, b; +var d = f(b, function (x) { + return x.a; +}, a); // type [A, A] +var d2 = f(b, function (x) { + return x.a; +}, null); // type [B, A] +var d3 = f(b, function (x) { + return x.b; +}, null); // type [B, any] diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.types new file mode 100644 index 00000000000..d6bd1b3b271 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.types @@ -0,0 +1,71 @@ +=== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments.ts === +function f(y: T, f: (x: T) => U, x: T): [T, U] { return [y, f(x)]; } +>f : (y: T, f: (x: T) => U, x: T) => [T, U] +>T : T +>U : U +>y : T +>T : T +>f : (x: T) => U +>x : T +>T : T +>U : U +>x : T +>T : T +>T : T +>U : U +>[y, f(x)] : [T, U] +>y : T +>f(x) : U +>f : (x: T) => U +>x : T + +interface A { a: A; } +>A : A +>a : A +>A : A + +interface B extends A { b; } +>B : B +>A : A +>b : any + +var a: A, b: B; +>a : A +>A : A +>b : B +>B : B + +var d = f(b, x => x.a, a); // type [A, A] +>d : [A, A] +>f(b, x => x.a, a) : [A, A] +>f : (y: T, f: (x: T) => U, x: T) => [T, U] +>b : B +>x => x.a : (x: A) => A +>x : A +>x.a : A +>x : A +>a : A +>a : A + +var d2 = f(b, x => x.a, null); // type [B, A] +>d2 : [B, A] +>f(b, x => x.a, null) : [B, A] +>f : (y: T, f: (x: T) => U, x: T) => [T, U] +>b : B +>x => x.a : (x: B) => A +>x : B +>x.a : A +>x : B +>a : A + +var d3 = f(b, x => x.b, null); // type [B, any] +>d3 : [B, any] +>f(b, x => x.b, null) : [B, any] +>f : (y: T, f: (x: T) => U, x: T) => [T, U] +>b : B +>x => x.b : (x: B) => any +>x : B +>x.b : any +>x : B +>b : any + diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt new file mode 100644 index 00000000000..6a7975b4b62 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts(7,25): error TS2345: Argument of type '(x: A) => A' is not assignable to parameter of type '(x: A) => B'. + Type 'A' is not assignable to type 'B'. + + +==== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts (1 errors) ==== + function f(y: T, y1: U, p: (z: U) => T, p1: (x: T) => U): [T, U] { return [y, p1(y)]; } + interface A { a: A; } + interface B extends A { b; } + + var a: A, b: B; + + var d = f(a, b, x => x, x => x); // A => A not assignable to A => B + ~~~~~~ +!!! error TS2345: Argument of type '(x: A) => A' is not assignable to parameter of type '(x: A) => B'. +!!! error TS2345: Type 'A' is not assignable to type 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js new file mode 100644 index 00000000000..1b97f04953e --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js @@ -0,0 +1,22 @@ +//// [typeParameterFixingWithContextSensitiveArguments2.ts] +function f(y: T, y1: U, p: (z: U) => T, p1: (x: T) => U): [T, U] { return [y, p1(y)]; } +interface A { a: A; } +interface B extends A { b; } + +var a: A, b: B; + +var d = f(a, b, x => x, x => x); // A => A not assignable to A => B + +//// [typeParameterFixingWithContextSensitiveArguments2.js] +function f(y, y1, p, p1) { + return [ + y, + p1(y) + ]; +} +var a, b; +var d = f(a, b, function (x) { + return x; +}, function (x) { + return x; +}); // A => A not assignable to A => B diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt new file mode 100644 index 00000000000..89be3c06c64 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts(7,29): error TS2345: Argument of type '(t2: A) => A' is not assignable to parameter of type '(t2: A) => B'. + Type 'A' is not assignable to type 'B'. + + +==== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts (1 errors) ==== + function f(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { return [t1, pf2(t1)]; } + interface A { a: A; } + interface B extends A { b: B; } + + var a: A, b: B; + + var d = f(a, b, u2 => u2.b, t2 => t2); + ~~~~~~~~ +!!! error TS2345: Argument of type '(t2: A) => A' is not assignable to parameter of type '(t2: A) => B'. +!!! error TS2345: Type 'A' is not assignable to type 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js new file mode 100644 index 00000000000..4b5370cfc1c --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js @@ -0,0 +1,22 @@ +//// [typeParameterFixingWithContextSensitiveArguments3.ts] +function f(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { return [t1, pf2(t1)]; } +interface A { a: A; } +interface B extends A { b: B; } + +var a: A, b: B; + +var d = f(a, b, u2 => u2.b, t2 => t2); + +//// [typeParameterFixingWithContextSensitiveArguments3.js] +function f(t1, u1, pf1, pf2) { + return [ + t1, + pf2(t1) + ]; +} +var a, b; +var d = f(a, b, function (u2) { + return u2.b; +}, function (t2) { + return t2; +}); diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js new file mode 100644 index 00000000000..7efab1f62c5 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js @@ -0,0 +1,22 @@ +//// [typeParameterFixingWithContextSensitiveArguments4.ts] +function f(y: T, y1: U, p: (z: U) => T, p1: (x: T) => U): [T, U] { return [y, p1(y)]; } +interface A { a: A; } +interface B extends A { b; } + +var a: A, b: B; + +var d = f(a, b, x => x, x => x); // Type [A, B] + +//// [typeParameterFixingWithContextSensitiveArguments4.js] +function f(y, y1, p, p1) { + return [ + y, + p1(y) + ]; +} +var a, b; +var d = f(a, b, function (x) { + return x; +}, function (x) { + return x; +}); // Type [A, B] diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types new file mode 100644 index 00000000000..61158ae9738 --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.types @@ -0,0 +1,55 @@ +=== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments4.ts === +function f(y: T, y1: U, p: (z: U) => T, p1: (x: T) => U): [T, U] { return [y, p1(y)]; } +>f : (y: T, y1: U, p: (z: U) => T, p1: (x: T) => U) => [T, U] +>T : T +>U : U +>y : T +>T : T +>y1 : U +>U : U +>p : (z: U) => T +>z : U +>U : U +>T : T +>p1 : (x: T) => U +>x : T +>T : T +>U : U +>T : T +>U : U +>[y, p1(y)] : [T, U] +>y : T +>p1(y) : U +>p1 : (x: T) => U +>y : T + +interface A { a: A; } +>A : A +>a : A +>A : A + +interface B extends A { b; } +>B : B +>A : A +>b : any + +var a: A, b: B; +>a : A +>A : A +>b : B +>B : B + +var d = f(a, b, x => x, x => x); // Type [A, B] +>d : [A, B] +>f(a, b, x => x, x => x) : [A, B] +>f : (y: T, y1: U, p: (z: U) => T, p1: (x: T) => U) => [T, U] +>a : A +>b : B +>x => x : (x: B) => B +>x : B +>x : B +>x => x : (x: A) => any +>x : A +>x : any +>x : A + diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js new file mode 100644 index 00000000000..7ab2502e02c --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js @@ -0,0 +1,22 @@ +//// [typeParameterFixingWithContextSensitiveArguments5.ts] +function f(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { return [t1, pf2(t1)]; } +interface A { a: A; } +interface B extends A { b: any; } + +var a: A, b: B; + +var d = f(a, b, u2 => u2.b, t2 => t2); + +//// [typeParameterFixingWithContextSensitiveArguments5.js] +function f(t1, u1, pf1, pf2) { + return [ + t1, + pf2(t1) + ]; +} +var a, b; +var d = f(a, b, function (u2) { + return u2.b; +}, function (t2) { + return t2; +}); diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.types new file mode 100644 index 00000000000..3eb7d07bc3c --- /dev/null +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.types @@ -0,0 +1,56 @@ +=== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments5.ts === +function f(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { return [t1, pf2(t1)]; } +>f : (t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U) => [T, U] +>T : T +>U : U +>t1 : T +>T : T +>u1 : U +>U : U +>pf1 : (u2: U) => T +>u2 : U +>U : U +>T : T +>pf2 : (t2: T) => U +>t2 : T +>T : T +>U : U +>T : T +>U : U +>[t1, pf2(t1)] : [T, U] +>t1 : T +>pf2(t1) : U +>pf2 : (t2: T) => U +>t1 : T + +interface A { a: A; } +>A : A +>a : A +>A : A + +interface B extends A { b: any; } +>B : B +>A : A +>b : any + +var a: A, b: B; +>a : A +>A : A +>b : B +>B : B + +var d = f(a, b, u2 => u2.b, t2 => t2); +>d : [any, B] +>f(a, b, u2 => u2.b, t2 => t2) : [any, B] +>f : (t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U) => [T, U] +>a : A +>b : B +>u2 => u2.b : (u2: B) => any +>u2 : B +>u2.b : any +>u2 : B +>b : any +>t2 => t2 : (t2: any) => any +>t2 : any +>t2 : any + diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js index 3cdb735adfb..fc0e10d41c9 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js @@ -29,11 +29,15 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} var a; -var b = function () { }; -var b2 = function () { }; +var b = function () { +}; +var b2 = function () { +}; var D = (function () { function D() { } diff --git a/tests/baselines/reference/typeParameterOrderReversal.js b/tests/baselines/reference/typeParameterOrderReversal.js index 40df6db0034..8c9185ba57c 100644 --- a/tests/baselines/reference/typeParameterOrderReversal.js +++ b/tests/baselines/reference/typeParameterOrderReversal.js @@ -15,8 +15,10 @@ tFirst(z); //// [typeParameterOrderReversal.js] // Only difference here is order of type parameters -function uFirst(x) { } -function tFirst(x) { } +function uFirst(x) { +} +function tFirst(x) { +} var z = null; // Both of these should be allowed uFirst(z); diff --git a/tests/baselines/reference/typeParameterUsedAsConstraint.js b/tests/baselines/reference/typeParameterUsedAsConstraint.js index b1c55343aa0..4649a53f8fc 100644 --- a/tests/baselines/reference/typeParameterUsedAsConstraint.js +++ b/tests/baselines/reference/typeParameterUsedAsConstraint.js @@ -66,18 +66,30 @@ var C6 = (function () { } return C6; })(); -function f() { } -function f2() { } -function f3() { } -function f4() { } -function f5() { } -function f6() { } -var e = function () { }; -var e2 = function () { }; -var e3 = function () { }; -var e4 = function () { }; -var e5 = function () { }; -var e6 = function () { }; +function f() { +} +function f2() { +} +function f3() { +} +function f4() { +} +function f5() { +} +function f6() { +} +var e = function () { +}; +var e2 = function () { +}; +var e3 = function () { +}; +var e4 = function () { +}; +var e5 = function () { +}; +var e6 = function () { +}; var a; var a2; var a3; diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js index c6c624f7e2b..a2f8aa2f9b7 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js @@ -78,26 +78,37 @@ interface I2 { //// [typeParametersAreIdenticalToThemselves.js] // type parameters from the same declaration are identical to themself -function foo1(x) { } -function foo2(x) { } +function foo1(x) { +} +function foo2(x) { +} function foo3(x, y) { - function inner(x) { } - function inner2(x) { } + function inner(x) { + } + function inner2(x) { + } } var C = (function () { function C() { } - C.prototype.foo1 = function (x) { }; - C.prototype.foo2 = function (a, x) { }; - C.prototype.foo3 = function (x) { }; - C.prototype.foo4 = function (x) { }; + C.prototype.foo1 = function (x) { + }; + C.prototype.foo2 = function (a, x) { + }; + C.prototype.foo3 = function (x) { + }; + C.prototype.foo4 = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo1 = function (x) { }; - C2.prototype.foo2 = function (a, x) { }; - C2.prototype.foo3 = function (x) { }; + C2.prototype.foo1 = function (x) { + }; + C2.prototype.foo2 = function (a, x) { + }; + C2.prototype.foo3 = function (x) { + }; return C2; })(); diff --git a/tests/baselines/reference/typeParametersInStaticAccessors.js b/tests/baselines/reference/typeParametersInStaticAccessors.js index c621de910bc..411a4eac69d 100644 --- a/tests/baselines/reference/typeParametersInStaticAccessors.js +++ b/tests/baselines/reference/typeParametersInStaticAccessors.js @@ -9,12 +9,15 @@ var foo = (function () { function foo() { } Object.defineProperty(foo, "Foo", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); Object.defineProperty(foo, "Bar", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index 1c8b2424a7e..a3ae0bd02c1 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -62,10 +62,14 @@ var C = (function () { var _this = this; this.x = x; this.ia = 1; - this.ib = function () { return _this.ia; }; + this.ib = function () { + return _this.ia; + }; } - C.foo = function (x) { }; - C.bar = function (x) { }; + C.foo = function (x) { + }; + C.bar = function (x) { + }; Object.defineProperty(C, "sc", { get: function () { return 1; @@ -82,7 +86,9 @@ var C = (function () { enumerable: true, configurable: true }); - C.prototype.baz = function (x) { return ''; }; + C.prototype.baz = function (x) { + return ''; + }; Object.defineProperty(C.prototype, "ic", { get: function () { return 1; @@ -100,7 +106,9 @@ var C = (function () { configurable: true }); C.sa = 1; - C.sb = function () { return 1; }; + C.sb = function () { + return 1; + }; return C; })(); var c; @@ -111,7 +119,8 @@ var D = (function () { function D(y) { this.y = y; } - D.prototype.foo = function () { }; + D.prototype.foo = function () { + }; return D; })(); var d; diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index 55a6beeceba..74102f5a0fd 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -224,21 +224,24 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1_2_2 = function () { }; + ClassA.prototype.AisIn1_2_2 = function () { + }; return ClassA; })(); SubSubModule2.ClassA = ClassA; var ClassB = (function () { function ClassB() { } - ClassB.prototype.BisIn1_2_2 = function () { }; + ClassB.prototype.BisIn1_2_2 = function () { + }; return ClassB; })(); SubSubModule2.ClassB = ClassB; var ClassC = (function () { function ClassC() { } - ClassC.prototype.CisIn1_2_2 = function () { }; + ClassC.prototype.CisIn1_2_2 = function () { + }; return ClassC; })(); SubSubModule2.ClassC = ClassC; @@ -247,7 +250,8 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1 = function () { }; + ClassA.prototype.AisIn1 = function () { + }; return ClassA; })(); var NotExportedModule; @@ -267,7 +271,8 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn2_3 = function () { }; + ClassA.prototype.AisIn2_3 = function () { + }; return ClassA; })(); SubModule3.ClassA = ClassA; diff --git a/tests/baselines/reference/typeResolution.js.map b/tests/baselines/reference/typeResolution.js.map index 6173573d306..b4aa7040531 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,IAAaA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAmBnBC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,GAANA,MAmBZA,CAAAA;gBACDA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAsBnBC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,GAANA,MAsBZA,CAAAA;gBAEDA,IAAMA,iBAAiBA;oBACnBO,SADEA,iBAAiBA;wBAEfC,SAASA,EAAEA;4BAEPC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;gBACpEA,MAAMA;gBACRW,SADEA,MAAMA;oBAEJC,SAASA,EAAEA;wBACPC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;oBAChDA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBO,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA,IAAMA,MAAMA;YAAZ0B,SAAMA,MAAMA;YAEZC,CAACA;YADUD,uBAAMA,GAAbA,cAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAAGC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,GAANA,MAAUA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAEnBC,CAACA;gBADUD,yBAAQA,GAAfA,cAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,GAANA,MAEZA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file +{"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;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,SAmBlBA,CAAAA;gBACDA;oBAAAI;oBAsBAC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,SAsBlBA,CAAAA;gBAEDA;oBACIO;wBACIC;4BAEIC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;;gBAEtEW;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;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;;oBAC7DC;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAI;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAO;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA;YAAA0B;YAEAC,CAACA;YADUD,uBAAMA,GAAbA;YAAkBE,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;gBAAoBE,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 diff --git a/tests/baselines/reference/typeResolution.sourcemap.txt b/tests/baselines/reference/typeResolution.sourcemap.txt index af7aa7cca93..54b2c44eae6 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -337,33 +337,22 @@ sourceFile:typeResolution.ts --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > ClassA 1->Emitted(8, 17) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(8, 21) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(8, 27) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassA 1->Emitted(9, 21) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -2 >Emitted(9, 30) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -3 >Emitted(9, 36) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +1->export class ClassA { > public AisIn1_1_1() { > // Try all qualified names of this type > var a1: ClassA; a1.AisIn1_1_1(); @@ -384,7 +373,7 @@ sourceFile:typeResolution.ts > } > 2 > } -1 >Emitted(10, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) +1->Emitted(10, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) 2 >Emitted(10, 22) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) --- >>> ClassA.prototype.AisIn1_1_1 = function () { @@ -825,68 +814,54 @@ sourceFile:typeResolution.ts >>> SubSubModule1.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ +3 > ^^^^^^^^^ +4 > ^ 1-> 2 > ClassA -3 > -4 > ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } -5 > +3 > { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } +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, 40) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(37, 46) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -5 >Emitted(37, 47) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +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) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export class -3 > ClassB 1 >Emitted(38, 17) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(38, 21) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(38, 27) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassB 1->Emitted(39, 21) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -2 >Emitted(39, 30) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -3 >Emitted(39, 36) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +1->export class ClassB { > public BisIn1_1_1() { > /** Exactly the same as above in AisIn1_1_1 **/ > @@ -910,7 +885,7 @@ sourceFile:typeResolution.ts > } > 2 > } -1 >Emitted(40, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) +1->Emitted(40, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) 2 >Emitted(40, 22) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) --- >>> ClassB.prototype.BisIn1_1_1 = function () { @@ -1400,88 +1375,67 @@ sourceFile:typeResolution.ts >>> SubSubModule1.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^^^^^^-> +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^-> 1-> 2 > ClassB -3 > -4 > ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } -5 > +3 > { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } +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, 40) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(70, 46) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -5 >Emitted(70, 47) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +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) --- >>> var NonExportedClassQ = (function () { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > export interface InterfaceX { XisIn1_1_1(); } > -2 > class -3 > NonExportedClassQ 1->Emitted(71, 17) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(71, 21) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(71, 38) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function NonExportedClassQ() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^ -1-> { +2 > ^^^^^^^^^^^^^^^^^^^^-> +1->class NonExportedClassQ { > -2 > -3 > NonExportedClassQ 1->Emitted(72, 21) Source(49, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -2 >Emitted(72, 30) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -3 >Emitted(72, 47) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) --- >>> function QQ() { -1 >^^^^^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - > constructor() { +1->^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->constructor() { > -2 > function -3 > QQ -1 >Emitted(73, 25) Source(50, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) -2 >Emitted(73, 34) Source(50, 30) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) -3 >Emitted(73, 36) Source(50, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +1->Emitted(73, 25) Source(50, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) --- >>> /* Sampling of stuff from AisIn1_1_1 */ 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->() { +1->function QQ() { > /* Sampling of stuff from AisIn1_1_1 */ > 2 > @@ -1785,41 +1739,20 @@ sourceFile:typeResolution.ts 3 >Emitted(88, 87) Source(61, 83) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> var ClassA = (function () { -1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^-> -1 > - > class -2 > ClassA -1 >Emitted(89, 17) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(89, 23) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1) ---- >>> function ClassA() { -1->^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ -4 > ^^^^^-> -1-> { +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^-> +1 > + > class ClassA { > -2 > -3 > ClassA -1->Emitted(90, 17) Source(63, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -2 >Emitted(90, 26) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -3 >Emitted(90, 32) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +1 >Emitted(90, 17) Source(63, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) --- >>> function AA() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^ -4 > ^-> -1-> { - > constructor() { +2 > ^^^^^^^^^^^^-> +1->constructor() { > -2 > function -3 > AA 1->Emitted(91, 21) Source(64, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) -2 >Emitted(91, 30) Source(64, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) -3 >Emitted(91, 32) Source(64, 28) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) --- >>> var a2; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1827,7 +1760,7 @@ sourceFile:typeResolution.ts 3 > ^^ 4 > ^ 5 > ^^^^^^^^^^-> -1->() { +1->function AA() { > 2 > var 3 > a2: SubSubModule1.ClassA @@ -2233,59 +2166,49 @@ sourceFile:typeResolution.ts 3 >Emitted(110, 78) Source(78, 74) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassA = (function () { -1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^-> -1 > - > export class -2 > ClassA -1 >Emitted(111, 21) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(111, 27) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) ---- >>> function ClassA() { -1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ -1-> -2 > export class -3 > ClassA -1->Emitted(112, 21) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(112, 30) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(112, 36) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^^-> +1 > + > +1 >Emitted(112, 21) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { public AisIn1_2_2() { } +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) +1->Emitted(113, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) 2 >Emitted(113, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1_2_2 = function () { }; +>>> ClassA.prototype.AisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn1_2_2 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 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn1_2_2() { +2 > } +1 >Emitted(115, 21) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +2 >Emitted(115, 22) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) --- >>> return ClassA; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +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) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(116, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2297,85 +2220,74 @@ 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) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(117, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(117, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(117, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ +3 > ^^^^^^^^^ +4 > ^ 1-> 2 > ClassA -3 > -4 > ClassA { public AisIn1_2_2() { } } -5 > -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, 40) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(117, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(117, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 > { public AisIn1_2_2() { } } +4 > +1->Emitted(118, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(118, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(118, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(118, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export class -3 > ClassB -1 >Emitted(118, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(118, 21) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(118, 27) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(119, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassB -1->Emitted(119, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(119, 30) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(119, 36) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(120, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { public BisIn1_2_2() { } +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) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +2 >Emitted(121, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) --- ->>> ClassB.prototype.BisIn1_2_2 = function () { }; +>>> ClassB.prototype.BisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > BisIn1_2_2 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) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(122, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(122, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public BisIn1_2_2() { +2 > } +1 >Emitted(123, 21) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +2 >Emitted(123, 22) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) --- >>> return ClassB; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +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(124, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(124, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2387,85 +2299,74 @@ 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(125, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(125, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(125, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(125, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ +3 > ^^^^^^^^^ +4 > ^ 1-> 2 > ClassB -3 > -4 > ClassB { public BisIn1_2_2() { } } -5 > -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, 40) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(124, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(124, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 > { public BisIn1_2_2() { } } +4 > +1->Emitted(126, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(126, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(126, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(126, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassC = (function () { 1 >^^^^^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 > export class -3 > ClassC -1 >Emitted(125, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(125, 21) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(125, 27) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(127, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassC() { 1->^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassC -1->Emitted(126, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(126, 30) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(126, 36) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(128, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> } -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { public CisIn1_2_2() { } +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(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +2 >Emitted(129, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) --- ->>> ClassC.prototype.CisIn1_2_2 = function () { }; +>>> ClassC.prototype.CisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > CisIn1_2_2 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(130, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(130, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(130, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public CisIn1_2_2() { +2 > } +1 >Emitted(131, 21) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +2 >Emitted(131, 22) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) --- >>> return ClassC; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(129, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(132, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(132, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2477,28 +2378,25 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassC { public CisIn1_2_2() { } } -1 >Emitted(130, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(130, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(130, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(130, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(133, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(133, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(133, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(133, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassC = ClassC; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > ClassC -3 > -4 > ClassC { public CisIn1_2_2() { } } -5 > -1->Emitted(131, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(131, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(131, 40) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(131, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(131, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 > { public CisIn1_2_2() { } } +4 > +1->Emitted(134, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(134, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(134, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(134, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); 1->^^^^^^^^^^^^^^^^ @@ -2531,16 +2429,16 @@ sourceFile:typeResolution.ts > export interface InterfaceY { YisIn1_2_2(); } > interface NonExportedInterfaceQ { } > } -1->Emitted(132, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(132, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(132, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(132, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(132, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(132, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -7 >Emitted(132, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -8 >Emitted(132, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -9 >Emitted(132, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -10>Emitted(132, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) +1->Emitted(135, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(135, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(135, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(135, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +5 >Emitted(135, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +6 >Emitted(135, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +7 >Emitted(135, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +8 >Emitted(135, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +9 >Emitted(135, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +10>Emitted(135, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- >>> })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); 1 >^^^^^^^^^^^^ @@ -2577,78 +2475,70 @@ sourceFile:typeResolution.ts > > export interface InterfaceY { YisIn1_2(); } > } -1 >Emitted(133, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(133, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(133, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(133, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(133, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(133, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(133, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -8 >Emitted(133, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -9 >Emitted(133, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -10>Emitted(133, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(136, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(136, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(136, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(136, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(136, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(136, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(136, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +8 >Emitted(136, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +9 >Emitted(136, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +10>Emitted(136, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > -2 > class -3 > ClassA -1 >Emitted(134, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(134, 13) Source(89, 11) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(134, 19) Source(89, 17) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(137, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > class -3 > ClassA -1->Emitted(135, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(135, 22) Source(89, 11) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(135, 28) Source(89, 17) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(138, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> } -1 >^^^^^^^^^^^^ +1->^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class ClassA { > 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(139, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +2 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1 = function () { }; +>>> ClassA.prototype.AisIn1 = function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn1 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(140, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(140, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(140, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) +--- +>>> }; +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn1() { +2 > } +1 >Emitted(141, 13) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +2 >Emitted(141, 14) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) --- >>> return ClassA; -1 >^^^^^^^^^^^^ +1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +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(142, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(142, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> })(); 1 >^^^^^^^^ @@ -2662,10 +2552,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(143, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(143, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(143, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(143, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var NotExportedModule; 1->^^^^^^^^ @@ -2685,10 +2575,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(144, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(144, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(144, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(144, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> (function (NotExportedModule) { 1->^^^^^^^^ @@ -2702,52 +2592,41 @@ 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(145, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(145, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(145, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(145, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(145, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > ClassA -1->Emitted(142, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(142, 17) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(142, 23) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(146, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassA -1->Emitted(143, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(143, 26) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(143, 32) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(147, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> } -1 >^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^-> -1 > { +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(148, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +2 >Emitted(148, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(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(149, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(149, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2759,28 +2638,25 @@ 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(150, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(150, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(150, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(150, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> NotExportedModule.ClassA = ClassA; 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^-> +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^-> 1-> 2 > ClassA -3 > -4 > ClassA { } -5 > -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, 40) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(147, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -5 >Emitted(147, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 > { } +4 > +1->Emitted(151, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(151, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(151, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(151, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> })(NotExportedModule || (NotExportedModule = {})); 1->^^^^^^^^ @@ -2801,13 +2677,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(152, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(152, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(152, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(152, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(152, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(152, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(152, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); 1->^^^^ @@ -2928,15 +2804,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(153, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(153, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(153, 8) Source(1, 15) + SourceIndex(0) +4 >Emitted(153, 23) Source(1, 30) + SourceIndex(0) +5 >Emitted(153, 26) Source(1, 15) + SourceIndex(0) +6 >Emitted(153, 49) Source(1, 30) + SourceIndex(0) +7 >Emitted(153, 54) Source(1, 15) + SourceIndex(0) +8 >Emitted(153, 77) Source(1, 30) + SourceIndex(0) +9 >Emitted(153, 85) Source(100, 2) + SourceIndex(0) --- >>> var TopLevelModule2; 1 >^^^^ @@ -2956,10 +2832,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(154, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(154, 9) Source(102, 8) + SourceIndex(0) +3 >Emitted(154, 24) Source(102, 23) + SourceIndex(0) +4 >Emitted(154, 25) Source(108, 2) + SourceIndex(0) --- >>> (function (TopLevelModule2) { 1->^^^^ @@ -2972,11 +2848,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(155, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(155, 16) Source(102, 8) + SourceIndex(0) +3 >Emitted(155, 31) Source(102, 23) + SourceIndex(0) +4 >Emitted(155, 33) Source(102, 24) + SourceIndex(0) +5 >Emitted(155, 34) Source(102, 25) + SourceIndex(0) --- >>> var SubModule3; 1 >^^^^^^^^ @@ -2993,10 +2869,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(156, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(156, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(156, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(156, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> (function (SubModule3) { 1->^^^^^^^^ @@ -3010,72 +2886,64 @@ 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(157, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(157, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(157, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(157, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(157, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 > export class -3 > ClassA -1->Emitted(154, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(154, 17) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(154, 23) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(158, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^^^^^^ +2 > ^^-> 1-> -2 > export class -3 > ClassA -1->Emitted(155, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(155, 26) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(155, 32) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(159, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> } -1 >^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->export class ClassA { > 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(160, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +2 >Emitted(160, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) --- ->>> ClassA.prototype.AisIn2_3 = function () { }; +>>> ClassA.prototype.AisIn2_3 = function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn2_3 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(161, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(161, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(161, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn2_3() { +2 > } +1 >Emitted(162, 17) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +2 >Emitted(162, 18) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) --- >>> return ClassA; -1 >^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +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(163, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(163, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -3089,30 +2957,27 @@ 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(164, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(164, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(164, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(164, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> SubModule3.ClassA = ClassA; 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > ClassA -3 > -4 > ClassA { - > public AisIn2_3() { } - > } -5 > -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, 33) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(160, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) -5 >Emitted(160, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 > { + > public AisIn2_3() { } + > } +4 > +1->Emitted(165, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(165, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(165, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(165, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); 1->^^^^^^^^ @@ -3138,15 +3003,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(166, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(166, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(166, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(166, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(166, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +6 >Emitted(166, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +7 >Emitted(166, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +8 >Emitted(166, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +9 >Emitted(166, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> })(TopLevelModule2 || (TopLevelModule2 = {})); 1 >^^^^ @@ -3170,13 +3035,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(167, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(167, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(167, 8) Source(102, 8) + SourceIndex(0) +4 >Emitted(167, 23) Source(102, 23) + SourceIndex(0) +5 >Emitted(167, 28) Source(102, 8) + SourceIndex(0) +6 >Emitted(167, 43) Source(102, 23) + SourceIndex(0) +7 >Emitted(167, 51) Source(108, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=typeResolution.js.map \ No newline at end of file diff --git a/tests/baselines/reference/typeVal.js b/tests/baselines/reference/typeVal.js index 264b40c5f16..7c1d506fbdc 100644 --- a/tests/baselines/reference/typeVal.js +++ b/tests/baselines/reference/typeVal.js @@ -9,5 +9,7 @@ I.I=4; //// [typeVal.js] -var I = { I: 3 }; +var I = { + I: 3 +}; I.I = 4; diff --git a/tests/baselines/reference/typedGenericPrototypeMember.js b/tests/baselines/reference/typedGenericPrototypeMember.js index e5ba2e0e75f..866bf500ded 100644 --- a/tests/baselines/reference/typedGenericPrototypeMember.js +++ b/tests/baselines/reference/typedGenericPrototypeMember.js @@ -10,7 +10,8 @@ List.prototype.add("abc"); // Valid because T is instantiated to any var List = (function () { function List() { } - List.prototype.add = function (item) { }; + List.prototype.add = function (item) { + }; return List; })(); List.prototype.add("abc"); // Valid because T is instantiated to any diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index bb41ddfab7a..7ce08d5f93a 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -54,7 +54,9 @@ export var r13: typeof foo; //// [typeofANonExportedType.js] var x = 1; exports.r1; -var y = { foo: '' }; +var y = { + foo: '' +}; exports.r2; var C = (function () { function C() { @@ -91,7 +93,8 @@ var E; exports.r10; exports.r11; exports.r12; -function foo() { } +function foo() { +} var foo; (function (foo) { foo.y = 1; diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index af6c405a3cf..20a0fe754e2 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -54,7 +54,9 @@ export var r13: typeof foo; //// [typeofAnExportedType.js] exports.x = 1; exports.r1; -exports.y = { foo: '' }; +exports.y = { + foo: '' +}; exports.r2; var C = (function () { function C() { @@ -93,7 +95,8 @@ var E = exports.E; exports.r10; exports.r11; exports.r12; -function foo() { } +function foo() { +} exports.foo = foo; var foo; (function (foo) { diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 1cef22bf2eb..cbad0068372 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -31,8 +31,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C(x) { } - C.foo = function (x) { }; - C.bar = function (x) { }; + C.foo = function (x) { + }; + C.bar = function (x) { + }; return C; })(); var D = (function (_super) { @@ -40,8 +42,10 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.baz = function (x) { }; - D.prototype.foo = function () { }; + D.baz = function (x) { + }; + D.prototype.foo = function () { + }; return D; })(C); var d; diff --git a/tests/baselines/reference/typeofInterface.js b/tests/baselines/reference/typeofInterface.js index 1f0bf72eebe..49e194db7fe 100644 --- a/tests/baselines/reference/typeofInterface.js +++ b/tests/baselines/reference/typeofInterface.js @@ -12,4 +12,6 @@ var j: typeof k.foo = { a: "hello" }; //// [typeofInterface.js] var I; var k; -var j = { a: "hello" }; +var j = { + a: "hello" +}; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js index a497519f249..422d49ae11e 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js @@ -78,9 +78,16 @@ z: typeof obj1.x; // typeof operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "a", y: function () { } }; +var obj1 = { + x: "a", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.js b/tests/baselines/reference/typeofOperatorWithBooleanType.js index 82af3eac26f..884371f9440 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.js +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.js @@ -53,11 +53,15 @@ z: typeof M.n; //// [typeofOperatorWithBooleanType.js] // typeof operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -69,7 +73,10 @@ var objA = new A(); var ResultIsString1 = typeof BOOLEAN; // boolean type literal var ResultIsString2 = typeof true; -var ResultIsString3 = typeof { x: true, y: false }; +var ResultIsString3 = typeof { + x: true, + y: false +}; // boolean type expressions var ResultIsString4 = typeof objA.a; var ResultIsString5 = typeof M.n; @@ -90,7 +97,10 @@ var x; var r; z: typeof BOOLEAN; r: typeof foo; -var y = { a: true, b: false }; +var y = { + a: true, + b: false +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.js b/tests/baselines/reference/typeofOperatorWithNumberType.js index 14b45ab518f..51e657e4019 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.js +++ b/tests/baselines/reference/typeofOperatorWithNumberType.js @@ -60,12 +60,19 @@ z: typeof M.n; //// [typeofOperatorWithNumberType.js] // typeof operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -78,8 +85,16 @@ var ResultIsString1 = typeof NUMBER; var ResultIsString2 = typeof NUMBER1; // number type literal var ResultIsString3 = typeof 1; -var ResultIsString4 = typeof { x: 1, y: 2 }; -var ResultIsString5 = typeof { x: 1, y: function (n) { return n; } }; +var ResultIsString4 = typeof { + x: 1, + y: 2 +}; +var ResultIsString5 = typeof { + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsString6 = typeof objA.a; var ResultIsString7 = typeof M.n; @@ -104,7 +119,10 @@ var x; z: typeof NUMBER; x: typeof NUMBER1; r: typeof foo; -var y = { a: 1, b: 2 }; +var y = { + a: 1, + b: 2 +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typeofOperatorWithStringType.js b/tests/baselines/reference/typeofOperatorWithStringType.js index 381205ff8c1..d5272844520 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.js +++ b/tests/baselines/reference/typeofOperatorWithStringType.js @@ -60,12 +60,19 @@ z: typeof M.n; //// [typeofOperatorWithStringType.js] // typeof operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -78,8 +85,16 @@ var ResultIsString1 = typeof STRING; var ResultIsString2 = typeof STRING1; // string type literal var ResultIsString3 = typeof ""; -var ResultIsString4 = typeof { x: "", y: "" }; -var ResultIsString5 = typeof { x: "", y: function (s) { return s; } }; +var ResultIsString4 = typeof { + x: "", + y: "" +}; +var ResultIsString5 = typeof { + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsString6 = typeof objA.a; var ResultIsString7 = typeof M.n; @@ -104,7 +119,10 @@ var r; z: typeof STRING; x: typeof STRING1; r: typeof foo; -var y = { a: "", b: "" }; +var y = { + a: "", + b: "" +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typesWithDuplicateTypeParameters.js b/tests/baselines/reference/typesWithDuplicateTypeParameters.js index cc80d4d57b4..f81f59d5307 100644 --- a/tests/baselines/reference/typesWithDuplicateTypeParameters.js +++ b/tests/baselines/reference/typesWithDuplicateTypeParameters.js @@ -19,5 +19,7 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} diff --git a/tests/baselines/reference/typesWithOptionalProperty.js b/tests/baselines/reference/typesWithOptionalProperty.js index 7c791cd599f..2056fab37e3 100644 --- a/tests/baselines/reference/typesWithOptionalProperty.js +++ b/tests/baselines/reference/typesWithOptionalProperty.js @@ -33,9 +33,20 @@ a = i; //// [typesWithOptionalProperty.js] // basic uses of optional properties without errors var a; -var b = { foo: '' }; -var c = { foo: '', bar: 3 }; -var d = { foo: '', bar: 3, baz: function () { return ''; } }; +var b = { + foo: '' +}; +var c = { + foo: '', + bar: 3 +}; +var d = { + foo: '', + bar: 3, + baz: function () { + return ''; + } +}; var i; i = b; i = c; diff --git a/tests/baselines/reference/uncaughtCompilerError1.js b/tests/baselines/reference/uncaughtCompilerError1.js index a09f8c949d5..39369c8e899 100644 --- a/tests/baselines/reference/uncaughtCompilerError1.js +++ b/tests/baselines/reference/uncaughtCompilerError1.js @@ -18,10 +18,16 @@ function f() { function f() { if (lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html') { if (index === (tokens.length - 1)) { - return { appendText: '\"\"', advanceCount: 1 }; + return { + appendText: '\"\"', + advanceCount: 1 + }; } else if (tokens[index + 1].type !== 'attribute.value.html' && tokens[index + 1].type !== '') { - return { appendText: '\"\"', advanceCount: 1 }; + return { + appendText: '\"\"', + advanceCount: 1 + }; } return null; } diff --git a/tests/baselines/reference/undeclaredBase.errors.txt b/tests/baselines/reference/undeclaredBase.errors.txt index b03108ac982..5a6d838284c 100644 --- a/tests/baselines/reference/undeclaredBase.errors.txt +++ b/tests/baselines/reference/undeclaredBase.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/undeclaredBase.ts(1,35): error TS2305: Module 'M' has no exported member 'I'. +tests/cases/compiler/undeclaredBase.ts(1,37): error TS2305: Module 'M' has no exported member 'I'. ==== tests/cases/compiler/undeclaredBase.ts (1 errors) ==== module M { export class C extends M.I { } } - ~~~ + ~ !!! error TS2305: Module 'M' has no exported member 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredMethod.js b/tests/baselines/reference/undeclaredMethod.js index 2cef06cc593..b2795938632 100644 --- a/tests/baselines/reference/undeclaredMethod.js +++ b/tests/baselines/reference/undeclaredMethod.js @@ -19,7 +19,8 @@ var M; var C = (function () { function C() { } - C.prototype.salt = function () { }; + C.prototype.salt = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index 0764840cadf..e7e9b70ee7b 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -17,7 +17,8 @@ function instrumentFile(covFileDir: string, covFileName: string, originalFilePat //// [undeclaredModuleError.js] define(["require", "exports", 'fs'], function (require, exports, fs) { - function readdir(path, accept, callback) { } + function readdir(path, accept, callback) { + } function join() { var paths = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/undefinedArgumentInference.js b/tests/baselines/reference/undefinedArgumentInference.js index 2e7501f23f0..ad74e9ebeb4 100644 --- a/tests/baselines/reference/undefinedArgumentInference.js +++ b/tests/baselines/reference/undefinedArgumentInference.js @@ -12,4 +12,7 @@ var z1 = foo1({ x: undefined, y: undefined }); function foo1(f1) { return undefined; } -var z1 = foo1({ x: undefined, y: undefined }); +var z1 = foo1({ + x: undefined, + y: undefined +}); diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index b1ef3e19edd..df87e7b0ad6 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -250,7 +250,8 @@ var D11 = (function (_super) { } return D11; })(Base); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js b/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js index f314f9ad111..61f248e56e7 100644 --- a/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js +++ b/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js @@ -9,8 +9,18 @@ var functions = [function() { //// [undefinedSymbolReferencedInArrayLiteral1.js] -var tokens = [{ startIndex: deltaOffset }]; -var functions = [function () { - [1, 2, 3].NonexistantMethod(); +var tokens = [ + { + startIndex: deltaOffset + } +]; +var functions = [ + function () { + [ + 1, + 2, + 3 + ].NonexistantMethod(); anotherNonExistingMethod(); - }]; + } +]; diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index a4fa2cbc65d..bc6bf9b615a 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -904,73 +904,428 @@ _.template("Using 'with': <%= data.answer %>", { answer: 'no' }, { variable: 'da //// [underscoreTest1_underscore.js] //// [underscoreTest1_underscoreTests.js] /// -_.each([1, 2, 3], function (num) { return alert(num.toString()); }); -_.each({ one: 1, two: 2, three: 3 }, function (value, key) { return alert(value.toString()); }); -_.map([1, 2, 3], function (num) { return num * 3; }); -_.map({ one: 1, two: 2, three: 3 }, function (value, key) { return value * 3; }); -var sum = _.reduce([1, 2, 3], function (memo, num) { return memo + num; }, 0); -var list = [[0, 1], [2, 3], [4, 5]]; -var flat = _.reduceRight(list, function (a, b) { return a.concat(b); }, []); -var even = _.find([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -var evens = _.filter([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -var listOfPlays = [{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }]; -_.where(listOfPlays, { author: "Shakespeare", year: 1611 }); -var odds = _.reject([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -_.all([true, 1, null, 'yes'], _.identity); -_.any([null, 0, 'yes', false]); -_.contains([1, 2, 3], 3); -_.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); -var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }]; +_.each([ + 1, + 2, + 3 +], function (num) { + return alert(num.toString()); +}); +_.each({ + one: 1, + two: 2, + three: 3 +}, function (value, key) { + return alert(value.toString()); +}); +_.map([ + 1, + 2, + 3 +], function (num) { + return num * 3; +}); +_.map({ + one: 1, + two: 2, + three: 3 +}, function (value, key) { + return value * 3; +}); +var sum = _.reduce([ + 1, + 2, + 3 +], function (memo, num) { + return memo + num; +}, 0); +var list = [ + [ + 0, + 1 + ], + [ + 2, + 3 + ], + [ + 4, + 5 + ] +]; +var flat = _.reduceRight(list, function (a, b) { + return a.concat(b); +}, []); +var even = _.find([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +var evens = _.filter([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +var listOfPlays = [ + { + title: "Cymbeline", + author: "Shakespeare", + year: 1611 + }, + { + title: "The Tempest", + author: "Shakespeare", + year: 1611 + }, + { + title: "Other", + author: "Not Shakespeare", + year: 2012 + } +]; +_.where(listOfPlays, { + author: "Shakespeare", + year: 1611 +}); +var odds = _.reject([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +_.all([ + true, + 1, + null, + 'yes' +], _.identity); +_.any([ + null, + 0, + 'yes', + false +]); +_.contains([ + 1, + 2, + 3 +], 3); +_.invoke([ + [ + 5, + 1, + 7 + ], + [ + 3, + 2, + 1 + ] +], 'sort'); +var stooges = [ + { + name: 'moe', + age: 40 + }, + { + name: 'larry', + age: 50 + }, + { + name: 'curly', + age: 60 + } +]; _.pluck(stooges, 'name'); -_.max(stooges, function (stooge) { return stooge.age; }); -var numbers = [10, 5, 100, 2, 1000]; +_.max(stooges, function (stooge) { + return stooge.age; +}); +var numbers = [ + 10, + 5, + 100, + 2, + 1000 +]; _.min(numbers); -_.sortBy([1, 2, 3, 4, 5, 6], function (num) { return Math.sin(num); }); +_.sortBy([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return Math.sin(num); +}); // not sure how this is typechecking at all.. Math.floor(e) is number not string..? -_([1.3, 2.1, 2.4]).groupBy(function (e, i, list) { return Math.floor(e); }); -_.groupBy([1.3, 2.1, 2.4], function (num) { return Math.floor(num); }); -_.groupBy(['one', 'two', 'three'], 'length'); -_.countBy([1, 2, 3, 4, 5], function (num) { return num % 2 == 0 ? 'even' : 'odd'; }); -_.shuffle([1, 2, 3, 4, 5, 6]); +_([ + 1.3, + 2.1, + 2.4 +]).groupBy(function (e, i, list) { + return Math.floor(e); +}); +_.groupBy([ + 1.3, + 2.1, + 2.4 +], function (num) { + return Math.floor(num); +}); +_.groupBy([ + 'one', + 'two', + 'three' +], 'length'); +_.countBy([ + 1, + 2, + 3, + 4, + 5 +], function (num) { + return num % 2 == 0 ? 'even' : 'odd'; +}); +_.shuffle([ + 1, + 2, + 3, + 4, + 5, + 6 +]); // (function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4); -_.size({ one: 1, two: 2, three: 3 }); +_.size({ + one: 1, + two: 2, + three: 3 +}); /////////////////////////////////////////////////////////////////////////////////////// -_.first([5, 4, 3, 2, 1]); -_.initial([5, 4, 3, 2, 1]); -_.last([5, 4, 3, 2, 1]); -_.rest([5, 4, 3, 2, 1]); -_.compact([0, 1, false, 2, '', 3]); -_.flatten([1, 2, 3, 4]); -_.flatten([1, [2]]); +_.first([ + 5, + 4, + 3, + 2, + 1 +]); +_.initial([ + 5, + 4, + 3, + 2, + 1 +]); +_.last([ + 5, + 4, + 3, + 2, + 1 +]); +_.rest([ + 5, + 4, + 3, + 2, + 1 +]); +_.compact([ + 0, + 1, + false, + 2, + '', + 3 +]); +_.flatten([ + 1, + 2, + 3, + 4 +]); +_.flatten([ + 1, + [ + 2 + ] +]); // typescript doesn't like the elements being different -_.flatten([1, [2], [3, [[4]]]]); -_.flatten([1, [2], [3, [[4]]]], true); -_.without([1, 2, 1, 0, 3, 1, 4], 0, 1); -_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); -_.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); -_.difference([1, 2, 3, 4, 5], [5, 2, 10]); -_.uniq([1, 2, 1, 3, 1, 4]); -_.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -_.object(['moe', 'larry', 'curly'], [30, 40, 50]); -_.object([['moe', 30], ['larry', 40], ['curly', 50]]); -_.indexOf([1, 2, 3], 2); -_.lastIndexOf([1, 2, 3, 1, 2, 3], 2); -_.sortedIndex([10, 20, 30, 40, 50], 35); +_.flatten([ + 1, + [ + 2 + ], + [ + 3, + [ + [ + 4 + ] + ] + ] +]); +_.flatten([ + 1, + [ + 2 + ], + [ + 3, + [ + [ + 4 + ] + ] + ] +], true); +_.without([ + 1, + 2, + 1, + 0, + 3, + 1, + 4 +], 0, 1); +_.union([ + 1, + 2, + 3 +], [ + 101, + 2, + 1, + 10 +], [ + 2, + 1 +]); +_.intersection([ + 1, + 2, + 3 +], [ + 101, + 2, + 1, + 10 +], [ + 2, + 1 +]); +_.difference([ + 1, + 2, + 3, + 4, + 5 +], [ + 5, + 2, + 10 +]); +_.uniq([ + 1, + 2, + 1, + 3, + 1, + 4 +]); +_.zip([ + 'moe', + 'larry', + 'curly' +], [ + 30, + 40, + 50 +], [ + true, + false, + false +]); +_.object([ + 'moe', + 'larry', + 'curly' +], [ + 30, + 40, + 50 +]); +_.object([ + [ + 'moe', + 30 + ], + [ + 'larry', + 40 + ], + [ + 'curly', + 50 + ] +]); +_.indexOf([ + 1, + 2, + 3 +], 2); +_.lastIndexOf([ + 1, + 2, + 3, + 1, + 2, + 3 +], 2); +_.sortedIndex([ + 10, + 20, + 30, + 40, + 50 +], 35); _.range(10); _.range(1, 11); _.range(0, 30, 5); _.range(0, 30, 5); _.range(0); /////////////////////////////////////////////////////////////////////////////////////// -var func = function (greeting) { return greeting + ': ' + this.name; }; +var func = function (greeting) { + return greeting + ': ' + this.name; +}; // need a second var otherwise typescript thinks func signature is the above func type, // instead of the newly returned _bind => func type. -var func2 = _.bind(func, { name: 'moe' }, 'hi'); +var func2 = _.bind(func, { + name: 'moe' +}, 'hi'); func2(); var buttonView = { label: 'underscore', - onClick: function () { alert('clicked: ' + this.label); }, - onHover: function () { alert('hovering: ' + this.label); } + onClick: function () { + alert('clicked: ' + this.label); + }, + onHover: function () { + alert('hovering: ' + this.label); + } }; _.bindAll(buttonView); $('#underscore_button').bind('click', buttonView.onClick); @@ -984,55 +1339,153 @@ var log = _.bind(function (message) { } }, Date); _.delay(log, 1000, 'logged later'); -_.defer(function () { alert('deferred'); }); -var updatePosition = function () { return alert('updating position...'); }; +_.defer(function () { + alert('deferred'); +}); +var updatePosition = function () { + return alert('updating position...'); +}; var throttled = _.throttle(updatePosition, 100); $(null).scroll(throttled); -var calculateLayout = function () { return alert('calculating layout...'); }; +var calculateLayout = function () { + return alert('calculating layout...'); +}; var lazyLayout = _.debounce(calculateLayout, 300); $(null).resize(lazyLayout); -var createApplication = function () { return alert('creating application...'); }; +var createApplication = function () { + return alert('creating application...'); +}; var initialize = _.once(createApplication); initialize(); initialize(); var notes; -var render = function () { return alert("rendering..."); }; +var render = function () { + return alert("rendering..."); +}; var renderNotes = _.after(notes.length, render); -_.each(notes, function (note) { return note.asyncSave({ success: renderNotes }); }); -var hello = function (name) { return "hello: " + name; }; -hello = _.wrap(hello, function (func, arg) { return "before, " + func(arg) + ", after"; }); +_.each(notes, function (note) { + return note.asyncSave({ + success: renderNotes + }); +}); +var hello = function (name) { + return "hello: " + name; +}; +hello = _.wrap(hello, function (func, arg) { + return "before, " + func(arg) + ", after"; +}); hello("moe"); -var greet = function (name) { return "hi: " + name; }; -var exclaim = function (statement) { return statement + "!"; }; +var greet = function (name) { + return "hi: " + name; +}; +var exclaim = function (statement) { + return statement + "!"; +}; var welcome = _.compose(exclaim, greet); welcome('moe'); /////////////////////////////////////////////////////////////////////////////////////// -_.keys({ one: 1, two: 2, three: 3 }); -_.values({ one: 1, two: 2, three: 3 }); -_.pairs({ one: 1, two: 2, three: 3 }); -_.invert({ Moe: "Moses", Larry: "Louis", Curly: "Jerome" }); +_.keys({ + one: 1, + two: 2, + three: 3 +}); +_.values({ + one: 1, + two: 2, + three: 3 +}); +_.pairs({ + one: 1, + two: 2, + three: 3 +}); +_.invert({ + Moe: "Moses", + Larry: "Louis", + Curly: "Jerome" +}); _.functions(_); -_.extend({ name: 'moe' }, { age: 50 }); -_.pick({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); -_.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid'); -var iceCream = { flavor: "chocolate" }; -_.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); -_.clone({ name: 'moe' }); -_.chain([1, 2, 3, 200]).filter(function (num) { return num % 2 == 0; }).tap(alert).map(function (num) { return num * num; }).value(); -_.has({ a: 1, b: 2, c: 3 }, "b"); -var moe = { name: 'moe', luckyNumbers: [13, 27, 34] }; -var clone = { name: 'moe', luckyNumbers: [13, 27, 34] }; +_.extend({ + name: 'moe' +}, { + age: 50 +}); +_.pick({ + name: 'moe', + age: 50, + userid: 'moe1' +}, 'name', 'age'); +_.omit({ + name: 'moe', + age: 50, + userid: 'moe1' +}, 'userid'); +var iceCream = { + flavor: "chocolate" +}; +_.defaults(iceCream, { + flavor: "vanilla", + sprinkles: "lots" +}); +_.clone({ + name: 'moe' +}); +_.chain([ + 1, + 2, + 3, + 200 +]).filter(function (num) { + return num % 2 == 0; +}).tap(alert).map(function (num) { + return num * num; +}).value(); +_.has({ + a: 1, + b: 2, + c: 3 +}, "b"); +var moe = { + name: 'moe', + luckyNumbers: [ + 13, + 27, + 34 + ] +}; +var clone = { + name: 'moe', + luckyNumbers: [ + 13, + 27, + 34 + ] +}; moe == clone; _.isEqual(moe, clone); -_.isEmpty([1, 2, 3]); +_.isEmpty([ + 1, + 2, + 3 +]); _.isEmpty({}); _.isElement($('body')[0]); -(function () { return _.isArray(arguments); })(); -_.isArray([1, 2, 3]); +(function () { + return _.isArray(arguments); +})(); +_.isArray([ + 1, + 2, + 3 +]); _.isObject({}); _.isObject(1); // (() => { return _.isArguments(arguments); })(1, 2, 3); -_.isArguments([1, 2, 3]); +_.isArguments([ + 1, + 2, + 3 +]); _.isFunction(alert); _.isString("moe"); _.isNumber(8.4 * 5); @@ -1049,10 +1502,14 @@ _.isNull(undefined); _.isUndefined(null.missingVariable); /////////////////////////////////////////////////////////////////////////////////////// var underscore = _.noConflict(); -var moe2 = { name: 'moe' }; +var moe2 = { + name: 'moe' +}; moe2 === _.identity(moe); var genie; -_.times(3, function (n) { genie.grantWishNumber(n); }); +_.times(3, function (n) { + genie.grantWishNumber(n); +}); _.random(0, 100); _.mixin({ capitalize: function (string) { @@ -1062,20 +1519,43 @@ _.mixin({ _("fabio").capitalize(); _.uniqueId('contact_'); _.escape('Curly, Larry & Moe'); -var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; +var object = { + cheese: 'crumpets', + stuff: function () { + return 'nonsense'; + } +}; _.result(object, 'cheese'); _.result(object, 'stuff'); var compiled = _.template("hello: <%= name %>"); -compiled({ name: 'moe' }); +compiled({ + name: 'moe' +}); var list2 = "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>"; -_.template(list2, { people: ['moe', 'curly', 'larry'] }); +_.template(list2, { + people: [ + 'moe', + 'curly', + 'larry' + ] +}); var template = _.template("<%- value %>"); -template({ value: '